CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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< reco::LeafCandidate > &muons)
 
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

Definition at line 25 of file MuScleFitPlotter.h.

Constructor & Destructor Documentation

MuScleFitPlotter::MuScleFitPlotter ( std::string  theGenInfoRootFileName)

Definition at line 34 of file MuScleFitPlotter.cc.

References fillHistoMap(), and outputFile.

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

Definition at line 39 of file MuScleFitPlotter.cc.

References outputFile, and writeHistoMap().

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

Member Function Documentation

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

Definition at line 47 of file MuScleFitPlotter.cc.

References funct::abs(), gather_cfg::cout, mapHisto, benchmark_cfg::pdgId, and ntuplemaker::status.

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

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

Definition at line 121 of file MuScleFitPlotter.cc.

References funct::abs(), edm::HepMCProduct::GetEvent(), mapHisto, benchmark_cfg::pdgId, and ntuplemaker::status.

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

Definition at line 276 of file MuScleFitPlotter.cc.

References MuScleFitUtils::findSimMuFromRes(), and mapHisto.

Referenced by MuScleFitMuonSelector::selectSimulatedMuons().

277 {
278  std::pair<reco::Particle::LorentzVector, reco::Particle::LorentzVector> simMuFromRes =
279  MuScleFitUtils::findSimMuFromRes(evtMC,simTracks);
280  //Fill resonance info
281  reco::Particle::LorentzVector rightSimRes = (simMuFromRes.first)+(simMuFromRes.second);
282  mapHisto["hSimRightRes"]->Fill(rightSimRes);
283  /*if ((fabs(simMuFromRes.first.Eta())<2.5 && fabs(simMuFromRes.second.Eta())<2.5)
284  && simMuFromRes.first.Pt()>2.5 && simMuFromRes.second.Pt()>2.5) {
285  }*/
286 }
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:27
void MuScleFitPlotter::fillHistoMap ( )

Definition at line 348 of file MuScleFitPlotter.cc.

References mapHisto.

Referenced by MuScleFitPlotter().

348  {
349 
350  // Generated Z and muons
351  // ---------------------
352  mapHisto["hGenResJPsi"] = new HParticle ("hGenResJPsi", 3., 3.1);
353  mapHisto["hGenResUpsilon1S"] = new HParticle ("hGenResUpsilon1S", 9., 11.);
354  mapHisto["hGenResZ"] = new HParticle ("hGenResZ", 60., 120.);
355  mapHisto["hGenMu"] = new HParticle ("hGenMu");
356  mapHisto["hGenMuVSEta"] = new HPartVSEta ("hGenMuVSEta");
357 
358  mapHisto["hGenMuMuJPsi"] = new HParticle ("hGenMuMuJPsi",3., 3.1 );
359  mapHisto["hGenResVSMuJPsi"] = new HMassVSPart ("hGenResVSMuJPsi",3., 3.1);
360  mapHisto["hGenMuMuUpsilon1S"] = new HParticle ("hGenMuMuUpsilon1S", 9., 11.);
361  mapHisto["hGenResVSMuUpsilon1S"] = new HMassVSPart ("hGenResVSMuUpsilon1S", 9., 11.);
362  mapHisto["hGenMuMuZ"] = new HParticle ("hGenMuMuZ", 60., 120.);
363  mapHisto["hGenResVSMuZ"] = new HMassVSPart ("hGenResVSMuZ", 60., 120.);
364 
365  mapHisto["hGenResVsSelf"] = new HMassVSPart ("hGenResVsSelf");
366 
367  // Simulated resonance and muons
368  // -----------------------------
369  mapHisto["hSimMu"] = new HParticle ("hSimMu");
370 
371  mapHisto["hSimMuPMuM"] = new HParticle ("hSimMuPMuM");
372 
373  mapHisto["hSimBestMu"] = new HParticle ("hSimBestMu");
374  mapHisto["hSimBestRes"] = new HParticle ("hSimBestRes");
375  mapHisto["hSimBestResVSMu"] = new HMassVSPart ("hSimBestResVSMu");
376 
377  mapHisto["hSimRightRes"] = new HParticle ("hSimRightZ");
378 
379  // Reconstructed resonance and muons
380  // -----------------------------
381  mapHisto["hRecMu"] = new HParticle ("hRecMu");
382  mapHisto["hRecMuVSEta"] = new HPartVSEta ("hRecMuVSEta");
383  mapHisto["hRecMuPMuM"] = new HParticle ("hRecMuPMuM");
384 }
std::map< std::string, Histograms * > mapHisto
void MuScleFitPlotter::fillRec ( std::vector< reco::LeafCandidate > &  muons)

Definition at line 290 of file MuScleFitPlotter.cc.

References mapHisto.

Referenced by MuScleFitMuonSelector::selectMuons().

291 {
292  for(std::vector<reco::LeafCandidate>::const_iterator mu1 = muons.begin(); mu1!=muons.end(); mu1++){
293  mapHisto["hRecMu"]->Fill(mu1->p4());
294  mapHisto["hRecMuVSEta"]->Fill(mu1->p4());
295  for(std::vector<reco::LeafCandidate>::const_iterator mu2 = muons.begin(); mu2!=muons.end(); mu2++){
296  if (mu1->charge()<0 || mu2->charge()>0)
297  continue;
298  reco::Particle::LorentzVector Res (mu1->p4()+mu2->p4());
299  mapHisto["hRecMuPMuM"]->Fill(Res);
300  }
301  }
302  mapHisto["hRecMu"]->Fill(muons.size());
303 }
std::map< std::string, Histograms * > mapHisto
tuple muons
Definition: patZpeak.py:38
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Particle.h:27
void MuScleFitPlotter::fillSim ( edm::Handle< edm::SimTrackContainer simTracks)

Definition at line 234 of file MuScleFitPlotter.cc.

References MuScleFitUtils::findBestSimuRes(), mapHisto, and Gflash::Z.

Referenced by MuScleFitMuonSelector::selectSimulatedMuons().

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

References mapHisto.

Referenced by MuScleFit::selectMuons().

326 {
327  std::vector<std::pair<reco::Particle::LorentzVector, reco::Particle::LorentzVector> >::const_iterator genPair = genPairs.begin();
328  for( ; genPair != genPairs.end(); ++genPair ) {
329  reco::Particle::LorentzVector genRes(genPair->first+genPair->second);
330  mapHisto["hGenResZ"]->Fill(genRes);
331  mapHisto["hGenMu"]->Fill(genPair->first);
332  mapHisto["hGenMuVSEta"]->Fill(genPair->first);
333  mapHisto["hGenMuMuZ"]->Fill(genRes);
334  mapHisto["hGenResVSMuZ"]->Fill( genPair->first, genRes, 1 );
335  mapHisto["hGenResVSMuZ"]->Fill( genPair->second, genRes, -1 );
336  mapHisto["hGenMuMuUpsilon1S"]->Fill(genRes);
337  mapHisto["hGenResVSMuUpsilon1S"]->Fill( genPair->first, genRes, 1 );
338  mapHisto["hGenResVSMuUpsilon1S"]->Fill( genPair->second, genRes, -1 );
339  mapHisto["hGenMuMuJPsi"]->Fill(genRes);
340  mapHisto["hGenResVSMuJPsi"]->Fill( genPair->first, genRes, 1 );
341  mapHisto["hGenResVSMuJPsi"]->Fill( genPair->second, genRes, -1 );
342  mapHisto["hGenResVsSelf"]->Fill( genRes, genRes, 1 );
343  }
344 }
std::map< std::string, Histograms * > mapHisto
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Particle.h:27
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 306 of file MuScleFitPlotter.cc.

References mapHisto.

Referenced by MuScleFit::selectMuons().

307 {
308  std::vector<std::pair<reco::Particle::LorentzVector, reco::Particle::LorentzVector> >::const_iterator muonPair = savedPairs.begin();
309  for( ; muonPair != savedPairs.end(); ++muonPair ) {
310  mapHisto["hRecMu"]->Fill(muonPair->first);
311  mapHisto["hRecMuVSEta"]->Fill(muonPair->first);
312  mapHisto["hRecMu"]->Fill(muonPair->second);
313  mapHisto["hRecMuVSEta"]->Fill(muonPair->second);
314  reco::Particle::LorentzVector Res( muonPair->first+muonPair->second );
315  mapHisto["hRecMuPMuM"]->Fill(Res);
316  mapHisto["hRecMu"]->Fill(savedPairs.size());
317  }
318 }
std::map< std::string, Histograms * > mapHisto
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Particle.h:27
void MuScleFitPlotter::writeHistoMap ( )

Definition at line 389 of file MuScleFitPlotter.cc.

References timingPdfMaker::histo, mapHisto, and outputFile.

Referenced by ~MuScleFitPlotter().

389  {
390  outputFile->cd();
391  for (std::map<std::string, Histograms*>::const_iterator histo=mapHisto.begin();
392  histo!=mapHisto.end(); histo++) {
393  (*histo).second->Write();
394  }
395 }
std::map< std::string, Histograms * > mapHisto

Member Data Documentation

bool MuScleFitPlotter::debug

Definition at line 51 of file MuScleFitPlotter.h.

Referenced by MuScleFit::beginOfJobInConstructor().

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

Definition at line 59 of file MuScleFitPlotter.h.

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