CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2/src/AnalysisDataFormats/TopObjects/interface/TtFullLeptonicEvent.h

Go to the documentation of this file.
00001 #ifndef TopObjects_TtFullLeptonicEvent_h
00002 #define TopObjects_TtFullLeptonicEvent_h
00003 
00004 #include "AnalysisDataFormats/TopObjects/interface/TtEvent.h"
00005 
00006 namespace TtFullLepDaughter{
00009   static const std::string Nu   ="Nu"   , LepBar="LepBar", WPlus ="WPlus" , B   ="B"   , Top   ="Top";
00010   static const std::string NuBar="NuBar", Lep   ="Lep"   , WMinus="WMinus", BBar="BBar", TopBar="TopBar"; 
00011 }
00012 
00024 class TtFullLeptonicEvent: public TtEvent {
00025   
00026  public:
00028   TtFullLeptonicEvent(){};
00030   virtual ~TtFullLeptonicEvent(){};
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(TtFullLepDaughter::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(TtFullLepDaughter::B); };
00041   const reco::Candidate* wPlus(const std::string& key, const unsigned& cmb=0) const { return wPlus(hypoClassKeyFromString(key), cmb); };
00043   const reco::Candidate* wPlus(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : top(key,cmb)->daughter(TtFullLepDaughter::WPlus); };
00045   const reco::Candidate* leptonBar(const std::string& key, const unsigned& cmb=0) const { return leptonBar(hypoClassKeyFromString(key), cmb); };
00047   const reco::Candidate* leptonBar(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : wPlus(key,cmb)->daughter(TtFullLepDaughter::LepBar); };
00049   const reco::Candidate* neutrino(const std::string& key, const unsigned& cmb=0) const { return neutrino(hypoClassKeyFromString(key), cmb); };
00051   const reco::Candidate* neutrino(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : wPlus(key,cmb)->daughter(TtFullLepDaughter::Nu    ); };
00053   const reco::Candidate* topBar(const std::string& key, const unsigned& cmb=0) const { return topBar(hypoClassKeyFromString(key), cmb); };
00055   const reco::Candidate* topBar(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : eventHypo(key,cmb). daughter(TtFullLepDaughter::TopBar); };
00057   const reco::Candidate* bBar(const std::string& key, const unsigned& cmb=0) const { return bBar(hypoClassKeyFromString(key), cmb); };
00059   const reco::Candidate* bBar(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : topBar(key,cmb)->daughter(TtFullLepDaughter::BBar  ); };
00061   const reco::Candidate* wMinus(const std::string& key, const unsigned& cmb=0) const { return wMinus(hypoClassKeyFromString(key), cmb); };
00063   const reco::Candidate* wMinus(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : topBar(key,cmb)->daughter(TtFullLepDaughter::WMinus); };
00065   const reco::Candidate* lepton(const std::string& key, const unsigned& cmb=0) const { return lepton(hypoClassKeyFromString(key), cmb); };
00067   const reco::Candidate* lepton(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : wMinus(key,cmb)->daughter(TtFullLepDaughter::Lep   ); };
00069   const reco::Candidate* neutrinoBar(const std::string& key, const unsigned& cmb=0) const { return neutrinoBar(hypoClassKeyFromString(key), cmb); };
00071   const reco::Candidate* neutrinoBar(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : wMinus   (key,cmb)->daughter(TtFullLepDaughter::NuBar ); };
00072 
00074   const reco::GenParticle* genTop        () const { return (!genEvt_ ? 0 : this->genEvent()->top()        ); };
00076   const reco::GenParticle* genB          () const { return (!genEvt_ ? 0 : this->genEvent()->b()          ); };
00078   const reco::GenParticle* genWPlus      () const { return (!genEvt_ ? 0 : this->genEvent()->wPlus()      ); };
00080   const reco::GenParticle* genLeptonBar  () const { return (!genEvt_ ? 0 : this->genEvent()->leptonBar()  ); };
00082   const reco::GenParticle* genNeutrino   () const { return (!genEvt_ ? 0 : this->genEvent()->neutrino()   ); };
00084   const reco::GenParticle* genTopBar     () const { return (!genEvt_ ? 0 : this->genEvent()->topBar()     ); };
00086   const reco::GenParticle* genBBar       () const { return (!genEvt_ ? 0 : this->genEvent()->bBar()       ); };
00088   const reco::GenParticle* genWMinus     () const { return (!genEvt_ ? 0 : this->genEvent()->wMinus()     ); };
00090   const reco::GenParticle* genLepton     () const { return (!genEvt_ ? 0 : this->genEvent()->lepton()     ); };
00092   const reco::GenParticle* genNeutrinoBar() const { return (!genEvt_ ? 0 : this->genEvent()->neutrinoBar()); };
00093 
00095   double solWeight(const unsigned& cmb=0) const { return (cmb<solWeight_.size() ? solWeight_[cmb] : -1.); }    
00097   bool isWrongCharge() const { return wrongCharge_; }
00098 
00100   void setSolWeight(const std::vector<double>& val) { solWeight_=val; }; 
00102   void setWrongCharge(const bool& val) { wrongCharge_=val; }; 
00103 
00106   void print(const int verbosity=1) const;
00107 
00108  protected:
00109 
00111   std::vector<double> solWeight_; 
00113   bool wrongCharge_;
00114 
00115 };
00116 
00117 #endif