CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch2/src/AnalysisDataFormats/TopObjects/interface/TtSemiLeptonicEvent.h

Go to the documentation of this file.
00001 #ifndef TopObjects_TtSemiLeptonicEvent_h
00002 #define TopObjects_TtSemiLeptonicEvent_h
00003 
00004 #include "AnalysisDataFormats/TopObjects/interface/TtEvent.h"
00005 
00006 namespace TtSemiLepDaughter{
00009   static const std::string Nu  ="Nu"  , Lep ="Lep" , LepW="LepW", LepB="LepB", LepTop="LepTop";
00010   static const std::string HadQ="HadQ", HadP="HadP", HadW="HadW", HadB="HadB", HadTop="HadTop"; 
00011 }
00012 
00024 class TtSemiLeptonicEvent: public TtEvent {
00025   
00026  public:
00027 
00029   TtSemiLeptonicEvent(){};
00031   virtual ~TtSemiLeptonicEvent(){};
00032 
00034   const reco::Candidate* hadronicDecayTop(const std::string& key, const unsigned& cmb=0) const { return hadronicDecayTop(hypoClassKeyFromString(key), cmb); };
00036   const reco::Candidate* hadronicDecayTop(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : eventHypo(key,cmb). daughter(TtSemiLepDaughter::HadTop); };
00038   const reco::Candidate* hadronicDecayB(const std::string& key, const unsigned& cmb=0) const { return hadronicDecayB(hypoClassKeyFromString(key), cmb); };
00040   const reco::Candidate* hadronicDecayB(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : hadronicDecayTop(key,cmb)->daughter(TtSemiLepDaughter::HadB); };
00042   const reco::Candidate* hadronicDecayW(const std::string& key, const unsigned& cmb=0) const { return hadronicDecayW(hypoClassKeyFromString(key), cmb); };
00044   const reco::Candidate* hadronicDecayW(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : hadronicDecayTop(key,cmb)->daughter(TtSemiLepDaughter::HadW); };
00046   const reco::Candidate* hadronicDecayQuark(const std::string& key, const unsigned& cmb=0) const { return hadronicDecayQuark(hypoClassKeyFromString(key), cmb); };
00048   const reco::Candidate* hadronicDecayQuark(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : hadronicDecayW(key,cmb)->daughter(TtSemiLepDaughter::HadP); };
00050   const reco::Candidate* hadronicDecayQuarkBar(const std::string& key, const unsigned& cmb=0) const { return hadronicDecayQuarkBar(hypoClassKeyFromString(key), cmb); };
00052   const reco::Candidate* hadronicDecayQuarkBar(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : hadronicDecayW(key,cmb)->daughter(TtSemiLepDaughter::HadQ); };
00054   const reco::Candidate* leptonicDecayTop(const std::string& key, const unsigned& cmb=0) const { return leptonicDecayTop(hypoClassKeyFromString(key), cmb); };
00056   const reco::Candidate* leptonicDecayTop(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : eventHypo(key,cmb). daughter(TtSemiLepDaughter::LepTop); };
00058   const reco::Candidate* leptonicDecayB(const std::string& key, const unsigned& cmb=0) const { return leptonicDecayB(hypoClassKeyFromString(key), cmb); };
00060   const reco::Candidate* leptonicDecayB(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : leptonicDecayTop(key,cmb)->daughter(TtSemiLepDaughter::LepB); };
00062   const reco::Candidate* leptonicDecayW(const std::string& key, const unsigned& cmb=0) const { return leptonicDecayW(hypoClassKeyFromString(key), cmb); };
00064   const reco::Candidate* leptonicDecayW(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : leptonicDecayTop(key,cmb)->daughter(TtSemiLepDaughter::LepW); };
00066   const reco::Candidate* singleNeutrino(const std::string& key, const unsigned& cmb=0) const { return singleNeutrino(hypoClassKeyFromString(key), cmb); };
00068   const reco::Candidate* singleNeutrino(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : leptonicDecayW(key,cmb)->daughter(TtSemiLepDaughter::Nu); };
00070   const reco::Candidate* singleLepton(const std::string& key, const unsigned& cmb=0) const { return singleLepton(hypoClassKeyFromString(key), cmb); };
00072   const reco::Candidate* singleLepton(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : leptonicDecayW(key,cmb)->daughter(TtSemiLepDaughter::Lep); };
00073 
00075   const reco::GenParticle* hadronicDecayTop() const { return (!genEvt_ ? 0 : this->genEvent()->hadronicDecayTop()); };
00077   const reco::GenParticle* hadronicDecayB() const { return (!genEvt_ ? 0 : this->genEvent()->hadronicDecayB()); };
00079   const reco::GenParticle* hadronicDecayW() const { return (!genEvt_ ? 0 : this->genEvent()->hadronicDecayW()); };
00081   const reco::GenParticle* hadronicDecayQuark() const { return (!genEvt_ ? 0 : this->genEvent()->hadronicDecayQuark()); };
00083   const reco::GenParticle* hadronicDecayQuarkBar() const { return (!genEvt_ ? 0 : this->genEvent()->hadronicDecayQuarkBar()); };
00085   const reco::GenParticle* leptonicDecayTop() const { return (!genEvt_ ? 0 : this->genEvent()->leptonicDecayTop()); };
00087   const reco::GenParticle* leptonicDecayB() const { return (!genEvt_ ? 0 : this->genEvent()->leptonicDecayB()); };
00089   const reco::GenParticle* leptonicDecayW() const { return (!genEvt_ ? 0 : this->genEvent()->leptonicDecayW()); };
00091   const reco::GenParticle* singleLepton() const { return (!genEvt_ ? 0 : this->genEvent()->singleLepton());   };
00093   const reco::GenParticle* singleNeutrino() const { return (!genEvt_ ? 0 : this->genEvent()->singleNeutrino()); };
00094 
00097   void print(const int verbosity=1) const;
00098 
00100   const int numberOfRealNeutrinoSolutions(const HypoClassKey& key) const { return (numberOfRealNeutrinoSolutions_.find(key)==numberOfRealNeutrinoSolutions_.end() ? -999 : numberOfRealNeutrinoSolutions_.find(key)->second); };
00102   const int numberOfRealNeutrinoSolutions(const std::string& key) const { return numberOfRealNeutrinoSolutions(hypoClassKeyFromString(key)); };
00103 
00105   void setNumberOfRealNeutrinoSolutions(const HypoClassKey& key, const int& nr) { numberOfRealNeutrinoSolutions_[key] = nr; };
00106 
00107  protected:
00108 
00110   std::map<HypoClassKey, int> numberOfRealNeutrinoSolutions_;
00111 
00112 };
00113 
00114 #endif