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 } // namespace TtSemiLepDaughter
12 
24 class TtSemiLeptonicEvent : public TtEvent {
25 public:
29  ~TtSemiLeptonicEvent() override{};
30 
32  const reco::Candidate* hadronicDecayTop(const std::string& key, const unsigned& cmb = 0) const {
34  };
36  const reco::Candidate* hadronicDecayTop(const HypoClassKey& key, const unsigned& cmb = 0) const {
37  return !isHypoValid(key, cmb) ? nullptr : eventHypo(key, cmb).daughter(TtSemiLepDaughter::HadTop);
38  };
40  const reco::Candidate* hadronicDecayB(const std::string& key, const unsigned& cmb = 0) const {
42  };
44  const reco::Candidate* hadronicDecayB(const HypoClassKey& key, const unsigned& cmb = 0) const {
45  return !isHypoValid(key, cmb) ? nullptr : hadronicDecayTop(key, cmb)->daughter(TtSemiLepDaughter::HadB);
46  };
48  const reco::Candidate* hadronicDecayW(const std::string& key, const unsigned& cmb = 0) const {
50  };
52  const reco::Candidate* hadronicDecayW(const HypoClassKey& key, const unsigned& cmb = 0) const {
53  return !isHypoValid(key, cmb) ? nullptr : hadronicDecayTop(key, cmb)->daughter(TtSemiLepDaughter::HadW);
54  };
56  const reco::Candidate* hadronicDecayQuark(const std::string& key, const unsigned& cmb = 0) const {
58  };
60  const reco::Candidate* hadronicDecayQuark(const HypoClassKey& key, const unsigned& cmb = 0) const {
61  return !isHypoValid(key, cmb) ? nullptr : hadronicDecayW(key, cmb)->daughter(TtSemiLepDaughter::HadP);
62  };
64  const reco::Candidate* hadronicDecayQuarkBar(const std::string& key, const unsigned& cmb = 0) const {
66  };
68  const reco::Candidate* hadronicDecayQuarkBar(const HypoClassKey& key, const unsigned& cmb = 0) const {
69  return !isHypoValid(key, cmb) ? nullptr : hadronicDecayW(key, cmb)->daughter(TtSemiLepDaughter::HadQ);
70  };
72  const reco::Candidate* leptonicDecayTop(const std::string& key, const unsigned& cmb = 0) const {
74  };
76  const reco::Candidate* leptonicDecayTop(const HypoClassKey& key, const unsigned& cmb = 0) const {
77  return !isHypoValid(key, cmb) ? nullptr : eventHypo(key, cmb).daughter(TtSemiLepDaughter::LepTop);
78  };
80  const reco::Candidate* leptonicDecayB(const std::string& key, const unsigned& cmb = 0) const {
82  };
84  const reco::Candidate* leptonicDecayB(const HypoClassKey& key, const unsigned& cmb = 0) const {
85  return !isHypoValid(key, cmb) ? nullptr : leptonicDecayTop(key, cmb)->daughter(TtSemiLepDaughter::LepB);
86  };
88  const reco::Candidate* leptonicDecayW(const std::string& key, const unsigned& cmb = 0) const {
90  };
92  const reco::Candidate* leptonicDecayW(const HypoClassKey& key, const unsigned& cmb = 0) const {
93  return !isHypoValid(key, cmb) ? nullptr : leptonicDecayTop(key, cmb)->daughter(TtSemiLepDaughter::LepW);
94  };
96  const reco::Candidate* singleNeutrino(const std::string& key, const unsigned& cmb = 0) const {
98  };
100  const reco::Candidate* singleNeutrino(const HypoClassKey& key, const unsigned& cmb = 0) const {
101  return !isHypoValid(key, cmb) ? nullptr : leptonicDecayW(key, cmb)->daughter(TtSemiLepDaughter::Nu);
102  };
104  const reco::Candidate* singleLepton(const std::string& key, const unsigned& cmb = 0) const {
106  };
108  const reco::Candidate* singleLepton(const HypoClassKey& key, const unsigned& cmb = 0) const {
109  return !isHypoValid(key, cmb) ? nullptr : leptonicDecayW(key, cmb)->daughter(TtSemiLepDaughter::Lep);
110  };
111 
114  return (!genEvt_ ? nullptr : this->genEvent()->hadronicDecayTop());
115  };
117  const reco::GenParticle* hadronicDecayB() const { return (!genEvt_ ? nullptr : this->genEvent()->hadronicDecayB()); };
119  const reco::GenParticle* hadronicDecayW() const { return (!genEvt_ ? nullptr : this->genEvent()->hadronicDecayW()); };
122  return (!genEvt_ ? nullptr : this->genEvent()->hadronicDecayQuark());
123  };
126  return (!genEvt_ ? nullptr : this->genEvent()->hadronicDecayQuarkBar());
127  };
130  return (!genEvt_ ? nullptr : this->genEvent()->leptonicDecayTop());
131  };
133  const reco::GenParticle* leptonicDecayB() const { return (!genEvt_ ? nullptr : this->genEvent()->leptonicDecayB()); };
135  const reco::GenParticle* leptonicDecayW() const { return (!genEvt_ ? nullptr : this->genEvent()->leptonicDecayW()); };
137  const reco::GenParticle* singleLepton() const { return (!genEvt_ ? nullptr : this->genEvent()->singleLepton()); };
139  const reco::GenParticle* singleNeutrino() const { return (!genEvt_ ? nullptr : this->genEvent()->singleNeutrino()); };
140 
143  void print(const int verbosity = 1) const;
144 
148  ? -999
149  : numberOfRealNeutrinoSolutions_.find(key)->second);
150  };
154  };
155 
159  };
160 
161 protected:
163  std::map<HypoClassKey, int> numberOfRealNeutrinoSolutions_;
164 };
165 
166 #endif
const reco::Candidate * hadronicDecayB(const HypoClassKey &key, const unsigned &cmb=0) const
get hadronic b of the given hypothesis
static const std::string HadB
HypoClassKey
supported classes of event hypotheses
Definition: TtEvent.h:26
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
static const std::string LepTop
const reco::GenParticle * singleLepton() const
get lepton top of the TtGenEvent
static const std::string Lep
static const std::string LepW
const reco::GenParticle * leptonicDecayTop() const
get leptonic top of the TtGenEvent
const reco::Candidate * singleLepton(const std::string &key, const unsigned &cmb=0) const
get leptonic light quark of the given hypothesis
const reco::Candidate * singleNeutrino(const std::string &key, const unsigned &cmb=0) const
get leptonic light quark of the given hypothesis
const reco::GenParticle * hadronicDecayB() const
get hadronic b of the TtGenEvent
const reco::Candidate * hadronicDecayTop(const HypoClassKey &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.
const reco::GenParticle * hadronicDecayW() const
get hadronic W of the TtGenEvent
static const std::string HadP
const reco::GenParticle * leptonicDecayW() const
get leptonic W of the TtGenEvent
const reco::GenParticle * leptonicDecayB() const
get leptonic b of the TtGenEvent
const reco::Candidate * leptonicDecayW(const std::string &key, const unsigned &cmb=0) const
get leptonic W of the given hypothesis
const edm::RefProd< TtGenEvent > & genEvent() const
get TtGenEvent
Definition: TtEvent.h:63
const reco::Candidate * leptonicDecayB(const std::string &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 * hadronicDecayW(const HypoClassKey &key, const unsigned &cmb=0) const
get hadronic W of the given hypothesis
const reco::Candidate * singleLepton(const HypoClassKey &key, const unsigned &cmb=0) const
get leptonic light quark of the given hypothesis
const reco::Candidate * leptonicDecayTop(const HypoClassKey &key, const unsigned &cmb=0) const
get leptonic top of the given hypothesis
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
static const std::string HadTop
TtSemiLeptonicEvent()
empty constructor
const reco::Candidate * hadronicDecayW(const std::string &key, const unsigned &cmb=0) const
get hadronic W of the given hypothesis
HypoClassKey hypoClassKeyFromString(const std::string &label) const
return the corresponding enum value from a string
Definition: TtEvent.cc:15
const reco::Candidate * hadronicDecayQuark(const HypoClassKey &key, const unsigned &cmb=0) const
get hadronic light quark of the given hypothesis
const reco::Candidate * hadronicDecayQuarkBar(const HypoClassKey &key, const unsigned &cmb=0) const
get hadronic light quark of the given hypothesis
const reco::CompositeCandidate & eventHypo(const HypoClassKey &key, const unsigned &cmb=0) const
Definition: TtEvent.h:59
Base class to hold information for ttbar event interpretation.
Definition: TtEvent.h:23
static const std::string HadQ
const reco::Candidate * leptonicDecayW(const HypoClassKey &key, const unsigned &cmb=0) const
get leptonic W of the given hypothesis
const reco::Candidate * hadronicDecayQuark(const std::string &key, const unsigned &cmb=0) const
get hadronic light quark of the given hypothesis
const reco::GenParticle * hadronicDecayTop() const
get hadronic top of the TtGenEvent
edm::RefProd< TtGenEvent > genEvt_
reference to TtGenEvent (has to be kept in the event!)
Definition: TtEvent.h:188
static const std::string HadW
const reco::Candidate * hadronicDecayTop(const std::string &key, const unsigned &cmb=0) const
get hadronic top of the given hypothesis
void print(const int verbosity=1) const
bool isHypoValid(const std::string &key, const unsigned &cmb=0) const
check if hypothesis &#39;cmb&#39; within the hypothesis class was valid; if not it lead to an empty Composite...
Definition: TtEvent.h:78
static const std::string Nu
~TtSemiLeptonicEvent() override
default destructor
static const std::string LepB
const reco::Candidate * leptonicDecayB(const HypoClassKey &key, const unsigned &cmb=0) const
get leptonic b of the given hypothesis
const reco::Candidate * leptonicDecayTop(const std::string &key, const unsigned &cmb=0) const
get leptonic top of the given hypothesis
std::map< HypoClassKey, int > numberOfRealNeutrinoSolutions_
number of real neutrino solutions for all hypo classes
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
const reco::Candidate * hadronicDecayQuarkBar(const std::string &key, const unsigned &cmb=0) const
get hadronic 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
const reco::Candidate * hadronicDecayB(const std::string &key, const unsigned &cmb=0) const
get hadronic 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 * hadronicDecayQuarkBar() const
get hadronic light quark of the TtGenEvent