74 bool TotalCutPassed =
false;
77 bool ElectronCutPassed =
false;
78 bool MuonCutPassed =
false;
79 bool TauCutPassed =
false;
80 bool PhotonCutPassed =
false;
81 bool JetCutPassed =
false;
82 bool MetCutPassed =
false;
83 bool HtCutPassed =
false;
94 const GenParticle* genParticle = (&(*theGenParticleCollection)[
i]);
95 if(genParticle->
status() == 2) {
97 if(fabs(genParticle->
pdgId()) == 15) {
105 if(genParticle->
status() == 1) {
116 if(fabs(motherCode) == fabs(genParticle->
pdgId()) || fabs(motherCode) == 15) {
118 if(fabs(motherCode) == fabs(genParticle->
pdgId()) || fabs(motherCode) == 15) motherCode = genParticle->
mother()->
mother()->
mother()->
pdgId();
120 if(fabs(motherCode) == 23 || fabs(motherCode) == 24 || fabs(motherCode) > 999999) {
136 if(fabs(motherCode) == fabs(genParticle->
pdgId()) || fabs(motherCode) == 15) {
138 if(fabs(motherCode) == fabs(genParticle->
pdgId()) || fabs(motherCode) == 15) motherCode = genParticle->
mother()->
mother()->
mother()->
pdgId();
140 if(fabs(motherCode) == 23 || fabs(motherCode) == 24 || fabs(motherCode) > 999999) {
148 if(fabs(genParticle->
pdgId()) == 22 && fabs(genParticle->
eta())<2.5) {
161 GenJet genjet = (*theGenJetCollection)[
i];
174 if(theGenMET.
pt() >
mc_metMin) MetCutPassed =
true;
186 if(nMcElectrons ==
mc_nElec) ElectronCutPassed =
true;
189 if(nMcElectrons >=
mc_nElec) ElectronCutPassed =
true;
191 else cout <<
"WARNING: not a correct definition of cuts at gen level for electrons! " << endl;
195 if(nMcMuons ==
mc_nMuon) MuonCutPassed =
true;
198 if(nMcMuons >=
mc_nMuon) MuonCutPassed =
true;
200 else cout <<
"WARNING: not a correct definition of cuts at gen level for muons! " << endl;
201 if(nMcTaus >=
mc_nTau) TauCutPassed =
true;
202 if(nMcPhotons >=
mc_nPhot) PhotonCutPassed =
true;
203 if(nMcJets >=
mc_nJet ) JetCutPassed =
true;
227 HtCutPassed ) TotalCutPassed =
true;
246 return TotalCutPassed;
virtual int pdgId() const
PDG identifier.
virtual float pt() const
transverse momentum
virtual const Candidate * mother(size_type i=0) const =0
return pointer to mother
virtual int status() const
status word
void handleObjects(const edm::Event &)
virtual size_t numberOfMothers() const
number of mothers
virtual float eta() const
momentum pseudorapidity
const reco::GenJetCollection * theGenJetCollection
Jets made from MC generator particles.
virtual int pdgId() const =0
PDG identifier.
const reco::GenParticleCollection * theGenParticleCollection
const reco::GenMETCollection * theGenMETCollection
virtual const Candidate * mother(size_type=0) const
return mother at a given position, i = 0, ... numberOfMothers() - 1 (read only mode) ...