CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch12/src/AnalysisDataFormats/TopObjects/interface/TtFullHadronicEvent.h

Go to the documentation of this file.
00001 #ifndef TopObjects_TtFullHadronicEvent_h
00002 #define TopObjects_TtFullHadronicEvent_h
00003 
00004 #include "AnalysisDataFormats/TopObjects/interface/TtEvent.h"
00005 
00006 namespace TtFullHadDaughter{
00009   static const std::string LightQ   ="LightQ"   , LightP   ="LightP",    WPlus ="WPlus" , B   ="B"   , Top   ="Top";
00010   static const std::string LightQBar="LightQBar", LightPBar="LightPBar", WMinus="WMinus", BBar="BBar", TopBar="TopBar"; 
00011 }
00012 
00024 class TtFullHadronicEvent: public TtEvent {
00025   
00026  public:
00028   TtFullHadronicEvent(){};
00030   virtual ~TtFullHadronicEvent(){};
00031 
00033   const reco::Candidate* top(const std::string& key, const unsigned& cmb=0) const { return top(hypoClassKeyFromString(key), cmb); };
00035   const reco::Candidate* top(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : eventHypo(key,cmb). daughter(TtFullHadDaughter::Top); };
00037   const reco::Candidate* b(const std::string& key, const unsigned& cmb=0) const { return b(hypoClassKeyFromString(key), cmb); };
00039   const reco::Candidate* b(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : top(key,cmb)->daughter(TtFullHadDaughter::B); };
00040 
00042   const reco::Candidate* lightQ(const std::string& key, const unsigned& cmb=0) const { return lightQ(hypoClassKeyFromString(key), cmb); };
00044   const reco::Candidate* lightQ(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : wPlus(key,cmb)->daughter(TtFullHadDaughter::LightQ); };
00045 
00047   const reco::Candidate* lightP(const std::string& key, const unsigned& cmb=0) const { return lightP(hypoClassKeyFromString(key), cmb); };
00049   const reco::Candidate* lightP(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : wMinus(key,cmb)->daughter(TtFullHadDaughter::LightP); };
00050 
00052   const reco::Candidate* wPlus(const std::string& key, const unsigned& cmb=0) const { return wPlus(hypoClassKeyFromString(key), cmb); };
00054   const reco::Candidate* wPlus(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : top(key,cmb)->daughter(TtFullHadDaughter::WPlus); };
00055 
00057   const reco::Candidate* topBar(const std::string& key, const unsigned& cmb=0) const { return topBar(hypoClassKeyFromString(key), cmb); };
00059   const reco::Candidate* topBar(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : eventHypo(key,cmb). daughter(TtFullHadDaughter::TopBar); };
00061   const reco::Candidate* bBar(const std::string& key, const unsigned& cmb=0) const { return bBar(hypoClassKeyFromString(key), cmb); };
00063   const reco::Candidate* bBar(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : topBar(key,cmb)->daughter(TtFullHadDaughter::BBar  ); };
00064 
00066   const reco::Candidate* lightQBar(const std::string& key, const unsigned& cmb=0) const { return lightQBar(hypoClassKeyFromString(key), cmb); };
00068   const reco::Candidate* lightQBar(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : wPlus(key,cmb)->daughter(TtFullHadDaughter::LightQBar); };
00069 
00071   const reco::Candidate* lightPBar(const std::string& key, const unsigned& cmb=0) const { return lightPBar(hypoClassKeyFromString(key), cmb); };
00073   const reco::Candidate* lightPBar(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : wMinus(key,cmb)->daughter(TtFullHadDaughter::LightPBar); };
00074 
00076   const reco::Candidate* wMinus(const std::string& key, const unsigned& cmb=0) const { return wMinus(hypoClassKeyFromString(key), cmb); };
00078   const reco::Candidate* wMinus(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : topBar(key,cmb)->daughter(TtFullHadDaughter::WMinus); };
00079 
00081   const reco::GenParticle* top        () const { return (!genEvt_ ? 0 : this->genEvent()->top()  ); };
00083   const reco::GenParticle* b          () const { return (!genEvt_ ? 0 : this->genEvent()->b()    ); };
00084 
00086   const reco::GenParticle* lightQ     () const { return (!genEvt_ ? 0 : this->genEvent()->daughterQuarkOfWPlus()   ); };
00088   const reco::GenParticle* lightP     () const { return (!genEvt_ ? 0 : this->genEvent()->daughterQuarkOfWMinus()  ); };
00089 
00091   const reco::GenParticle* wPlus      () const { return (!genEvt_ ? 0 : this->genEvent()->wPlus()   ); };
00092 
00094   const reco::GenParticle* topBar     () const { return (!genEvt_ ? 0 : this->genEvent()->topBar()  ); };
00096   const reco::GenParticle* bBar       () const { return (!genEvt_ ? 0 : this->genEvent()->bBar()    ); };
00097 
00099   const reco::GenParticle* lightQBar  () const { return (!genEvt_ ? 0 : this->genEvent()->daughterQuarkBarOfWPlus()   ); };
00101   const reco::GenParticle* lightPBar  () const { return (!genEvt_ ? 0 : this->genEvent()->daughterQuarkBarOfWMinus()  ); };
00102 
00104   const reco::GenParticle* wMinus     () const { return (!genEvt_ ? 0 : this->genEvent()->wMinus()  ); };
00105 
00108   void print(const int verbosity=1) const;
00109 };
00110 
00111 #endif