CMS 3D CMS Logo

TtSemiLeptonicEvent.h
Go to the documentation of this file.
1 #ifndef TopObjects_TtSemiLeptonicEvent_h
2 #define TopObjects_TtSemiLeptonicEvent_h
3 
5 
6 namespace TtSemiLepDaughter{
9  static const std::string Nu ="Nu" , Lep ="Lep" , LepW="LepW", LepB="LepB", LepTop="LepTop";
10  static const std::string HadQ="HadQ", HadP="HadP", HadW="HadW", HadB="HadB", HadTop="HadTop";
11 }
12 
25 
26  public:
27 
31  ~TtSemiLeptonicEvent() override{};
32 
34  const reco::Candidate* hadronicDecayTop(const std::string& key, const unsigned& cmb=0) const { return hadronicDecayTop(hypoClassKeyFromString(key), cmb); };
36  const reco::Candidate* hadronicDecayTop(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? nullptr : eventHypo(key,cmb). daughter(TtSemiLepDaughter::HadTop); };
38  const reco::Candidate* hadronicDecayB(const std::string& key, const unsigned& cmb=0) const { return hadronicDecayB(hypoClassKeyFromString(key), cmb); };
40  const reco::Candidate* hadronicDecayB(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? nullptr : hadronicDecayTop(key,cmb)->daughter(TtSemiLepDaughter::HadB); };
42  const reco::Candidate* hadronicDecayW(const std::string& key, const unsigned& cmb=0) const { return hadronicDecayW(hypoClassKeyFromString(key), cmb); };
44  const reco::Candidate* hadronicDecayW(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? nullptr : hadronicDecayTop(key,cmb)->daughter(TtSemiLepDaughter::HadW); };
46  const reco::Candidate* hadronicDecayQuark(const std::string& key, const unsigned& cmb=0) const { return hadronicDecayQuark(hypoClassKeyFromString(key), cmb); };
48  const reco::Candidate* hadronicDecayQuark(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? nullptr : hadronicDecayW(key,cmb)->daughter(TtSemiLepDaughter::HadP); };
50  const reco::Candidate* hadronicDecayQuarkBar(const std::string& key, const unsigned& cmb=0) const { return hadronicDecayQuarkBar(hypoClassKeyFromString(key), cmb); };
52  const reco::Candidate* hadronicDecayQuarkBar(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? nullptr : hadronicDecayW(key,cmb)->daughter(TtSemiLepDaughter::HadQ); };
54  const reco::Candidate* leptonicDecayTop(const std::string& key, const unsigned& cmb=0) const { return leptonicDecayTop(hypoClassKeyFromString(key), cmb); };
56  const reco::Candidate* leptonicDecayTop(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? nullptr : eventHypo(key,cmb). daughter(TtSemiLepDaughter::LepTop); };
58  const reco::Candidate* leptonicDecayB(const std::string& key, const unsigned& cmb=0) const { return leptonicDecayB(hypoClassKeyFromString(key), cmb); };
60  const reco::Candidate* leptonicDecayB(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? nullptr : leptonicDecayTop(key,cmb)->daughter(TtSemiLepDaughter::LepB); };
62  const reco::Candidate* leptonicDecayW(const std::string& key, const unsigned& cmb=0) const { return leptonicDecayW(hypoClassKeyFromString(key), cmb); };
64  const reco::Candidate* leptonicDecayW(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? nullptr : leptonicDecayTop(key,cmb)->daughter(TtSemiLepDaughter::LepW); };
66  const reco::Candidate* singleNeutrino(const std::string& key, const unsigned& cmb=0) const { return singleNeutrino(hypoClassKeyFromString(key), cmb); };
68  const reco::Candidate* singleNeutrino(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? nullptr : leptonicDecayW(key,cmb)->daughter(TtSemiLepDaughter::Nu); };
70  const reco::Candidate* singleLepton(const std::string& key, const unsigned& cmb=0) const { return singleLepton(hypoClassKeyFromString(key), cmb); };
72  const reco::Candidate* singleLepton(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? nullptr : leptonicDecayW(key,cmb)->daughter(TtSemiLepDaughter::Lep); };
73 
75  const reco::GenParticle* hadronicDecayTop() const { return (!genEvt_ ? nullptr : this->genEvent()->hadronicDecayTop()); };
77  const reco::GenParticle* hadronicDecayB() const { return (!genEvt_ ? nullptr : this->genEvent()->hadronicDecayB()); };
79  const reco::GenParticle* hadronicDecayW() const { return (!genEvt_ ? nullptr : this->genEvent()->hadronicDecayW()); };
81  const reco::GenParticle* hadronicDecayQuark() const { return (!genEvt_ ? nullptr : this->genEvent()->hadronicDecayQuark()); };
83  const reco::GenParticle* hadronicDecayQuarkBar() const { return (!genEvt_ ? nullptr : this->genEvent()->hadronicDecayQuarkBar()); };
85  const reco::GenParticle* leptonicDecayTop() const { return (!genEvt_ ? nullptr : this->genEvent()->leptonicDecayTop()); };
87  const reco::GenParticle* leptonicDecayB() const { return (!genEvt_ ? nullptr : this->genEvent()->leptonicDecayB()); };
89  const reco::GenParticle* leptonicDecayW() const { return (!genEvt_ ? nullptr : this->genEvent()->leptonicDecayW()); };
91  const reco::GenParticle* singleLepton() const { return (!genEvt_ ? nullptr : this->genEvent()->singleLepton()); };
93  const reco::GenParticle* singleNeutrino() const { return (!genEvt_ ? nullptr : this->genEvent()->singleNeutrino()); };
94 
97  void print(const int verbosity=1) const;
98 
100  const int numberOfRealNeutrinoSolutions(const HypoClassKey& key) const { return (numberOfRealNeutrinoSolutions_.find(key)==numberOfRealNeutrinoSolutions_.end() ? -999 : numberOfRealNeutrinoSolutions_.find(key)->second); };
102  const int numberOfRealNeutrinoSolutions(const std::string& key) const { return numberOfRealNeutrinoSolutions(hypoClassKeyFromString(key)); };
103 
105  void setNumberOfRealNeutrinoSolutions(const HypoClassKey& key, const int& nr) { numberOfRealNeutrinoSolutions_[key] = nr; };
106 
107  protected:
108 
110  std::map<HypoClassKey, int> numberOfRealNeutrinoSolutions_;
111 
112 };
113 
114 #endif
const reco::Candidate * leptonicDecayTop(const HypoClassKey &key, const unsigned &cmb=0) const
get leptonic top of the given hypothesis
static const std::string HadB
const reco::Candidate * leptonicDecayW(const std::string &key, const unsigned &cmb=0) const
get leptonic W of the given hypothesis
const reco::GenParticle * leptonicDecayTop() const
get leptonic top of the TtGenEvent
HypoClassKey
supported classes of event hypotheses
Definition: TtEvent.h:31
static const std::string LepTop
const reco::Candidate * hadronicDecayTop(const HypoClassKey &key, const unsigned &cmb=0) const
get hadronic top of the given hypothesis
const reco::Candidate * singleLepton(const std::string &key, const unsigned &cmb=0) const
get leptonic light quark of the given hypothesis
static const std::string Lep
static const std::string LepW
const reco::Candidate * hadronicDecayW(const std::string &key, const unsigned &cmb=0) const
get hadronic W of the given hypothesis
const reco::Candidate * hadronicDecayQuarkBar(const HypoClassKey &key, const unsigned &cmb=0) const
get hadronic light quark of the given hypothesis
virtual const Candidate * daughter(size_type i) const =0
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
const reco::Candidate * hadronicDecayW(const HypoClassKey &key, const unsigned &cmb=0) const
get hadronic W of the given hypothesis
const reco::GenParticle * leptonicDecayB() const
get leptonic b of the TtGenEvent
const reco::Candidate * hadronicDecayTop(const std::string &key, const unsigned &cmb=0) const
get hadronic top of the given hypothesis
void setNumberOfRealNeutrinoSolutions(const HypoClassKey &key, const int &nr)
set number of real neutrino solutions for a given hypo class
Class derived from the TtEvent for the semileptonic decay channel.
static const std::string HadP
const reco::Candidate * leptonicDecayW(const HypoClassKey &key, const unsigned &cmb=0) const
get leptonic W of the given hypothesis
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:65
const reco::Candidate * hadronicDecayB(const std::string &key, const unsigned &cmb=0) const
get hadronic b of the given hypothesis
const reco::GenParticle * hadronicDecayB() const
get hadronic b of the TtGenEvent
const reco::GenParticle * singleLepton() const
get lepton top of the TtGenEvent
const reco::Candidate * leptonicDecayB(const std::string &key, const unsigned &cmb=0) const
get leptonic b of the given hypothesis
const int numberOfRealNeutrinoSolutions(const std::string &key) const
get number of real neutrino solutions for a given hypo class
const reco::GenParticle * leptonicDecayW() const
get leptonic W of the TtGenEvent
const reco::GenParticle * hadronicDecayW() const
get hadronic W of the TtGenEvent
const reco::Candidate * hadronicDecayB(const HypoClassKey &key, const unsigned &cmb=0) const
get hadronic b of the given hypothesis
static const std::string HadTop
const reco::Candidate * hadronicDecayQuarkBar(const std::string &key, const unsigned &cmb=0) const
get hadronic light quark of the given hypothesis
TtSemiLeptonicEvent()
empty constructor
const reco::Candidate * leptonicDecayTop(const std::string &key, const unsigned &cmb=0) const
get leptonic top of the given hypothesis
const reco::GenParticle * hadronicDecayQuarkBar() const
get hadronic light quark of the TtGenEvent
const reco::Candidate * hadronicDecayQuark(const HypoClassKey &key, const unsigned &cmb=0) const
get hadronic light quark of the given hypothesis
const reco::Candidate * singleLepton(const HypoClassKey &key, const unsigned &cmb=0) const
get leptonic light quark of the given hypothesis
Base class to hold information for ttbar event interpretation.
Definition: TtEvent.h:27
static const std::string HadQ
static const std::string HadW
const reco::GenParticle * hadronicDecayTop() const
get hadronic top of the TtGenEvent
static const std::string Nu
const reco::Candidate * hadronicDecayQuark(const std::string &key, const unsigned &cmb=0) const
get hadronic light quark of the given hypothesis
~TtSemiLeptonicEvent() override
default destructor
static const std::string LepB
const reco::GenParticle * hadronicDecayQuark() const
get hadronic light quark of the TtGenEvent
const int numberOfRealNeutrinoSolutions(const HypoClassKey &key) const
get number of real neutrino solutions for a given hypo class
const reco::Candidate * leptonicDecayB(const HypoClassKey &key, const unsigned &cmb=0) const
get leptonic b of the given hypothesis
const reco::GenParticle * singleNeutrino() const
get neutrino of the TtGenEvent
const reco::Candidate * singleNeutrino(const std::string &key, const unsigned &cmb=0) const
get leptonic light quark of the given hypothesis
const reco::Candidate * singleNeutrino(const HypoClassKey &key, const unsigned &cmb=0) const
get leptonic light quark of the given hypothesis