20 |
|
class Jet : public Particle |
21 |
|
{ |
22 |
|
public: |
23 |
+ |
enum ECorr { |
24 |
+ |
L1 = 0, |
25 |
+ |
L2, |
26 |
+ |
L3, |
27 |
+ |
L4, |
28 |
+ |
L5, |
29 |
+ |
L6, |
30 |
+ |
L7, |
31 |
+ |
Custom |
32 |
+ |
}; |
33 |
+ |
|
34 |
|
Jet() : fMaxEInEmTowers(0), fMaxEInHadTowers(0), fEnergyFractionH(0), fEnergyFractionEm(0), |
35 |
|
fHadEnergyInHB(0), fHadEnergyInHO(0), fHadEnergyInHE(0), fHadEnergyInHF(0), |
36 |
|
fEmEnergyInEB(0), fEmEnergyInEE(0), fEmEnergyInHF(0), fTowersArea(0), fN(0), |
37 |
< |
fN60(0), fN90(0), fMatchedMCFlavor(0) {} |
38 |
< |
Jet(Double_t px, Double_t py, Double_t pz, Double_t e) : fMom(px,py,pz,e), |
37 |
> |
fN60(0), fN90(0), fAlpha(0), fBeta(0), fMatchedMCFlavor(0), |
38 |
> |
fJetProbabilityBJetTagsDisc(0), fJetBProbabilityBJetTagsDisc(0), |
39 |
> |
fSimpleSecondaryVertexBJetTagsDisc(0), fCombinedSecondaryVertexBJetTagsDisc(0), |
40 |
> |
fCombinedSecondaryVertexMVABJetTagsDisc(0), fImpactParameterMVABJetTagsDisc(0), |
41 |
> |
fTrackCountingHighEffBJetTagsDisc(0), fTrackCountingHighPurBJetTagsDisc(0), |
42 |
> |
fSoftMuonBJetTagsDisc(0), fSoftMuonNoIPBJetTagsDisc(0), |
43 |
> |
fSoftElectronBJetTagsDisc(0), fL2RelativeCorrectionScale(0), |
44 |
> |
fL3AbsoluteCorrectionScale(0), fL4EMFCorrectionScale(0), |
45 |
> |
fL5FlavorCorrectionScale(0), fL7PartonCorrectionScale(0) |
46 |
> |
{} |
47 |
> |
Jet(Double_t px, Double_t py, Double_t pz, Double_t e) : fRawMom(FourVector(px,py,pz,e)), |
48 |
|
fMaxEInEmTowers(0), fMaxEInHadTowers(0), fEnergyFractionH(0), fEnergyFractionEm(0), |
49 |
|
fHadEnergyInHB(0), fHadEnergyInHO(0), fHadEnergyInHE(0), fHadEnergyInHF(0), |
50 |
|
fEmEnergyInEB(0), fEmEnergyInEE(0), fEmEnergyInHF(0), fTowersArea(0), fN(0), |
51 |
< |
fN60(0), fN90(0), fMatchedMCFlavor(0) {} |
52 |
< |
~Jet() {} |
51 |
> |
fN60(0), fN90(0), fAlpha(0), fBeta(0), fMatchedMCFlavor(0), |
52 |
> |
fJetProbabilityBJetTagsDisc(0), fJetBProbabilityBJetTagsDisc(0), |
53 |
> |
fSimpleSecondaryVertexBJetTagsDisc(0), fCombinedSecondaryVertexBJetTagsDisc(0), |
54 |
> |
fCombinedSecondaryVertexMVABJetTagsDisc(0), fImpactParameterMVABJetTagsDisc(0), |
55 |
> |
fTrackCountingHighEffBJetTagsDisc(0), fTrackCountingHighPurBJetTagsDisc(0), |
56 |
> |
fSoftMuonBJetTagsDisc(0), fSoftMuonNoIPBJetTagsDisc(0), |
57 |
> |
fSoftElectronBJetTagsDisc(0), fL2RelativeCorrectionScale(0), |
58 |
> |
fL3AbsoluteCorrectionScale(0), fL4EMFCorrectionScale(0), |
59 |
> |
fL5FlavorCorrectionScale(0), fL7PartonCorrectionScale(0) |
60 |
> |
{} |
61 |
|
|
62 |
|
Double_t Alpha() const { return fAlpha; } |
63 |
|
Double_t Beta() const { return fBeta; } |
36 |
– |
Double_t Charge() const { return 0; } |
64 |
|
Double_t CombinedSecondaryVertexBJetTagsDisc() const |
65 |
|
{ return fCombinedSecondaryVertexBJetTagsDisc; } |
66 |
|
Double_t CombinedSecondaryVertexMVABJetTagsDisc() const |
67 |
|
{ return fCombinedSecondaryVertexMVABJetTagsDisc; } |
68 |
+ |
Double_t CustomCorrectionScale() const { return fCustomCorrectionScale; } |
69 |
+ |
void DisableCorrection(ECorr c) { fCorrections.ClearBit(c); ClearMom(); } |
70 |
+ |
void DisableCorrections() { fCorrections.Clear(); ClearMom(); } |
71 |
|
Double_t EmEnergyInEB() const { return fEmEnergyInEB; } |
72 |
|
Double_t EmEnergyInEE() const { return fEmEnergyInEE; } |
73 |
|
Double_t EmEnergyInHF() const { return fEmEnergyInHF; } |
74 |
+ |
void EnableCorrection(ECorr c) { fCorrections.SetBit(c); ClearMom();} |
75 |
+ |
Bool_t CorrectionActive(ECorr c) const { return fCorrections.TestBit(c); } |
76 |
|
Double_t EnergyFractionH() const { return fEnergyFractionH; } |
77 |
|
Double_t EnergyFractionEm() const { return fEnergyFractionEm; } |
78 |
|
Double_t HadEnergyInHO() const { return fHadEnergyInHO; } |
79 |
|
Double_t HadEnergyInHB() const { return fHadEnergyInHB; } |
80 |
|
Double_t HadEnergyInHF() const { return fHadEnergyInHF; } |
81 |
< |
Double_t HadEnergyInHE() const { return fHadEnergyInHE; } |
81 |
> |
Double_t HadEnergyInHE() const { return fHadEnergyInHE; } |
82 |
> |
Bool_t HasTower(const CaloTower *t) const { return fTowers.HasObject(t); } |
83 |
|
Double_t ImpactParameterMVABJetTagsDisc() const |
84 |
|
{ return fImpactParameterMVABJetTagsDisc; } |
85 |
|
Double_t JetProbabilityBJetTagsDisc() const |
89 |
|
Int_t MatchedMCFlavor() const { return fMatchedMCFlavor; } |
90 |
|
Double_t MaxEInEmTowers() const { return fMaxEInEmTowers; } |
91 |
|
Double_t MaxEInHadTowers() const { return fMaxEInHadTowers; } |
59 |
– |
FourVector Mom() const { return fMom; } |
92 |
|
UShort_t N() const { return fN; } |
93 |
|
UShort_t N60() const { return fN60; } |
94 |
|
UShort_t N90() const { return fN90; } |
98 |
|
Double_t L4EMFCorrectionScale() const { return fL4EMFCorrectionScale; } |
99 |
|
Double_t L5FlavorCorrectionScale() const { return fL5FlavorCorrectionScale; } |
100 |
|
Double_t L7PartonCorrectionScale() const { return fL7PartonCorrectionScale; } |
101 |
< |
EObjType ObjType() const { return kJet; } |
101 |
> |
EObjType ObjType() const { return kJet; } |
102 |
|
Double_t SimpleSecondaryVertexBJetTagsDisc() const |
103 |
< |
{ return fSimpleSecondaryVertexBJetTagsDisc; } |
103 |
> |
{ return fSimpleSecondaryVertexBJetTagsDisc; } |
104 |
|
Double_t SoftMuonBJetTagsDisc() const |
105 |
< |
{ return fSoftMuonBJetTagsDisc; } |
105 |
> |
{ return fSoftMuonBJetTagsDisc; } |
106 |
|
Double_t SoftMuonNoIPBJetTagsDisc() const |
107 |
< |
{ return fSoftMuonNoIPBJetTagsDisc; } |
107 |
> |
{ return fSoftMuonNoIPBJetTagsDisc; } |
108 |
|
Double_t SoftElectronBJetTagsDisc() const |
109 |
< |
{ return fSoftElectronBJetTagsDisc; } |
109 |
> |
{ return fSoftElectronBJetTagsDisc; } |
110 |
|
Double_t TrackCountingHighEffBJetTagsDisc() const |
111 |
< |
{ return fTrackCountingHighEffBJetTagsDisc; } |
111 |
> |
{ return fTrackCountingHighEffBJetTagsDisc; } |
112 |
|
Double_t TrackCountingHighPurBJetTagsDisc() const |
113 |
< |
{ return fTrackCountingHighPurBJetTagsDisc; } |
113 |
> |
{ return fTrackCountingHighPurBJetTagsDisc; } |
114 |
|
const CaloTower |
115 |
|
*Tower(UInt_t i) const { return fTowers.At(i); } |
116 |
|
Double_t TowersArea() const { return fTowersArea; } |
117 |
|
void AddTower(const CaloTower *tower) { fTowers.Add(tower); } |
118 |
+ |
const FourVectorM &RawMom() const { return fRawMom; } |
119 |
|
void SetAlpha(Double_t val) { fAlpha = val; } |
120 |
|
void SetBeta(Double_t val) { fBeta = val; } |
121 |
|
void SetCombinedSecondaryVertexBJetTagsDisc(Double_t d) |
122 |
< |
{ fCombinedSecondaryVertexBJetTagsDisc = d; } |
122 |
> |
{ fCombinedSecondaryVertexBJetTagsDisc = d; } |
123 |
|
void SetCombinedSecondaryVertexMVABJetTagsDisc(Double_t d) |
124 |
< |
{ fCombinedSecondaryVertexMVABJetTagsDisc = d; } |
124 |
> |
{ fCombinedSecondaryVertexMVABJetTagsDisc = d; } |
125 |
|
void SetEmEnergyInEB(Double_t val) { fEmEnergyInEB = val; } |
126 |
|
void SetEmEnergyInEE(Double_t val) { fEmEnergyInEE = val; } |
127 |
|
void SetEmEnergyInHF(Double_t val) { fEmEnergyInHF = val; } |
132 |
|
void SetHadEnergyInHF(Double_t val) { fHadEnergyInHF = val; } |
133 |
|
void SetHadEnergyInHE(Double_t val) { fHadEnergyInHE = val; } |
134 |
|
void SetImpactParameterMVABJetTagsDisc (Double_t d) |
135 |
< |
{ fImpactParameterMVABJetTagsDisc = d; } |
136 |
< |
void SetJetProbabilityBJetTagsDisc(Double_t d) { fJetProbabilityBJetTagsDisc = d; } |
137 |
< |
void SetJetBProbabilityBJetTagsDisc(Double_t d) { fJetBProbabilityBJetTagsDisc = d; } |
135 |
> |
{ fImpactParameterMVABJetTagsDisc = d; } |
136 |
> |
void SetJetProbabilityBJetTagsDisc(Double_t d) { fJetProbabilityBJetTagsDisc = d; } |
137 |
> |
void SetJetBProbabilityBJetTagsDisc(Double_t d) { fJetBProbabilityBJetTagsDisc = d; } |
138 |
> |
void SetRawMom(const FourVectorM &mom) { fRawMom = mom; ClearMom(); } |
139 |
|
void SetN(UShort_t n) { fN = n; } |
140 |
|
void SetN60(UShort_t n) { fN60 = n; } |
141 |
|
void SetN90(UShort_t n) { fN90 = n; } |
142 |
|
void SetMatchedMCFlavor(Int_t flavor) { fMatchedMCFlavor = flavor; } |
143 |
|
void SetMaxEInEmTowers(Double_t val) { fMaxEInEmTowers = val; } |
144 |
|
void SetMaxEInHadTowers(Double_t val) { fMaxEInHadTowers = val; } |
145 |
< |
void SetL2RelativeCorrectionScale(Double_t s ) { fL2RelativeCorrectionScale = s; } |
146 |
< |
void SetL3AbsoluteCorrectionScale(Double_t s ) { fL3AbsoluteCorrectionScale = s; } |
147 |
< |
void SetL4EMFCorrectionScale(Double_t s ) { fL4EMFCorrectionScale = s; } |
148 |
< |
void SetL5FlavorCorrectionScale(Double_t s ) { fL5FlavorCorrectionScale = s; } |
149 |
< |
void SetL7PartonCorrectionScale(Double_t s ) { fL7PartonCorrectionScale = s; } |
145 |
> |
void SetL2RelativeCorrectionScale(Double_t s ) { fL2RelativeCorrectionScale = s; ClearMom(); } |
146 |
> |
void SetL3AbsoluteCorrectionScale(Double_t s ) { fL3AbsoluteCorrectionScale = s; ClearMom(); } |
147 |
> |
void SetL4EMFCorrectionScale(Double_t s ) { fL4EMFCorrectionScale = s; ClearMom(); } |
148 |
> |
void SetL5FlavorCorrectionScale(Double_t s ) { fL5FlavorCorrectionScale = s; ClearMom(); } |
149 |
> |
void SetL7PartonCorrectionScale(Double_t s ) { fL7PartonCorrectionScale = s; ClearMom(); } |
150 |
> |
void SetCustomCorrectionScale(Double_t s) { fCustomCorrectionScale = s; ClearMom(); } |
151 |
|
void SetSimpleSecondaryVertexBJetTagsDisc(Double_t d) |
152 |
|
{ fSimpleSecondaryVertexBJetTagsDisc = d; } |
153 |
< |
void SetSoftMuonBJetTagsDisc(Double_t d ) { fSoftMuonBJetTagsDisc = d; } |
154 |
< |
void SetSoftMuonNoIPBJetTagsDisc(Double_t d ) { fSoftMuonNoIPBJetTagsDisc = d; } |
155 |
< |
void SetSoftElectronBJetTagsDisc(Double_t d ) { fSoftElectronBJetTagsDisc = d; } |
153 |
> |
void SetSoftMuonBJetTagsDisc(Double_t d) { fSoftMuonBJetTagsDisc = d; } |
154 |
> |
void SetSoftMuonNoIPBJetTagsDisc(Double_t d) { fSoftMuonNoIPBJetTagsDisc = d; } |
155 |
> |
void SetSoftElectronBJetTagsDisc(Double_t d) { fSoftElectronBJetTagsDisc = d; } |
156 |
|
void SetTowersArea(Double_t val) { fTowersArea = val; } |
157 |
< |
void SetTrackCountingHighEffBJetTagsDisc( Double_t d) |
157 |
> |
void SetTrackCountingHighEffBJetTagsDisc(Double_t d) |
158 |
|
{ fTrackCountingHighEffBJetTagsDisc = d; } |
159 |
|
void SetTrackCountingHighPurBJetTagsDisc(Double_t d) |
160 |
|
{ fTrackCountingHighPurBJetTagsDisc = d; } |
161 |
|
|
162 |
|
protected: |
163 |
< |
FourVector fMom; //four momentum of jet |
163 |
> |
void GetMom() const; |
164 |
> |
|
165 |
> |
FourVectorM32 fRawMom; //uncorrected four momentum of jet |
166 |
|
Double_t fMaxEInEmTowers; //maximum energy in EM towers |
167 |
|
Double_t fMaxEInHadTowers; //maximum energy in HCAL towers |
168 |
|
Double_t fEnergyFractionH; //hadronic energy fraction |
192 |
|
Double_t fSoftMuonBJetTagsDisc; // |
193 |
|
Double_t fSoftMuonNoIPBJetTagsDisc; // |
194 |
|
Double_t fSoftElectronBJetTagsDisc; // |
195 |
< |
Double_t fL2RelativeCorrectionScale; // |
196 |
< |
Double_t fL3AbsoluteCorrectionScale; // |
197 |
< |
Double_t fL4EMFCorrectionScale; // |
198 |
< |
Double_t fL5FlavorCorrectionScale; // |
199 |
< |
Double_t fL7PartonCorrectionScale; // |
200 |
< |
RefArray<CaloTower,1024> fTowers; //calo towers assigned to this jet |
195 |
> |
Double_t fL2RelativeCorrectionScale; // |
196 |
> |
Double_t fL3AbsoluteCorrectionScale; // |
197 |
> |
Double_t fL4EMFCorrectionScale; // |
198 |
> |
Double_t fL5FlavorCorrectionScale; // |
199 |
> |
Double_t fL7PartonCorrectionScale; // |
200 |
> |
Double_t fCustomCorrectionScale; // |
201 |
> |
BitMask8 fCorrections; //mask of which corrections should be applied |
202 |
> |
RefArray<CaloTower> fTowers; //calo towers assigned to this jet |
203 |
|
|
204 |
|
ClassDef(Jet, 1) // Jet class |
205 |
|
}; |
206 |
|
} |
207 |
+ |
|
208 |
+ |
//-------------------------------------------------------------------------------------------------- |
209 |
+ |
inline void mithep::Jet::GetMom() const |
210 |
+ |
{ |
211 |
+ |
// Get momentum values from stored values. |
212 |
+ |
|
213 |
+ |
fCachedMom = fRawMom; |
214 |
+ |
|
215 |
+ |
if (CorrectionActive(L2)) |
216 |
+ |
fCachedMom *= fL2RelativeCorrectionScale; |
217 |
+ |
|
218 |
+ |
if (CorrectionActive(L3)) |
219 |
+ |
fCachedMom *= fL3AbsoluteCorrectionScale; |
220 |
+ |
|
221 |
+ |
if (CorrectionActive(L4)) |
222 |
+ |
fCachedMom *= fL4EMFCorrectionScale; |
223 |
+ |
|
224 |
+ |
if (CorrectionActive(L5)) |
225 |
+ |
fCachedMom *= fL5FlavorCorrectionScale; |
226 |
+ |
|
227 |
+ |
if (CorrectionActive(L7)) |
228 |
+ |
fCachedMom *= fL7PartonCorrectionScale; |
229 |
+ |
|
230 |
+ |
if (CorrectionActive(Custom)) |
231 |
+ |
fCachedMom *= fCustomCorrectionScale; |
232 |
+ |
} |
233 |
|
#endif |