CMS 3D CMS Logo

TtFullHadronicEvent.h
Go to the documentation of this file.
1 #ifndef TopObjects_TtFullHadronicEvent_h
2 #define TopObjects_TtFullHadronicEvent_h
3 
5 
6 namespace TtFullHadDaughter {
9  static const std::string LightQ = "LightQ", LightP = "LightP", WPlus = "WPlus", B = "B", Top = "Top";
10  static const std::string LightQBar = "LightQBar", LightPBar = "LightPBar", WMinus = "WMinus", BBar = "BBar",
11  TopBar = "TopBar";
12 } // namespace TtFullHadDaughter
13 
25 class TtFullHadronicEvent : public TtEvent {
26 public:
30  ~TtFullHadronicEvent() override{};
31 
33  const reco::Candidate* top(const std::string& key, const unsigned& cmb = 0) const {
34  return top(hypoClassKeyFromString(key), cmb);
35  };
37  const reco::Candidate* top(const HypoClassKey& key, const unsigned& cmb = 0) const {
38  return !isHypoValid(key, cmb) ? nullptr : eventHypo(key, cmb).daughter(TtFullHadDaughter::Top);
39  };
41  const reco::Candidate* b(const std::string& key, const unsigned& cmb = 0) const {
42  return b(hypoClassKeyFromString(key), cmb);
43  };
45  const reco::Candidate* b(const HypoClassKey& key, const unsigned& cmb = 0) const {
46  return !isHypoValid(key, cmb) ? nullptr : top(key, cmb)->daughter(TtFullHadDaughter::B);
47  };
48 
50  const reco::Candidate* lightQ(const std::string& key, const unsigned& cmb = 0) const {
51  return lightQ(hypoClassKeyFromString(key), cmb);
52  };
54  const reco::Candidate* lightQ(const HypoClassKey& key, const unsigned& cmb = 0) const {
55  return !isHypoValid(key, cmb) ? nullptr : wPlus(key, cmb)->daughter(TtFullHadDaughter::LightQ);
56  };
57 
59  const reco::Candidate* lightP(const std::string& key, const unsigned& cmb = 0) const {
60  return lightP(hypoClassKeyFromString(key), cmb);
61  };
63  const reco::Candidate* lightP(const HypoClassKey& key, const unsigned& cmb = 0) const {
64  return !isHypoValid(key, cmb) ? nullptr : wMinus(key, cmb)->daughter(TtFullHadDaughter::LightP);
65  };
66 
68  const reco::Candidate* wPlus(const std::string& key, const unsigned& cmb = 0) const {
69  return wPlus(hypoClassKeyFromString(key), cmb);
70  };
72  const reco::Candidate* wPlus(const HypoClassKey& key, const unsigned& cmb = 0) const {
73  return !isHypoValid(key, cmb) ? nullptr : top(key, cmb)->daughter(TtFullHadDaughter::WPlus);
74  };
75 
77  const reco::Candidate* topBar(const std::string& key, const unsigned& cmb = 0) const {
78  return topBar(hypoClassKeyFromString(key), cmb);
79  };
81  const reco::Candidate* topBar(const HypoClassKey& key, const unsigned& cmb = 0) const {
82  return !isHypoValid(key, cmb) ? nullptr : eventHypo(key, cmb).daughter(TtFullHadDaughter::TopBar);
83  };
85  const reco::Candidate* bBar(const std::string& key, const unsigned& cmb = 0) const {
86  return bBar(hypoClassKeyFromString(key), cmb);
87  };
89  const reco::Candidate* bBar(const HypoClassKey& key, const unsigned& cmb = 0) const {
90  return !isHypoValid(key, cmb) ? nullptr : topBar(key, cmb)->daughter(TtFullHadDaughter::BBar);
91  };
92 
94  const reco::Candidate* lightQBar(const std::string& key, const unsigned& cmb = 0) const {
95  return lightQBar(hypoClassKeyFromString(key), cmb);
96  };
98  const reco::Candidate* lightQBar(const HypoClassKey& key, const unsigned& cmb = 0) const {
99  return !isHypoValid(key, cmb) ? nullptr : wPlus(key, cmb)->daughter(TtFullHadDaughter::LightQBar);
100  };
101 
103  const reco::Candidate* lightPBar(const std::string& key, const unsigned& cmb = 0) const {
104  return lightPBar(hypoClassKeyFromString(key), cmb);
105  };
107  const reco::Candidate* lightPBar(const HypoClassKey& key, const unsigned& cmb = 0) const {
108  return !isHypoValid(key, cmb) ? nullptr : wMinus(key, cmb)->daughter(TtFullHadDaughter::LightPBar);
109  };
110 
112  const reco::Candidate* wMinus(const std::string& key, const unsigned& cmb = 0) const {
113  return wMinus(hypoClassKeyFromString(key), cmb);
114  };
116  const reco::Candidate* wMinus(const HypoClassKey& key, const unsigned& cmb = 0) const {
117  return !isHypoValid(key, cmb) ? nullptr : topBar(key, cmb)->daughter(TtFullHadDaughter::WMinus);
118  };
119 
121  const reco::GenParticle* top() const { return (!genEvt_ ? nullptr : this->genEvent()->top()); };
123  const reco::GenParticle* b() const { return (!genEvt_ ? nullptr : this->genEvent()->b()); };
124 
126  const reco::GenParticle* lightQ() const { return (!genEvt_ ? nullptr : this->genEvent()->daughterQuarkOfWPlus()); };
128  const reco::GenParticle* lightP() const { return (!genEvt_ ? nullptr : this->genEvent()->daughterQuarkOfWMinus()); };
129 
131  const reco::GenParticle* wPlus() const { return (!genEvt_ ? nullptr : this->genEvent()->wPlus()); };
132 
134  const reco::GenParticle* topBar() const { return (!genEvt_ ? nullptr : this->genEvent()->topBar()); };
136  const reco::GenParticle* bBar() const { return (!genEvt_ ? nullptr : this->genEvent()->bBar()); };
137 
139  const reco::GenParticle* lightQBar() const {
140  return (!genEvt_ ? nullptr : this->genEvent()->daughterQuarkBarOfWPlus());
141  };
143  const reco::GenParticle* lightPBar() const {
144  return (!genEvt_ ? nullptr : this->genEvent()->daughterQuarkBarOfWMinus());
145  };
146 
148  const reco::GenParticle* wMinus() const { return (!genEvt_ ? nullptr : this->genEvent()->wMinus()); };
149 
152  void print(const int verbosity = 1) const;
153 };
154 
155 #endif
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) ...
~TtFullHadronicEvent() override
default destructor
const reco::Candidate * lightP(const std::string &key, const unsigned &cmb=0) const
get light P of the given hypothesis
static const std::string LightPBar
const reco::GenParticle * lightQBar() const
get light Q bar of the TtGenEvent
static const std::string LightQ
const reco::Candidate * topBar(const std::string &key, const unsigned &cmb=0) const
get anti-top of the given hypothesis
const reco::Candidate * lightQ(const HypoClassKey &key, const unsigned &cmb=0) const
get light Q of the given hypothesis
const reco::Candidate * lightPBar(const HypoClassKey &key, const unsigned &cmb=0) const
get light P bar of the given hypothesis
const reco::GenParticle * lightQ() const
get light Q of the TtGenEvent
TtFullHadronicEvent()
empty constructor
const edm::RefProd< TtGenEvent > & genEvent() const
get TtGenEvent
Definition: TtEvent.h:63
const reco::GenParticle * bBar() const
get anti-b of the TtGenEvent
void print(const int verbosity=1) const
static const std::string Top
const reco::GenParticle * lightP() const
get light P of the TtGenEvent
const reco::Candidate * b(const std::string &key, const unsigned &cmb=0) const
get b of the given hypothesis
const reco::Candidate * lightQBar(const HypoClassKey &key, const unsigned &cmb=0) const
get light Q bar of the given hypothesis
static const std::string LightP
static const std::string WMinus
const reco::Candidate * lightPBar(const std::string &key, const unsigned &cmb=0) const
get light P bar of the given hypothesis
static const std::string B
const reco::Candidate * wPlus(const std::string &key, const unsigned &cmb=0) const
get Wplus of the given hypothesis
const reco::Candidate * wMinus(const HypoClassKey &key, const unsigned &cmb=0) const
get Wminus of the given hypothesis
const reco::GenParticle * lightPBar() const
get light P bar of the TtGenEvent
HypoClassKey hypoClassKeyFromString(const std::string &label) const
return the corresponding enum value from a string
Definition: TtEvent.cc:15
const reco::Candidate * top(const std::string &key, const unsigned &cmb=0) const
get top of the given hypothesis
const int verbosity
static const std::string WPlus
const reco::CompositeCandidate & eventHypo(const HypoClassKey &key, const unsigned &cmb=0) const
Definition: TtEvent.h:59
static const std::string BBar
static const std::string TopBar
Class derived from the TtEvent for the full hadronic decay channel.
const reco::Candidate * bBar(const std::string &key, const unsigned &cmb=0) const
get anti-b of the given hypothesis
Base class to hold information for ttbar event interpretation.
Definition: TtEvent.h:23
const reco::GenParticle * wMinus() const
get Wminus of the TtGenEvent
const reco::GenParticle * b() const
get b of the TtGenEvent
edm::RefProd< TtGenEvent > genEvt_
reference to TtGenEvent (has to be kept in the event!)
Definition: TtEvent.h:188
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
const reco::Candidate * wPlus(const HypoClassKey &key, const unsigned &cmb=0) const
get Wplus of the given hypothesis
const reco::Candidate * bBar(const HypoClassKey &key, const unsigned &cmb=0) const
get anti-b of the given hypothesis
const reco::Candidate * topBar(const HypoClassKey &key, const unsigned &cmb=0) const
get anti-top of the given hypothesis
const reco::GenParticle * top() const
get top of the TtGenEvent
const reco::Candidate * lightQBar(const std::string &key, const unsigned &cmb=0) const
get light Q bar of the given hypothesis
const reco::Candidate * lightQ(const std::string &key, const unsigned &cmb=0) const
get light Q of the given hypothesis
const reco::Candidate * wMinus(const std::string &key, const unsigned &cmb=0) const
get Wminus of the given hypothesis
static const std::string LightQBar
const reco::GenParticle * topBar() const
get anti-top of the TtGenEvent
const reco::Candidate * top(const HypoClassKey &key, const unsigned &cmb=0) const
get top of the given hypothesis
const reco::GenParticle * wPlus() const
get Wplus of the TtGenEvent
const reco::Candidate * b(const HypoClassKey &key, const unsigned &cmb=0) const
get b of the given hypothesis
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
const reco::Candidate * lightP(const HypoClassKey &key, const unsigned &cmb=0) const
get light P of the given hypothesis