CMS 3D CMS Logo

TopGenEvent.h
Go to the documentation of this file.
1 #ifndef TopObjects_TopGenEvent_h
2 #define TopObjects_TopGenEvent_h
3 
6 
7 namespace TopDecayID {
10  static const int stable = 2;
11  static const int unfrag = 3;
12  static const int tID = 6;
13  static const int bID = 5;
14  static const int glueID = 21;
15  static const int photID = 22;
16  static const int ZID = 23;
17  static const int WID = 24;
18  static const int elecID = 11;
19  static const int muonID = 13;
20  static const int tauID = 15;
21 } // namespace TopDecayID
22 
23 namespace WDecay {
28 } // namespace WDecay
29 
40 class TopGenEvent {
41 public:
47  virtual ~TopGenEvent(){};
48 
50  const reco::GenParticleCollection& particles() const { return *parts_; }
54  std::vector<const reco::GenParticle*> radiatedGluons(int pdgId) const;
56  std::vector<const reco::GenParticle*> lightQuarks(bool includingBQuarks = false) const;
58  int numberOfLeptons(bool fromWBoson = true) const;
60  int numberOfLeptons(WDecay::LeptonType type, bool fromWBoson = true) const;
62  int numberOfBQuarks(bool fromTopQuark = true) const;
64  std::vector<const reco::GenParticle*> topSisters() const;
66  const reco::GenParticle* daughterQuarkOfTop(bool invertCharge = false) const;
70  const reco::GenParticle* daughterQuarkOfWPlus(bool invertQuarkCharge = false, bool invertBosonCharge = false) const;
72  const reco::GenParticle* daughterQuarkOfWMinus() const { return daughterQuarkOfWPlus(false, true); };
74  const reco::GenParticle* daughterQuarkBarOfWPlus() const { return daughterQuarkOfWPlus(true, false); };
76  const reco::GenParticle* daughterQuarkBarOfWMinus() const { return daughterQuarkOfWPlus(true, true); };
77 
79  const reco::GenParticle* candidate(int id, unsigned int parentId = 0) const;
101  const reco::GenParticle* top() const { return candidate(TopDecayID::tID); }
103  const reco::GenParticle* topBar() const { return candidate(-TopDecayID::tID); }
104 
107  void print() const;
108 
109 protected:
114 };
115 
116 #endif
edm::RefProd< GenParticleCollection >
TopGenEvent::daughterQuarkOfTopBar
const reco::GenParticle * daughterQuarkOfTopBar() const
return daughter quark of anti-top quark (which can have flavor b, s or d)
Definition: TopGenEvent.h:68
TopGenEvent::daughterQuarkOfWMinus
const reco::GenParticle * daughterQuarkOfWMinus() const
return quark daughter of anti-W boson
Definition: TopGenEvent.h:72
TopGenEvent::numberOfBQuarks
int numberOfBQuarks(bool fromTopQuark=true) const
return number of b quarks in the decay chain
Definition: TopGenEvent.cc:99
reco::GenParticle
Definition: GenParticle.h:21
TopGenEvent::muPlus
const reco::GenParticle * muPlus() const
return anti-muon if available; 0 else
Definition: TopGenEvent.h:87
TopDecayID
Definition: TopGenEvent.h:7
TopGenEvent::daughterQuarkOfWPlus
const reco::GenParticle * daughterQuarkOfWPlus(bool invertQuarkCharge=false, bool invertBosonCharge=false) const
return quark daughter quark of W boson
Definition: TopGenEvent.cc:150
TopDecayID::bID
static const int bID
Definition: TopGenEvent.h:13
reco::GenParticleCollection
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
Definition: GenParticleFwd.h:13
TopGenEvent::b
const reco::GenParticle * b() const
return b quark if available; 0 else
Definition: TopGenEvent.h:97
TopGenEvent::initPartons_
reco::GenParticleRefProd initPartons_
reference to the list of initial partons (has to be kept in the event!)
Definition: TopGenEvent.h:113
TopGenEvent::radiatedGluons
std::vector< const reco::GenParticle * > radiatedGluons(int pdgId) const
return radiated gluons from particle with pdgId
Definition: TopGenEvent.cc:177
TopGenEvent::wMinus
const reco::GenParticle * wMinus() const
return W minus if available; 0 else
Definition: TopGenEvent.h:93
TopDecayID::elecID
static const int elecID
Definition: TopGenEvent.h:18
TopGenEvent::numberOfLeptons
int numberOfLeptons(bool fromWBoson=true) const
return number of leptons in the decay chain
Definition: TopGenEvent.cc:41
TopGenEvent::topBar
const reco::GenParticle * topBar() const
return anti-top if available; 0 else
Definition: TopGenEvent.h:103
GenParticle.h
TopDecayID::muonID
static const int muonID
Definition: TopGenEvent.h:19
TopGenEvent::TopGenEvent
TopGenEvent()
empty constructor
Definition: TopGenEvent.h:43
TopDecayID::glueID
static const int glueID
Definition: TopGenEvent.h:14
TopGenEvent::bBar
const reco::GenParticle * bBar() const
return anti-b quark if available; 0 else
Definition: TopGenEvent.h:99
TopGenEvent::particles
const reco::GenParticleCollection & particles() const
return particles of decay chain
Definition: TopGenEvent.h:50
TopGenEvent::lightQuarks
std::vector< const reco::GenParticle * > lightQuarks(bool includingBQuarks=false) const
return all light quarks or all quarks including b's
Definition: TopGenEvent.cc:164
TopDecaySubset_cfi.decaySubset
decaySubset
Definition: TopDecaySubset_cfi.py:7
WDecay
Definition: TopGenEvent.h:23
TopDecayID::tID
static const int tID
Definition: TopGenEvent.h:12
TopGenEvent::tauPlus
const reco::GenParticle * tauPlus() const
return anti-tau if available; 0 else
Definition: TopGenEvent.h:91
TopGenEvent::candidate
const reco::GenParticle * candidate(int id, unsigned int parentId=0) const
get candidate with given pdg id if available; 0 else
Definition: TopGenEvent.cc:14
TopGenEvent::top
const reco::GenParticle * top() const
return top if available; 0 else
Definition: TopGenEvent.h:101
TopGenEvent::tauMinus
const reco::GenParticle * tauMinus() const
return tau if available; 0 else
Definition: TopGenEvent.h:89
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
TopGenEvent::topSisters
std::vector< const reco::GenParticle * > topSisters() const
return number of top anti-top sisters
Definition: TopGenEvent.cc:117
TopGenEvent::wPlus
const reco::GenParticle * wPlus() const
return W plus if available; 0 else
Definition: TopGenEvent.h:95
EgammaValidation_cff.pdgId
pdgId
Definition: EgammaValidation_cff.py:117
WDecay::kTau
Definition: TopGenEvent.h:27
TopDecayID::WID
static const int WID
Definition: TopGenEvent.h:17
TopDecayID::tauID
static const int tauID
Definition: TopGenEvent.h:20
WDecay::LeptonType
LeptonType
Definition: TopGenEvent.h:27
TopGenEvent::print
void print() const
Definition: TopGenEvent.cc:27
TopDecayID::ZID
static const int ZID
Definition: TopGenEvent.h:16
WDecay::kNone
Definition: TopGenEvent.h:27
WDecay::kMuon
Definition: TopGenEvent.h:27
TopGenEvent::daughterQuarkBarOfWMinus
const reco::GenParticle * daughterQuarkBarOfWMinus() const
return anti-quark daughter of anti-W boson
Definition: TopGenEvent.h:76
TopDecayID::photID
static const int photID
Definition: TopGenEvent.h:15
TopDecayID::stable
static const int stable
Definition: TopGenEvent.h:10
TopDecayID::unfrag
static const int unfrag
Definition: TopGenEvent.h:11
TopGenEvent::ePlus
const reco::GenParticle * ePlus() const
return positron if available; 0 else
Definition: TopGenEvent.h:83
TopGenEvent::~TopGenEvent
virtual ~TopGenEvent()
default destructor
Definition: TopGenEvent.h:47
Candidate.h
TopGenEvent::daughterQuarkBarOfWPlus
const reco::GenParticle * daughterQuarkBarOfWPlus() const
return anti-quark daughter of W boson
Definition: TopGenEvent.h:74
TopGenEvent::parts_
reco::GenParticleRefProd parts_
reference to the top decay chain (has to be kept in the event!)
Definition: TopGenEvent.h:111
WDecay::kElec
Definition: TopGenEvent.h:27
TopGenEvent::eMinus
const reco::GenParticle * eMinus() const
return electron if available; 0 else
Definition: TopGenEvent.h:81
TopGenEvent::initialPartons
const reco::GenParticleCollection & initialPartons() const
return particles of initial partons
Definition: TopGenEvent.h:52
TopGenEvent::muMinus
const reco::GenParticle * muMinus() const
return muon if available; 0 else
Definition: TopGenEvent.h:85
TopGenEvent::daughterQuarkOfTop
const reco::GenParticle * daughterQuarkOfTop(bool invertCharge=false) const
return daughter quark of top quark (which can have flavor b, s or d)
Definition: TopGenEvent.cc:132
TopGenEvent
Base class to hold information for reduced top generator information.
Definition: TopGenEvent.h:40