CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
ZMuMu_efficiencyAnalyzer Class Reference
Inheritance diagram for ZMuMu_efficiencyAnalyzer:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 ZMuMu_efficiencyAnalyzer (const edm::ParameterSet &pset)
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

virtual void analyze (const edm::Event &event, const edm::EventSetup &setup) override
 
bool check_ifZmumu (const Candidate *dauGen0, const Candidate *dauGen1, const Candidate *dauGen2)
 
virtual void endJob () override
 
float getParticleEta (const int ipart, const Candidate *dauGen0, const Candidate *dauGen1, const Candidate *dauGen2)
 
Particle::LorentzVector getParticleP4 (const int ipart, const Candidate *dauGen0, const Candidate *dauGen1, const Candidate *dauGen2)
 
float getParticlePhi (const int ipart, const Candidate *dauGen0, const Candidate *dauGen1, const Candidate *dauGen2)
 
float getParticlePt (const int ipart, const Candidate *dauGen0, const Candidate *dauGen1, const Candidate *dauGen2)
 

Private Attributes

bool bothMuons_
 
unsigned int etaBins
 
double etamax_
 
double etaRange [7]
 
EDGetTokenT
< GenParticleCollection
genParticlesToken_
 
reco::CandidateBaseRef globalMuonCandRef_
 
TH1D * h_zmm1HLTminus_mass
 
TH1D * h_zmm1HLTplus_mass
 
TH1D * h_zmm2HLT_mass
 
TH1D * h_zmm_mass
 
TH1D * h_zmmNotIsominus_mass
 
TH1D * h_zmmNotIsoplus_mass
 
TH1D * h_zmsminus_mass
 
TH1D * h_zmsplus_mass
 
TH1D * h_zmtminus_mass
 
TH1D * h_zmtplus_mass
 
vector< TH1D * > hmumu1HLTminus_eta
 
vector< TH1D * > hmumu1HLTminus_pt
 
vector< TH1D * > hmumu1HLTplus_eta
 
vector< TH1D * > hmumu1HLTplus_pt
 
vector< TH1D * > hmumu2HLTminus_eta
 
vector< TH1D * > hmumu2HLTminus_pt
 
vector< TH1D * > hmumu2HLTplus_eta
 
vector< TH1D * > hmumu2HLTplus_pt
 
vector< TH1D * > hmumuNotIsominus_eta
 
vector< TH1D * > hmumuNotIsominus_pt
 
vector< TH1D * > hmumuNotIsoplus_eta
 
vector< TH1D * > hmumuNotIsoplus_pt
 
vector< TH1D * > hmustaminus_eta
 
vector< TH1D * > hmustaminus_pt
 
vector< TH1D * > hmustaplus_eta
 
vector< TH1D * > hmustaplus_pt
 
vector< TH1D * > hmutrackminus_eta
 
vector< TH1D * > hmutrackminus_pt
 
vector< TH1D * > hmutrackplus_eta
 
vector< TH1D * > hmutrackplus_pt
 
double isoMax_
 
double massMax_
 
double massMin_
 
EDGetTokenT< CandidateViewmuonsToken_
 
int nGlobalMuonsMatched_passed
 
OverlapChecker overlap_
 
EDGetTokenT< VertexCollectionprimaryVerticesToken_
 
unsigned int ptBins
 
double ptmin_
 
double ptRange [5]
 
reco::CandidateBaseRef standAloneMuonCandRef_
 
reco::CandidateBaseRef trackMuonCandRef_
 
EDGetTokenT< CandidateViewtracksToken_
 
EDGetTokenT< GenParticleMatchzMuMuMatchMapToken_
 
EDGetTokenT< CandidateViewzMuMuToken_
 
EDGetTokenT< GenParticleMatchzMuStandAloneMatchMapToken_
 
EDGetTokenT< CandidateViewzMuStandAloneToken_
 
EDGetTokenT< GenParticleMatchzMuTrackMatchMapToken_
 
EDGetTokenT< CandidateViewzMuTrackToken_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 46 of file ZMuMu_efficiencyAnalyzer.cc.

Constructor & Destructor Documentation

ZMuMu_efficiencyAnalyzer::ZMuMu_efficiencyAnalyzer ( const edm::ParameterSet pset)

Definition at line 105 of file ZMuMu_efficiencyAnalyzer.cc.

References gather_cfg::cout, etaBins, etaRange, h_zmm1HLTminus_mass, h_zmm1HLTplus_mass, h_zmm2HLT_mass, h_zmm_mass, h_zmmNotIsominus_mass, h_zmmNotIsoplus_mass, h_zmsminus_mass, h_zmsplus_mass, h_zmtminus_mass, h_zmtplus_mass, hmumu1HLTminus_eta, hmumu1HLTminus_pt, hmumu1HLTplus_eta, hmumu1HLTplus_pt, hmumu2HLTminus_eta, hmumu2HLTminus_pt, hmumu2HLTplus_eta, hmumu2HLTplus_pt, hmumuNotIsominus_eta, hmumuNotIsominus_pt, hmumuNotIsoplus_eta, hmumuNotIsoplus_pt, hmustaminus_eta, hmustaminus_pt, hmustaplus_eta, hmustaplus_pt, hmutrackminus_eta, hmutrackminus_pt, hmutrackplus_eta, hmutrackplus_pt, i, TFileDirectory::make(), TFileService::make(), TFileService::mkdir(), nGlobalMuonsMatched_passed, ptBins, and ptRange.

105  :
106  zMuMuToken_(consumes<CandidateView>(pset.getParameter<InputTag>("zMuMu"))),
107  zMuMuMatchMapToken_(mayConsume<GenParticleMatch>(pset.getParameter<InputTag>("zMuMuMatchMap"))),
108  zMuStandAloneToken_(consumes<CandidateView>(pset.getParameter<InputTag>("zMuStandAlone"))),
109  zMuStandAloneMatchMapToken_(mayConsume<GenParticleMatch>(pset.getParameter<InputTag>("zMuStandAloneMatchMap"))),
110  zMuTrackToken_(consumes<CandidateView>(pset.getParameter<InputTag>("zMuTrack"))),
111  zMuTrackMatchMapToken_(mayConsume<GenParticleMatch>(pset.getParameter<InputTag>("zMuTrackMatchMap"))),
112  muonsToken_(consumes<CandidateView>(pset.getParameter<InputTag>("muons"))),
113  tracksToken_(consumes<CandidateView>(pset.getParameter<InputTag>("tracks"))),
114  genParticlesToken_(consumes<GenParticleCollection>(pset.getParameter<InputTag>("genParticles"))),
115  primaryVerticesToken_(consumes<VertexCollection>(pset.getParameter<InputTag>("primaryVertices"))),
116 
117  bothMuons_(pset.getParameter<bool>("bothMuons")),
118 
119  etamax_(pset.getUntrackedParameter<double>("etamax")),
120  ptmin_(pset.getUntrackedParameter<double>("ptmin")),
121  massMin_(pset.getUntrackedParameter<double>("zMassMin")),
122  massMax_(pset.getUntrackedParameter<double>("zMassMax")),
123  isoMax_(pset.getUntrackedParameter<double>("isomax")) {
125 
126  // general histograms
127  h_zmm_mass = fs->make<TH1D>("zmm_mass","zmumu mass",100,0.,200.);
128  h_zmm2HLT_mass = fs->make<TH1D>("zmm2HLT_mass","zmumu 2HLT mass",100,0.,200.);
129  h_zmm1HLTplus_mass = fs->make<TH1D>("zmm1HLTplus_mass","zmumu 1HLT plus mass",100,0.,200.);
130  h_zmmNotIsoplus_mass = fs->make<TH1D>("zmmNotIsoplus_mass","zmumu a least One Not Iso plus mass",100,0.,200.);
131  h_zmsplus_mass = fs->make<TH1D>("zmsplus_mass","zmusta plus mass",100,0.,200.);
132  h_zmtplus_mass = fs->make<TH1D>("zmtplus_mass","zmutrack plus mass",100,0.,200.);
133  h_zmm1HLTminus_mass = fs->make<TH1D>("zmm1HLTminus_mass","zmumu 1HLT minus mass",100,0.,200.);
134  h_zmmNotIsominus_mass = fs->make<TH1D>("zmmNotIsominus_mass","zmumu a least One Not Iso minus mass",100,0.,200.);
135  h_zmsminus_mass = fs->make<TH1D>("zmsminus_mass","zmusta minus mass",100,0.,200.);
136  h_zmtminus_mass = fs->make<TH1D>("zmtminus_mass","zmutrack minus mass",100,0.,200.);
137 
138  cout << "primo" << endl;
139  // creating histograms for each Pt, eta interval
140 
141  TFileDirectory etaDirectory = fs->mkdir("etaIntervals"); // in this directory will be saved all the histos of different eta intervals
142  TFileDirectory ptDirectory = fs->mkdir("ptIntervals"); // in this directory will be saved all the histos of different pt intervals
143 
144  // binning of entries array (at moment defined by hand and not in cfg file)
145  etaBins = 6;
146  ptBins = 4;
147  double etaRangeTmp[7] = {-2.,-1.2,-0.8,0.,0.8,1.2,2.};
148  double ptRangeTmp[5] = {20.,40.,60.,80.,100.};
149  for (unsigned int i=0;i<=etaBins;i++) etaRange[i] = etaRangeTmp[i];
150  for (unsigned int i=0;i<=ptBins;i++) ptRange[i] = ptRangeTmp[i];
151 
152  // eta histograms creation
153  cout << "eta istograms creation " << endl;
154 
155  for (unsigned int i=0;i<etaBins;i++) {
156  cout << " bin eta plus " << i << endl;
157  // muon plus
158  double range0 = etaRange[i];
159  double range1= etaRange[i+1];
160  char ap[30], bp[50];
161  sprintf(ap,"zmumu2HLTplus_etaRange%d",i);
162  sprintf(bp,"zmumu2HLT plus mass eta Range %f to %f",range0,range1);
163  cout << ap << " " << bp << endl;
164  hmumu2HLTplus_eta.push_back(etaDirectory.make<TH1D>(ap,bp,200,0.,200.));
165  sprintf(ap,"zmumu1HLTplus_etaRange%d",i);
166  sprintf(bp,"zmumu1HLT plus mass eta Range %f to %f",range0,range1);
167  cout << ap << " " << bp << endl;
168  hmumu1HLTplus_eta.push_back(etaDirectory.make<TH1D>(ap,bp,200,0.,200.));
169  sprintf(ap,"zmustaplus_etaRange%d",i);
170  sprintf(bp,"zmusta plus mass eta Range %f to %f",range0,range1);
171  cout << ap << " " << bp << endl;
172  hmustaplus_eta.push_back(etaDirectory.make<TH1D>(ap,bp,50,0.,200.));
173  sprintf(ap,"zmutrackplus_etaRange%d",i);
174  sprintf(bp,"zmutrack plus mass eta Range %f to %f",range0,range1);
175  cout << ap << " " << bp << endl;
176  hmutrackplus_eta.push_back(etaDirectory.make<TH1D>(ap,bp,100,0.,200.));
177  sprintf(ap,"zmumuNotIsoplus_etaRange%d",i);
178  sprintf(bp,"zmumuNotIso plus mass eta Range %f to %f",range0,range1);
179  cout << ap << " " << bp << endl;
180  hmumuNotIsoplus_eta.push_back(etaDirectory.make<TH1D>(ap,bp,100,0.,200.));
181  // muon minus
182  cout << " bin eta minus " << i << endl;
183  char am[30], bm[50];
184  sprintf(am,"zmumu2HLTminus_etaRange%d",i);
185  sprintf(bm,"zmumu2HLT minus mass eta Range %f to %f",range0,range1);
186  cout << am << " " << bm << endl;
187  hmumu2HLTminus_eta.push_back(etaDirectory.make<TH1D>(am,bm,200,0.,200.));
188  sprintf(am,"zmumu1HLTminus_etaRange%d",i);
189  sprintf(bm,"zmumu1HLT minus mass eta Range %f to %f",range0,range1);
190  cout << am << " " << bm << endl;
191  hmumu1HLTminus_eta.push_back(etaDirectory.make<TH1D>(am,bm,200,0.,200.));
192  sprintf(am,"zmustaminus_etaRange%d",i);
193  sprintf(bm,"zmusta minus mass eta Range %f to %f",range0,range1);
194  cout << am << " " << bm << endl;
195  hmustaminus_eta.push_back(etaDirectory.make<TH1D>(am,bm,50,0.,200.));
196  sprintf(am,"zmutrackminus_etaRange%d",i);
197  sprintf(bm,"zmutrack minus mass eta Range %f to %f",range0,range1);
198  cout << am << " " << bm << endl;
199  hmutrackminus_eta.push_back(etaDirectory.make<TH1D>(am,bm,100,0.,200.));
200  sprintf(am,"zmumuNotIsominus_etaRange%d",i);
201  sprintf(bm,"zmumuNotIso minus mass eta Range %f to %f",range0,range1);
202  cout << am << " " << bm << endl;
203  hmumuNotIsominus_eta.push_back(etaDirectory.make<TH1D>(am,bm,100,0.,200.));
204  }
205 
206  // pt histograms creation
207  cout << "pt istograms creation " << endl;
208 
209  for (unsigned int i=0;i<ptBins;i++) {
210  double range0 = ptRange[i];
211  double range1= ptRange[i+1];
212  // muon plus
213  cout << " bin pt plus " << i << endl;
214  char ap1[30], bp1[50];
215  sprintf(ap1,"zmumu2HLTplus_ptRange%d",i);
216  sprintf(bp1,"zmumu2HLT plus mass pt Range %f to %f",range0,range1);
217  cout << ap1 << " " << bp1 << endl;
218  hmumu2HLTplus_pt.push_back(ptDirectory.make<TH1D>(ap1,bp1,200,0.,200.));
219  sprintf(ap1,"zmumu1HLTplus_ptRange%d",i);
220  sprintf(bp1,"zmumu1HLT plus mass pt Range %f to %f",range0,range1);
221  cout << ap1 << " " << bp1 << endl;
222  hmumu1HLTplus_pt.push_back(ptDirectory.make<TH1D>(ap1,bp1,200,0.,200.));
223  sprintf(ap1,"zmustaplus_ptRange%d",i);
224  sprintf(bp1,"zmusta plus mass pt Range %f to %f",range0,range1);
225  cout << ap1 << " " << bp1 << endl;
226  hmustaplus_pt.push_back(ptDirectory.make<TH1D>(ap1,bp1,50,0.,200.));
227  sprintf(ap1,"zmutrackplus_ptRange%d",i);
228  sprintf(bp1,"zmutrack plus mass pt Range %f to %f",range0,range1);
229  cout << ap1 << " " << bp1 << endl;
230  hmutrackplus_pt.push_back(ptDirectory.make<TH1D>(ap1,bp1,100,0.,200.));
231  sprintf(ap1,"zmumuNotIsoplus_ptRange%d",i);
232  sprintf(bp1,"zmumuNotIso plus mass pt Range %f to %f",range0,range1);
233  cout << ap1 << " " << bp1 << endl;
234  hmumuNotIsoplus_pt.push_back(ptDirectory.make<TH1D>(ap1,bp1,100,0.,200.));
235  // muon minus
236  cout << " bin pt minus " << i << endl;
237  char am1[30], bm1[50];
238  sprintf(am1,"zmumu2HLTminus_ptRange%d",i);
239  sprintf(bm1,"zmumu2HLT minus mass pt Range %f to %f",range0,range1);
240  cout << am1 << " " << bm1 << endl;
241  hmumu2HLTminus_pt.push_back(ptDirectory.make<TH1D>(am1,bm1,200,0.,200.));
242  sprintf(am1,"zmumu1HLTminus_ptRange%d",i);
243  sprintf(bm1,"zmumu1HLT minus mass pt Range %f to %f",range0,range1);
244  cout << am1 << " " << bm1 << endl;
245  hmumu1HLTminus_pt.push_back(ptDirectory.make<TH1D>(am1,bm1,200,0.,200.));
246  sprintf(am1,"zmustaminus_ptRange%d",i);
247  sprintf(bm1,"zmusta minus mass pt Range %f to %f",range0,range1);
248  cout << am1 << " " << bm1 << endl;
249  hmustaminus_pt.push_back(ptDirectory.make<TH1D>(am1,bm1,50,0.,200.));
250  sprintf(am1,"zmutrackminus_ptRange%d",i);
251  sprintf(bm1,"zmutrack minus mass pt Range %f to %f",range0,range1);
252  cout << am1 << " " << bm1 << endl;
253  hmutrackminus_pt.push_back(ptDirectory.make<TH1D>(am1,bm1,100,0.,200.));
254  sprintf(am1,"zmumuNotIsominus_ptRange%d",i);
255  sprintf(bm1,"zmumuNotIso minus mass pt Range %f to %f",range0,range1);
256  cout << am1 << " " << bm1 << endl;
257  hmumuNotIsominus_pt.push_back(ptDirectory.make<TH1D>(am1,bm1,100,0.,200.));
258  }
259 
260  // clear global counters
262 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
EDGetTokenT< GenParticleMatch > zMuMuMatchMapToken_
EDGetTokenT< CandidateView > muonsToken_
EDGetTokenT< GenParticleMatch > zMuStandAloneMatchMapToken_
EDGetTokenT< GenParticleCollection > genParticlesToken_
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
EDGetTokenT< CandidateView > tracksToken_
EDGetTokenT< GenParticleMatch > zMuTrackMatchMapToken_
EDGetTokenT< CandidateView > zMuTrackToken_
T * make(const Args &...args) const
make new ROOT object
EDGetTokenT< CandidateView > zMuStandAloneToken_
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
EDGetTokenT< VertexCollection > primaryVerticesToken_
tuple cout
Definition: gather_cfg.py:121
EDGetTokenT< CandidateView > zMuMuToken_

Member Function Documentation

void ZMuMu_efficiencyAnalyzer::analyze ( const edm::Event event,
const edm::EventSetup setup 
)
overrideprivatevirtual

Implements edm::EDAnalyzer.

Definition at line 264 of file ZMuMu_efficiencyAnalyzer.cc.

References funct::abs(), reco::Candidate::charge(), reco::Candidate::daughter(), reco::Candidate::eta(), eta(), etaBins, etamax_, etaRange, genParticleCandidates2GenParticles_cfi::genParticles, genParticlesToken_, h_zmm1HLTminus_mass, h_zmm1HLTplus_mass, h_zmm2HLT_mass, h_zmm_mass, h_zmsminus_mass, h_zmsplus_mass, h_zmtminus_mass, h_zmtplus_mass, hmumu1HLTminus_eta, hmumu1HLTminus_pt, hmumu1HLTplus_eta, hmumu1HLTplus_pt, hmumu2HLTminus_eta, hmumu2HLTminus_pt, hmumu2HLTplus_eta, hmumu2HLTplus_pt, hmustaminus_eta, hmustaminus_pt, hmustaplus_eta, hmustaplus_pt, hmutrackminus_eta, hmutrackminus_pt, hmutrackplus_eta, hmutrackplus_pt, i, reco::Muon::isGlobalMuon(), isoMax_, j, reco::Candidate::mass(), massMax_, massMin_, reco::Candidate::masterClone(), patZpeak::muons, muonsToken_, primaryVerticesToken_, RecoTauCleanerPlugins::pt, reco::Candidate::pt(), ptBins, ptmin_, ptRange, pat::Muon::trackIso(), pat::GenericParticle::trackIso(), testEve_cfg::tracks, tracksToken_, pat::PATObject< ObjectType >::triggerObjectMatchesByPath(), ZMuMuAnalysisNtupler_cff::zMuMu, zMuMuToken_, zMuStandAloneMatchMapToken_, zMuStandAloneToken_, zMuTrackMatchMapToken_, and zMuTrackToken_.

264  {
266  Handle<GenParticleMatch> zMuMuMatchMap; //Map of Z made by Mu global + Mu global
267  Handle<CandidateView> zMuStandAlone;
268  Handle<GenParticleMatch> zMuStandAloneMatchMap; //Map of Z made by Mu + StandAlone
269  Handle<CandidateView> zMuTrack;
270  Handle<GenParticleMatch> zMuTrackMatchMap; //Map of Z made by Mu + Track
271  Handle<CandidateView> muons; //Collection of Muons
272  Handle<CandidateView> tracks; //Collection of Tracks
273 
274  Handle<GenParticleCollection> genParticles; // Collection of Generatd Particles
275  Handle<VertexCollection> primaryVertices; // Collection of primary Vertices
276 
277  event.getByToken(zMuMuToken_, zMuMu);
278  event.getByToken(zMuStandAloneToken_, zMuStandAlone);
279  event.getByToken(zMuTrackToken_, zMuTrack);
280  event.getByToken(genParticlesToken_, genParticles);
281  event.getByToken(primaryVerticesToken_, primaryVertices);
282  event.getByToken(muonsToken_, muons);
283  event.getByToken(tracksToken_, tracks);
284 
285  /*
286  cout << "********* zMuMu size : " << zMuMu->size() << endl;
287  cout << "********* zMuStandAlone size : " << zMuStandAlone->size() << endl;
288  cout << "********* zMuTrack size : " << zMuTrack->size() << endl;
289  cout << "********* muons size : " << muons->size() << endl;
290  cout << "********* tracks size : " << tracks->size() << endl;
291  cout << "********* vertices size : " << primaryVertices->size() << endl;
292  */
293 
294  // std::cout<<"Run-> "<<event.id().run()<<std::endl;
295  // std::cout<<"Event-> "<<event.id().event()<<std::endl;
296 
297 
298 
299  bool zMuMu_found = false;
300  // loop on ZMuMu
301  if (zMuMu->size() > 0 ) {
302  for(unsigned int i = 0; i < zMuMu->size(); ++i) { //loop on candidates
303  const Candidate & zMuMuCand = (*zMuMu)[i]; //the candidate
304  CandidateBaseRef zMuMuCandRef = zMuMu->refAt(i);
305 
306  const Candidate * lep0 = zMuMuCand.daughter( 0 );
307  const Candidate * lep1 = zMuMuCand.daughter( 1 );
308  const pat::Muon & muonDau0 = dynamic_cast<const pat::Muon &>(*lep0->masterClone());
309  double trkiso0 = muonDau0.trackIso();
310  const pat::Muon & muonDau1 = dynamic_cast<const pat::Muon &>(*lep1->masterClone());
311  double trkiso1 = muonDau1.trackIso();
312 
313  // kinemtic variables
314  double pt0 = zMuMuCand.daughter(0)->pt();
315  double pt1 = zMuMuCand.daughter(1)->pt();
316  double eta0 = zMuMuCand.daughter(0)->eta();
317  double eta1 = zMuMuCand.daughter(1)->eta();
318  double charge0 = zMuMuCand.daughter(0)->charge();
319  double charge1 = zMuMuCand.daughter(1)->charge();
320  double mass = zMuMuCand.mass();
321 
322  // HLT match
323  const pat::TriggerObjectStandAloneCollection mu0HLTMatches =
324  muonDau0.triggerObjectMatchesByPath( "HLT_Mu9" );
325  const pat::TriggerObjectStandAloneCollection mu1HLTMatches =
326  muonDau1.triggerObjectMatchesByPath( "HLT_Mu9" );
327 
328  bool trig0found = false;
329  bool trig1found = false;
330  if( mu0HLTMatches.size()>0 )
331  trig0found = true;
332  if( mu1HLTMatches.size()>0 )
333  trig1found = true;
334 
335  // kinematic selection
336 
337  bool checkOppositeCharge = false;
338  if (charge0 != charge1) checkOppositeCharge = true;
339  if (pt0>ptmin_ && pt1>ptmin_ && abs(eta0)<etamax_ && abs(eta1)<etamax_ && mass>massMin_ && mass<massMax_ && checkOppositeCharge) {
340  if (trig0found || trig1found) { // at least one muon match HLT
341  zMuMu_found = true; // Z found as global-global (so don't check Zms and Zmt)
342  if (trkiso0 < isoMax_ && trkiso1 < isoMax_) { // both muons are isolated
343  if (trig0found && trig1found) {
344 
345  // ******************** category zmm 2 HLT ****************
346 
347  h_zmm2HLT_mass->Fill(mass);
348  h_zmm_mass->Fill(mass);
349 
350  // check the cynematics to fill correct histograms
351 
352  for (unsigned int j=0;j<etaBins;j++) { // eta Bins loop
353  double range0 = etaRange[j];
354  double range1= etaRange[j+1];
355 
356  // eta histograms
357 
358  if (eta0>=range0 && eta0<range1)
359  {
360  if (charge0<0) hmumu2HLTminus_eta[j]->Fill(mass); // mu- in bin eta
361  if (charge0>0) hmumu2HLTplus_eta[j]->Fill(mass); // mu+ in bin eta
362  }
363  if (eta1>=range0 && eta1<range1)
364  {
365  if (charge1<0) hmumu2HLTminus_eta[j]->Fill(mass); // mu- in bin eta
366  if (charge1>0) hmumu2HLTplus_eta[j]->Fill(mass); // mu+ in bin eta
367  }
368  } // end loop etaBins
369 
370  for (unsigned int j=0;j<ptBins;j++) { // pt Bins loop
371  double range0pt = ptRange[j];
372  double range1pt = ptRange[j+1];
373  // pt histograms
374  if (pt0>=range0pt && pt0<range1pt)
375  {
376  if (charge0<0) hmumu2HLTminus_pt[j]->Fill(mass); // mu- in bin eta
377  if (charge0>0) hmumu2HLTplus_pt[j]->Fill(mass); // mu+ in bin eta
378  }
379  if (pt1>=range0pt && pt1<range1pt)
380  {
381  if (charge1<0) hmumu2HLTminus_pt[j]->Fill(mass); // mu- in bin eta
382  if (charge1>0) hmumu2HLTplus_pt[j]->Fill(mass); // mu+ in bin eta
383  }
384  } // end loop ptBins
385 
386  } // ******************* end category zmm 2 HLT ****************
387 
388  if (!trig0found || !trig1found) {
389  // ****************** category zmm 1 HLT ******************
390  h_zmm_mass->Fill(mass);
391  double eta = 9999;
392  double pt = 9999;
393  double charge = 0;
394  if (trig0found) {
395  eta = eta1; // check muon not HLT matched
396  pt = pt1;
397  charge = charge1;
398  } else {
399  eta = eta0;
400  pt =pt0;
401  charge = charge0;
402  }
403  if (charge<0) h_zmm1HLTminus_mass->Fill(mass);
404  if (charge>0) h_zmm1HLTplus_mass->Fill(mass);
405 
406  for (unsigned int j=0;j<etaBins;j++) { // eta Bins loop
407  double range0 = etaRange[j];
408  double range1= etaRange[j+1];
409  // eta histograms fill the bin of the muon not HLT matched
410  if (eta>=range0 && eta<range1)
411  {
412  if (charge<0) hmumu1HLTminus_eta[j]->Fill(mass);
413  if (charge>0) hmumu1HLTplus_eta[j]->Fill(mass);
414  }
415  } // end loop etaBins
416  for (unsigned int j=0;j<ptBins;j++) { // pt Bins loop
417  double range0 = ptRange[j];
418  double range1= ptRange[j+1];
419  // pt histograms
420  if (pt>=range0 && pt<range1)
421  {
422  if (charge<0) hmumu1HLTminus_pt[j]->Fill(mass);
423  if (charge>0) hmumu1HLTplus_pt[j]->Fill(mass);
424  }
425  } // end loop ptBins
426 
427  } // ****************** end category zmm 1 HLT ***************
428 
429  } else { // one or both muons are not isolated
430  // ***************** category zmumuNotIso **************** (per ora non studio iso vs eta e pt da capire meglio)
431 
432  } // end if both muons isolated
433 
434  } // end if at least 1 HLT trigger found
435  } // end if kinematic selection
436 
437 
438  } // end loop on ZMuMu cand
439  } // end if ZMuMu size > 0
440 
441  // loop on ZMuSta
442  bool zMuSta_found = false;
443  if (!zMuMu_found && zMuStandAlone->size() > 0 ) {
444  event.getByToken(zMuStandAloneMatchMapToken_, zMuStandAloneMatchMap);
445  for(unsigned int i = 0; i < zMuStandAlone->size(); ++i) { //loop on candidates
446  const Candidate & zMuStandAloneCand = (*zMuStandAlone)[i]; //the candidate
447  CandidateBaseRef zMuStandAloneCandRef = zMuStandAlone->refAt(i);
448  GenParticleRef zMuStandAloneMatch = (*zMuStandAloneMatchMap)[zMuStandAloneCandRef];
449 
450  const Candidate * lep0 = zMuStandAloneCand.daughter( 0 );
451  const Candidate * lep1 = zMuStandAloneCand.daughter( 1 );
452  const pat::Muon & muonDau0 = dynamic_cast<const pat::Muon &>(*lep0->masterClone());
453  double trkiso0 = muonDau0.trackIso();
454  const pat::Muon & muonDau1 = dynamic_cast<const pat::Muon &>(*lep1->masterClone());
455  double trkiso1 = muonDau1.trackIso();
456  double pt0 = zMuStandAloneCand.daughter(0)->pt();
457  double pt1 = zMuStandAloneCand.daughter(1)->pt();
458  double eta0 = zMuStandAloneCand.daughter(0)->eta();
459  double eta1 = zMuStandAloneCand.daughter(1)->eta();
460  double charge0 = zMuStandAloneCand.daughter(0)->charge();
461  double charge1 = zMuStandAloneCand.daughter(1)->charge();
462  double mass = zMuStandAloneCand.mass();
463 
464  // HLT match
465  const pat::TriggerObjectStandAloneCollection mu0HLTMatches =
466  muonDau0.triggerObjectMatchesByPath( "HLT_Mu9" );
467  const pat::TriggerObjectStandAloneCollection mu1HLTMatches =
468  muonDau1.triggerObjectMatchesByPath( "HLT_Mu9" );
469 
470  bool trig0found = false;
471  bool trig1found = false;
472  if( mu0HLTMatches.size()>0 )
473  trig0found = true;
474  if( mu1HLTMatches.size()>0 )
475  trig1found = true;
476 
477  // check HLT match of Global muon and save eta, pt of second muon (standAlone)
478  bool trigGlbfound = false;
479  double pt =999.;
480  double eta = 999.;
481  double charge = 0;
482  if (muonDau0.isGlobalMuon()) {
483  trigGlbfound = trig0found;
484  pt = pt1;
485  eta = eta1;
486  charge = charge1;
487  }
488  if (muonDau1.isGlobalMuon()) {
489  trigGlbfound = trig1found;
490  pt = pt0;
491  eta = eta0;
492  charge = charge0;
493  }
494 
495  bool checkOppositeCharge = false;
496  if (charge0 != charge1) checkOppositeCharge = true;
497 
498  if (checkOppositeCharge && trigGlbfound && pt0>ptmin_ && pt1>ptmin_ && abs(eta0)<etamax_ && abs(eta1)<etamax_ && mass>massMin_ && mass<massMax_ && trkiso0<isoMax_ && trkiso1<isoMax_ ) { // global mu match HLT + kinematic cuts + opposite charge
499 
500  if (charge<0) h_zmsminus_mass->Fill(mass);
501  if (charge>0) h_zmsplus_mass->Fill(mass);
502 
503  for (unsigned int j=0;j<etaBins;j++) { // eta Bins loop
504  double range0 = etaRange[j];
505  double range1= etaRange[j+1];
506  // eta histograms
507  if (eta>=range0 && eta<range1) {
508  if (charge<0) hmustaminus_eta[j]->Fill(mass);
509  if (charge>0) hmustaplus_eta[j]->Fill(mass);
510  }
511  } // end loop etaBins
512  for (unsigned int j=0;j<ptBins;j++) { // pt Bins loop
513  double range0 = ptRange[j];
514  double range1= ptRange[j+1];
515  // pt histograms
516  if (pt>=range0 && pt<range1) {
517  if (charge<0) hmustaminus_pt[j]->Fill(mass);
518  if (charge>0) hmustaplus_pt[j]->Fill(mass);
519  }
520  } // end loop ptBins
521 
522  } // end if trigGlbfound + kinecuts + OppostieCharge
523  } // end loop on ZMuStandAlone cand
524  } // end if ZMuStandAlone size > 0
525 
526 
527  // loop on ZMuTrack
528  // bool zMuTrack_found = false;
529  if (!zMuMu_found && !zMuSta_found && zMuTrack->size() > 0 ) {
530  event.getByToken(zMuTrackMatchMapToken_, zMuTrackMatchMap);
531  for(unsigned int i = 0; i < zMuTrack->size(); ++i) { //loop on candidates
532  const Candidate & zMuTrackCand = (*zMuTrack)[i]; //the candidate
533  CandidateBaseRef zMuTrackCandRef = zMuTrack->refAt(i);
534  const Candidate * lep0 = zMuTrackCand.daughter( 0 );
535  const Candidate * lep1 = zMuTrackCand.daughter( 1 );
536  const pat::Muon & muonDau0 = dynamic_cast<const pat::Muon &>(*lep0->masterClone());
537  double trkiso0 = muonDau0.trackIso();
538  const pat::GenericParticle & trackDau1 = dynamic_cast<const pat::GenericParticle &>(*lep1->masterClone());
539  double trkiso1 = trackDau1.trackIso();
540  double pt0 = zMuTrackCand.daughter(0)->pt();
541  double pt1 = zMuTrackCand.daughter(1)->pt();
542  double eta0 = zMuTrackCand.daughter(0)->eta();
543  double eta1 = zMuTrackCand.daughter(1)->eta();
544  double charge0 = zMuTrackCand.daughter(0)->charge();
545  double charge1 = zMuTrackCand.daughter(1)->charge();
546  double mass = zMuTrackCand.mass();
547 
548  // HLT match (check just dau0 the global)
549  const pat::TriggerObjectStandAloneCollection mu0HLTMatches =
550  muonDau0.triggerObjectMatchesByPath( "HLT_Mu9" );
551 
552  bool trig0found = false;
553  if( mu0HLTMatches.size()>0 )
554  trig0found = true;
555 
556  bool checkOppositeCharge = false;
557  if (charge0 != charge1) checkOppositeCharge = true;
558 
559  if (checkOppositeCharge && trig0found && pt0>ptmin_ && pt1>ptmin_ && abs(eta0)<etamax_ && abs(eta1)<etamax_ && mass>massMin_ && mass<massMax_ && trkiso0<isoMax_ && trkiso1<isoMax_ ) { // global mu match HLT + kinematic cuts + opposite charge
560 
561  if (charge1<0) h_zmtminus_mass->Fill(mass);
562  if (charge1>0) h_zmtplus_mass->Fill(mass);
563 
564  for (unsigned int j=0;j<etaBins;j++) { // eta Bins loop
565  double range0 = etaRange[j];
566  double range1= etaRange[j+1];
567  // eta histograms
568  if (eta1>=range0 && eta1<range1) {
569  if (charge1<0) hmutrackminus_eta[j]->Fill(mass); // just check muon1 (mu0 is global by definition)
570  if (charge1>0) hmutrackplus_eta[j]->Fill(mass); // just check muon1 (mu0 is global by definition)
571  }
572  } // end loop etaBins
573  for (unsigned int j=0;j<ptBins;j++) { // pt Bins loop
574  double range0 = ptRange[j];
575  double range1= ptRange[j+1];
576  // pt histograms
577  if (pt1>=range0 && pt1<range1) {
578  if (charge1<0) hmutrackminus_pt[j]->Fill(mass); // just check muon1 (mu0 is global by definition)
579  if (charge1>0) hmutrackplus_pt[j]->Fill(mass); // just check muon1 (mu0 is global by definition)
580  }
581  } // end loop ptBins
582 
583  } // end if trig0found
584 
585 
586  } // end loop on ZMuTrack cand
587  } // end if ZMuTrack size > 0
588 
589 } // end analyze
int i
Definition: DBlmapReader.cc:9
virtual const Candidate * daughter(size_type i) const =0
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
virtual float mass() const =0
mass
EDGetTokenT< CandidateView > muonsToken_
virtual float eta() const =0
momentum pseudorapidity
EDGetTokenT< GenParticleMatch > zMuStandAloneMatchMapToken_
EDGetTokenT< GenParticleCollection > genParticlesToken_
bool isGlobalMuon() const
Definition: Muon.h:218
std::vector< TriggerObjectStandAlone > TriggerObjectStandAloneCollection
Collection of TriggerObjectStandAlone.
T eta() const
EDGetTokenT< CandidateView > tracksToken_
float trackIso() const
float trackIso() const
Definition: Muon.h:170
EDGetTokenT< GenParticleMatch > zMuTrackMatchMapToken_
EDGetTokenT< CandidateView > zMuTrackToken_
Analysis-level Generic Particle class (e.g. for hadron or muon not fully reconstructed) ...
virtual float pt() const =0
transverse momentum
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int j
Definition: DBlmapReader.cc:9
virtual int charge() const =0
electric charge
const TriggerObjectStandAloneCollection triggerObjectMatchesByPath(const std::string &namePath, const bool pathLastFilterAccepted=false, const bool pathL3FilterAccepted=true) const
Definition: PATObject.h:596
EDGetTokenT< CandidateView > zMuStandAloneToken_
tuple tracks
Definition: testEve_cfg.py:39
EDGetTokenT< VertexCollection > primaryVerticesToken_
tuple muons
Definition: patZpeak.py:38
EDGetTokenT< CandidateView > zMuMuToken_
Analysis-level muon class.
Definition: Muon.h:50
tuple zMuMu
zMuMu vector of PSet is common to all categories except zMuTrk category
virtual const CandidateBaseRef & masterClone() const =0
bool ZMuMu_efficiencyAnalyzer::check_ifZmumu ( const Candidate dauGen0,
const Candidate dauGen1,
const Candidate dauGen2 
)
private

Definition at line 591 of file ZMuMu_efficiencyAnalyzer.cc.

References reco::Candidate::pdgId().

592 {
593  int partId0 = dauGen0->pdgId();
594  int partId1 = dauGen1->pdgId();
595  int partId2 = dauGen2->pdgId();
596  bool muplusFound=false;
597  bool muminusFound=false;
598  bool ZFound=false;
599  if (partId0==13 || partId1==13 || partId2==13) muminusFound=true;
600  if (partId0==-13 || partId1==-13 || partId2==-13) muplusFound=true;
601  if (partId0==23 || partId1==23 || partId2==23) ZFound=true;
602  return muplusFound*muminusFound*ZFound;
603 }
virtual int pdgId() const =0
PDG identifier.
void ZMuMu_efficiencyAnalyzer::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 739 of file ZMuMu_efficiencyAnalyzer.cc.

739  {
740 
741 
742 
743 }
float ZMuMu_efficiencyAnalyzer::getParticleEta ( const int  ipart,
const Candidate dauGen0,
const Candidate dauGen1,
const Candidate dauGen2 
)
private

Definition at line 638 of file ZMuMu_efficiencyAnalyzer.cc.

References funct::abs(), reco::Candidate::daughter(), reco::Candidate::eta(), gen::k, reco::Candidate::numberOfDaughters(), reco::Candidate::pdgId(), and reco::Candidate::status().

639 {
640  int partId0 = dauGen0->pdgId();
641  int partId1 = dauGen1->pdgId();
642  int partId2 = dauGen2->pdgId();
643  float etapart=0.;
644  if (partId0 == ipart) {
645  for(unsigned int k = 0; k < dauGen0->numberOfDaughters(); ++k) {
646  const Candidate * dauMuGen = dauGen0->daughter(k);
647  if(dauMuGen->pdgId() == ipart && dauMuGen->status() ==1) {
648  etapart = dauMuGen->eta();
649  }
650  }
651  }
652  if (partId1 == ipart) {
653  for(unsigned int k = 0; k < dauGen1->numberOfDaughters(); ++k) {
654  const Candidate * dauMuGen = dauGen1->daughter(k);
655  if(dauMuGen->pdgId() == ipart && dauMuGen->status() ==1) {
656  etapart = dauMuGen->eta();
657  }
658  }
659  }
660  if (partId2 == ipart) {
661  for(unsigned int k = 0; k < dauGen2->numberOfDaughters(); ++k) {
662  const Candidate * dauMuGen = dauGen2->daughter(k);
663  if(abs(dauMuGen->pdgId()) == ipart && dauMuGen->status() ==1) {
664  etapart = dauMuGen->eta();
665  }
666  }
667  }
668  return etapart;
669 }
virtual const Candidate * daughter(size_type i) const =0
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
virtual float eta() const =0
momentum pseudorapidity
virtual int status() const =0
status word
virtual size_type numberOfDaughters() const =0
number of daughters
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int k[5][pyjets_maxn]
virtual int pdgId() const =0
PDG identifier.
Particle::LorentzVector ZMuMu_efficiencyAnalyzer::getParticleP4 ( const int  ipart,
const Candidate dauGen0,
const Candidate dauGen1,
const Candidate dauGen2 
)
private

Definition at line 704 of file ZMuMu_efficiencyAnalyzer.cc.

References funct::abs(), reco::Candidate::daughter(), gen::k, reco::Candidate::numberOfDaughters(), reco::Candidate::p4(), reco::Candidate::pdgId(), and reco::Candidate::status().

705 {
706  int partId0 = dauGen0->pdgId();
707  int partId1 = dauGen1->pdgId();
708  int partId2 = dauGen2->pdgId();
709  Particle::LorentzVector p4part(0.,0.,0.,0.);
710  if (partId0 == ipart) {
711  for(unsigned int k = 0; k < dauGen0->numberOfDaughters(); ++k) {
712  const Candidate * dauMuGen = dauGen0->daughter(k);
713  if(dauMuGen->pdgId() == ipart && dauMuGen->status() ==1) {
714  p4part = dauMuGen->p4();
715  }
716  }
717  }
718  if (partId1 == ipart) {
719  for(unsigned int k = 0; k < dauGen1->numberOfDaughters(); ++k) {
720  const Candidate * dauMuGen = dauGen1->daughter(k);
721  if(dauMuGen->pdgId() == ipart && dauMuGen->status() ==1) {
722  p4part = dauMuGen->p4();
723  }
724  }
725  }
726  if (partId2 == ipart) {
727  for(unsigned int k = 0; k < dauGen2->numberOfDaughters(); ++k) {
728  const Candidate * dauMuGen = dauGen2->daughter(k);
729  if(abs(dauMuGen->pdgId()) == ipart && dauMuGen->status() ==1) {
730  p4part = dauMuGen->p4();
731  }
732  }
733  }
734  return p4part;
735 }
virtual const Candidate * daughter(size_type i) const =0
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
virtual int status() const =0
status word
virtual size_type numberOfDaughters() const =0
number of daughters
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int k[5][pyjets_maxn]
virtual int pdgId() const =0
PDG identifier.
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Particle.h:27
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector
float ZMuMu_efficiencyAnalyzer::getParticlePhi ( const int  ipart,
const Candidate dauGen0,
const Candidate dauGen1,
const Candidate dauGen2 
)
private

Definition at line 671 of file ZMuMu_efficiencyAnalyzer.cc.

References funct::abs(), reco::Candidate::daughter(), gen::k, reco::Candidate::numberOfDaughters(), reco::Candidate::pdgId(), reco::Candidate::phi(), and reco::Candidate::status().

672 {
673  int partId0 = dauGen0->pdgId();
674  int partId1 = dauGen1->pdgId();
675  int partId2 = dauGen2->pdgId();
676  float phipart=0.;
677  if (partId0 == ipart) {
678  for(unsigned int k = 0; k < dauGen0->numberOfDaughters(); ++k) {
679  const Candidate * dauMuGen = dauGen0->daughter(k);
680  if(dauMuGen->pdgId() == ipart && dauMuGen->status() ==1) {
681  phipart = dauMuGen->phi();
682  }
683  }
684  }
685  if (partId1 == ipart) {
686  for(unsigned int k = 0; k < dauGen1->numberOfDaughters(); ++k) {
687  const Candidate * dauMuGen = dauGen1->daughter(k);
688  if(dauMuGen->pdgId() == ipart && dauMuGen->status() ==1) {
689  phipart = dauMuGen->phi();
690  }
691  }
692  }
693  if (partId2 == ipart) {
694  for(unsigned int k = 0; k < dauGen2->numberOfDaughters(); ++k) {
695  const Candidate * dauMuGen = dauGen2->daughter(k);
696  if(abs(dauMuGen->pdgId()) == ipart && dauMuGen->status() ==1) {
697  phipart = dauMuGen->phi();
698  }
699  }
700  }
701  return phipart;
702 }
virtual const Candidate * daughter(size_type i) const =0
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
virtual int status() const =0
status word
virtual float phi() const =0
momentum azimuthal angle
virtual size_type numberOfDaughters() const =0
number of daughters
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int k[5][pyjets_maxn]
virtual int pdgId() const =0
PDG identifier.
float ZMuMu_efficiencyAnalyzer::getParticlePt ( const int  ipart,
const Candidate dauGen0,
const Candidate dauGen1,
const Candidate dauGen2 
)
private

Definition at line 605 of file ZMuMu_efficiencyAnalyzer.cc.

References funct::abs(), reco::Candidate::daughter(), gen::k, reco::Candidate::numberOfDaughters(), reco::Candidate::pdgId(), reco::Candidate::pt(), and reco::Candidate::status().

606 {
607  int partId0 = dauGen0->pdgId();
608  int partId1 = dauGen1->pdgId();
609  int partId2 = dauGen2->pdgId();
610  float ptpart=0.;
611  if (partId0 == ipart) {
612  for(unsigned int k = 0; k < dauGen0->numberOfDaughters(); ++k) {
613  const Candidate * dauMuGen = dauGen0->daughter(k);
614  if(dauMuGen->pdgId() == ipart && dauMuGen->status() ==1) {
615  ptpart = dauMuGen->pt();
616  }
617  }
618  }
619  if (partId1 == ipart) {
620  for(unsigned int k = 0; k < dauGen1->numberOfDaughters(); ++k) {
621  const Candidate * dauMuGen = dauGen1->daughter(k);
622  if(dauMuGen->pdgId() == ipart && dauMuGen->status() ==1) {
623  ptpart = dauMuGen->pt();
624  }
625  }
626  }
627  if (partId2 == ipart) {
628  for(unsigned int k = 0; k < dauGen2->numberOfDaughters(); ++k) {
629  const Candidate * dauMuGen = dauGen2->daughter(k);
630  if(abs(dauMuGen->pdgId()) == ipart && dauMuGen->status() ==1) {
631  ptpart = dauMuGen->pt();
632  }
633  }
634  }
635  return ptpart;
636 }
virtual const Candidate * daughter(size_type i) const =0
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
virtual int status() const =0
status word
virtual size_type numberOfDaughters() const =0
number of daughters
virtual float pt() const =0
transverse momentum
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int k[5][pyjets_maxn]
virtual int pdgId() const =0
PDG identifier.

Member Data Documentation

bool ZMuMu_efficiencyAnalyzer::bothMuons_
private

Definition at line 69 of file ZMuMu_efficiencyAnalyzer.cc.

unsigned int ZMuMu_efficiencyAnalyzer::etaBins
private

Definition at line 74 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze(), and ZMuMu_efficiencyAnalyzer().

double ZMuMu_efficiencyAnalyzer::etamax_
private

Definition at line 71 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze().

double ZMuMu_efficiencyAnalyzer::etaRange[7]
private

Definition at line 76 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze(), and ZMuMu_efficiencyAnalyzer().

EDGetTokenT<GenParticleCollection> ZMuMu_efficiencyAnalyzer::genParticlesToken_
private

Definition at line 66 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze().

reco::CandidateBaseRef ZMuMu_efficiencyAnalyzer::globalMuonCandRef_
private

Definition at line 79 of file ZMuMu_efficiencyAnalyzer.cc.

TH1D* ZMuMu_efficiencyAnalyzer::h_zmm1HLTminus_mass
private

Definition at line 85 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze(), and ZMuMu_efficiencyAnalyzer().

TH1D* ZMuMu_efficiencyAnalyzer::h_zmm1HLTplus_mass
private

Definition at line 84 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze(), and ZMuMu_efficiencyAnalyzer().

TH1D * ZMuMu_efficiencyAnalyzer::h_zmm2HLT_mass
private

Definition at line 83 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze(), and ZMuMu_efficiencyAnalyzer().

TH1D* ZMuMu_efficiencyAnalyzer::h_zmm_mass
private

Definition at line 83 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze(), and ZMuMu_efficiencyAnalyzer().

TH1D * ZMuMu_efficiencyAnalyzer::h_zmmNotIsominus_mass
private

Definition at line 85 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by ZMuMu_efficiencyAnalyzer().

TH1D * ZMuMu_efficiencyAnalyzer::h_zmmNotIsoplus_mass
private

Definition at line 84 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by ZMuMu_efficiencyAnalyzer().

TH1D * ZMuMu_efficiencyAnalyzer::h_zmsminus_mass
private

Definition at line 85 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze(), and ZMuMu_efficiencyAnalyzer().

TH1D * ZMuMu_efficiencyAnalyzer::h_zmsplus_mass
private

Definition at line 84 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze(), and ZMuMu_efficiencyAnalyzer().

TH1D * ZMuMu_efficiencyAnalyzer::h_zmtminus_mass
private

Definition at line 85 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze(), and ZMuMu_efficiencyAnalyzer().

TH1D * ZMuMu_efficiencyAnalyzer::h_zmtplus_mass
private

Definition at line 84 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze(), and ZMuMu_efficiencyAnalyzer().

vector<TH1D *> ZMuMu_efficiencyAnalyzer::hmumu1HLTminus_eta
private

Definition at line 92 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze(), and ZMuMu_efficiencyAnalyzer().

vector<TH1D *> ZMuMu_efficiencyAnalyzer::hmumu1HLTminus_pt
private

Definition at line 93 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze(), and ZMuMu_efficiencyAnalyzer().

vector<TH1D *> ZMuMu_efficiencyAnalyzer::hmumu1HLTplus_eta
private

Definition at line 90 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze(), and ZMuMu_efficiencyAnalyzer().

vector<TH1D *> ZMuMu_efficiencyAnalyzer::hmumu1HLTplus_pt
private

Definition at line 91 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze(), and ZMuMu_efficiencyAnalyzer().

vector<TH1D *> ZMuMu_efficiencyAnalyzer::hmumu2HLTminus_eta
private

Definition at line 92 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze(), and ZMuMu_efficiencyAnalyzer().

vector<TH1D *> ZMuMu_efficiencyAnalyzer::hmumu2HLTminus_pt
private

Definition at line 93 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze(), and ZMuMu_efficiencyAnalyzer().

vector<TH1D *> ZMuMu_efficiencyAnalyzer::hmumu2HLTplus_eta
private

Definition at line 90 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze(), and ZMuMu_efficiencyAnalyzer().

vector<TH1D *> ZMuMu_efficiencyAnalyzer::hmumu2HLTplus_pt
private

Definition at line 91 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze(), and ZMuMu_efficiencyAnalyzer().

vector<TH1D *> ZMuMu_efficiencyAnalyzer::hmumuNotIsominus_eta
private

Definition at line 92 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by ZMuMu_efficiencyAnalyzer().

vector<TH1D *> ZMuMu_efficiencyAnalyzer::hmumuNotIsominus_pt
private

Definition at line 93 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by ZMuMu_efficiencyAnalyzer().

vector<TH1D *> ZMuMu_efficiencyAnalyzer::hmumuNotIsoplus_eta
private

Definition at line 90 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by ZMuMu_efficiencyAnalyzer().

vector<TH1D *> ZMuMu_efficiencyAnalyzer::hmumuNotIsoplus_pt
private

Definition at line 91 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by ZMuMu_efficiencyAnalyzer().

vector<TH1D *> ZMuMu_efficiencyAnalyzer::hmustaminus_eta
private

Definition at line 92 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze(), and ZMuMu_efficiencyAnalyzer().

vector<TH1D *> ZMuMu_efficiencyAnalyzer::hmustaminus_pt
private

Definition at line 93 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze(), and ZMuMu_efficiencyAnalyzer().

vector<TH1D *> ZMuMu_efficiencyAnalyzer::hmustaplus_eta
private

Definition at line 90 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze(), and ZMuMu_efficiencyAnalyzer().

vector<TH1D *> ZMuMu_efficiencyAnalyzer::hmustaplus_pt
private

Definition at line 91 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze(), and ZMuMu_efficiencyAnalyzer().

vector<TH1D *> ZMuMu_efficiencyAnalyzer::hmutrackminus_eta
private

Definition at line 92 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze(), and ZMuMu_efficiencyAnalyzer().

vector<TH1D *> ZMuMu_efficiencyAnalyzer::hmutrackminus_pt
private

Definition at line 93 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze(), and ZMuMu_efficiencyAnalyzer().

vector<TH1D *> ZMuMu_efficiencyAnalyzer::hmutrackplus_eta
private

Definition at line 90 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze(), and ZMuMu_efficiencyAnalyzer().

vector<TH1D *> ZMuMu_efficiencyAnalyzer::hmutrackplus_pt
private

Definition at line 91 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze(), and ZMuMu_efficiencyAnalyzer().

double ZMuMu_efficiencyAnalyzer::isoMax_
private

Definition at line 71 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze().

double ZMuMu_efficiencyAnalyzer::massMax_
private

Definition at line 71 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze().

double ZMuMu_efficiencyAnalyzer::massMin_
private

Definition at line 71 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze().

EDGetTokenT<CandidateView> ZMuMu_efficiencyAnalyzer::muonsToken_
private

Definition at line 64 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze().

int ZMuMu_efficiencyAnalyzer::nGlobalMuonsMatched_passed
private

Definition at line 88 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by ZMuMu_efficiencyAnalyzer().

OverlapChecker ZMuMu_efficiencyAnalyzer::overlap_
private

Definition at line 80 of file ZMuMu_efficiencyAnalyzer.cc.

EDGetTokenT<VertexCollection> ZMuMu_efficiencyAnalyzer::primaryVerticesToken_
private

Definition at line 67 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze().

unsigned int ZMuMu_efficiencyAnalyzer::ptBins
private

Definition at line 75 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze(), and ZMuMu_efficiencyAnalyzer().

double ZMuMu_efficiencyAnalyzer::ptmin_
private

Definition at line 71 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze().

double ZMuMu_efficiencyAnalyzer::ptRange[5]
private

Definition at line 77 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze(), and ZMuMu_efficiencyAnalyzer().

reco::CandidateBaseRef ZMuMu_efficiencyAnalyzer::standAloneMuonCandRef_
private

Definition at line 79 of file ZMuMu_efficiencyAnalyzer.cc.

reco::CandidateBaseRef ZMuMu_efficiencyAnalyzer::trackMuonCandRef_
private

Definition at line 79 of file ZMuMu_efficiencyAnalyzer.cc.

EDGetTokenT<CandidateView> ZMuMu_efficiencyAnalyzer::tracksToken_
private

Definition at line 65 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze().

EDGetTokenT<GenParticleMatch> ZMuMu_efficiencyAnalyzer::zMuMuMatchMapToken_
private

Definition at line 59 of file ZMuMu_efficiencyAnalyzer.cc.

EDGetTokenT<CandidateView> ZMuMu_efficiencyAnalyzer::zMuMuToken_
private

Definition at line 58 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze().

EDGetTokenT<GenParticleMatch> ZMuMu_efficiencyAnalyzer::zMuStandAloneMatchMapToken_
private

Definition at line 61 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze().

EDGetTokenT<CandidateView> ZMuMu_efficiencyAnalyzer::zMuStandAloneToken_
private

Definition at line 60 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze().

EDGetTokenT<GenParticleMatch> ZMuMu_efficiencyAnalyzer::zMuTrackMatchMapToken_
private

Definition at line 63 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze().

EDGetTokenT<CandidateView> ZMuMu_efficiencyAnalyzer::zMuTrackToken_
private

Definition at line 62 of file ZMuMu_efficiencyAnalyzer.cc.

Referenced by analyze().