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_vtxAnalyzer Class Reference
Inheritance diagram for ZMuMu_vtxAnalyzer:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 ZMuMu_vtxAnalyzer (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
std::vector< ConsumesInfoconsumesInfo () const
 
 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 (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) 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_
 
double etamax_
 
EDGetTokenT
< GenParticleCollection
genParticlesToken_
 
reco::CandidateBaseRef globalMuonCandRef_
 
TH1D * h_dimuon_vz
 
TH1D * h_muon_d0signed
 
TH1D * h_muon_d0signed_respectToPV
 
TH1D * h_muon_vz
 
TH1D * h_muon_vz_respectToPV
 
TH1D * h_zmumuNotIsoSele_dimuon_vz
 
TH1D * h_zmumuNotIsoSele_muonIso_d0signed
 
TH1D * h_zmumuNotIsoSele_muonIso_d0signed_respectToPV
 
TH1D * h_zmumuNotIsoSele_muonIso_vz
 
TH1D * h_zmumuNotIsoSele_muonIso_vz_respectToPV
 
TH1D * h_zmumuNotIsoSele_muonNotIso_d0signed
 
TH1D * h_zmumuNotIsoSele_muonNotIso_d0signed_respectToPV
 
TH1D * h_zmumuNotIsoSele_muonNotIso_vz
 
TH1D * h_zmumuNotIsoSele_muonNotIso_vz_respectToPV
 
TH1D * h_zmumuSele_dimuon_vz
 
TH1D * h_zmumuSele_muon_d0signed
 
TH1D * h_zmumuSele_muon_d0signed_respectToPV
 
TH1D * h_zmumuSele_muon_vz
 
TH1D * h_zmumuSele_muon_vz_respectToPV
 
TH1D * h_zmustaSele_muon_d0signed
 
TH1D * h_zmustaSele_muon_d0signed_respectToPV
 
TH1D * h_zmustaSele_muon_vz
 
TH1D * h_zmustaSele_muon_vz_respectToPV
 
TH1D * h_zmustaSele_sta_d0signed
 
TH1D * h_zmustaSele_sta_d0signed_respectToPV
 
TH1D * h_zmustaSele_sta_vz
 
TH1D * h_zmustaSele_sta_vz_respectToPV
 
TH1D * h_zmutrackSele_muon_d0signed
 
TH1D * h_zmutrackSele_muon_d0signed_respectToPV
 
TH1D * h_zmutrackSele_muon_vz
 
TH1D * h_zmutrackSele_muon_vz_respectToPV
 
TH1D * h_zmutrackSele_track_d0signed
 
TH1D * h_zmutrackSele_track_d0signed_respectToPV
 
TH1D * h_zmutrackSele_track_vz
 
TH1D * h_zmutrackSele_track_vz_respectToPV
 
double isoMax_
 
double massMax_
 
double massMin_
 
EDGetTokenT< CandidateViewmuonsToken_
 
OverlapChecker overlap_
 
EDGetTokenT< VertexCollectionprimaryVerticesToken_
 
double ptmin_
 
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
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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 45 of file ZMuMu_vtxAnalyzer.cc.

Constructor & Destructor Documentation

ZMuMu_vtxAnalyzer::ZMuMu_vtxAnalyzer ( const edm::ParameterSet pset)

Definition at line 114 of file ZMuMu_vtxAnalyzer.cc.

References h_dimuon_vz, h_muon_d0signed, h_muon_d0signed_respectToPV, h_muon_vz, h_muon_vz_respectToPV, h_zmumuNotIsoSele_dimuon_vz, h_zmumuNotIsoSele_muonIso_d0signed, h_zmumuNotIsoSele_muonIso_d0signed_respectToPV, h_zmumuNotIsoSele_muonIso_vz, h_zmumuNotIsoSele_muonIso_vz_respectToPV, h_zmumuNotIsoSele_muonNotIso_d0signed, h_zmumuNotIsoSele_muonNotIso_d0signed_respectToPV, h_zmumuNotIsoSele_muonNotIso_vz, h_zmumuNotIsoSele_muonNotIso_vz_respectToPV, h_zmumuSele_dimuon_vz, h_zmumuSele_muon_d0signed, h_zmumuSele_muon_d0signed_respectToPV, h_zmumuSele_muon_vz, h_zmumuSele_muon_vz_respectToPV, h_zmustaSele_muon_d0signed, h_zmustaSele_muon_d0signed_respectToPV, h_zmustaSele_muon_vz, h_zmustaSele_muon_vz_respectToPV, h_zmustaSele_sta_d0signed, h_zmustaSele_sta_d0signed_respectToPV, h_zmustaSele_sta_vz, h_zmustaSele_sta_vz_respectToPV, h_zmutrackSele_muon_d0signed, h_zmutrackSele_muon_d0signed_respectToPV, h_zmutrackSele_muon_vz, h_zmutrackSele_muon_vz_respectToPV, h_zmutrackSele_track_d0signed, h_zmutrackSele_track_d0signed_respectToPV, h_zmutrackSele_track_vz, h_zmutrackSele_track_vz_respectToPV, and TFileService::make().

114  :
115  zMuMuToken_(consumes<CandidateView>(pset.getParameter<InputTag>("zMuMu"))),
116  zMuMuMatchMapToken_(mayConsume<GenParticleMatch>(pset.getParameter<InputTag>("zMuMuMatchMap"))),
117  zMuStandAloneToken_(consumes<CandidateView>(pset.getParameter<InputTag>("zMuStandAlone"))),
118  zMuStandAloneMatchMapToken_(mayConsume<GenParticleMatch>(pset.getParameter<InputTag>("zMuStandAloneMatchMap"))),
119  zMuTrackToken_(consumes<CandidateView>(pset.getParameter<InputTag>("zMuTrack"))),
120  zMuTrackMatchMapToken_(mayConsume<GenParticleMatch>(pset.getParameter<InputTag>("zMuTrackMatchMap"))),
121  muonsToken_(consumes<CandidateView>(pset.getParameter<InputTag>("muons"))),
122  tracksToken_(consumes<CandidateView>(pset.getParameter<InputTag>("tracks"))),
123  genParticlesToken_(consumes<GenParticleCollection>(pset.getParameter<InputTag>("genParticles"))),
124  primaryVerticesToken_(consumes<VertexCollection>(pset.getParameter<InputTag>("primaryVertices"))),
125 
126  bothMuons_(pset.getParameter<bool>("bothMuons")),
127 
128  etamax_(pset.getUntrackedParameter<double>("etamax")),
129  ptmin_(pset.getUntrackedParameter<double>("ptmin")),
130  massMin_(pset.getUntrackedParameter<double>("zMassMin")),
131  massMax_(pset.getUntrackedParameter<double>("zMassMax")),
132  isoMax_(pset.getUntrackedParameter<double>("isomax")) {
134 
135  // general histograms
136 
137  // vertex histograms
138  // ... zmumu no Cuts
139  h_muon_vz = fs->make<TH1D>("muonVz","z vertex of muons",50,-20.,20.);
140  h_muon_d0signed = fs->make<TH1D>("muonD0signed","d0 vertex of muons",50,-.1,.1);
141  h_dimuon_vz = fs->make<TH1D>("dimuonVz","z vertex of dimuon",50,-20.,20.);
142  h_muon_vz_respectToPV = fs->make<TH1D>("muonVz_respectToPV","z vertex of muons respect to PrimaryVertex",50,-.05,.05);
143  h_muon_d0signed_respectToPV = fs->make<TH1D>("muonD0signed_respectToPV","d0 vertex of muons respect to PrimaryVertex",50,-.05,.05);
144  // ... zmumu cynematic Cuts
145  h_zmumuSele_muon_vz = fs->make<TH1D>("zmumuSele_muonVz","z vertex of muons (zmumu sele)",50,-20.,20.);
146  h_zmumuSele_muon_d0signed = fs->make<TH1D>("zmumuSele_muonD0signed","d0 vertex of muons (zmumu sele)",50,-.1,.1);
147  h_zmumuSele_dimuon_vz = fs->make<TH1D>("zmumuSele_dimuonVz","z vertex of dimuon (zmumu sele)",50,-20.,20.);
148  h_zmumuSele_muon_vz_respectToPV = fs->make<TH1D>("zmumuSele_muonVz_respectToPV","z vertex of muons respect to PrimaryVertex (zmumu sele)",50,-.05,.05);
149  h_zmumuSele_muon_d0signed_respectToPV = fs->make<TH1D>("zmumuSele_muonD0signed_respectToPV","d0 vertex of muons respect to PrimaryVertex (zmumu sele)",50,-.05,.05);
150  // ... zmumuNotIso cynematic Cuts
151  h_zmumuNotIsoSele_dimuon_vz = fs->make<TH1D>("zmumuNotIsoSele_dimuonVz","z vertex of dimuon (zmumuNotIso sele)",50,-20.,20.);
152  h_zmumuNotIsoSele_muonIso_vz = fs->make<TH1D>("zmumuNotIsoSele_muonIsoVz","z vertex of muons (zmumuNotIso sele muon Iso)",50,-20.,20.);
153  h_zmumuNotIsoSele_muonIso_d0signed = fs->make<TH1D>("zmumuNotIsoSele_muonIsoD0signed","d0 vertex of muons (zmumuNotIso sele muon Iso)",50,-.1,.1);
154  h_zmumuNotIsoSele_muonIso_vz_respectToPV = fs->make<TH1D>("zmumuNotIsoSele_muonIsoVz_respectToPV","z vertex of muons respect to PrimaryVertex (zmumuNotIso sele muon Iso)",50,-.05,.05);
155  h_zmumuNotIsoSele_muonIso_d0signed_respectToPV = fs->make<TH1D>("zmumuNotIsoSele_muonIsoD0signed_respectToPV","d0 vertex of muons respect to PrimaryVertex (zmumuNotIso sele muon Iso)",50,-.05,.05);
156  h_zmumuNotIsoSele_muonNotIso_vz = fs->make<TH1D>("zmumuNotIsoSele_muonNotIsoVz","z vertex of muons (zmumuNotIso sele muon Not Iso)",50,-20.,20.);
157  h_zmumuNotIsoSele_muonNotIso_d0signed = fs->make<TH1D>("zmumuNotIsoSele_muonNotIsoD0signed","d0 vertex of muons (zmumuNotIso sele muon Not Iso)",50,-.1,.1);
158  h_zmumuNotIsoSele_muonNotIso_vz_respectToPV = fs->make<TH1D>("zmumuNotIsoSele_muonNotIsoVz_respectToPV","z vertex of muons respect to PrimaryVertex (zmumuNotIso sele muon Not Iso)",50,-.05,.05);
159  h_zmumuNotIsoSele_muonNotIso_d0signed_respectToPV = fs->make<TH1D>("zmumuNotIsoSele_muonNotIsoD0signed_respectToPV","d0 vertex of muons respect to PrimaryVertex (zmumuNotIso sele muon Not Iso)",50,-.05,.05);
160  // ... zmutrack cynematic Cuts
161  h_zmutrackSele_muon_vz = fs->make<TH1D>("zmutrackSele_muonVz","z vertex of muon (zmutrack sele)",50,-20.,20.);
162  h_zmutrackSele_muon_d0signed = fs->make<TH1D>("zmutrackSele_muonD0signed","d0 vertex of muon (zmutrack sele)",50,-.1,.1);
163  h_zmutrackSele_muon_vz_respectToPV = fs->make<TH1D>("zmutrackSele_muonVz_respectToPV","z vertex of muon respect to PV (zmutrack sele)",50,-.05,.05);
164  h_zmutrackSele_muon_d0signed_respectToPV = fs->make<TH1D>("zmutrackSele_muonD0signed_respectToPV","d0 vertex of muon respect to PV (zmutrack sele)",50,-.1,.1);
165  h_zmutrackSele_track_vz = fs->make<TH1D>("zmutrackSele_trackVz","z vertex of track (zmutrack sele)",50,-20.,20.);
166  h_zmutrackSele_track_d0signed = fs->make<TH1D>("zmutrackSele_trackD0signed","d0 vertex of track (zmutrack sele)",50,-.1,.1);
167  h_zmutrackSele_track_vz_respectToPV = fs->make<TH1D>("zmutrackSele_trackVz_respectToPV","z vertex of track respect to PV (zmutrack sele)",50,-.05,.05);
168  h_zmutrackSele_track_d0signed_respectToPV = fs->make<TH1D>("zmutrackSele_trackD0signed_respectToPV","d0 vertex of track respect to PV (zmutrack sele)",50,-.1,.1);
169  // ... zmusta cynematic Cuts
170  h_zmustaSele_muon_vz = fs->make<TH1D>("zmustaSele_muonVz","z vertex of muon (zmusta sele)",50,-20.,20.);
171  h_zmustaSele_muon_d0signed = fs->make<TH1D>("zmustaSele_muonD0signed","d0 vertex of muon (zmusta sele)",50,-.1,.1);
172  h_zmustaSele_muon_vz_respectToPV = fs->make<TH1D>("zmustaSele_muonVz_respectToPV","z vertex of muon respect to PV (zmusta sele)",50,-.05,.05);
173  h_zmustaSele_muon_d0signed_respectToPV = fs->make<TH1D>("zmustaSele_muonD0signed_respectToPV","d0 vertex of muon respect to PV (zmusta sele)",50,-.1,.1);
174  h_zmustaSele_sta_vz = fs->make<TH1D>("zmustaSele_staVz","z vertex of sta (zmusta sele)",50,-20.,20.);
175  h_zmustaSele_sta_d0signed = fs->make<TH1D>("zmustaSele_staD0signed","d0 vertex of sta (zmusta sele)",50,-.1,.1);
176  h_zmustaSele_sta_vz_respectToPV = fs->make<TH1D>("zmustaSele_staVz_respectToPV","z vertex of sta respect to PV (zmusta sele)",50,-.05,.05);
177  h_zmustaSele_sta_d0signed_respectToPV = fs->make<TH1D>("zmustaSele_staD0signed_respectToPV","d0 vertex of sta respect to PV (zmusta sele)",50,-.1,.1);
178 
179 }
EDGetTokenT< GenParticleMatch > zMuTrackMatchMapToken_
TH1D * h_zmumuSele_muon_d0signed_respectToPV
TH1D * h_zmumuNotIsoSele_muonNotIso_d0signed
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
EDGetTokenT< GenParticleMatch > zMuStandAloneMatchMapToken_
TH1D * h_zmumuNotIsoSele_muonIso_d0signed
TH1D * h_zmutrackSele_track_vz_respectToPV
TH1D * h_zmumuNotIsoSele_dimuon_vz
EDGetTokenT< GenParticleCollection > genParticlesToken_
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
TH1D * h_zmustaSele_muon_vz_respectToPV
TH1D * h_zmutrackSele_track_d0signed
TH1D * h_zmutrackSele_muon_d0signed
TH1D * h_zmumuNotIsoSele_muonIso_vz
TH1D * h_zmutrackSele_track_d0signed_respectToPV
TH1D * h_zmumuNotIsoSele_muonNotIso_d0signed_respectToPV
TH1D * h_zmumuSele_muon_vz_respectToPV
EDGetTokenT< GenParticleMatch > zMuMuMatchMapToken_
TH1D * h_zmumuNotIsoSele_muonIso_d0signed_respectToPV
EDGetTokenT< CandidateView > zMuMuToken_
TH1D * h_zmustaSele_sta_d0signed_respectToPV
TH1D * h_zmutrackSele_muon_vz_respectToPV
TH1D * h_zmumuNotIsoSele_muonNotIso_vz_respectToPV
TH1D * h_zmustaSele_sta_vz_respectToPV
TH1D * h_zmumuNotIsoSele_muonNotIso_vz
TH1D * h_zmustaSele_muon_d0signed_respectToPV
EDGetTokenT< CandidateView > tracksToken_
EDGetTokenT< VertexCollection > primaryVerticesToken_
EDGetTokenT< CandidateView > muonsToken_
TH1D * h_zmumuNotIsoSele_muonIso_vz_respectToPV
TH1D * h_muon_d0signed_respectToPV
EDGetTokenT< CandidateView > zMuStandAloneToken_
TH1D * h_zmutrackSele_muon_d0signed_respectToPV
EDGetTokenT< CandidateView > zMuTrackToken_

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 181 of file ZMuMu_vtxAnalyzer.cc.

References funct::abs(), reco::Candidate::daughter(), reco::Candidate::eta(), etamax_, genParticleCandidates2GenParticles_cfi::genParticles, genParticlesToken_, h_dimuon_vz, h_muon_d0signed, h_muon_d0signed_respectToPV, h_muon_vz, h_muon_vz_respectToPV, h_zmumuNotIsoSele_dimuon_vz, h_zmumuNotIsoSele_muonIso_d0signed, h_zmumuNotIsoSele_muonIso_d0signed_respectToPV, h_zmumuNotIsoSele_muonIso_vz, h_zmumuNotIsoSele_muonIso_vz_respectToPV, h_zmumuNotIsoSele_muonNotIso_d0signed, h_zmumuNotIsoSele_muonNotIso_d0signed_respectToPV, h_zmumuNotIsoSele_muonNotIso_vz, h_zmumuNotIsoSele_muonNotIso_vz_respectToPV, h_zmumuSele_dimuon_vz, h_zmumuSele_muon_d0signed, h_zmumuSele_muon_d0signed_respectToPV, h_zmumuSele_muon_vz, h_zmumuSele_muon_vz_respectToPV, h_zmustaSele_muon_d0signed, h_zmustaSele_muon_d0signed_respectToPV, h_zmustaSele_muon_vz, h_zmustaSele_muon_vz_respectToPV, h_zmustaSele_sta_d0signed, h_zmustaSele_sta_d0signed_respectToPV, h_zmustaSele_sta_vz, h_zmustaSele_sta_vz_respectToPV, h_zmutrackSele_muon_d0signed, h_zmutrackSele_muon_d0signed_respectToPV, h_zmutrackSele_muon_vz, h_zmutrackSele_muon_vz_respectToPV, h_zmutrackSele_track_d0signed, h_zmutrackSele_track_d0signed_respectToPV, h_zmutrackSele_track_vz, h_zmutrackSele_track_vz_respectToPV, i, reco::Muon::isGlobalMuon(), isoMax_, RazorAnalyzer::lep1, reco::Candidate::mass(), massMin_, reco::Candidate::masterClone(), patZpeak::muons, muonsToken_, HLT_25ns10e33_v2_cff::primaryVertices, primaryVerticesToken_, reco::Candidate::pt(), ptmin_, pat::GenericParticle::track(), pat::Muon::track(), pat::Muon::trackIso(), pat::GenericParticle::trackIso(), testEve_cfg::tracks, tracksToken_, pat::PATObject< ObjectType >::triggerObjectMatchesByPath(), reco::LeafCandidate::vz(), ZMuMuAnalysisNtupler_cff::zMuMu, zMuMuMatchMapToken_, zMuMuToken_, zMuStandAloneMatchMapToken_, zMuStandAloneToken_, zMuTrackMatchMapToken_, and zMuTrackToken_.

181  {
183  Handle<GenParticleMatch> zMuMuMatchMap; //Map of Z made by Mu global + Mu global
184  Handle<CandidateView> zMuStandAlone;
185  Handle<GenParticleMatch> zMuStandAloneMatchMap; //Map of Z made by Mu + StandAlone
186  Handle<CandidateView> zMuTrack;
187  Handle<GenParticleMatch> zMuTrackMatchMap; //Map of Z made by Mu + Track
188  Handle<CandidateView> muons; //Collection of Muons
189  Handle<CandidateView> tracks; //Collection of Tracks
190 
191  Handle<GenParticleCollection> genParticles; // Collection of Generatd Particles
192  Handle<reco::VertexCollection> primaryVertices; // Collection of primary Vertices
193 
194  event.getByToken(zMuMuToken_, zMuMu);
195  event.getByToken(zMuStandAloneToken_, zMuStandAlone);
196  event.getByToken(zMuTrackToken_, zMuTrack);
197  event.getByToken(genParticlesToken_, genParticles);
198  event.getByToken(primaryVerticesToken_, primaryVertices);
199  event.getByToken(muonsToken_, muons);
200  event.getByToken(tracksToken_, tracks);
201 
202  /*
203  cout << "********* zMuMu size : " << zMuMu->size() << endl;
204  cout << "********* zMuStandAlone size : " << zMuStandAlone->size() << endl;
205  cout << "********* zMuTrack size : " << zMuTrack->size() << endl;
206  cout << "********* muons size : " << muons->size() << endl;
207  cout << "********* tracks size : " << tracks->size() << endl;
208  cout << "********* vertices size : " << primaryVertices->size() << endl;
209  */
210 
211  // std::cout<<"Run-> "<<event.id().run()<<std::endl;
212  // std::cout<<"Event-> "<<event.id().event()<<std::endl;
213 
214  bool zMuMu_found = false;
215 
216  // loop on ZMuMu
217  if (zMuMu->size() > 0 ) {
218  event.getByToken(zMuMuMatchMapToken_, zMuMuMatchMap);
219  for(unsigned int i = 0; i < zMuMu->size(); ++i) { //loop on candidates
220  const Candidate & zMuMuCand = (*zMuMu)[i]; //the candidate
221  CandidateBaseRef zMuMuCandRef = zMuMu->refAt(i);
222 
223  const Candidate * lep0 = zMuMuCand.daughter( 0 );
224  const Candidate * lep1 = zMuMuCand.daughter( 1 );
225  const pat::Muon & muonDau0 = dynamic_cast<const pat::Muon &>(*lep0->masterClone());
226  double trkiso0 = muonDau0.trackIso();
227  const pat::Muon & muonDau1 = dynamic_cast<const pat::Muon &>(*lep1->masterClone());
228  double trkiso1 = muonDau1.trackIso();
229 
230  // vertex
231  h_muon_vz->Fill(muonDau0.vz());
232  h_muon_vz->Fill(muonDau1.vz());
233  h_dimuon_vz->Fill((muonDau0.vz()+muonDau1.vz())/2.);
234 
235  TrackRef mu0TrkRef = muonDau0.track();
236  float d0signed_mu0 = (*mu0TrkRef).dxy();
237  float d0signed_mu0_respectToPV= (*mu0TrkRef).dxy( primaryVertices->begin()->position() );
238  float vz_mu0_respectToPV= (*mu0TrkRef).dz( primaryVertices->begin()->position() );
239 
240  TrackRef mu1TrkRef = muonDau1.track();
241  float d0signed_mu1 = (*mu1TrkRef).dxy();
242  float d0signed_mu1_respectToPV= (*mu1TrkRef).dxy( primaryVertices->begin()->position() );
243  float vz_mu1_respectToPV= (*mu1TrkRef).dz( primaryVertices->begin()->position() );
244  h_muon_d0signed->Fill(d0signed_mu0);
245  h_muon_d0signed->Fill(d0signed_mu1);
246  h_muon_d0signed_respectToPV->Fill(d0signed_mu0_respectToPV);
247  h_muon_d0signed_respectToPV->Fill(d0signed_mu1_respectToPV);
248  h_muon_vz_respectToPV->Fill(vz_mu0_respectToPV);
249  h_muon_vz_respectToPV->Fill(vz_mu1_respectToPV);
250 
251  // eta , pt distributions
252  double pt0 = zMuMuCand.daughter(0)->pt();
253  double pt1 = zMuMuCand.daughter(1)->pt();
254  double eta0 = zMuMuCand.daughter(0)->eta();
255  double eta1 = zMuMuCand.daughter(1)->eta();
256  double mass = zMuMuCand.mass();
257 
258  // HLT match
259  const pat::TriggerObjectStandAloneCollection mu0HLTMatches =
260  muonDau0.triggerObjectMatchesByPath( "HLT_Mu9" );
261  const pat::TriggerObjectStandAloneCollection mu1HLTMatches =
262  muonDau1.triggerObjectMatchesByPath( "HLT_Mu9" );
263 
264  bool trig0found = false;
265  bool trig1found = false;
266  if( mu0HLTMatches.size()>0 )
267  trig0found = true;
268  if( mu1HLTMatches.size()>0 )
269  trig1found = true;
270 
271  // cynematical selection
272  if ((trig0found || trig1found) && pt0>ptmin_ && pt1>ptmin_ && abs(eta0)<etamax_ && abs(eta1)<etamax_ && mass > massMin_) {
273  if (trkiso0<isoMax_ && trkiso1<isoMax_) { // zmumu both isolated
274  h_zmumuSele_muon_vz->Fill(muonDau0.vz());
275  h_zmumuSele_muon_vz->Fill(muonDau1.vz());
276  h_zmumuSele_dimuon_vz->Fill((muonDau0.vz()+muonDau1.vz())/2.);
277  h_zmumuSele_muon_d0signed->Fill(d0signed_mu0);
278  h_zmumuSele_muon_d0signed->Fill(d0signed_mu1);
279  h_zmumuSele_muon_d0signed_respectToPV->Fill(d0signed_mu0_respectToPV);
280  h_zmumuSele_muon_d0signed_respectToPV->Fill(d0signed_mu1_respectToPV);
281  h_zmumuSele_muon_vz_respectToPV->Fill(vz_mu0_respectToPV);
282  h_zmumuSele_muon_vz_respectToPV->Fill(vz_mu1_respectToPV);
283  }
284  if (trkiso0>=isoMax_ && trkiso1<isoMax_) { // zmumu just muon1 isolated
285  h_zmumuNotIsoSele_muonNotIso_vz->Fill(muonDau0.vz());
286  h_zmumuNotIsoSele_muonIso_vz->Fill(muonDau1.vz());
287  h_zmumuNotIsoSele_dimuon_vz->Fill((muonDau0.vz()+muonDau1.vz())/2.);
288  h_zmumuNotIsoSele_muonNotIso_d0signed->Fill(d0signed_mu0);
289  h_zmumuNotIsoSele_muonIso_d0signed->Fill(d0signed_mu1);
290  h_zmumuNotIsoSele_muonNotIso_d0signed_respectToPV->Fill(d0signed_mu0_respectToPV);
291  h_zmumuNotIsoSele_muonIso_d0signed_respectToPV->Fill(d0signed_mu1_respectToPV);
292  h_zmumuNotIsoSele_muonNotIso_vz_respectToPV->Fill(vz_mu0_respectToPV);
293  h_zmumuNotIsoSele_muonIso_vz_respectToPV->Fill(vz_mu1_respectToPV);
294  }
295  if (trkiso0<isoMax_ && trkiso1>=isoMax_) { // zmumu just muon0 isolated
296  h_zmumuNotIsoSele_muonNotIso_vz->Fill(muonDau1.vz());
297  h_zmumuNotIsoSele_muonIso_vz->Fill(muonDau0.vz());
298  h_zmumuNotIsoSele_dimuon_vz->Fill((muonDau1.vz()+muonDau1.vz())/2.);
299  h_zmumuNotIsoSele_muonNotIso_d0signed->Fill(d0signed_mu1);
300  h_zmumuNotIsoSele_muonIso_d0signed->Fill(d0signed_mu0);
301  h_zmumuNotIsoSele_muonNotIso_d0signed_respectToPV->Fill(d0signed_mu1_respectToPV);
302  h_zmumuNotIsoSele_muonIso_d0signed_respectToPV->Fill(d0signed_mu0_respectToPV);
303  h_zmumuNotIsoSele_muonNotIso_vz_respectToPV->Fill(vz_mu1_respectToPV);
304  h_zmumuNotIsoSele_muonIso_vz_respectToPV->Fill(vz_mu0_respectToPV);
305  }
306  }
307  } // end loop on ZMuMu cand
308  } // end if ZMuMu size > 0
309 
310  // loop on ZMuSta
311  bool zMuSta_found = false;
312  if (!zMuMu_found && zMuStandAlone->size() > 0 ) {
313  event.getByToken(zMuStandAloneMatchMapToken_, zMuStandAloneMatchMap);
314  for(unsigned int i = 0; i < zMuStandAlone->size(); ++i) { //loop on candidates
315  const Candidate & zMuStandAloneCand = (*zMuStandAlone)[i]; //the candidate
316  CandidateBaseRef zMuStandAloneCandRef = zMuStandAlone->refAt(i);
317  GenParticleRef zMuStandAloneMatch = (*zMuStandAloneMatchMap)[zMuStandAloneCandRef];
318 
319  const Candidate * lep0 = zMuStandAloneCand.daughter( 0 );
320  const Candidate * lep1 = zMuStandAloneCand.daughter( 1 );
321  const pat::Muon & muonDau0 = dynamic_cast<const pat::Muon &>(*lep0->masterClone());
322  double trkiso0 = muonDau0.trackIso();
323  const pat::Muon & muonDau1 = dynamic_cast<const pat::Muon &>(*lep1->masterClone());
324  double trkiso1 = muonDau1.trackIso();
325 
326  // vertex
327 
328  TrackRef mu0TrkRef = muonDau0.track();
329  float d0signed_mu0 = (*mu0TrkRef).dxy();
330  float d0signed_mu0_respectToPV= (*mu0TrkRef).dxy( primaryVertices->begin()->position() );
331  float vz_mu0_respectToPV= (*mu0TrkRef).dz( primaryVertices->begin()->position() );
332 
333  TrackRef mu1TrkRef = muonDau1.track();
334  float d0signed_mu1 = (*mu1TrkRef).dxy();
335  float d0signed_mu1_respectToPV= (*mu1TrkRef).dxy( primaryVertices->begin()->position() );
336  float vz_mu1_respectToPV= (*mu1TrkRef).dz( primaryVertices->begin()->position() );
337 
338  double pt0 = zMuStandAloneCand.daughter(0)->pt();
339  double pt1 = zMuStandAloneCand.daughter(1)->pt();
340  double eta0 = zMuStandAloneCand.daughter(0)->eta();
341  double eta1 = zMuStandAloneCand.daughter(1)->eta();
342  double mass = zMuStandAloneCand.mass();
343 
344  // HLT match
345  const pat::TriggerObjectStandAloneCollection mu0HLTMatches =
346  muonDau0.triggerObjectMatchesByPath( "HLT_Mu9" );
347  const pat::TriggerObjectStandAloneCollection mu1HLTMatches =
348  muonDau1.triggerObjectMatchesByPath( "HLT_Mu9" );
349 
350  bool trig0found = false;
351  bool trig1found = false;
352  if( mu0HLTMatches.size()>0 )
353  trig0found = true;
354  if( mu1HLTMatches.size()>0 )
355  trig1found = true;
356 
357  // check the global muon ... trigger is required just on global muon
358  bool trigfound = false;
359  if (muonDau0.isGlobalMuon()) trigfound = trig0found;
360  if (muonDau1.isGlobalMuon()) trigfound = trig1found;
361 
362  // cynematical selection
363  if (trigfound && pt0>ptmin_ && pt1>ptmin_ && abs(eta0)<etamax_ && abs(eta1)<etamax_ && mass>massMin_ && trkiso0<isoMax_ && trkiso1<isoMax_) {
364  zMuSta_found = true;
365  h_zmustaSele_muon_vz->Fill(muonDau0.vz(),1.); // muon vz
366  h_zmustaSele_sta_vz->Fill(muonDau1.vz(),1.); // sta vz
367  h_zmustaSele_muon_d0signed->Fill(d0signed_mu0,1.); // muon d0
368  h_zmustaSele_sta_d0signed->Fill(d0signed_mu1,1.); // sta d0
369  h_zmustaSele_muon_d0signed_respectToPV->Fill(d0signed_mu0_respectToPV,1.); // muon d0 respect PV
370  h_zmustaSele_sta_d0signed_respectToPV->Fill(d0signed_mu1_respectToPV,1.); // sta d0 respect PV
371  h_zmustaSele_muon_vz_respectToPV->Fill(vz_mu0_respectToPV,1.); // muon vz respect PV
372  h_zmustaSele_sta_vz_respectToPV->Fill(vz_mu1_respectToPV,1.); // sta vz respect PV
373  }
374 
375  } // end loop on ZMuStandAlone cand
376  } // end if ZMuStandAlone size > 0
377 
378 
379  // loop on ZMuTrack
380  if (!zMuMu_found && !zMuSta_found && zMuTrack->size() > 0 ) {
381  event.getByToken(zMuTrackMatchMapToken_, zMuTrackMatchMap);
382  for(unsigned int i = 0; i < zMuTrack->size(); ++i) { //loop on candidates
383  const Candidate & zMuTrackCand = (*zMuTrack)[i]; //the candidate
384  CandidateBaseRef zMuTrackCandRef = zMuTrack->refAt(i);
385  const Candidate * lep0 = zMuTrackCand.daughter( 0 );
386  const Candidate * lep1 = zMuTrackCand.daughter( 1 );
387  const pat::Muon & muonDau0 = dynamic_cast<const pat::Muon &>(*lep0->masterClone());
388  double trkiso0 = muonDau0.trackIso();
389  const pat::GenericParticle & trackDau1 = dynamic_cast<const pat::GenericParticle &>(*lep1->masterClone());
390  double trkiso1 = trackDau1.trackIso();
391 
392  // vertex
393 
394  TrackRef mu0TrkRef = muonDau0.track();
395  float d0signed_mu0 = (*mu0TrkRef).dxy();
396  float d0signed_mu0_respectToPV= (*mu0TrkRef).dxy( primaryVertices->begin()->position() );
397  float vz_mu0_respectToPV= (*mu0TrkRef).dz( primaryVertices->begin()->position() );
398 
399  TrackRef mu1TrkRef = trackDau1.track();
400  float d0signed_mu1 = (*mu1TrkRef).dxy();
401  float d0signed_mu1_respectToPV= (*mu1TrkRef).dxy( primaryVertices->begin()->position() );
402  float vz_mu1_respectToPV= (*mu1TrkRef).dz( primaryVertices->begin()->position() );
403 
404  // cynematical parameters
405 
406  double pt0 = zMuTrackCand.daughter(0)->pt();
407  double pt1 = zMuTrackCand.daughter(1)->pt();
408  double eta0 = zMuTrackCand.daughter(0)->eta();
409  double eta1 = zMuTrackCand.daughter(1)->eta();
410  double mass = zMuTrackCand.mass();
411 
412  // HLT match (check just dau0 the global)
413  const pat::TriggerObjectStandAloneCollection mu0HLTMatches =
414  muonDau0.triggerObjectMatchesByPath( "HLT_Mu9" );
415 
416  bool trig0found = false;
417  if( mu0HLTMatches.size()>0 )
418  trig0found = true;
419 
420  // cynematical selection
421  if (trig0found && pt0>ptmin_ && pt1>ptmin_ && abs(eta0)<etamax_ && abs(eta1)<etamax_ && mass>massMin_ && trkiso0<isoMax_ && trkiso1<isoMax_) {
422  h_zmutrackSele_muon_vz->Fill(muonDau0.vz(),1.); // muon vz
423  h_zmutrackSele_track_vz->Fill(trackDau1.vz(),1.); // track vz
424  h_zmutrackSele_muon_d0signed->Fill(d0signed_mu0,1.); // muon d0
425  h_zmutrackSele_track_d0signed->Fill(d0signed_mu1,1.); // track d0
426  h_zmutrackSele_muon_d0signed_respectToPV->Fill(d0signed_mu0_respectToPV,1.); // muon d0 respect PV
427  h_zmutrackSele_track_d0signed_respectToPV->Fill(d0signed_mu1_respectToPV,1.); // track d0 respect PV
428  h_zmutrackSele_muon_vz_respectToPV->Fill(vz_mu0_respectToPV,1.); // muon vz respect PV
429  h_zmutrackSele_track_vz_respectToPV->Fill(vz_mu1_respectToPV,1.); // track vz respect PV
430  }
431 
432  } // end loop on ZMuTrack cand
433  } // end if ZMuTrack size > 0
434 
435 } // end analyze
EDGetTokenT< GenParticleMatch > zMuTrackMatchMapToken_
TH1D * h_zmumuSele_muon_d0signed_respectToPV
TH1D * h_zmumuNotIsoSele_muonNotIso_d0signed
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) ...
EDGetTokenT< GenParticleMatch > zMuStandAloneMatchMapToken_
reco::TrackRef track() const
reference to Track reconstructed in the tracker only (reimplemented from reco::Muon) ...
TH1D * h_zmumuNotIsoSele_muonIso_d0signed
virtual double pt() const =0
transverse momentum
virtual double mass() const =0
mass
TH1D * h_zmutrackSele_track_vz_respectToPV
TH1D * h_zmumuNotIsoSele_dimuon_vz
bool isGlobalMuon() const
Definition: Muon.h:222
EDGetTokenT< GenParticleCollection > genParticlesToken_
std::vector< TriggerObjectStandAlone > TriggerObjectStandAloneCollection
Collection of TriggerObjectStandAlone.
TH1D * h_zmustaSele_muon_vz_respectToPV
float trackIso() const
float trackIso() const
Definition: Muon.h:170
TH1D * h_zmutrackSele_track_d0signed
TH1D * h_zmutrackSele_muon_d0signed
TH1D * h_zmumuNotIsoSele_muonIso_vz
TH1D * h_zmutrackSele_track_d0signed_respectToPV
Analysis-level Generic Particle class (e.g. for hadron or muon not fully reconstructed) ...
TH1D * h_zmumuNotIsoSele_muonNotIso_d0signed_respectToPV
TH1D * h_zmumuSele_muon_vz_respectToPV
EDGetTokenT< GenParticleMatch > zMuMuMatchMapToken_
tuple lep1
print &#39;MRbb(1b)&#39;,event.mr_bb
TH1D * h_zmumuNotIsoSele_muonIso_d0signed_respectToPV
EDGetTokenT< CandidateView > zMuMuToken_
TH1D * h_zmustaSele_sta_d0signed_respectToPV
TH1D * h_zmutrackSele_muon_vz_respectToPV
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
TH1D * h_zmumuNotIsoSele_muonNotIso_vz_respectToPV
virtual reco::TrackRef track() const
const TriggerObjectStandAloneCollection triggerObjectMatchesByPath(const std::string &namePath, const bool pathLastFilterAccepted=false, const bool pathL3FilterAccepted=true) const
Definition: PATObject.h:612
TH1D * h_zmustaSele_sta_vz_respectToPV
virtual double vz() const
z coordinate of vertex position
TH1D * h_zmumuNotIsoSele_muonNotIso_vz
tuple tracks
Definition: testEve_cfg.py:39
TH1D * h_zmustaSele_muon_d0signed_respectToPV
EDGetTokenT< CandidateView > tracksToken_
EDGetTokenT< VertexCollection > primaryVerticesToken_
tuple muons
Definition: patZpeak.py:38
EDGetTokenT< CandidateView > muonsToken_
TH1D * h_zmumuNotIsoSele_muonIso_vz_respectToPV
TH1D * h_muon_d0signed_respectToPV
EDGetTokenT< CandidateView > zMuStandAloneToken_
TH1D * h_zmutrackSele_muon_d0signed_respectToPV
EDGetTokenT< CandidateView > zMuTrackToken_
Analysis-level muon class.
Definition: Muon.h:49
tuple zMuMu
zMuMu vector of PSet is common to all categories except zMuTrk category
virtual double eta() const =0
momentum pseudorapidity
virtual const CandidateBaseRef & masterClone() const =0
bool ZMuMu_vtxAnalyzer::check_ifZmumu ( const Candidate dauGen0,
const Candidate dauGen1,
const Candidate dauGen2 
)
private

Definition at line 437 of file ZMuMu_vtxAnalyzer.cc.

References reco::Candidate::pdgId().

438 {
439  int partId0 = dauGen0->pdgId();
440  int partId1 = dauGen1->pdgId();
441  int partId2 = dauGen2->pdgId();
442  bool muplusFound=false;
443  bool muminusFound=false;
444  bool ZFound=false;
445  if (partId0==13 || partId1==13 || partId2==13) muminusFound=true;
446  if (partId0==-13 || partId1==-13 || partId2==-13) muplusFound=true;
447  if (partId0==23 || partId1==23 || partId2==23) ZFound=true;
448  return muplusFound*muminusFound*ZFound;
449 }
virtual int pdgId() const =0
PDG identifier.
void ZMuMu_vtxAnalyzer::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 585 of file ZMuMu_vtxAnalyzer.cc.

585  {
586 
587 }
float ZMuMu_vtxAnalyzer::getParticleEta ( const int  ipart,
const Candidate dauGen0,
const Candidate dauGen1,
const Candidate dauGen2 
)
private

Definition at line 484 of file ZMuMu_vtxAnalyzer.cc.

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

485 {
486  int partId0 = dauGen0->pdgId();
487  int partId1 = dauGen1->pdgId();
488  int partId2 = dauGen2->pdgId();
489  float etapart=0.;
490  if (partId0 == ipart) {
491  for(unsigned int k = 0; k < dauGen0->numberOfDaughters(); ++k) {
492  const Candidate * dauMuGen = dauGen0->daughter(k);
493  if(dauMuGen->pdgId() == ipart && dauMuGen->status() ==1) {
494  etapart = dauMuGen->eta();
495  }
496  }
497  }
498  if (partId1 == ipart) {
499  for(unsigned int k = 0; k < dauGen1->numberOfDaughters(); ++k) {
500  const Candidate * dauMuGen = dauGen1->daughter(k);
501  if(dauMuGen->pdgId() == ipart && dauMuGen->status() ==1) {
502  etapart = dauMuGen->eta();
503  }
504  }
505  }
506  if (partId2 == ipart) {
507  for(unsigned int k = 0; k < dauGen2->numberOfDaughters(); ++k) {
508  const Candidate * dauMuGen = dauGen2->daughter(k);
509  if(abs(dauMuGen->pdgId()) == ipart && dauMuGen->status() ==1) {
510  etapart = dauMuGen->eta();
511  }
512  }
513  }
514  return etapart;
515 }
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
virtual int pdgId() const =0
PDG identifier.
virtual double eta() const =0
momentum pseudorapidity
Particle::LorentzVector ZMuMu_vtxAnalyzer::getParticleP4 ( const int  ipart,
const Candidate dauGen0,
const Candidate dauGen1,
const Candidate dauGen2 
)
private

Definition at line 550 of file ZMuMu_vtxAnalyzer.cc.

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

551 {
552  int partId0 = dauGen0->pdgId();
553  int partId1 = dauGen1->pdgId();
554  int partId2 = dauGen2->pdgId();
555  Particle::LorentzVector p4part(0.,0.,0.,0.);
556  if (partId0 == ipart) {
557  for(unsigned int k = 0; k < dauGen0->numberOfDaughters(); ++k) {
558  const Candidate * dauMuGen = dauGen0->daughter(k);
559  if(dauMuGen->pdgId() == ipart && dauMuGen->status() ==1) {
560  p4part = dauMuGen->p4();
561  }
562  }
563  }
564  if (partId1 == ipart) {
565  for(unsigned int k = 0; k < dauGen1->numberOfDaughters(); ++k) {
566  const Candidate * dauMuGen = dauGen1->daughter(k);
567  if(dauMuGen->pdgId() == ipart && dauMuGen->status() ==1) {
568  p4part = dauMuGen->p4();
569  }
570  }
571  }
572  if (partId2 == ipart) {
573  for(unsigned int k = 0; k < dauGen2->numberOfDaughters(); ++k) {
574  const Candidate * dauMuGen = dauGen2->daughter(k);
575  if(abs(dauMuGen->pdgId()) == ipart && dauMuGen->status() ==1) {
576  p4part = dauMuGen->p4();
577  }
578  }
579  }
580  return p4part;
581 }
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
virtual int pdgId() const =0
PDG identifier.
math::PtEtaPhiELorentzVectorF LorentzVector
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector
float ZMuMu_vtxAnalyzer::getParticlePhi ( const int  ipart,
const Candidate dauGen0,
const Candidate dauGen1,
const Candidate dauGen2 
)
private

Definition at line 517 of file ZMuMu_vtxAnalyzer.cc.

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

518 {
519  int partId0 = dauGen0->pdgId();
520  int partId1 = dauGen1->pdgId();
521  int partId2 = dauGen2->pdgId();
522  float phipart=0.;
523  if (partId0 == ipart) {
524  for(unsigned int k = 0; k < dauGen0->numberOfDaughters(); ++k) {
525  const Candidate * dauMuGen = dauGen0->daughter(k);
526  if(dauMuGen->pdgId() == ipart && dauMuGen->status() ==1) {
527  phipart = dauMuGen->phi();
528  }
529  }
530  }
531  if (partId1 == ipart) {
532  for(unsigned int k = 0; k < dauGen1->numberOfDaughters(); ++k) {
533  const Candidate * dauMuGen = dauGen1->daughter(k);
534  if(dauMuGen->pdgId() == ipart && dauMuGen->status() ==1) {
535  phipart = dauMuGen->phi();
536  }
537  }
538  }
539  if (partId2 == ipart) {
540  for(unsigned int k = 0; k < dauGen2->numberOfDaughters(); ++k) {
541  const Candidate * dauMuGen = dauGen2->daughter(k);
542  if(abs(dauMuGen->pdgId()) == ipart && dauMuGen->status() ==1) {
543  phipart = dauMuGen->phi();
544  }
545  }
546  }
547  return phipart;
548 }
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
virtual int pdgId() const =0
PDG identifier.
virtual double phi() const =0
momentum azimuthal angle
float ZMuMu_vtxAnalyzer::getParticlePt ( const int  ipart,
const Candidate dauGen0,
const Candidate dauGen1,
const Candidate dauGen2 
)
private

Definition at line 451 of file ZMuMu_vtxAnalyzer.cc.

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

452 {
453  int partId0 = dauGen0->pdgId();
454  int partId1 = dauGen1->pdgId();
455  int partId2 = dauGen2->pdgId();
456  float ptpart=0.;
457  if (partId0 == ipart) {
458  for(unsigned int k = 0; k < dauGen0->numberOfDaughters(); ++k) {
459  const Candidate * dauMuGen = dauGen0->daughter(k);
460  if(dauMuGen->pdgId() == ipart && dauMuGen->status() ==1) {
461  ptpart = dauMuGen->pt();
462  }
463  }
464  }
465  if (partId1 == ipart) {
466  for(unsigned int k = 0; k < dauGen1->numberOfDaughters(); ++k) {
467  const Candidate * dauMuGen = dauGen1->daughter(k);
468  if(dauMuGen->pdgId() == ipart && dauMuGen->status() ==1) {
469  ptpart = dauMuGen->pt();
470  }
471  }
472  }
473  if (partId2 == ipart) {
474  for(unsigned int k = 0; k < dauGen2->numberOfDaughters(); ++k) {
475  const Candidate * dauMuGen = dauGen2->daughter(k);
476  if(abs(dauMuGen->pdgId()) == ipart && dauMuGen->status() ==1) {
477  ptpart = dauMuGen->pt();
478  }
479  }
480  }
481  return ptpart;
482 }
virtual const Candidate * daughter(size_type i) const =0
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
virtual double pt() const =0
transverse momentum
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
virtual int pdgId() const =0
PDG identifier.

Member Data Documentation

bool ZMuMu_vtxAnalyzer::bothMuons_
private

Definition at line 68 of file ZMuMu_vtxAnalyzer.cc.

double ZMuMu_vtxAnalyzer::etamax_
private

Definition at line 70 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze().

EDGetTokenT<GenParticleCollection> ZMuMu_vtxAnalyzer::genParticlesToken_
private

Definition at line 65 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze().

reco::CandidateBaseRef ZMuMu_vtxAnalyzer::globalMuonCandRef_
private

Definition at line 72 of file ZMuMu_vtxAnalyzer.cc.

TH1D * ZMuMu_vtxAnalyzer::h_dimuon_vz
private

Definition at line 79 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_muon_d0signed
private

Definition at line 79 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_muon_d0signed_respectToPV
private

Definition at line 80 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_muon_vz
private

Definition at line 79 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_muon_vz_respectToPV
private

Definition at line 80 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_zmumuNotIsoSele_dimuon_vz
private

Definition at line 85 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_zmumuNotIsoSele_muonIso_d0signed
private

Definition at line 86 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_zmumuNotIsoSele_muonIso_d0signed_respectToPV
private

Definition at line 87 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_zmumuNotIsoSele_muonIso_vz
private

Definition at line 86 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_zmumuNotIsoSele_muonIso_vz_respectToPV
private

Definition at line 87 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_zmumuNotIsoSele_muonNotIso_d0signed
private

Definition at line 88 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_zmumuNotIsoSele_muonNotIso_d0signed_respectToPV
private

Definition at line 89 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_zmumuNotIsoSele_muonNotIso_vz
private

Definition at line 88 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_zmumuNotIsoSele_muonNotIso_vz_respectToPV
private

Definition at line 89 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_zmumuSele_dimuon_vz
private

Definition at line 82 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_zmumuSele_muon_d0signed
private

Definition at line 82 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_zmumuSele_muon_d0signed_respectToPV
private

Definition at line 83 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_zmumuSele_muon_vz
private

Definition at line 82 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_zmumuSele_muon_vz_respectToPV
private

Definition at line 83 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_zmustaSele_muon_d0signed
private

Definition at line 96 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_zmustaSele_muon_d0signed_respectToPV
private

Definition at line 97 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_zmustaSele_muon_vz
private

Definition at line 96 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_zmustaSele_muon_vz_respectToPV
private

Definition at line 97 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_zmustaSele_sta_d0signed
private

Definition at line 98 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_zmustaSele_sta_d0signed_respectToPV
private

Definition at line 99 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_zmustaSele_sta_vz
private

Definition at line 98 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_zmustaSele_sta_vz_respectToPV
private

Definition at line 99 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_zmutrackSele_muon_d0signed
private

Definition at line 91 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_zmutrackSele_muon_d0signed_respectToPV
private

Definition at line 92 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_zmutrackSele_muon_vz
private

Definition at line 91 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_zmutrackSele_muon_vz_respectToPV
private

Definition at line 92 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_zmutrackSele_track_d0signed
private

Definition at line 93 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_zmutrackSele_track_d0signed_respectToPV
private

Definition at line 94 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_zmutrackSele_track_vz
private

Definition at line 93 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_zmutrackSele_track_vz_respectToPV
private

Definition at line 94 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

double ZMuMu_vtxAnalyzer::isoMax_
private

Definition at line 70 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze().

double ZMuMu_vtxAnalyzer::massMax_
private

Definition at line 70 of file ZMuMu_vtxAnalyzer.cc.

double ZMuMu_vtxAnalyzer::massMin_
private

Definition at line 70 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze().

EDGetTokenT<CandidateView> ZMuMu_vtxAnalyzer::muonsToken_
private

Definition at line 63 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze().

OverlapChecker ZMuMu_vtxAnalyzer::overlap_
private

Definition at line 73 of file ZMuMu_vtxAnalyzer.cc.

EDGetTokenT<VertexCollection> ZMuMu_vtxAnalyzer::primaryVerticesToken_
private

Definition at line 66 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze().

double ZMuMu_vtxAnalyzer::ptmin_
private

Definition at line 70 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze().

reco::CandidateBaseRef ZMuMu_vtxAnalyzer::standAloneMuonCandRef_
private

Definition at line 72 of file ZMuMu_vtxAnalyzer.cc.

reco::CandidateBaseRef ZMuMu_vtxAnalyzer::trackMuonCandRef_
private

Definition at line 72 of file ZMuMu_vtxAnalyzer.cc.

EDGetTokenT<CandidateView> ZMuMu_vtxAnalyzer::tracksToken_
private

Definition at line 64 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze().

EDGetTokenT<GenParticleMatch> ZMuMu_vtxAnalyzer::zMuMuMatchMapToken_
private

Definition at line 58 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze().

EDGetTokenT<CandidateView> ZMuMu_vtxAnalyzer::zMuMuToken_
private

Definition at line 57 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze().

EDGetTokenT<GenParticleMatch> ZMuMu_vtxAnalyzer::zMuStandAloneMatchMapToken_
private

Definition at line 60 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze().

EDGetTokenT<CandidateView> ZMuMu_vtxAnalyzer::zMuStandAloneToken_
private

Definition at line 59 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze().

EDGetTokenT<GenParticleMatch> ZMuMu_vtxAnalyzer::zMuTrackMatchMapToken_
private

Definition at line 62 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze().

EDGetTokenT<CandidateView> ZMuMu_vtxAnalyzer::zMuTrackToken_
private

Definition at line 61 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze().