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)

Date:
2012/12/20 16:09:28
Revision:
1.6
Author
C.Mariotti, S.Bolognesi - INFN Torino / T.Dorigo - INFN Padova

Definition at line 27 of file MuScleFitPlotter.h.

Constructor & Destructor Documentation

MuScleFitPlotter::MuScleFitPlotter ( std::string  theGenInfoRootFileName)

Definition at line 36 of file MuScleFitPlotter.cc.

References fillHistoMap(), and outputFile.

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

Definition at line 41 of file MuScleFitPlotter.cc.

References outputFile, and writeHistoMap().

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

Member Function Documentation

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

Definition at line 49 of file MuScleFitPlotter.cc.

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

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

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

Definition at line 123 of file MuScleFitPlotter.cc.

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

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

Definition at line 278 of file MuScleFitPlotter.cc.

References MuScleFitUtils::findSimMuFromRes(), and mapHisto.

Referenced by MuScleFitMuonSelector::selectSimulatedMuons().

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

Definition at line 350 of file MuScleFitPlotter.cc.

References mapHisto.

Referenced by MuScleFitPlotter().

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

Definition at line 292 of file MuScleFitPlotter.cc.

References mapHisto.

Referenced by MuScleFitMuonSelector::selectMuons().

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

Definition at line 236 of file MuScleFitPlotter.cc.

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

Referenced by MuScleFitMuonSelector::selectSimulatedMuons().

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

References mapHisto.

Referenced by MuScleFit::selectMuons().

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

References mapHisto.

Referenced by MuScleFit::selectMuons().

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

Definition at line 391 of file MuScleFitPlotter.cc.

References timingPdfMaker::histo, mapHisto, and outputFile.

Referenced by ~MuScleFitPlotter().

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

Member Data Documentation

bool MuScleFitPlotter::debug

Definition at line 53 of file MuScleFitPlotter.h.

Referenced by MuScleFit::beginOfJobInConstructor().

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

Definition at line 61 of file MuScleFitPlotter.h.

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