File indexing completed on 2024-09-07 04:34:43
0001 #ifndef TopObjects_TtFullHadronicEvent_h
0002 #define TopObjects_TtFullHadronicEvent_h
0003
0004 #include "AnalysisDataFormats/TopObjects/interface/TtEvent.h"
0005
0006 namespace TtFullHadDaughter {
0007
0008
0009 static const std::string LightQ = "LightQ", LightP = "LightP", WPlus = "WPlus", B = "B", Top = "Top";
0010 static const std::string LightQBar = "LightQBar", LightPBar = "LightPBar", WMinus = "WMinus", BBar = "BBar",
0011 TopBar = "TopBar";
0012 }
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 class TtFullHadronicEvent : public TtEvent {
0026 public:
0027
0028 TtFullHadronicEvent() {}
0029
0030 ~TtFullHadronicEvent() override {}
0031
0032
0033 const reco::Candidate* top(const std::string& key, const unsigned& cmb = 0) const {
0034 return top(hypoClassKeyFromString(key), cmb);
0035 };
0036
0037 const reco::Candidate* top(const HypoClassKey& key, const unsigned& cmb = 0) const {
0038 return !isHypoValid(key, cmb) ? nullptr : eventHypo(key, cmb).daughter(TtFullHadDaughter::Top);
0039 };
0040
0041 const reco::Candidate* b(const std::string& key, const unsigned& cmb = 0) const {
0042 return b(hypoClassKeyFromString(key), cmb);
0043 };
0044
0045 const reco::Candidate* b(const HypoClassKey& key, const unsigned& cmb = 0) const {
0046 return !isHypoValid(key, cmb) ? nullptr : top(key, cmb)->daughter(TtFullHadDaughter::B);
0047 };
0048
0049
0050 const reco::Candidate* lightQ(const std::string& key, const unsigned& cmb = 0) const {
0051 return lightQ(hypoClassKeyFromString(key), cmb);
0052 };
0053
0054 const reco::Candidate* lightQ(const HypoClassKey& key, const unsigned& cmb = 0) const {
0055 return !isHypoValid(key, cmb) ? nullptr : wPlus(key, cmb)->daughter(TtFullHadDaughter::LightQ);
0056 };
0057
0058
0059 const reco::Candidate* lightP(const std::string& key, const unsigned& cmb = 0) const {
0060 return lightP(hypoClassKeyFromString(key), cmb);
0061 };
0062
0063 const reco::Candidate* lightP(const HypoClassKey& key, const unsigned& cmb = 0) const {
0064 return !isHypoValid(key, cmb) ? nullptr : wMinus(key, cmb)->daughter(TtFullHadDaughter::LightP);
0065 };
0066
0067
0068 const reco::Candidate* wPlus(const std::string& key, const unsigned& cmb = 0) const {
0069 return wPlus(hypoClassKeyFromString(key), cmb);
0070 };
0071
0072 const reco::Candidate* wPlus(const HypoClassKey& key, const unsigned& cmb = 0) const {
0073 return !isHypoValid(key, cmb) ? nullptr : top(key, cmb)->daughter(TtFullHadDaughter::WPlus);
0074 };
0075
0076
0077 const reco::Candidate* topBar(const std::string& key, const unsigned& cmb = 0) const {
0078 return topBar(hypoClassKeyFromString(key), cmb);
0079 };
0080
0081 const reco::Candidate* topBar(const HypoClassKey& key, const unsigned& cmb = 0) const {
0082 return !isHypoValid(key, cmb) ? nullptr : eventHypo(key, cmb).daughter(TtFullHadDaughter::TopBar);
0083 };
0084
0085 const reco::Candidate* bBar(const std::string& key, const unsigned& cmb = 0) const {
0086 return bBar(hypoClassKeyFromString(key), cmb);
0087 };
0088
0089 const reco::Candidate* bBar(const HypoClassKey& key, const unsigned& cmb = 0) const {
0090 return !isHypoValid(key, cmb) ? nullptr : topBar(key, cmb)->daughter(TtFullHadDaughter::BBar);
0091 };
0092
0093
0094 const reco::Candidate* lightQBar(const std::string& key, const unsigned& cmb = 0) const {
0095 return lightQBar(hypoClassKeyFromString(key), cmb);
0096 };
0097
0098 const reco::Candidate* lightQBar(const HypoClassKey& key, const unsigned& cmb = 0) const {
0099 return !isHypoValid(key, cmb) ? nullptr : wPlus(key, cmb)->daughter(TtFullHadDaughter::LightQBar);
0100 };
0101
0102
0103 const reco::Candidate* lightPBar(const std::string& key, const unsigned& cmb = 0) const {
0104 return lightPBar(hypoClassKeyFromString(key), cmb);
0105 };
0106
0107 const reco::Candidate* lightPBar(const HypoClassKey& key, const unsigned& cmb = 0) const {
0108 return !isHypoValid(key, cmb) ? nullptr : wMinus(key, cmb)->daughter(TtFullHadDaughter::LightPBar);
0109 };
0110
0111
0112 const reco::Candidate* wMinus(const std::string& key, const unsigned& cmb = 0) const {
0113 return wMinus(hypoClassKeyFromString(key), cmb);
0114 };
0115
0116 const reco::Candidate* wMinus(const HypoClassKey& key, const unsigned& cmb = 0) const {
0117 return !isHypoValid(key, cmb) ? nullptr : topBar(key, cmb)->daughter(TtFullHadDaughter::WMinus);
0118 };
0119
0120
0121 const reco::GenParticle* top() const { return (!genEvt_ ? nullptr : this->genEvent()->top()); };
0122
0123 const reco::GenParticle* b() const { return (!genEvt_ ? nullptr : this->genEvent()->b()); };
0124
0125
0126 const reco::GenParticle* lightQ() const { return (!genEvt_ ? nullptr : this->genEvent()->daughterQuarkOfWPlus()); };
0127
0128 const reco::GenParticle* lightP() const { return (!genEvt_ ? nullptr : this->genEvent()->daughterQuarkOfWMinus()); };
0129
0130
0131 const reco::GenParticle* wPlus() const { return (!genEvt_ ? nullptr : this->genEvent()->wPlus()); };
0132
0133
0134 const reco::GenParticle* topBar() const { return (!genEvt_ ? nullptr : this->genEvent()->topBar()); };
0135
0136 const reco::GenParticle* bBar() const { return (!genEvt_ ? nullptr : this->genEvent()->bBar()); };
0137
0138
0139 const reco::GenParticle* lightQBar() const {
0140 return (!genEvt_ ? nullptr : this->genEvent()->daughterQuarkBarOfWPlus());
0141 };
0142
0143 const reco::GenParticle* lightPBar() const {
0144 return (!genEvt_ ? nullptr : this->genEvent()->daughterQuarkBarOfWMinus());
0145 };
0146
0147
0148 const reco::GenParticle* wMinus() const { return (!genEvt_ ? nullptr : this->genEvent()->wMinus()); };
0149
0150
0151
0152 void print(const int verbosity = 1) const;
0153 };
0154
0155 #endif