CMS 3D CMS Logo

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 ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void analyze (const edm::Event &event, const edm::EventSetup &setup) override
 
bool check_ifZmumu (const Candidate *dauGen0, const Candidate *dauGen1, const Candidate *dauGen2)
 
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< GenParticleCollectiongenParticlesToken_
 
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 &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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 117 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().

118  : zMuMuToken_(consumes<CandidateView>(pset.getParameter<InputTag>("zMuMu"))),
119  zMuMuMatchMapToken_(mayConsume<GenParticleMatch>(pset.getParameter<InputTag>("zMuMuMatchMap"))),
120  zMuStandAloneToken_(consumes<CandidateView>(pset.getParameter<InputTag>("zMuStandAlone"))),
121  zMuStandAloneMatchMapToken_(mayConsume<GenParticleMatch>(pset.getParameter<InputTag>("zMuStandAloneMatchMap"))),
122  zMuTrackToken_(consumes<CandidateView>(pset.getParameter<InputTag>("zMuTrack"))),
123  zMuTrackMatchMapToken_(mayConsume<GenParticleMatch>(pset.getParameter<InputTag>("zMuTrackMatchMap"))),
124  muonsToken_(consumes<CandidateView>(pset.getParameter<InputTag>("muons"))),
125  tracksToken_(consumes<CandidateView>(pset.getParameter<InputTag>("tracks"))),
126  genParticlesToken_(consumes<GenParticleCollection>(pset.getParameter<InputTag>("genParticles"))),
127  primaryVerticesToken_(consumes<VertexCollection>(pset.getParameter<InputTag>("primaryVertices"))),
128 
129  bothMuons_(pset.getParameter<bool>("bothMuons")),
130 
131  etamax_(pset.getUntrackedParameter<double>("etamax")),
132  ptmin_(pset.getUntrackedParameter<double>("ptmin")),
133  massMin_(pset.getUntrackedParameter<double>("zMassMin")),
134  massMax_(pset.getUntrackedParameter<double>("zMassMax")),
135  isoMax_(pset.getUntrackedParameter<double>("isomax")) {
137 
138  // general histograms
139 
140  // vertex histograms
141  // ... zmumu no Cuts
142  h_muon_vz = fs->make<TH1D>("muonVz", "z vertex of muons", 50, -20., 20.);
143  h_muon_d0signed = fs->make<TH1D>("muonD0signed", "d0 vertex of muons", 50, -.1, .1);
144  h_dimuon_vz = fs->make<TH1D>("dimuonVz", "z vertex of dimuon", 50, -20., 20.);
146  fs->make<TH1D>("muonVz_respectToPV", "z vertex of muons respect to PrimaryVertex", 50, -.05, .05);
148  fs->make<TH1D>("muonD0signed_respectToPV", "d0 vertex of muons respect to PrimaryVertex", 50, -.05, .05);
149  // ... zmumu cynematic Cuts
150  h_zmumuSele_muon_vz = fs->make<TH1D>("zmumuSele_muonVz", "z vertex of muons (zmumu sele)", 50, -20., 20.);
151  h_zmumuSele_muon_d0signed = fs->make<TH1D>("zmumuSele_muonD0signed", "d0 vertex of muons (zmumu sele)", 50, -.1, .1);
152  h_zmumuSele_dimuon_vz = fs->make<TH1D>("zmumuSele_dimuonVz", "z vertex of dimuon (zmumu sele)", 50, -20., 20.);
153  h_zmumuSele_muon_vz_respectToPV = fs->make<TH1D>(
154  "zmumuSele_muonVz_respectToPV", "z vertex of muons respect to PrimaryVertex (zmumu sele)", 50, -.05, .05);
155  h_zmumuSele_muon_d0signed_respectToPV = fs->make<TH1D>(
156  "zmumuSele_muonD0signed_respectToPV", "d0 vertex of muons respect to PrimaryVertex (zmumu sele)", 50, -.05, .05);
157  // ... zmumuNotIso cynematic Cuts
159  fs->make<TH1D>("zmumuNotIsoSele_dimuonVz", "z vertex of dimuon (zmumuNotIso sele)", 50, -20., 20.);
161  fs->make<TH1D>("zmumuNotIsoSele_muonIsoVz", "z vertex of muons (zmumuNotIso sele muon Iso)", 50, -20., 20.);
163  fs->make<TH1D>("zmumuNotIsoSele_muonIsoD0signed", "d0 vertex of muons (zmumuNotIso sele muon Iso)", 50, -.1, .1);
165  fs->make<TH1D>("zmumuNotIsoSele_muonIsoVz_respectToPV",
166  "z vertex of muons respect to PrimaryVertex (zmumuNotIso sele muon Iso)",
167  50,
168  -.05,
169  .05);
171  fs->make<TH1D>("zmumuNotIsoSele_muonIsoD0signed_respectToPV",
172  "d0 vertex of muons respect to PrimaryVertex (zmumuNotIso sele muon Iso)",
173  50,
174  -.05,
175  .05);
176  h_zmumuNotIsoSele_muonNotIso_vz = fs->make<TH1D>(
177  "zmumuNotIsoSele_muonNotIsoVz", "z vertex of muons (zmumuNotIso sele muon Not Iso)", 50, -20., 20.);
178  h_zmumuNotIsoSele_muonNotIso_d0signed = fs->make<TH1D>(
179  "zmumuNotIsoSele_muonNotIsoD0signed", "d0 vertex of muons (zmumuNotIso sele muon Not Iso)", 50, -.1, .1);
181  fs->make<TH1D>("zmumuNotIsoSele_muonNotIsoVz_respectToPV",
182  "z vertex of muons respect to PrimaryVertex (zmumuNotIso sele muon Not Iso)",
183  50,
184  -.05,
185  .05);
187  fs->make<TH1D>("zmumuNotIsoSele_muonNotIsoD0signed_respectToPV",
188  "d0 vertex of muons respect to PrimaryVertex (zmumuNotIso sele muon Not Iso)",
189  50,
190  -.05,
191  .05);
192  // ... zmutrack cynematic Cuts
193  h_zmutrackSele_muon_vz = fs->make<TH1D>("zmutrackSele_muonVz", "z vertex of muon (zmutrack sele)", 50, -20., 20.);
195  fs->make<TH1D>("zmutrackSele_muonD0signed", "d0 vertex of muon (zmutrack sele)", 50, -.1, .1);
196  h_zmutrackSele_muon_vz_respectToPV = fs->make<TH1D>(
197  "zmutrackSele_muonVz_respectToPV", "z vertex of muon respect to PV (zmutrack sele)", 50, -.05, .05);
199  "zmutrackSele_muonD0signed_respectToPV", "d0 vertex of muon respect to PV (zmutrack sele)", 50, -.1, .1);
200  h_zmutrackSele_track_vz = fs->make<TH1D>("zmutrackSele_trackVz", "z vertex of track (zmutrack sele)", 50, -20., 20.);
202  fs->make<TH1D>("zmutrackSele_trackD0signed", "d0 vertex of track (zmutrack sele)", 50, -.1, .1);
203  h_zmutrackSele_track_vz_respectToPV = fs->make<TH1D>(
204  "zmutrackSele_trackVz_respectToPV", "z vertex of track respect to PV (zmutrack sele)", 50, -.05, .05);
206  "zmutrackSele_trackD0signed_respectToPV", "d0 vertex of track respect to PV (zmutrack sele)", 50, -.1, .1);
207  // ... zmusta cynematic Cuts
208  h_zmustaSele_muon_vz = fs->make<TH1D>("zmustaSele_muonVz", "z vertex of muon (zmusta sele)", 50, -20., 20.);
210  fs->make<TH1D>("zmustaSele_muonD0signed", "d0 vertex of muon (zmusta sele)", 50, -.1, .1);
212  fs->make<TH1D>("zmustaSele_muonVz_respectToPV", "z vertex of muon respect to PV (zmusta sele)", 50, -.05, .05);
214  "zmustaSele_muonD0signed_respectToPV", "d0 vertex of muon respect to PV (zmusta sele)", 50, -.1, .1);
215  h_zmustaSele_sta_vz = fs->make<TH1D>("zmustaSele_staVz", "z vertex of sta (zmusta sele)", 50, -20., 20.);
216  h_zmustaSele_sta_d0signed = fs->make<TH1D>("zmustaSele_staD0signed", "d0 vertex of sta (zmusta sele)", 50, -.1, .1);
218  fs->make<TH1D>("zmustaSele_staVz_respectToPV", "z vertex of sta respect to PV (zmusta sele)", 50, -.05, .05);
220  fs->make<TH1D>("zmustaSele_staD0signed_respectToPV", "d0 vertex of sta respect to PV (zmusta sele)", 50, -.1, .1);
221 }
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 
)
overrideprivate

Definition at line 223 of file ZMuMu_vtxAnalyzer.cc.

References funct::abs(), reco::Candidate::daughter(), edm::View< T >::empty(), reco::Candidate::eta(), HLT_2018_cff::eta1, etamax_, genParticles2HepMC_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, mps_fire::i, reco::Muon::isGlobalMuon(), isoMax_, RazorAnalyzer::lep1, EgHLTOffHistBins_cfi::mass, reco::Candidate::mass(), massMin_, reco::Candidate::masterClone(), PDWG_BPHSkim_cff::muons, muonsToken_, zMuMuMuonUserData::primaryVertices, primaryVerticesToken_, reco::Candidate::pt(), HLT_2018_cff::pt1, ptmin_, edm::View< T >::refAt(), edm::View< T >::size(), pat::GenericParticle::track(), pat::Muon::track(), pat::Muon::trackIso(), pat::GenericParticle::trackIso(), PDWG_EXOHSCP_cff::tracks, tracksToken_, pat::PATObject< ObjectType >::triggerObjectMatchesByPath(), reco::LeafCandidate::vz(), ZMuMuAnalysisNtupler_cff::zMuMu, zMuMuMatchMapToken_, zMuMuToken_, zMuStandAloneMatchMapToken_, zMuStandAloneToken_, zMuTrackMatchMapToken_, and zMuTrackToken_.

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

Definition at line 478 of file ZMuMu_vtxAnalyzer.cc.

References reco::Candidate::pdgId().

478  {
479  int partId0 = dauGen0->pdgId();
480  int partId1 = dauGen1->pdgId();
481  int partId2 = dauGen2->pdgId();
482  bool muplusFound = false;
483  bool muminusFound = false;
484  bool ZFound = false;
485  if (partId0 == 13 || partId1 == 13 || partId2 == 13)
486  muminusFound = true;
487  if (partId0 == -13 || partId1 == -13 || partId2 == -13)
488  muplusFound = true;
489  if (partId0 == 23 || partId1 == 23 || partId2 == 23)
490  ZFound = true;
491  return (muplusFound && muminusFound && ZFound);
492 }
virtual int pdgId() const =0
PDG identifier.
void ZMuMu_vtxAnalyzer::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 634 of file ZMuMu_vtxAnalyzer.cc.

References DEFINE_FWK_MODULE.

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

Definition at line 529 of file ZMuMu_vtxAnalyzer.cc.

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

532  {
533  int partId0 = dauGen0->pdgId();
534  int partId1 = dauGen1->pdgId();
535  int partId2 = dauGen2->pdgId();
536  float etapart = 0.;
537  if (partId0 == ipart) {
538  for (unsigned int k = 0; k < dauGen0->numberOfDaughters(); ++k) {
539  const Candidate *dauMuGen = dauGen0->daughter(k);
540  if (dauMuGen->pdgId() == ipart && dauMuGen->status() == 1) {
541  etapart = dauMuGen->eta();
542  }
543  }
544  }
545  if (partId1 == ipart) {
546  for (unsigned int k = 0; k < dauGen1->numberOfDaughters(); ++k) {
547  const Candidate *dauMuGen = dauGen1->daughter(k);
548  if (dauMuGen->pdgId() == ipart && dauMuGen->status() == 1) {
549  etapart = dauMuGen->eta();
550  }
551  }
552  }
553  if (partId2 == ipart) {
554  for (unsigned int k = 0; k < dauGen2->numberOfDaughters(); ++k) {
555  const Candidate *dauMuGen = dauGen2->daughter(k);
556  if (abs(dauMuGen->pdgId()) == ipart && dauMuGen->status() == 1) {
557  etapart = dauMuGen->eta();
558  }
559  }
560  }
561  return etapart;
562 }
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 int pdgId() const =0
PDG identifier.
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
virtual double eta() const =0
momentum pseudorapidity
virtual size_type numberOfDaughters() const =0
number of daughters
Particle::LorentzVector ZMuMu_vtxAnalyzer::getParticleP4 ( const int  ipart,
const Candidate dauGen0,
const Candidate dauGen1,
const Candidate dauGen2 
)
private

Definition at line 599 of file ZMuMu_vtxAnalyzer.cc.

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

602  {
603  int partId0 = dauGen0->pdgId();
604  int partId1 = dauGen1->pdgId();
605  int partId2 = dauGen2->pdgId();
606  Particle::LorentzVector p4part(0., 0., 0., 0.);
607  if (partId0 == ipart) {
608  for (unsigned int k = 0; k < dauGen0->numberOfDaughters(); ++k) {
609  const Candidate *dauMuGen = dauGen0->daughter(k);
610  if (dauMuGen->pdgId() == ipart && dauMuGen->status() == 1) {
611  p4part = dauMuGen->p4();
612  }
613  }
614  }
615  if (partId1 == ipart) {
616  for (unsigned int k = 0; k < dauGen1->numberOfDaughters(); ++k) {
617  const Candidate *dauMuGen = dauGen1->daughter(k);
618  if (dauMuGen->pdgId() == ipart && dauMuGen->status() == 1) {
619  p4part = dauMuGen->p4();
620  }
621  }
622  }
623  if (partId2 == ipart) {
624  for (unsigned int k = 0; k < dauGen2->numberOfDaughters(); ++k) {
625  const Candidate *dauMuGen = dauGen2->daughter(k);
626  if (abs(dauMuGen->pdgId()) == ipart && dauMuGen->status() == 1) {
627  p4part = dauMuGen->p4();
628  }
629  }
630  }
631  return p4part;
632 }
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 const LorentzVector & p4() const =0
four-momentum Lorentz vector
virtual int pdgId() const =0
PDG identifier.
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
virtual size_type numberOfDaughters() const =0
number of daughters
math::PtEtaPhiELorentzVectorF LorentzVector
float ZMuMu_vtxAnalyzer::getParticlePhi ( const int  ipart,
const Candidate dauGen0,
const Candidate dauGen1,
const Candidate dauGen2 
)
private

Definition at line 564 of file ZMuMu_vtxAnalyzer.cc.

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

567  {
568  int partId0 = dauGen0->pdgId();
569  int partId1 = dauGen1->pdgId();
570  int partId2 = dauGen2->pdgId();
571  float phipart = 0.;
572  if (partId0 == ipart) {
573  for (unsigned int k = 0; k < dauGen0->numberOfDaughters(); ++k) {
574  const Candidate *dauMuGen = dauGen0->daughter(k);
575  if (dauMuGen->pdgId() == ipart && dauMuGen->status() == 1) {
576  phipart = dauMuGen->phi();
577  }
578  }
579  }
580  if (partId1 == ipart) {
581  for (unsigned int k = 0; k < dauGen1->numberOfDaughters(); ++k) {
582  const Candidate *dauMuGen = dauGen1->daughter(k);
583  if (dauMuGen->pdgId() == ipart && dauMuGen->status() == 1) {
584  phipart = dauMuGen->phi();
585  }
586  }
587  }
588  if (partId2 == ipart) {
589  for (unsigned int k = 0; k < dauGen2->numberOfDaughters(); ++k) {
590  const Candidate *dauMuGen = dauGen2->daughter(k);
591  if (abs(dauMuGen->pdgId()) == ipart && dauMuGen->status() == 1) {
592  phipart = dauMuGen->phi();
593  }
594  }
595  }
596  return phipart;
597 }
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 int pdgId() const =0
PDG identifier.
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
virtual size_type numberOfDaughters() const =0
number of daughters
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 494 of file ZMuMu_vtxAnalyzer.cc.

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

497  {
498  int partId0 = dauGen0->pdgId();
499  int partId1 = dauGen1->pdgId();
500  int partId2 = dauGen2->pdgId();
501  float ptpart = 0.;
502  if (partId0 == ipart) {
503  for (unsigned int k = 0; k < dauGen0->numberOfDaughters(); ++k) {
504  const Candidate *dauMuGen = dauGen0->daughter(k);
505  if (dauMuGen->pdgId() == ipart && dauMuGen->status() == 1) {
506  ptpart = dauMuGen->pt();
507  }
508  }
509  }
510  if (partId1 == ipart) {
511  for (unsigned int k = 0; k < dauGen1->numberOfDaughters(); ++k) {
512  const Candidate *dauMuGen = dauGen1->daughter(k);
513  if (dauMuGen->pdgId() == ipart && dauMuGen->status() == 1) {
514  ptpart = dauMuGen->pt();
515  }
516  }
517  }
518  if (partId2 == ipart) {
519  for (unsigned int k = 0; k < dauGen2->numberOfDaughters(); ++k) {
520  const Candidate *dauMuGen = dauGen2->daughter(k);
521  if (abs(dauMuGen->pdgId()) == ipart && dauMuGen->status() == 1) {
522  ptpart = dauMuGen->pt();
523  }
524  }
525  }
526  return ptpart;
527 }
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 int pdgId() const =0
PDG identifier.
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
virtual double pt() const =0
transverse momentum
virtual size_type numberOfDaughters() const =0
number of daughters

Member Data Documentation

bool ZMuMu_vtxAnalyzer::bothMuons_
private

Definition at line 72 of file ZMuMu_vtxAnalyzer.cc.

double ZMuMu_vtxAnalyzer::etamax_
private

Definition at line 74 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze().

EDGetTokenT<GenParticleCollection> ZMuMu_vtxAnalyzer::genParticlesToken_
private

Definition at line 69 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze().

reco::CandidateBaseRef ZMuMu_vtxAnalyzer::globalMuonCandRef_
private

Definition at line 76 of file ZMuMu_vtxAnalyzer.cc.

TH1D * ZMuMu_vtxAnalyzer::h_dimuon_vz
private

Definition at line 83 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_muon_d0signed
private

Definition at line 83 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_muon_d0signed_respectToPV
private

Definition at line 84 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_muon_vz
private

Definition at line 83 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_muon_vz_respectToPV
private

Definition at line 84 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_zmumuNotIsoSele_dimuon_vz
private

Definition at line 89 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_zmumuNotIsoSele_muonIso_d0signed
private

Definition at line 90 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_zmumuNotIsoSele_muonIso_d0signed_respectToPV
private

Definition at line 91 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_zmumuNotIsoSele_muonIso_vz
private

Definition at line 90 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_zmumuNotIsoSele_muonIso_vz_respectToPV
private

Definition at line 91 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_zmumuNotIsoSele_muonNotIso_d0signed
private

Definition at line 92 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_zmumuNotIsoSele_muonNotIso_d0signed_respectToPV
private

Definition at line 93 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_zmumuNotIsoSele_muonNotIso_vz
private

Definition at line 92 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_zmumuNotIsoSele_muonNotIso_vz_respectToPV
private

Definition at line 93 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_zmumuSele_dimuon_vz
private

Definition at line 86 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_zmumuSele_muon_d0signed
private

Definition at line 86 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_zmumuSele_muon_d0signed_respectToPV
private

Definition at line 87 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_zmumuSele_muon_vz
private

Definition at line 86 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_zmumuSele_muon_vz_respectToPV
private

Definition at line 87 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_zmustaSele_muon_d0signed
private

Definition at line 100 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_zmustaSele_muon_d0signed_respectToPV
private

Definition at line 101 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_zmustaSele_muon_vz
private

Definition at line 100 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_zmustaSele_muon_vz_respectToPV
private

Definition at line 101 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_zmustaSele_sta_d0signed
private

Definition at line 102 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_zmustaSele_sta_d0signed_respectToPV
private

Definition at line 103 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_zmustaSele_sta_vz
private

Definition at line 102 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_zmustaSele_sta_vz_respectToPV
private

Definition at line 103 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_zmutrackSele_muon_d0signed
private

Definition at line 95 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_zmutrackSele_muon_d0signed_respectToPV
private

Definition at line 96 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_zmutrackSele_muon_vz
private

Definition at line 95 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_zmutrackSele_muon_vz_respectToPV
private

Definition at line 96 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_zmutrackSele_track_d0signed
private

Definition at line 97 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D * ZMuMu_vtxAnalyzer::h_zmutrackSele_track_d0signed_respectToPV
private

Definition at line 98 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_zmutrackSele_track_vz
private

Definition at line 97 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

TH1D* ZMuMu_vtxAnalyzer::h_zmutrackSele_track_vz_respectToPV
private

Definition at line 98 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze(), and ZMuMu_vtxAnalyzer().

double ZMuMu_vtxAnalyzer::isoMax_
private

Definition at line 74 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze().

double ZMuMu_vtxAnalyzer::massMax_
private

Definition at line 74 of file ZMuMu_vtxAnalyzer.cc.

double ZMuMu_vtxAnalyzer::massMin_
private

Definition at line 74 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze().

EDGetTokenT<CandidateView> ZMuMu_vtxAnalyzer::muonsToken_
private

Definition at line 67 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze().

OverlapChecker ZMuMu_vtxAnalyzer::overlap_
private

Definition at line 77 of file ZMuMu_vtxAnalyzer.cc.

EDGetTokenT<VertexCollection> ZMuMu_vtxAnalyzer::primaryVerticesToken_
private

Definition at line 70 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze().

double ZMuMu_vtxAnalyzer::ptmin_
private

Definition at line 74 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze().

reco::CandidateBaseRef ZMuMu_vtxAnalyzer::standAloneMuonCandRef_
private

Definition at line 76 of file ZMuMu_vtxAnalyzer.cc.

reco::CandidateBaseRef ZMuMu_vtxAnalyzer::trackMuonCandRef_
private

Definition at line 76 of file ZMuMu_vtxAnalyzer.cc.

EDGetTokenT<CandidateView> ZMuMu_vtxAnalyzer::tracksToken_
private

Definition at line 68 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze().

EDGetTokenT<GenParticleMatch> ZMuMu_vtxAnalyzer::zMuMuMatchMapToken_
private

Definition at line 62 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze().

EDGetTokenT<CandidateView> ZMuMu_vtxAnalyzer::zMuMuToken_
private

Definition at line 61 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze().

EDGetTokenT<GenParticleMatch> ZMuMu_vtxAnalyzer::zMuStandAloneMatchMapToken_
private

Definition at line 64 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze().

EDGetTokenT<CandidateView> ZMuMu_vtxAnalyzer::zMuStandAloneToken_
private

Definition at line 63 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze().

EDGetTokenT<GenParticleMatch> ZMuMu_vtxAnalyzer::zMuTrackMatchMapToken_
private

Definition at line 66 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze().

EDGetTokenT<CandidateView> ZMuMu_vtxAnalyzer::zMuTrackToken_
private

Definition at line 65 of file ZMuMu_vtxAnalyzer.cc.

Referenced by analyze().