CMS 3D CMS Logo

TopGenEvent.h

Go to the documentation of this file.
00001 #ifndef TopObjects_TopGenEvent_h
00002 #define TopObjects_TopGenEvent_h
00003 
00004 #include "DataFormats/Candidate/interface/Candidate.h"
00005 #include "DataFormats/HepMCCandidate/interface/GenParticle.h"
00006 
00007 
00008 namespace TopDecayID{
00011   static const int stable = 2;
00012   static const int unfrag = 3;
00013   static const int tID    = 6;
00014   static const int bID    = 5;
00015   static const int glueID = 21;
00016   static const int photID = 22;
00017   static const int ZID    = 23;
00018   static const int WID    = 24;
00019   static const int elecID = 11;
00020   static const int muonID = 13;
00021   static const int tauID  = 15;
00022 }
00023 
00024 namespace WDecay{
00028   enum LeptonType {kNone, kElec, kMuon, kTau};
00029 }
00030 
00031 // ----------------------------------------------------------------------
00032 // common base class for: 
00033 //
00034 //  * TtGenEvent
00035 //  * StGenEvent
00036 //
00037 //  the structure holds reference information to the generator particles 
00038 //  of the decay chains for each top quark and of the initial partons 
00039 //  and provides access and administration
00040 // ----------------------------------------------------------------------
00041 
00042 class TopGenEvent {
00043 
00044  public:
00045 
00047   TopGenEvent(){};
00049   TopGenEvent(reco::GenParticleRefProd&, reco::GenParticleRefProd&);
00051   virtual ~TopGenEvent(){};
00052 
00054   const reco::GenParticleCollection& particles() const { return *parts_; }
00056   const reco::GenParticleCollection& initialPartons() const { return *initPartons_;}
00058   std::vector<const reco::GenParticle*> radiatedGluons(int pdgId) const;
00060   std::vector<const reco::GenParticle*> lightQuarks(bool plusB=false) const;
00062   int numberOfLeptons(bool fromWBoson=true) const;
00064   int numberOfLeptons(WDecay::LeptonType type, bool fromWBoson=true) const;
00066   int numberOfBQuarks(bool fromTopQuark=true) const;
00068   std::vector<const reco::GenParticle*> topSisters() const;
00069 
00071   const reco::GenParticle* candidate(int id) const;
00073   const reco::GenParticle* eMinus() const   { return candidate( TopDecayID::elecID );}
00075   const reco::GenParticle* ePlus() const    { return candidate(-TopDecayID::elecID );}
00077   const reco::GenParticle* muMinus() const  { return candidate( TopDecayID::muonID );}
00079   const reco::GenParticle* muPlus() const   { return candidate(-TopDecayID::muonID );}
00081   const reco::GenParticle* tauMinus() const { return candidate( TopDecayID::tauID  );}
00083   const reco::GenParticle* tauPlus() const  { return candidate(-TopDecayID::tauID  );}
00085   const reco::GenParticle* wMinus() const   { return candidate( TopDecayID::WID    );}
00087   const reco::GenParticle* wPlus() const    { return candidate(-TopDecayID::WID    );}
00089   const reco::GenParticle* top() const      { return candidate( TopDecayID::tID    );}
00091   const reco::GenParticle* topBar() const   { return candidate(-TopDecayID::tID    );}
00093   const reco::GenParticle* b() const        { return candidate( TopDecayID::bID    );}
00095   const reco::GenParticle* bBar() const     { return candidate(-TopDecayID::bID    );}
00096 
00099   void dumpEventContent() const;
00100 
00101 
00102  protected:
00103 
00105   reco::GenParticleRefProd parts_;       
00107   reco::GenParticleRefProd initPartons_; 
00108 };
00109 
00110 #endif

Generated on Tue Jun 9 17:25:07 2009 for CMSSW by  doxygen 1.5.4