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
TtSemiLepDaughter::LepW
static const std::string LepW
Definition: TtSemiLeptonicEvent.h:9
HIPAlignmentAlgorithm_cfi.verbosity
verbosity
Definition: HIPAlignmentAlgorithm_cfi.py:7
TtSemiLeptonicEvent::hadronicDecayQuark
const reco::Candidate * hadronicDecayQuark(const std::string &key, const unsigned &cmb=0) const
get hadronic light quark of the given hypothesis
Definition: TtSemiLeptonicEvent.h:56
TtEvent::genEvt_
edm::RefProd< TtGenEvent > genEvt_
reference to TtGenEvent (has to be kept in the event!)
Definition: TtEvent.h:188
TtSemiLepDaughter::Nu
static const std::string Nu
Definition: TtSemiLeptonicEvent.h:9
TtSemiLeptonicEvent::numberOfRealNeutrinoSolutions
const int numberOfRealNeutrinoSolutions(const HypoClassKey &key) const
get number of real neutrino solutions for a given hypo class
Definition: TtSemiLeptonicEvent.h:146
TtSemiLeptonicEvent::leptonicDecayTop
const reco::Candidate * leptonicDecayTop(const std::string &key, const unsigned &cmb=0) const
get leptonic top of the given hypothesis
Definition: TtSemiLeptonicEvent.h:72
TtSemiLeptonicEvent::hadronicDecayB
const reco::GenParticle * hadronicDecayB() const
get hadronic b of the TtGenEvent
Definition: TtSemiLeptonicEvent.h:117
TtSemiLeptonicEvent::hadronicDecayTop
const reco::Candidate * hadronicDecayTop(const HypoClassKey &key, const unsigned &cmb=0) const
get hadronic top of the given hypothesis
Definition: TtSemiLeptonicEvent.h:36
TtEvent::isHypoValid
bool isHypoValid(const std::string &key, const unsigned &cmb=0) const
check if hypothesis 'cmb' within the hypothesis class was valid; if not it lead to an empty Composite...
Definition: TtEvent.h:78
TtSemiLeptonicEvent::singleNeutrino
const reco::Candidate * singleNeutrino(const HypoClassKey &key, const unsigned &cmb=0) const
get leptonic light quark of the given hypothesis
Definition: TtSemiLeptonicEvent.h:100
reco::GenParticle
Definition: GenParticle.h:21
TtSemiLeptonicEvent::leptonicDecayB
const reco::Candidate * leptonicDecayB(const HypoClassKey &key, const unsigned &cmb=0) const
get leptonic b of the given hypothesis
Definition: TtSemiLeptonicEvent.h:84
TtSemiLepDaughter::Lep
static const std::string Lep
Definition: TtSemiLeptonicEvent.h:9
TtSemiLeptonicEvent::leptonicDecayW
const reco::Candidate * leptonicDecayW(const HypoClassKey &key, const unsigned &cmb=0) const
get leptonic W of the given hypothesis
Definition: TtSemiLeptonicEvent.h:92
TtSemiLeptonicEvent::hadronicDecayQuark
const reco::GenParticle * hadronicDecayQuark() const
get hadronic light quark of the TtGenEvent
Definition: TtSemiLeptonicEvent.h:121
TtSemiLeptonicEvent::singleNeutrino
const reco::GenParticle * singleNeutrino() const
get neutrino of the TtGenEvent
Definition: TtSemiLeptonicEvent.h:139
TtSemiLeptonicEvent::numberOfRealNeutrinoSolutions_
std::map< HypoClassKey, int > numberOfRealNeutrinoSolutions_
number of real neutrino solutions for all hypo classes
Definition: TtSemiLeptonicEvent.h:159
TtSemiLeptonicEvent::hadronicDecayQuark
const reco::Candidate * hadronicDecayQuark(const HypoClassKey &key, const unsigned &cmb=0) const
get hadronic light quark of the given hypothesis
Definition: TtSemiLeptonicEvent.h:60
TtSemiLeptonicEvent::hadronicDecayQuarkBar
const reco::Candidate * hadronicDecayQuarkBar(const HypoClassKey &key, const unsigned &cmb=0) const
get hadronic light quark of the given hypothesis
Definition: TtSemiLeptonicEvent.h:68
TtSemiLeptonicEvent::hadronicDecayW
const reco::Candidate * hadronicDecayW(const HypoClassKey &key, const unsigned &cmb=0) const
get hadronic W of the given hypothesis
Definition: TtSemiLeptonicEvent.h:52
TtSemiLepDaughter::HadP
static const std::string HadP
Definition: TtSemiLeptonicEvent.h:10
TtEvent::eventHypo
const reco::CompositeCandidate & eventHypo(const HypoClassKey &key, const unsigned &cmb=0) const
Definition: TtEvent.h:59
TtSemiLeptonicEvent
Class derived from the TtEvent for the semileptonic decay channel.
Definition: TtSemiLeptonicEvent.h:24
TtSemiLeptonicEvent::~TtSemiLeptonicEvent
~TtSemiLeptonicEvent() override
default destructor
Definition: TtSemiLeptonicEvent.h:29
TtSemiLeptonicEvent::leptonicDecayTop
const reco::Candidate * leptonicDecayTop(const HypoClassKey &key, const unsigned &cmb=0) const
get leptonic top of the given hypothesis
Definition: TtSemiLeptonicEvent.h:76
TtSemiLepDaughter::HadQ
static const std::string HadQ
Definition: TtSemiLeptonicEvent.h:10
TtSemiLeptonicEvent::singleLepton
const reco::GenParticle * singleLepton() const
get lepton top of the TtGenEvent
Definition: TtSemiLeptonicEvent.h:137
TtEvent
Base class to hold information for ttbar event interpretation.
Definition: TtEvent.h:23
TtEvent::genEvent
const edm::RefProd< TtGenEvent > & genEvent() const
get TtGenEvent
Definition: TtEvent.h:63
TtSemiLeptonicEvent::hadronicDecayTop
const reco::Candidate * hadronicDecayTop(const std::string &key, const unsigned &cmb=0) const
get hadronic top of the given hypothesis
Definition: TtSemiLeptonicEvent.h:32
TtSemiLepDaughter
Definition: TtSemiLeptonicEvent.h:6
TtSemiLeptonicEvent::hadronicDecayW
const reco::Candidate * hadronicDecayW(const std::string &key, const unsigned &cmb=0) const
get hadronic W of the given hypothesis
Definition: TtSemiLeptonicEvent.h:48
TtEvent::hypoClassKeyFromString
HypoClassKey hypoClassKeyFromString(const std::string &label) const
return the corresponding enum value from a string
Definition: TtEvent.cc:15
TtSemiLeptonicEvent::hadronicDecayQuarkBar
const reco::Candidate * hadronicDecayQuarkBar(const std::string &key, const unsigned &cmb=0) const
get hadronic light quark of the given hypothesis
Definition: TtSemiLeptonicEvent.h:64
TtSemiLeptonicEvent::numberOfRealNeutrinoSolutions
const int numberOfRealNeutrinoSolutions(const std::string &key) const
get number of real neutrino solutions for a given hypo class
Definition: TtSemiLeptonicEvent.h:152
TtSemiLepDaughter::LepTop
static const std::string LepTop
Definition: TtSemiLeptonicEvent.h:9
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TtSemiLeptonicEvent::hadronicDecayQuarkBar
const reco::GenParticle * hadronicDecayQuarkBar() const
get hadronic light quark of the TtGenEvent
Definition: TtSemiLeptonicEvent.h:125
TtSemiLeptonicEvent::hadronicDecayB
const reco::Candidate * hadronicDecayB(const HypoClassKey &key, const unsigned &cmb=0) const
get hadronic b of the given hypothesis
Definition: TtSemiLeptonicEvent.h:44
TtSemiLeptonicEvent::setNumberOfRealNeutrinoSolutions
void setNumberOfRealNeutrinoSolutions(const HypoClassKey &key, const int &nr)
set number of real neutrino solutions for a given hypo class
Definition: TtSemiLeptonicEvent.h:157
TtEvent::HypoClassKey
HypoClassKey
supported classes of event hypotheses
Definition: TtEvent.h:26
EgHLTOffHistBins_cfi.nr
nr
Definition: EgHLTOffHistBins_cfi.py:4
TtSemiLeptonicEvent::hadronicDecayTop
const reco::GenParticle * hadronicDecayTop() const
get hadronic top of the TtGenEvent
Definition: TtSemiLeptonicEvent.h:113
TtSemiLeptonicEvent::leptonicDecayW
const reco::GenParticle * leptonicDecayW() const
get leptonic W of the TtGenEvent
Definition: TtSemiLeptonicEvent.h:135
TtSemiLeptonicEvent::leptonicDecayB
const reco::GenParticle * leptonicDecayB() const
get leptonic b of the TtGenEvent
Definition: TtSemiLeptonicEvent.h:133
TtSemiLeptonicEvent::leptonicDecayW
const reco::Candidate * leptonicDecayW(const std::string &key, const unsigned &cmb=0) const
get leptonic W of the given hypothesis
Definition: TtSemiLeptonicEvent.h:88
TtSemiLepDaughter::HadW
static const std::string HadW
Definition: TtSemiLeptonicEvent.h:10
TtSemiLeptonicEvent::singleNeutrino
const reco::Candidate * singleNeutrino(const std::string &key, const unsigned &cmb=0) const
get leptonic light quark of the given hypothesis
Definition: TtSemiLeptonicEvent.h:96
reco::Candidate
Definition: Candidate.h:27
TtSemiLeptonicEvent::TtSemiLeptonicEvent
TtSemiLeptonicEvent()
empty constructor
Definition: TtSemiLeptonicEvent.h:27
TtSemiLepDaughter::LepB
static const std::string LepB
Definition: TtSemiLeptonicEvent.h:9
TtSemiLepDaughter::HadTop
static const std::string HadTop
Definition: TtSemiLeptonicEvent.h:10
TtSemiLeptonicEvent::singleLepton
const reco::Candidate * singleLepton(const HypoClassKey &key, const unsigned &cmb=0) const
get leptonic light quark of the given hypothesis
Definition: TtSemiLeptonicEvent.h:108
TtSemiLeptonicEvent::leptonicDecayTop
const reco::GenParticle * leptonicDecayTop() const
get leptonic top of the TtGenEvent
Definition: TtSemiLeptonicEvent.h:129
reco::CompositeRefCandidateT::daughter
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode)
TtSemiLeptonicEvent::hadronicDecayB
const reco::Candidate * hadronicDecayB(const std::string &key, const unsigned &cmb=0) const
get hadronic b of the given hypothesis
Definition: TtSemiLeptonicEvent.h:40
TtSemiLeptonicEvent::singleLepton
const reco::Candidate * singleLepton(const std::string &key, const unsigned &cmb=0) const
get leptonic light quark of the given hypothesis
Definition: TtSemiLeptonicEvent.h:104
TtEvent.h
TtSemiLeptonicEvent::leptonicDecayB
const reco::Candidate * leptonicDecayB(const std::string &key, const unsigned &cmb=0) const
get leptonic b of the given hypothesis
Definition: TtSemiLeptonicEvent.h:80
TtSemiLeptonicEvent::print
void print(const int verbosity=1) const
Definition: TtSemiLeptonicEvent.cc:9
TtSemiLeptonicEvent::hadronicDecayW
const reco::GenParticle * hadronicDecayW() const
get hadronic W of the TtGenEvent
Definition: TtSemiLeptonicEvent.h:119
crabWrapper.key
key
Definition: crabWrapper.py:19
reco::CompositeCandidate::daughter
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode)
Definition: CompositeCandidate.cc:30
TtSemiLepDaughter::HadB
static const std::string HadB
Definition: TtSemiLeptonicEvent.h:10