CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Attributes
MuScleFitPlotter Class Reference

#include <MuScleFitPlotter.h>

Public Member Functions

void fillGen (const reco::GenParticleCollection &genParticles, bool=false)
 
void fillGen (const edm::HepMCProduct &evtMC, bool sherpaFlag_)
 
void fillGenSim (edm::Handle< edm::HepMCProduct > evtMC, edm::Handle< edm::SimTrackContainer > simTracks)
 
void fillHistoMap ()
 
void fillRec (std::vector< MuScleFitMuon > &muons)
 Used when running on the root tree containing preselected muon pairs. More...
 
void fillSim (edm::Handle< edm::SimTrackContainer > simTracks)
 
void fillTreeGen (const std::vector< std::pair< reco::Particle::LorentzVector, reco::Particle::LorentzVector > > &genPairs)
 
void fillTreeRec (const std::vector< std::pair< reco::Particle::LorentzVector, reco::Particle::LorentzVector > > &savedPairs)
 Used when running on the root tree containing preselected muon pairs. More...
 
 MuScleFitPlotter (std::string)
 
void writeHistoMap ()
 
virtual ~MuScleFitPlotter ()
 

Public Attributes

bool debug
 

Private Attributes

std::map< std::string, Histograms * > mapHisto
 
TFile * outputFile
 

Detailed Description

Plotter of the muon info (sim,gen,rec)

Author
C.Mariotti, S.Bolognesi - INFN Torino / T.Dorigo - INFN Padova revised S. Casasso, E. Migliore - UniTo & INFN Torino

Definition at line 27 of file MuScleFitPlotter.h.

Constructor & Destructor Documentation

MuScleFitPlotter::MuScleFitPlotter ( std::string  theGenInfoRootFileName)

Definition at line 35 of file MuScleFitPlotter.cc.

References fillHistoMap(), and outputFile.

35  {
36  outputFile = new TFile(theGenInfoRootFileName.c_str(),"RECREATE");
37  fillHistoMap();
38 }
MuScleFitPlotter::~MuScleFitPlotter ( )
virtual

Definition at line 40 of file MuScleFitPlotter.cc.

References outputFile, and writeHistoMap().

40  {
41  outputFile->cd();
42  writeHistoMap();
43  outputFile->Close();
44 }

Member Function Documentation

void MuScleFitPlotter::fillGen ( const reco::GenParticleCollection genParticles,
bool  PATmuons = false 
)

Definition at line 48 of file MuScleFitPlotter.cc.

References funct::abs(), gather_cfg::cout, mapHisto, common_cff::pdgId, and mps_update::status.

Referenced by MuScleFitMuonSelector::selectGeneratedMuons(), and MuScleFitMuonSelector::selectGenSimMuons().

49 {
50  // bool prova = false;
51  //Loop on generated particles
52  std::pair<reco::Particle::LorentzVector,reco::Particle::LorentzVector> muFromRes;
54 
55  int mothersFound[] = {0, 0, 0, 0, 0, 0};
56 
57  for( reco::GenParticleCollection::const_iterator mcIter=genParticles.begin(); mcIter!=genParticles.end(); ++mcIter ) {
58  int status = mcIter->status();
59  int pdgId = std::abs(mcIter->pdgId());
60  //Check if it's a resonance
61  if( status == 2 &&
62  ( pdgId==23 || pdgId==443 || pdgId==100443 ||
63  pdgId==553 || pdgId==100553 || pdgId==200553 ) ) {
64  genRes = mcIter->p4();
65  // std::cout << "mother's mother = " << mcIter->mother()->pdgId() << std::endl;
66  if( pdgId == 23 ) mapHisto["hGenResZ"]->Fill(genRes);
67  else if( pdgId == 443 || pdgId == 100443 ) mapHisto["hGenResJPsi"]->Fill(genRes);
68  else if( pdgId == 553 || pdgId == 100553 || pdgId == 200553 ) mapHisto["hGenResUpsilon1S"]->Fill(genRes);
69  }
70  //Check if it's a muon from a resonance
71  if( status==1 && pdgId==13 && !PATmuons) {
72  int momPdgId = std::abs(mcIter->mother()->pdgId());
73  if( momPdgId==23 || momPdgId==443 || momPdgId==100443 ||
74  momPdgId==553 || momPdgId==100553 || momPdgId==200553 ) {
75  if( momPdgId == 23 ) mothersFound[0] = 1;
76  if( momPdgId == 443 || momPdgId == 100443 ) mothersFound[5] = 1;
77  if( momPdgId == 553 || momPdgId == 100553 || momPdgId == 200553 ) mothersFound[3] = 1;
78  mapHisto["hGenMu"]->Fill(mcIter->p4());
79  std::cout<<"genmu "<<mcIter->p4()<<std::endl;
80  if(mcIter->charge()>0){
81  muFromRes.first = mcIter->p4();
82  // prova = true;
83  }
84  else muFromRes.second = mcIter->p4();
85  }
86  }//if PATmuons you don't have the info of the mother !!! Here I assume is a JPsi
87  if( status==1 && pdgId==13 && PATmuons) {
88  mothersFound[5] = 1;
89  mapHisto["hGenMu"]->Fill(mcIter->p4());
90  std::cout<<"genmu "<<mcIter->p4()<<std::endl;
91  if(mcIter->charge()>0){
92  muFromRes.first = mcIter->p4();
93  // prova = true;
94  }
95  else muFromRes.second = mcIter->p4();
96  }
97  }
98  // if(!prova)
99  // std::cout<<"hgenmumu not found"<<std::endl;
100 
101  if( mothersFound[0] == 1 ) {
102  mapHisto["hGenMuMuZ"]->Fill(muFromRes.first+muFromRes.second);
103  mapHisto["hGenResVSMuZ"]->Fill( muFromRes.first, genRes, 1 );
104  mapHisto["hGenResVSMuZ"]->Fill( muFromRes.second,genRes, -1 );
105  }
106  if( mothersFound[3] == 1 ) {
107  mapHisto["hGenMuMuUpsilon1S"]->Fill(muFromRes.first+muFromRes.second);
108  mapHisto["hGenResVSMuUpsilon1S"]->Fill( muFromRes.first, genRes, 1 );
109  mapHisto["hGenResVSMuUpsilon1S"]->Fill( muFromRes.second,genRes, -1 );
110  }
111  if( mothersFound[5] == 1 ) {
112  mapHisto["hGenMuMuJPsi"]->Fill(muFromRes.first+muFromRes.second);
113  mapHisto["hGenResVSMuJPsi"]->Fill( muFromRes.first, genRes, 1 );
114  mapHisto["hGenResVSMuJPsi"]->Fill( muFromRes.second,genRes, -1 );
115  }
116 
117  mapHisto["hGenResVsSelf"]->Fill( genRes, genRes, 1 );
118 }
std::map< std::string, Histograms * > mapHisto
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Particle.h:21
void MuScleFitPlotter::fillGen ( const edm::HepMCProduct evtMC,
bool  sherpaFlag_ 
)

Definition at line 122 of file MuScleFitPlotter.cc.

References funct::abs(), edm::HepMCProduct::GetEvent(), mapHisto, common_cff::pdgId, and mps_update::status.

123 {
124  //Loop on generated particles
125  const HepMC::GenEvent* Evt = evtMC.GetEvent();
126  std::pair<reco::Particle::LorentzVector,reco::Particle::LorentzVector> muFromRes;
128 
129  int mothersFound[] = {0, 0, 0, 0, 0, 0};
130 
131  if( sherpaFlag_ ) {
132 
133  for (HepMC::GenEvent::particle_const_iterator part=Evt->particles_begin();
134  part!=Evt->particles_end(); part++) {
135  if (std::abs((*part)->pdg_id())==13 && (*part)->status()==1) {//looks for muon in the final state
136  bool fromRes = false;
137  for (HepMC::GenVertex::particle_iterator mother = (*part)->production_vertex()->particles_begin(HepMC::ancestors);//loops on the mother of the final state muons
138  mother != (*part)->production_vertex()->particles_end(HepMC::ancestors); ++mother) {
139  unsigned int motherPdgId = (*mother)->pdg_id();
140  if( motherPdgId == 13 && (*mother)->status() == 3 ) fromRes = true;
141  }
142  if(fromRes){
143  if((*part)->pdg_id()==13){
144  muFromRes.first = (lorentzVector((*part)->momentum().px(),(*part)->momentum().py(),
145  (*part)->momentum().pz(),(*part)->momentum().e()));
146  }
147  else if((*part)->pdg_id()==-13){
148  muFromRes.second = (lorentzVector((*part)->momentum().px(),(*part)->momentum().py(),
149  (*part)->momentum().pz(),(*part)->momentum().e()));
150  }
151  }
152  }
153 
154  }
155  mapHisto["hGenResZ"]->Fill(muFromRes.first+muFromRes.second);
156  }
157  else{
158  for (HepMC::GenEvent::particle_const_iterator part=Evt->particles_begin();
159  part!=Evt->particles_end(); part++) {
160  int status = (*part)->status();
161  int pdgId = std::abs((*part)->pdg_id());
162  //std::cout<<"PDG ID "<< (*part)->pdg_id() <<" status "<< (*part)->status()
163  //<<" pt "<<(*part)->momentum().perp()<< " eta "<<(*part)->momentum().eta()<<std::endl ;
164  //Check if it's a resonance
165  // For sherpa the resonance is not saved. The muons from the resonance can be identified
166  // by having as mother a muon of status 3.
167 
168  if (pdgId==13 && status==1) {
169  if( status==2 &&
170  ( pdgId==23 || pdgId==443 || pdgId==100443 ||
171  pdgId==553 || pdgId==100553 || pdgId==200553 ) ) {
172  genRes = reco::Particle::LorentzVector((*part)->momentum().px(),(*part)->momentum().py(),
173  (*part)->momentum().pz(),(*part)->momentum().e());
174 
175  if( pdgId == 23 ) mapHisto["hGenResZ"]->Fill(genRes);
176  if( pdgId == 443 ) mapHisto["hGenResJPsi"]->Fill(genRes);
177  if( pdgId == 553 ) {
178  // std::cout << "genRes mass = " << CLHEP::HepLorentzVector(genRes.x(),genRes.y(),genRes.z(),genRes.t()).m() << std::endl;
179  mapHisto["hGenResUpsilon1S"]->Fill(genRes);
180  }
181  }
182 
183  //Check if it's a muon from a resonance
184  if (pdgId==13 && status==1) {
185  bool fromRes=false;
186  for (HepMC::GenVertex::particle_iterator mother =
187  (*part)->production_vertex()->particles_begin(HepMC::ancestors);
188  mother != (*part)->production_vertex()->particles_end(HepMC::ancestors); ++mother) {
189  int motherPdgId = (*mother)->pdg_id();
190  if (motherPdgId==23 || motherPdgId==443 || motherPdgId==100443 ||
191  motherPdgId==553 || motherPdgId==100553 || motherPdgId==200553) {
192  fromRes=true;
193  if( motherPdgId == 23 ) mothersFound[0] = 1;
194  if( motherPdgId == 443 ) mothersFound[3] = 1;
195  if( motherPdgId == 553 ) mothersFound[5] = 1;
196  }
197  }
198 
199  if(fromRes) {
200  mapHisto["hGenMu"]->Fill(reco::Particle::LorentzVector((*part)->momentum().px(),(*part)->momentum().py(),
201  (*part)->momentum().pz(),(*part)->momentum().e()));
202  mapHisto["hGenMuVSEta"]->Fill(reco::Particle::LorentzVector((*part)->momentum().px(),(*part)->momentum().py(),
203  (*part)->momentum().pz(),(*part)->momentum().e()));
204  if((*part)->pdg_id()==-13)
205  muFromRes.first = (reco::Particle::LorentzVector((*part)->momentum().px(),(*part)->momentum().py(),
206  (*part)->momentum().pz(),(*part)->momentum().e()));
207  else
208  muFromRes.second = (reco::Particle::LorentzVector((*part)->momentum().px(),(*part)->momentum().py(),
209  (*part)->momentum().pz(),(*part)->momentum().e()));
210  }
211  }
212  }
213  }
214  }
215  if( mothersFound[0] == 1 ) {
216  mapHisto["hGenMuMuZ"]->Fill(muFromRes.first+muFromRes.second);
217  mapHisto["hGenResVSMuZ"]->Fill( muFromRes.first, genRes, 1 );
218  mapHisto["hGenResVSMuZ"]->Fill( muFromRes.second,genRes, -1 );
219  }
220  if( mothersFound[3] == 1 ) {
221  mapHisto["hGenMuMuUpsilon1S"]->Fill(muFromRes.first+muFromRes.second);
222  mapHisto["hGenResVSMuUpsilon1S"]->Fill( muFromRes.first, genRes, 1 );
223  mapHisto["hGenResVSMuUpsilon1S"]->Fill( muFromRes.second,genRes, -1 );
224  }
225  if( mothersFound[5] == 1 ) {
226  mapHisto["hGenMuMuJPsi"]->Fill(muFromRes.first+muFromRes.second);
227  mapHisto["hGenResVSMuJPsi"]->Fill( muFromRes.first, genRes, 1 );
228  mapHisto["hGenResVSMuJPsi"]->Fill( muFromRes.second,genRes, -1 );
229  }
230  mapHisto["hGenResVsSelf"]->Fill( genRes, genRes, 1 );
231 }
std::map< std::string, Histograms * > mapHisto
reco::Particle::LorentzVector lorentzVector
Definition: GenMuonPair.h:9
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:38
part
Definition: HCALResponse.h:20
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Particle.h:21
void MuScleFitPlotter::fillGenSim ( edm::Handle< edm::HepMCProduct evtMC,
edm::Handle< edm::SimTrackContainer simTracks 
)

Definition at line 277 of file MuScleFitPlotter.cc.

References MuScleFitUtils::findSimMuFromRes(), and mapHisto.

Referenced by MuScleFitMuonSelector::selectSimulatedMuons().

278 {
279  std::pair<reco::Particle::LorentzVector, reco::Particle::LorentzVector> simMuFromRes =
280  MuScleFitUtils::findSimMuFromRes(evtMC,simTracks);
281  //Fill resonance info
282  reco::Particle::LorentzVector rightSimRes = (simMuFromRes.first)+(simMuFromRes.second);
283  mapHisto["hSimRightRes"]->Fill(rightSimRes);
284  /*if ((std::abs(simMuFromRes.first.Eta())<2.5 && std::abs(simMuFromRes.second.Eta())<2.5)
285  && simMuFromRes.first.Pt()>2.5 && simMuFromRes.second.Pt()>2.5) {
286  }*/
287 }
std::map< std::string, Histograms * > mapHisto
static std::pair< lorentzVector, lorentzVector > findSimMuFromRes(const edm::Handle< edm::HepMCProduct > &evtMC, const edm::Handle< edm::SimTrackContainer > &simTracks)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Particle.h:21
void MuScleFitPlotter::fillHistoMap ( )

Definition at line 366 of file MuScleFitPlotter.cc.

References mapHisto.

Referenced by MuScleFitPlotter().

366  {
367 
368  // Generated Z and muons
369  // ---------------------
370  mapHisto["hGenResJPsi"] = new HParticle ("hGenResJPsi", 3., 3.1);
371  mapHisto["hGenResUpsilon1S"] = new HParticle ("hGenResUpsilon1S", 9., 11.);
372  mapHisto["hGenResZ"] = new HParticle ("hGenResZ", 60., 120.);
373  mapHisto["hGenMu"] = new HParticle ("hGenMu");
374  mapHisto["hGenMuVSEta"] = new HPartVSEta ("hGenMuVSEta");
375 
376  mapHisto["hGenMuMuJPsi"] = new HParticle ("hGenMuMuJPsi",3., 3.1 );
377  mapHisto["hGenResVSMuJPsi"] = new HMassVSPart ("hGenResVSMuJPsi",3., 3.1);
378  mapHisto["hGenMuMuUpsilon1S"] = new HParticle ("hGenMuMuUpsilon1S", 9., 11.);
379  mapHisto["hGenResVSMuUpsilon1S"] = new HMassVSPart ("hGenResVSMuUpsilon1S", 9., 11.);
380  mapHisto["hGenMuMuZ"] = new HParticle ("hGenMuMuZ", 60., 120.);
381  mapHisto["hGenResVSMuZ"] = new HMassVSPart ("hGenResVSMuZ", 60., 120.);
382 
383  mapHisto["hGenResVsSelf"] = new HMassVSPart ("hGenResVsSelf");
384 
385  // Simulated resonance and muons
386  // -----------------------------
387  mapHisto["hSimMu"] = new HParticle ("hSimMu");
388 
389  mapHisto["hSimMuPMuM"] = new HParticle ("hSimMuPMuM");
390 
391  mapHisto["hSimBestMu"] = new HParticle ("hSimBestMu");
392  mapHisto["hSimBestRes"] = new HParticle ("hSimBestRes");
393  mapHisto["hSimBestResVSMu"] = new HMassVSPart ("hSimBestResVSMu");
394 
395  mapHisto["hSimRightRes"] = new HParticle ("hSimRightZ");
396 
397  // Reconstructed resonance and muons
398  // -----------------------------
399  mapHisto["hRecMu"] = new HParticle ("hRecMu");
400  mapHisto["hRecMuVSEta"] = new HPartVSEta ("hRecMuVSEta");
401  mapHisto["hRecMuPMuM"] = new HParticle ("hRecMuPMuM");
402 }
std::map< std::string, Histograms * > mapHisto
void MuScleFitPlotter::fillRec ( std::vector< MuScleFitMuon > &  muons)

Used when running on the root tree containing preselected muon pairs.

Definition at line 307 of file MuScleFitPlotter.cc.

References mapHisto.

Referenced by MuScleFitMuonSelector::selectMuons().

308 {
309  for(std::vector<MuScleFitMuon>::const_iterator mu1 = muons.begin(); mu1!=muons.end(); mu1++){
310  mapHisto["hRecMu"]->Fill(mu1->p4());
311  mapHisto["hRecMuVSEta"]->Fill(mu1->p4());
312  for(std::vector<MuScleFitMuon>::const_iterator mu2 = muons.begin(); mu2!=muons.end(); mu2++){
313  if (mu1->charge()<0 || mu2->charge()>0)
314  continue;
315  reco::Particle::LorentzVector Res (mu1->p4()+mu2->p4());
316  mapHisto["hRecMuPMuM"]->Fill(Res);
317  }
318  }
319  mapHisto["hRecMu"]->Fill(muons.size());
320 }
std::map< std::string, Histograms * > mapHisto
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Particle.h:21
void MuScleFitPlotter::fillSim ( edm::Handle< edm::SimTrackContainer simTracks)

Definition at line 235 of file MuScleFitPlotter.cc.

References funct::abs(), MuScleFitUtils::findBestSimuRes(), createfilelist::int, mapHisto, simTrackMatching_cfi::simTrack, and DOFs::Z.

Referenced by MuScleFitMuonSelector::selectSimulatedMuons().

236 {
237  std::vector<SimTrack> simMuons;
238 
239  //Loop on simulated tracks
240  for( edm::SimTrackContainer::const_iterator simTrack=simTracks->begin(); simTrack!=simTracks->end(); ++simTrack ) {
241  // Select the muons from all the simulated tracks
242  if (std::abs((*simTrack).type())==13) {
243  simMuons.push_back(*simTrack);
244  mapHisto["hSimMu"]->Fill((*simTrack).momentum());
245  }
246  }
247  mapHisto["hSimMu"]->Fill(simMuons.size());
248 
249  // Recombine all the possible Z from simulated muons
250  if( simMuons.size() >= 2 ) {
251  for( std::vector<SimTrack>::const_iterator imu=simMuons.begin(); imu != simMuons.end(); ++imu ) {
252  for( std::vector<SimTrack>::const_iterator imu2=imu+1; imu2!=simMuons.end(); ++imu2 ) {
253  if (imu==imu2) continue;
254 
255  // Try all the pairs with opposite charge
256  if (((*imu).charge()*(*imu2).charge())<0) {
257  reco::Particle::LorentzVector Z = (*imu).momentum()+(*imu2).momentum();
258  mapHisto["hSimMuPMuM"]->Fill(Z);
259  }
260  }
261  }
262 
263  // Plots for the best possible simulated resonance
264  std::pair<SimTrack,SimTrack> simMuFromBestRes = MuScleFitUtils::findBestSimuRes(simMuons);
265  reco::Particle::LorentzVector bestSimZ = (simMuFromBestRes.first).momentum()+(simMuFromBestRes.second).momentum();
266  mapHisto["hSimBestRes"]->Fill(bestSimZ);
267  if (std::abs(simMuFromBestRes.first.momentum().eta())<2.5 && std::abs(simMuFromBestRes.second.momentum().eta())<2.5 &&
268  simMuFromBestRes.first.momentum().pt()>2.5 && simMuFromBestRes.second.momentum().pt()>2.5) {
269  mapHisto["hSimBestResVSMu"]->Fill (simMuFromBestRes.first.momentum(), bestSimZ, int(simMuFromBestRes.first.charge()));
270  mapHisto["hSimBestResVSMu"]->Fill (simMuFromBestRes.second.momentum(),bestSimZ, int(simMuFromBestRes.second.charge()));
271  }
272  }
273 }
std::map< std::string, Histograms * > mapHisto
static std::pair< SimTrack, SimTrack > findBestSimuRes(const std::vector< SimTrack > &simMuons)
simTrack
per collection params
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Particle.h:21
void MuScleFitPlotter::fillTreeGen ( const std::vector< std::pair< reco::Particle::LorentzVector, reco::Particle::LorentzVector > > &  genPairs)

Used when running on the root tree and there is genInfo.
ATTENTION: since we do not have any id information when reading from the root tree, we always fill the Z histograms by default.

Definition at line 343 of file MuScleFitPlotter.cc.

References mapHisto.

Referenced by MuScleFit::selectMuons().

344 {
345  std::vector<std::pair<reco::Particle::LorentzVector, reco::Particle::LorentzVector> >::const_iterator genPair = genPairs.begin();
346  for( ; genPair != genPairs.end(); ++genPair ) {
347  reco::Particle::LorentzVector genRes(genPair->first+genPair->second);
348  mapHisto["hGenResZ"]->Fill(genRes);
349  mapHisto["hGenMu"]->Fill(genPair->first);
350  mapHisto["hGenMuVSEta"]->Fill(genPair->first);
351  mapHisto["hGenMuMuZ"]->Fill(genRes);
352  mapHisto["hGenResVSMuZ"]->Fill( genPair->first, genRes, 1 );
353  mapHisto["hGenResVSMuZ"]->Fill( genPair->second, genRes, -1 );
354  mapHisto["hGenMuMuUpsilon1S"]->Fill(genRes);
355  mapHisto["hGenResVSMuUpsilon1S"]->Fill( genPair->first, genRes, 1 );
356  mapHisto["hGenResVSMuUpsilon1S"]->Fill( genPair->second, genRes, -1 );
357  mapHisto["hGenMuMuJPsi"]->Fill(genRes);
358  mapHisto["hGenResVSMuJPsi"]->Fill( genPair->first, genRes, 1 );
359  mapHisto["hGenResVSMuJPsi"]->Fill( genPair->second, genRes, -1 );
360  mapHisto["hGenResVsSelf"]->Fill( genRes, genRes, 1 );
361  }
362 }
std::map< std::string, Histograms * > mapHisto
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Particle.h:21
void MuScleFitPlotter::fillTreeRec ( const std::vector< std::pair< reco::Particle::LorentzVector, reco::Particle::LorentzVector > > &  savedPairs)

Used when running on the root tree containing preselected muon pairs.

Definition at line 324 of file MuScleFitPlotter.cc.

References mapHisto.

Referenced by MuScleFit::selectMuons().

325 {
326  std::vector<std::pair<reco::Particle::LorentzVector, reco::Particle::LorentzVector> >::const_iterator muonPair = savedPairs.begin();
327  for( ; muonPair != savedPairs.end(); ++muonPair ) {
328  mapHisto["hRecMu"]->Fill(muonPair->first);
329  mapHisto["hRecMuVSEta"]->Fill(muonPair->first);
330  mapHisto["hRecMu"]->Fill(muonPair->second);
331  mapHisto["hRecMuVSEta"]->Fill(muonPair->second);
332  reco::Particle::LorentzVector Res( muonPair->first+muonPair->second );
333  mapHisto["hRecMuPMuM"]->Fill(Res);
334  mapHisto["hRecMu"]->Fill(savedPairs.size());
335  }
336 }
std::map< std::string, Histograms * > mapHisto
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Particle.h:21
void MuScleFitPlotter::writeHistoMap ( )

Definition at line 407 of file MuScleFitPlotter.cc.

References trackerHits::histo, mapHisto, and outputFile.

Referenced by ~MuScleFitPlotter().

407  {
408  outputFile->cd();
409  for (std::map<std::string, Histograms*>::const_iterator histo=mapHisto.begin();
410  histo!=mapHisto.end(); histo++) {
411  (*histo).second->Write();
412  }
413 }
std::map< std::string, Histograms * > mapHisto

Member Data Documentation

bool MuScleFitPlotter::debug

Definition at line 54 of file MuScleFitPlotter.h.

Referenced by MuScleFit::beginOfJobInConstructor().

std::map<std::string, Histograms*> MuScleFitPlotter::mapHisto
private
TFile* MuScleFitPlotter::outputFile
private

Definition at line 62 of file MuScleFitPlotter.h.

Referenced by MuScleFitPlotter(), writeHistoMap(), and ~MuScleFitPlotter().