test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TopGenEvent.h
Go to the documentation of this file.
1 #ifndef TopObjects_TopGenEvent_h
2 #define TopObjects_TopGenEvent_h
3 
6 
7 
8 namespace TopDecayID{
11  static const int stable = 2;
12  static const int unfrag = 3;
13  static const int tID = 6;
14  static const int bID = 5;
15  static const int glueID = 21;
16  static const int photID = 22;
17  static const int ZID = 23;
18  static const int WID = 24;
19  static const int elecID = 11;
20  static const int muonID = 13;
21  static const int tauID = 15;
22 }
23 
24 namespace WDecay{
29 }
30 
41 class TopGenEvent {
42 
43  public:
44 
50  virtual ~TopGenEvent(){};
51 
53  const reco::GenParticleCollection& particles() const { return *parts_; }
57  std::vector<const reco::GenParticle*> radiatedGluons(int pdgId) const;
59  std::vector<const reco::GenParticle*> lightQuarks(bool includingBQuarks=false) const;
61  int numberOfLeptons(bool fromWBoson=true) const;
63  int numberOfLeptons(WDecay::LeptonType type, bool fromWBoson=true) const;
65  int numberOfBQuarks(bool fromTopQuark=true) const;
67  std::vector<const reco::GenParticle*> topSisters() const;
69  const reco::GenParticle* daughterQuarkOfTop(bool invertCharge=false) const;
73  const reco::GenParticle* daughterQuarkOfWPlus(bool invertQuarkCharge=false, bool invertBosonCharge=false) const;
75  const reco::GenParticle* daughterQuarkOfWMinus() const { return daughterQuarkOfWPlus(false, true); };
77  const reco::GenParticle* daughterQuarkBarOfWPlus() const { return daughterQuarkOfWPlus(true, false); };
79  const reco::GenParticle* daughterQuarkBarOfWMinus() const { return daughterQuarkOfWPlus(true, true); };
80 
82  const reco::GenParticle* candidate(int id, unsigned int parentId=0) const;
104  const reco::GenParticle* top() const { return candidate( TopDecayID::tID );}
106  const reco::GenParticle* topBar() const { return candidate(-TopDecayID::tID );}
107 
110  void print() const;
111 
112  protected:
113 
118 };
119 
120 #endif
const reco::GenParticle * wPlus() const
return W plus if available; 0 else
Definition: TopGenEvent.h:98
type
Definition: HCALResponse.h:21
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
const reco::GenParticle * b() const
return b quark if available; 0 else
Definition: TopGenEvent.h:100
const reco::GenParticle * ePlus() const
return positron if available; 0 else
Definition: TopGenEvent.h:86
reco::GenParticleRefProd parts_
reference to the top decay chain (has to be kept in the event!)
Definition: TopGenEvent.h:115
static const int bID
Definition: TopGenEvent.h:14
static const int glueID
Definition: TopGenEvent.h:15
static const int unfrag
Definition: TopGenEvent.h:12
const reco::GenParticle * tauPlus() const
return anti-tau if available; 0 else
Definition: TopGenEvent.h:94
static const int stable
Definition: TopGenEvent.h:11
std::vector< const reco::GenParticle * > topSisters() const
return number of top anti-top sisters
Definition: TopGenEvent.cc:133
TopGenEvent()
empty constructor
Definition: TopGenEvent.h:46
const reco::GenParticle * daughterQuarkOfWPlus(bool invertQuarkCharge=false, bool invertBosonCharge=false) const
return quark daughter quark of W boson
Definition: TopGenEvent.cc:170
const reco::GenParticle * muMinus() const
return muon if available; 0 else
Definition: TopGenEvent.h:88
const reco::GenParticle * bBar() const
return anti-b quark if available; 0 else
Definition: TopGenEvent.h:102
const reco::GenParticle * top() const
return top if available; 0 else
Definition: TopGenEvent.h:104
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:150
reco::GenParticleRefProd initPartons_
reference to the list of initial partons (has to be kept in the event!)
Definition: TopGenEvent.h:117
static const int tID
Definition: TopGenEvent.h:13
static const int tauID
Definition: TopGenEvent.h:21
const reco::GenParticle * tauMinus() const
return tau if available; 0 else
Definition: TopGenEvent.h:92
std::vector< const reco::GenParticle * > lightQuarks(bool includingBQuarks=false) const
return all light quarks or all quarks including b&#39;s
Definition: TopGenEvent.cc:184
static const int ZID
Definition: TopGenEvent.h:17
const reco::GenParticle * candidate(int id, unsigned int parentId=0) const
get candidate with given pdg id if available; 0 else
Definition: TopGenEvent.cc:16
int numberOfBQuarks(bool fromTopQuark=true) const
return number of b quarks in the decay chain
Definition: TopGenEvent.cc:112
static const int muonID
Definition: TopGenEvent.h:20
Base class to hold information for reduced top generator information.
Definition: TopGenEvent.h:41
std::vector< const reco::GenParticle * > radiatedGluons(int pdgId) const
return radiated gluons from particle with pdgId
Definition: TopGenEvent.cc:199
const reco::GenParticle * daughterQuarkOfTopBar() const
return daughter quark of anti-top quark (which can have flavor b, s or d)
Definition: TopGenEvent.h:71
static const int WID
Definition: TopGenEvent.h:18
const reco::GenParticle * wMinus() const
return W minus if available; 0 else
Definition: TopGenEvent.h:96
const reco::GenParticleCollection & particles() const
return particles of decay chain
Definition: TopGenEvent.h:53
const reco::GenParticle * daughterQuarkBarOfWMinus() const
return anti-quark daughter of anti-W boson
Definition: TopGenEvent.h:79
static const int elecID
Definition: TopGenEvent.h:19
const reco::GenParticle * daughterQuarkBarOfWPlus() const
return anti-quark daughter of W boson
Definition: TopGenEvent.h:77
const reco::GenParticleCollection & initialPartons() const
return particles of initial partons
Definition: TopGenEvent.h:55
static const int photID
Definition: TopGenEvent.h:16
virtual ~TopGenEvent()
default destructor
Definition: TopGenEvent.h:50
const reco::GenParticle * daughterQuarkOfWMinus() const
return quark daughter of anti-W boson
Definition: TopGenEvent.h:75
const reco::GenParticle * muPlus() const
return anti-muon if available; 0 else
Definition: TopGenEvent.h:90
void print() const
Definition: TopGenEvent.cc:31
const reco::GenParticle * topBar() const
return anti-top if available; 0 else
Definition: TopGenEvent.h:106
const reco::GenParticle * eMinus() const
return electron if available; 0 else
Definition: TopGenEvent.h:84
int numberOfLeptons(bool fromWBoson=true) const
return number of leptons in the decay chain
Definition: TopGenEvent.cc:48