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
HIPAlignmentAlgorithm_cfi.verbosity
verbosity
Definition: HIPAlignmentAlgorithm_cfi.py:7
TtFullHadronicEvent::TtFullHadronicEvent
TtFullHadronicEvent()
empty constructor
Definition: TtFullHadronicEvent.h:28
TtEvent::genEvt_
edm::RefProd< TtGenEvent > genEvt_
reference to TtGenEvent (has to be kept in the event!)
Definition: TtEvent.h:195
TtFullHadronicEvent::lightPBar
const reco::Candidate * lightPBar(const std::string &key, const unsigned &cmb=0) const
get light P bar of the given hypothesis
Definition: TtFullHadronicEvent.h:103
TtFullHadronicEvent::lightP
const reco::Candidate * lightP(const std::string &key, const unsigned &cmb=0) const
get light P of the given hypothesis
Definition: TtFullHadronicEvent.h:59
TtFullHadronicEvent::b
const reco::Candidate * b(const HypoClassKey &key, const unsigned &cmb=0) const
get b of the given hypothesis
Definition: TtFullHadronicEvent.h:45
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:82
TtFullHadronicEvent::wMinus
const reco::Candidate * wMinus(const HypoClassKey &key, const unsigned &cmb=0) const
get Wminus of the given hypothesis
Definition: TtFullHadronicEvent.h:116
reco::GenParticle
Definition: GenParticle.h:21
TtFullHadronicEvent::lightQ
const reco::Candidate * lightQ(const std::string &key, const unsigned &cmb=0) const
get light Q of the given hypothesis
Definition: TtFullHadronicEvent.h:50
TtFullHadronicEvent::lightPBar
const reco::Candidate * lightPBar(const HypoClassKey &key, const unsigned &cmb=0) const
get light P bar of the given hypothesis
Definition: TtFullHadronicEvent.h:107
TtFullHadronicEvent::lightQ
const reco::GenParticle * lightQ() const
get light Q of the TtGenEvent
Definition: TtFullHadronicEvent.h:126
TtFullHadDaughter
Definition: TtFullHadronicEvent.h:6
TtFullHadronicEvent
Class derived from the TtEvent for the full hadronic decay channel.
Definition: TtFullHadronicEvent.h:25
TtFullHadronicEvent::topBar
const reco::GenParticle * topBar() const
get anti-top of the TtGenEvent
Definition: TtFullHadronicEvent.h:134
TtFullHadronicEvent::bBar
const reco::GenParticle * bBar() const
get anti-b of the TtGenEvent
Definition: TtFullHadronicEvent.h:136
TtFullHadronicEvent::b
const reco::GenParticle * b() const
get b of the TtGenEvent
Definition: TtFullHadronicEvent.h:123
TtFullHadronicEvent::top
const reco::Candidate * top(const HypoClassKey &key, const unsigned &cmb=0) const
get top of the given hypothesis
Definition: TtFullHadronicEvent.h:37
TtFullHadDaughter::WMinus
static const std::string WMinus
Definition: TtFullHadronicEvent.h:10
TtFullHadronicEvent::print
void print(const int verbosity=1) const
Definition: TtFullHadronicEvent.cc:6
TtFullHadronicEvent::wPlus
const reco::Candidate * wPlus(const HypoClassKey &key, const unsigned &cmb=0) const
get Wplus of the given hypothesis
Definition: TtFullHadronicEvent.h:72
TtFullHadronicEvent::lightQBar
const reco::Candidate * lightQBar(const std::string &key, const unsigned &cmb=0) const
get light Q bar of the given hypothesis
Definition: TtFullHadronicEvent.h:94
TtEvent::eventHypo
const reco::CompositeCandidate & eventHypo(const HypoClassKey &key, const unsigned &cmb=0) const
Definition: TtEvent.h:63
TtFullHadronicEvent::lightQBar
const reco::Candidate * lightQBar(const HypoClassKey &key, const unsigned &cmb=0) const
get light Q bar of the given hypothesis
Definition: TtFullHadronicEvent.h:98
TtFullHadronicEvent::lightQ
const reco::Candidate * lightQ(const HypoClassKey &key, const unsigned &cmb=0) const
get light Q of the given hypothesis
Definition: TtFullHadronicEvent.h:54
TtEvent
Base class to hold information for ttbar event interpretation.
Definition: TtEvent.h:27
TtEvent::genEvent
const edm::RefProd< TtGenEvent > & genEvent() const
get TtGenEvent
Definition: TtEvent.h:67
TtFullHadDaughter::LightQ
static const std::string LightQ
Definition: TtFullHadronicEvent.h:9
TtFullHadronicEvent::lightP
const reco::GenParticle * lightP() const
get light P of the TtGenEvent
Definition: TtFullHadronicEvent.h:128
TtEvent::hypoClassKeyFromString
HypoClassKey hypoClassKeyFromString(const std::string &label) const
return the corresponding enum value from a string
Definition: TtEvent.cc:16
TtFullHadDaughter::Top
static const std::string Top
Definition: TtFullHadronicEvent.h:9
TtFullHadronicEvent::topBar
const reco::Candidate * topBar(const HypoClassKey &key, const unsigned &cmb=0) const
get anti-top of the given hypothesis
Definition: TtFullHadronicEvent.h:81
TtFullHadronicEvent::b
const reco::Candidate * b(const std::string &key, const unsigned &cmb=0) const
get b of the given hypothesis
Definition: TtFullHadronicEvent.h:41
TtFullHadronicEvent::wPlus
const reco::Candidate * wPlus(const std::string &key, const unsigned &cmb=0) const
get Wplus of the given hypothesis
Definition: TtFullHadronicEvent.h:68
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TtFullHadronicEvent::top
const reco::Candidate * top(const std::string &key, const unsigned &cmb=0) const
get top of the given hypothesis
Definition: TtFullHadronicEvent.h:33
TtEvent::HypoClassKey
HypoClassKey
supported classes of event hypotheses
Definition: TtEvent.h:30
TtFullHadronicEvent::topBar
const reco::Candidate * topBar(const std::string &key, const unsigned &cmb=0) const
get anti-top of the given hypothesis
Definition: TtFullHadronicEvent.h:77
TtFullHadDaughter::LightP
static const std::string LightP
Definition: TtFullHadronicEvent.h:9
TtFullHadDaughter::WPlus
static const std::string WPlus
Definition: TtFullHadronicEvent.h:9
TtFullHadDaughter::BBar
static const std::string BBar
Definition: TtFullHadronicEvent.h:10
TtFullHadronicEvent::bBar
const reco::Candidate * bBar(const HypoClassKey &key, const unsigned &cmb=0) const
get anti-b of the given hypothesis
Definition: TtFullHadronicEvent.h:89
TtFullHadronicEvent::top
const reco::GenParticle * top() const
get top of the TtGenEvent
Definition: TtFullHadronicEvent.h:121
reco::Candidate
Definition: Candidate.h:27
TtFullHadronicEvent::lightQBar
const reco::GenParticle * lightQBar() const
get light Q bar of the TtGenEvent
Definition: TtFullHadronicEvent.h:139
TtFullHadronicEvent::wMinus
const reco::Candidate * wMinus(const std::string &key, const unsigned &cmb=0) const
get Wminus of the given hypothesis
Definition: TtFullHadronicEvent.h:112
TtFullHadDaughter::B
static const std::string B
Definition: TtFullHadronicEvent.h:9
TtFullHadDaughter::TopBar
static const std::string TopBar
Definition: TtFullHadronicEvent.h:11
TtFullHadronicEvent::wPlus
const reco::GenParticle * wPlus() const
get Wplus of the TtGenEvent
Definition: TtFullHadronicEvent.h:131
TtFullHadronicEvent::wMinus
const reco::GenParticle * wMinus() const
get Wminus of the TtGenEvent
Definition: TtFullHadronicEvent.h:148
reco::CompositeRefCandidateT::daughter
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode)
TtFullHadronicEvent::lightP
const reco::Candidate * lightP(const HypoClassKey &key, const unsigned &cmb=0) const
get light P of the given hypothesis
Definition: TtFullHadronicEvent.h:63
TtEvent.h
TtFullHadronicEvent::lightPBar
const reco::GenParticle * lightPBar() const
get light P bar of the TtGenEvent
Definition: TtFullHadronicEvent.h:143
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
TtFullHadDaughter::LightQBar
static const std::string LightQBar
Definition: TtFullHadronicEvent.h:10
TtFullHadronicEvent::bBar
const reco::Candidate * bBar(const std::string &key, const unsigned &cmb=0) const
get anti-b of the given hypothesis
Definition: TtFullHadronicEvent.h:85
TtFullHadDaughter::LightPBar
static const std::string LightPBar
Definition: TtFullHadronicEvent.h:10
TtFullHadronicEvent::~TtFullHadronicEvent
~TtFullHadronicEvent() override
default destructor
Definition: TtFullHadronicEvent.h:30