1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
|
#ifndef TopObjects_TtFullLeptonicEvent_h
#define TopObjects_TtFullLeptonicEvent_h
#include "AnalysisDataFormats/TopObjects/interface/TtEvent.h"
namespace TtFullLepDaughter {
/// full leptonic daughter names for common
/// use and use with the hypotheses
static const std::string Nu = "Nu", LepBar = "LepBar", WPlus = "WPlus", B = "B", Top = "Top";
static const std::string NuBar = "NuBar", Lep = "Lep", WMinus = "WMinus", BBar = "BBar", TopBar = "TopBar";
} // namespace TtFullLepDaughter
/**
\class TtFullLeptonicEvent TtFullLeptonicEvent.h "AnalysisDataFormats/TopObjects/interface/TtFullLeptonicEvent.h"
\brief Class derived from the TtEvent for the full leptonic decay channel
The structure holds information on the leptonic decay channels,
all event hypotheses of different classes (user defined during
production) and a reference to the TtGenEvent (if available). It
provides access and administration.
*/
class TtFullLeptonicEvent : public TtEvent {
public:
/// empty constructor
TtFullLeptonicEvent() {}
/// default destructor
~TtFullLeptonicEvent() override {}
/// get top of the given hypothesis
const reco::Candidate* top(const std::string& key, const unsigned& cmb = 0) const {
return top(hypoClassKeyFromString(key), cmb);
};
/// get top of the given hypothesis
const reco::Candidate* top(const HypoClassKey& key, const unsigned& cmb = 0) const {
return !isHypoValid(key, cmb) ? nullptr : eventHypo(key, cmb).daughter(TtFullLepDaughter::Top);
};
/// get b of the given hypothesis
const reco::Candidate* b(const std::string& key, const unsigned& cmb = 0) const {
return b(hypoClassKeyFromString(key), cmb);
};
/// get b of the given hypothesis
const reco::Candidate* b(const HypoClassKey& key, const unsigned& cmb = 0) const {
return !isHypoValid(key, cmb) ? nullptr : top(key, cmb)->daughter(TtFullLepDaughter::B);
};
/// get Wplus of the given hypothesis
const reco::Candidate* wPlus(const std::string& key, const unsigned& cmb = 0) const {
return wPlus(hypoClassKeyFromString(key), cmb);
};
/// get Wplus of the given hypothesis
const reco::Candidate* wPlus(const HypoClassKey& key, const unsigned& cmb = 0) const {
return !isHypoValid(key, cmb) ? nullptr : top(key, cmb)->daughter(TtFullLepDaughter::WPlus);
};
/// get anti-lepton of the given hypothesis
const reco::Candidate* leptonBar(const std::string& key, const unsigned& cmb = 0) const {
return leptonBar(hypoClassKeyFromString(key), cmb);
};
/// get anti-lepton of the given hypothesis
const reco::Candidate* leptonBar(const HypoClassKey& key, const unsigned& cmb = 0) const {
return !isHypoValid(key, cmb) ? nullptr : wPlus(key, cmb)->daughter(TtFullLepDaughter::LepBar);
};
/// get neutrino of the given hypothesis
const reco::Candidate* neutrino(const std::string& key, const unsigned& cmb = 0) const {
return neutrino(hypoClassKeyFromString(key), cmb);
};
/// get neutrino of the given hypothesis
const reco::Candidate* neutrino(const HypoClassKey& key, const unsigned& cmb = 0) const {
return !isHypoValid(key, cmb) ? nullptr : wPlus(key, cmb)->daughter(TtFullLepDaughter::Nu);
};
/// get anti-top of the given hypothesis
const reco::Candidate* topBar(const std::string& key, const unsigned& cmb = 0) const {
return topBar(hypoClassKeyFromString(key), cmb);
};
/// get anti-top of the given hypothesis
const reco::Candidate* topBar(const HypoClassKey& key, const unsigned& cmb = 0) const {
return !isHypoValid(key, cmb) ? nullptr : eventHypo(key, cmb).daughter(TtFullLepDaughter::TopBar);
};
/// get anti-b of the given hypothesis
const reco::Candidate* bBar(const std::string& key, const unsigned& cmb = 0) const {
return bBar(hypoClassKeyFromString(key), cmb);
};
/// get anti-b of the given hypothesis
const reco::Candidate* bBar(const HypoClassKey& key, const unsigned& cmb = 0) const {
return !isHypoValid(key, cmb) ? nullptr : topBar(key, cmb)->daughter(TtFullLepDaughter::BBar);
};
/// get Wminus of the given hypothesis
const reco::Candidate* wMinus(const std::string& key, const unsigned& cmb = 0) const {
return wMinus(hypoClassKeyFromString(key), cmb);
};
/// get Wminus of the given hypothesis
const reco::Candidate* wMinus(const HypoClassKey& key, const unsigned& cmb = 0) const {
return !isHypoValid(key, cmb) ? nullptr : topBar(key, cmb)->daughter(TtFullLepDaughter::WMinus);
};
/// get lepton of the given hypothesis
const reco::Candidate* lepton(const std::string& key, const unsigned& cmb = 0) const {
return lepton(hypoClassKeyFromString(key), cmb);
};
/// get lepton of the given hypothesis
const reco::Candidate* lepton(const HypoClassKey& key, const unsigned& cmb = 0) const {
return !isHypoValid(key, cmb) ? nullptr : wMinus(key, cmb)->daughter(TtFullLepDaughter::Lep);
};
/// get anti-neutrino of the given hypothesis
const reco::Candidate* neutrinoBar(const std::string& key, const unsigned& cmb = 0) const {
return neutrinoBar(hypoClassKeyFromString(key), cmb);
};
/// get anti-neutrino of the given hypothesis
const reco::Candidate* neutrinoBar(const HypoClassKey& key, const unsigned& cmb = 0) const {
return !isHypoValid(key, cmb) ? nullptr : wMinus(key, cmb)->daughter(TtFullLepDaughter::NuBar);
};
/// get top of the TtGenEvent
const reco::GenParticle* genTop() const { return (!genEvt_ ? nullptr : this->genEvent()->top()); };
/// get b of the TtGenEvent
const reco::GenParticle* genB() const { return (!genEvt_ ? nullptr : this->genEvent()->b()); };
/// get Wplus of the TtGenEvent
const reco::GenParticle* genWPlus() const { return (!genEvt_ ? nullptr : this->genEvent()->wPlus()); };
/// get anti-lepton of the TtGenEvent
const reco::GenParticle* genLeptonBar() const { return (!genEvt_ ? nullptr : this->genEvent()->leptonBar()); };
/// get neutrino of the TtGenEvent
const reco::GenParticle* genNeutrino() const { return (!genEvt_ ? nullptr : this->genEvent()->neutrino()); };
/// get anti-top of the TtGenEvent
const reco::GenParticle* genTopBar() const { return (!genEvt_ ? nullptr : this->genEvent()->topBar()); };
/// get anti-b of the TtGenEvent
const reco::GenParticle* genBBar() const { return (!genEvt_ ? nullptr : this->genEvent()->bBar()); };
/// get Wminus of the TtGenEvent
const reco::GenParticle* genWMinus() const { return (!genEvt_ ? nullptr : this->genEvent()->wMinus()); };
/// get lepton of the TtGenEvent
const reco::GenParticle* genLepton() const { return (!genEvt_ ? nullptr : this->genEvent()->lepton()); };
/// get anti-neutrino of the TtGenEvent
const reco::GenParticle* genNeutrinoBar() const { return (!genEvt_ ? nullptr : this->genEvent()->neutrinoBar()); };
/// return the weight of the kinematic solution of hypothesis 'cmb' if available; -1 else
double solWeight(const unsigned& cmb = 0) const { return (cmb < solWeight_.size() ? solWeight_[cmb] : -1.); }
/// return if the kinematic solution of hypothesis 'cmb' is right or wrong charge if available; -1 else
bool isWrongCharge() const { return wrongCharge_; }
/// set weight of kKinSolution hypothesis
void setSolWeight(const std::vector<double>& val) { solWeight_ = val; };
/// set right or wrong charge combination of kKinSolution hypothesis
void setWrongCharge(const bool& val) { wrongCharge_ = val; };
/// print full content of the structure as formated
/// LogInfo to the MessageLogger output for debugging
void print(const int verbosity = 1) const;
protected:
/// result of kinematic solution
std::vector<double> solWeight_;
/// right/wrong charge booleans
bool wrongCharge_;
};
#endif
|