11 |
|
#ifndef MITANA_DATATREE_JET_H |
12 |
|
#define MITANA_DATATREE_JET_H |
13 |
|
|
14 |
+ |
#include "MitCommon/DataFormats/interface/Vect4M.h" |
15 |
|
#include "MitAna/DataTree/interface/Particle.h" |
16 |
|
|
17 |
|
namespace mithep |
54 |
|
fL5FlavorCorrectionScale(0), fL7PartonCorrectionScale(0), |
55 |
|
fCustomCorrectionScale(0) {} |
56 |
|
|
57 |
< |
Double_t Alpha() const { return fAlpha; } |
58 |
< |
Double_t Beta() const { return fBeta; } |
59 |
< |
Double_t CombinedSecondaryVertexBJetTagsDisc() const |
60 |
< |
{ return fCombinedSecondaryVertexBJetTagsDisc; } |
61 |
< |
Double_t CombinedSecondaryVertexMVABJetTagsDisc() const |
62 |
< |
{ return fCombinedSecondaryVertexMVABJetTagsDisc; } |
63 |
< |
Double_t CustomCorrectionScale() const { return fCustomCorrectionScale; } |
64 |
< |
void DisableCorrection(ECorr c) { fCorrections.ClearBit(c); ClearMom(); } |
65 |
< |
void DisableCorrections() { fCorrections.Clear(); ClearMom(); } |
66 |
< |
void EnableCorrection(ECorr c) { fCorrections.SetBit(c); ClearMom(); } |
67 |
< |
Bool_t CorrectionActive(ECorr c) const { return fCorrections.TestBit(c); } |
68 |
< |
Double_t ImpactParameterMVABJetTagsDisc() const |
69 |
< |
{ return fImpactParameterMVABJetTagsDisc; } |
70 |
< |
Double_t JetProbabilityBJetTagsDisc() const |
71 |
< |
{ return fJetProbabilityBJetTagsDisc; } |
72 |
< |
Double_t JetBProbabilityBJetTagsDisc() const |
73 |
< |
{ return fJetBProbabilityBJetTagsDisc; } |
74 |
< |
Int_t MatchedMCFlavor() const { return fMatchedMCFlavor; } |
75 |
< |
virtual UInt_t NConstituents() const { return 0; } |
76 |
< |
UInt_t N() const { return NConstituents(); } |
77 |
< |
Double_t L2RelativeCorrectionScale() const { return fL2RelativeCorrectionScale; } |
78 |
< |
Double_t L3AbsoluteCorrectionScale() const { return fL3AbsoluteCorrectionScale; } |
79 |
< |
Double_t L4EMFCorrectionScale() const { return fL4EMFCorrectionScale; } |
80 |
< |
Double_t L5FlavorCorrectionScale() const { return fL5FlavorCorrectionScale; } |
81 |
< |
Double_t L7PartonCorrectionScale() const { return fL7PartonCorrectionScale; } |
82 |
< |
EObjType ObjType() const { return kJet; } |
83 |
< |
Double_t SimpleSecondaryVertexBJetTagsDisc() const |
84 |
< |
{ return fSimpleSecondaryVertexBJetTagsDisc; } |
85 |
< |
Double_t SoftMuonBJetTagsDisc() const |
86 |
< |
{ return fSoftMuonBJetTagsDisc; } |
87 |
< |
Double_t SoftMuonNoIPBJetTagsDisc() const |
88 |
< |
{ return fSoftMuonNoIPBJetTagsDisc; } |
89 |
< |
Double_t SoftElectronBJetTagsDisc() const |
90 |
< |
{ return fSoftElectronBJetTagsDisc; } |
91 |
< |
Double_t TrackCountingHighEffBJetTagsDisc() const |
92 |
< |
{ return fTrackCountingHighEffBJetTagsDisc; } |
93 |
< |
Double_t TrackCountingHighPurBJetTagsDisc() const |
94 |
< |
{ return fTrackCountingHighPurBJetTagsDisc; } |
95 |
< |
const FourVectorM &RawMom() const { return fRawMom; } |
96 |
< |
void SetAlpha(Double_t val) { fAlpha = val; } |
97 |
< |
void SetBeta(Double_t val) { fBeta = val; } |
98 |
< |
void SetCombinedSecondaryVertexBJetTagsDisc(Double_t d) |
99 |
< |
{ fCombinedSecondaryVertexBJetTagsDisc = d; } |
100 |
< |
void SetCombinedSecondaryVertexMVABJetTagsDisc(Double_t d) |
101 |
< |
{ fCombinedSecondaryVertexMVABJetTagsDisc = d; } |
102 |
< |
void SetImpactParameterMVABJetTagsDisc (Double_t d) |
103 |
< |
{ fImpactParameterMVABJetTagsDisc = d; } |
104 |
< |
void SetJetProbabilityBJetTagsDisc(Double_t d) |
105 |
< |
{ fJetProbabilityBJetTagsDisc = d; } |
106 |
< |
void SetJetBProbabilityBJetTagsDisc(Double_t d) |
107 |
< |
{ fJetBProbabilityBJetTagsDisc = d; } |
108 |
< |
void SetRawMom(const FourVectorM &mom) { fRawMom = mom; ClearMom(); } |
109 |
< |
void SetMatchedMCFlavor(Int_t flavor) { fMatchedMCFlavor = flavor; } |
110 |
< |
void SetL2RelativeCorrectionScale(Double_t s ) |
111 |
< |
{ fL2RelativeCorrectionScale = s; ClearMom(); } |
112 |
< |
void SetL3AbsoluteCorrectionScale(Double_t s ) |
113 |
< |
{ fL3AbsoluteCorrectionScale = s; ClearMom(); } |
114 |
< |
void SetL4EMFCorrectionScale(Double_t s ) |
115 |
< |
{ fL4EMFCorrectionScale = s; ClearMom(); } |
116 |
< |
void SetL5FlavorCorrectionScale(Double_t s ) |
117 |
< |
{ fL5FlavorCorrectionScale = s; ClearMom(); } |
118 |
< |
void SetL7PartonCorrectionScale(Double_t s ) |
119 |
< |
{ fL7PartonCorrectionScale = s; ClearMom(); } |
120 |
< |
void SetCustomCorrectionScale(Double_t s) |
121 |
< |
{ fCustomCorrectionScale = s; ClearMom(); } |
122 |
< |
void SetSimpleSecondaryVertexBJetTagsDisc(Double_t d) |
123 |
< |
{ fSimpleSecondaryVertexBJetTagsDisc = d; } |
124 |
< |
void SetSoftMuonBJetTagsDisc(Double_t d) { fSoftMuonBJetTagsDisc = d; } |
125 |
< |
void SetSoftMuonNoIPBJetTagsDisc(Double_t d) { fSoftMuonNoIPBJetTagsDisc = d; } |
126 |
< |
void SetSoftElectronBJetTagsDisc(Double_t d) { fSoftElectronBJetTagsDisc = d; } |
127 |
< |
void SetTrackCountingHighEffBJetTagsDisc(Double_t d) |
128 |
< |
{ fTrackCountingHighEffBJetTagsDisc = d; } |
129 |
< |
void SetTrackCountingHighPurBJetTagsDisc(Double_t d) |
130 |
< |
{ fTrackCountingHighPurBJetTagsDisc = d; } |
57 |
> |
Double_t Alpha() const { return fAlpha; } |
58 |
> |
Double_t Beta() const { return fBeta; } |
59 |
> |
Double_t CombinedSecondaryVertexBJetTagsDisc() const |
60 |
> |
{ return fCombinedSecondaryVertexBJetTagsDisc; } |
61 |
> |
Double_t CombinedSecondaryVertexMVABJetTagsDisc() const |
62 |
> |
{ return fCombinedSecondaryVertexMVABJetTagsDisc; } |
63 |
> |
Double_t CustomCorrectionScale() const { return fCustomCorrectionScale; } |
64 |
> |
void DisableCorrection(ECorr c) { fCorrections.ClearBit(c); ClearMom(); } |
65 |
> |
void DisableCorrections() { fCorrections.Clear(); ClearMom(); } |
66 |
> |
void EnableCorrection(ECorr c) { fCorrections.SetBit(c); ClearMom(); } |
67 |
> |
Bool_t CorrectionActive(ECorr c) const { return fCorrections.TestBit(c); } |
68 |
> |
Double_t ImpactParameterMVABJetTagsDisc() const |
69 |
> |
{ return fImpactParameterMVABJetTagsDisc; } |
70 |
> |
Double_t JetProbabilityBJetTagsDisc() const |
71 |
> |
{ return fJetProbabilityBJetTagsDisc; } |
72 |
> |
Double_t JetBProbabilityBJetTagsDisc() const |
73 |
> |
{ return fJetBProbabilityBJetTagsDisc; } |
74 |
> |
Int_t MatchedMCFlavor() const { return fMatchedMCFlavor; } |
75 |
> |
virtual |
76 |
> |
UInt_t NConstituents() const { return 0; } |
77 |
> |
UInt_t N() const { return NConstituents(); } |
78 |
> |
Double_t L2RelativeCorrectionScale() const { return fL2RelativeCorrectionScale; } |
79 |
> |
Double_t L3AbsoluteCorrectionScale() const { return fL3AbsoluteCorrectionScale; } |
80 |
> |
Double_t L4EMFCorrectionScale() const { return fL4EMFCorrectionScale; } |
81 |
> |
Double_t L5FlavorCorrectionScale() const { return fL5FlavorCorrectionScale; } |
82 |
> |
Double_t L7PartonCorrectionScale() const { return fL7PartonCorrectionScale; } |
83 |
> |
EObjType ObjType() const { return kJet; } |
84 |
> |
Double_t SimpleSecondaryVertexBJetTagsDisc() const |
85 |
> |
{ return fSimpleSecondaryVertexBJetTagsDisc; } |
86 |
> |
Double_t SoftMuonBJetTagsDisc() const |
87 |
> |
{ return fSoftMuonBJetTagsDisc; } |
88 |
> |
Double_t SoftMuonNoIPBJetTagsDisc() const |
89 |
> |
{ return fSoftMuonNoIPBJetTagsDisc; } |
90 |
> |
Double_t SoftElectronBJetTagsDisc() const |
91 |
> |
{ return fSoftElectronBJetTagsDisc; } |
92 |
> |
Double_t TrackCountingHighEffBJetTagsDisc() const |
93 |
> |
{ return fTrackCountingHighEffBJetTagsDisc; } |
94 |
> |
Double_t TrackCountingHighPurBJetTagsDisc() const |
95 |
> |
{ return fTrackCountingHighPurBJetTagsDisc; } |
96 |
> |
FourVectorM RawMom() const { return fRawMom.V(); } |
97 |
> |
void SetAlpha(Double_t val) { fAlpha = val; } |
98 |
> |
void SetBeta(Double_t val) { fBeta = val; } |
99 |
> |
void SetCombinedSecondaryVertexBJetTagsDisc(Double_t d) |
100 |
> |
{ fCombinedSecondaryVertexBJetTagsDisc = d; } |
101 |
> |
void SetCombinedSecondaryVertexMVABJetTagsDisc(Double_t d) |
102 |
> |
{ fCombinedSecondaryVertexMVABJetTagsDisc = d; } |
103 |
> |
void SetImpactParameterMVABJetTagsDisc (Double_t d) |
104 |
> |
{ fImpactParameterMVABJetTagsDisc = d; } |
105 |
> |
void SetJetProbabilityBJetTagsDisc(Double_t d) |
106 |
> |
{ fJetProbabilityBJetTagsDisc = d; } |
107 |
> |
void SetJetBProbabilityBJetTagsDisc(Double_t d) |
108 |
> |
{ fJetBProbabilityBJetTagsDisc = d; } |
109 |
> |
void SetRawMom(const FourVectorM &mom) { fRawMom = mom; ClearMom(); } |
110 |
> |
void SetMatchedMCFlavor(Int_t flavor) { fMatchedMCFlavor = flavor; } |
111 |
> |
void SetL2RelativeCorrectionScale(Double_t s ) |
112 |
> |
{ fL2RelativeCorrectionScale = s; ClearMom(); } |
113 |
> |
void SetL3AbsoluteCorrectionScale(Double_t s ) |
114 |
> |
{ fL3AbsoluteCorrectionScale = s; ClearMom(); } |
115 |
> |
void SetL4EMFCorrectionScale(Double_t s ) |
116 |
> |
{ fL4EMFCorrectionScale = s; ClearMom(); } |
117 |
> |
void SetL5FlavorCorrectionScale(Double_t s ) |
118 |
> |
{ fL5FlavorCorrectionScale = s; ClearMom(); } |
119 |
> |
void SetL7PartonCorrectionScale(Double_t s ) |
120 |
> |
{ fL7PartonCorrectionScale = s; ClearMom(); } |
121 |
> |
void SetCustomCorrectionScale(Double_t s) |
122 |
> |
{ fCustomCorrectionScale = s; ClearMom(); } |
123 |
> |
void SetSimpleSecondaryVertexBJetTagsDisc(Double_t d) |
124 |
> |
{ fSimpleSecondaryVertexBJetTagsDisc = d; } |
125 |
> |
void SetSoftMuonBJetTagsDisc(Double_t d) { fSoftMuonBJetTagsDisc = d; } |
126 |
> |
void SetSoftMuonNoIPBJetTagsDisc(Double_t d) { fSoftMuonNoIPBJetTagsDisc = d; } |
127 |
> |
void SetSoftElectronBJetTagsDisc(Double_t d) { fSoftElectronBJetTagsDisc = d; } |
128 |
> |
void SetTrackCountingHighEffBJetTagsDisc(Double_t d) |
129 |
> |
{ fTrackCountingHighEffBJetTagsDisc = d; } |
130 |
> |
void SetTrackCountingHighPurBJetTagsDisc(Double_t d) |
131 |
> |
{ fTrackCountingHighPurBJetTagsDisc = d; } |
132 |
|
|
133 |
|
protected: |
134 |
|
void GetMom() const; |
135 |
|
|
136 |
< |
FourVectorM32 fRawMom; //uncorrected four momentum of jet |
137 |
< |
Double32_t fAlpha; //jet vertex association alpha variable |
138 |
< |
Double32_t fBeta; //jet vertex association beta variable |
139 |
< |
Int_t fMatchedMCFlavor; //pdg of the quark flavor that the jet matched to |
140 |
< |
Double32_t fJetProbabilityBJetTagsDisc; //discriminants from b-tagging algos |
141 |
< |
Double32_t fJetBProbabilityBJetTagsDisc; //discriminants from b-tagging algos |
142 |
< |
Double32_t fSimpleSecondaryVertexBJetTagsDisc; //discriminants from b-tagging algos |
143 |
< |
Double32_t fCombinedSecondaryVertexBJetTagsDisc; //discriminants from b-tagging algos |
144 |
< |
Double32_t fCombinedSecondaryVertexMVABJetTagsDisc; //discriminants from b-tagging algos |
145 |
< |
Double32_t fImpactParameterMVABJetTagsDisc; //discriminants from b-tagging algos |
146 |
< |
Double32_t fTrackCountingHighEffBJetTagsDisc; //discriminants from b-tagging algos |
147 |
< |
Double32_t fTrackCountingHighPurBJetTagsDisc; //discriminants from b-tagging algos |
148 |
< |
Double32_t fSoftMuonBJetTagsDisc; //discriminants from b-tagging algos |
149 |
< |
Double32_t fSoftMuonNoIPBJetTagsDisc; //discriminants from b-tagging algos |
150 |
< |
Double32_t fSoftElectronBJetTagsDisc; //discriminants from b-tagging algos |
151 |
< |
Double32_t fL2RelativeCorrectionScale; //L2 correction scale |
152 |
< |
Double32_t fL3AbsoluteCorrectionScale; //L3 correction scale |
153 |
< |
Double32_t fL4EMFCorrectionScale; //L4 correction scale |
154 |
< |
Double32_t fL5FlavorCorrectionScale; //L5 correction scale |
155 |
< |
Double32_t fL7PartonCorrectionScale; //L7 correction scale |
156 |
< |
Double32_t fCustomCorrectionScale; //custom correction scale |
136 |
> |
Vect4M fRawMom; //uncorrected four momentum of jet |
137 |
> |
Double32_t fAlpha; //[0,0,14]jet vertex alpha variable |
138 |
> |
Double32_t fBeta; //[0,0,14]jet vertex beta variable |
139 |
> |
Int_t fMatchedMCFlavor; //[0,0,14]pdg of matched quark flavor |
140 |
> |
Double32_t fJetProbabilityBJetTagsDisc; //[0,0,14]discriminants b-tagging algos |
141 |
> |
Double32_t fJetBProbabilityBJetTagsDisc; //[0,0,14]discriminants b-tagging algos |
142 |
> |
Double32_t fSimpleSecondaryVertexBJetTagsDisc; //[0,0,14]discriminants b-tagging algos |
143 |
> |
Double32_t fCombinedSecondaryVertexBJetTagsDisc; //[0,0,14]discriminants b-tagging algos |
144 |
> |
Double32_t fCombinedSecondaryVertexMVABJetTagsDisc; //[0,0,14]discriminants b-tagging algos |
145 |
> |
Double32_t fImpactParameterMVABJetTagsDisc; //[0,0,14]discriminants b-tagging algos |
146 |
> |
Double32_t fTrackCountingHighEffBJetTagsDisc; //[0,0,14]discriminants b-tagging algos |
147 |
> |
Double32_t fTrackCountingHighPurBJetTagsDisc; //[0,0,14]discriminants b-tagging algos |
148 |
> |
Double32_t fSoftMuonBJetTagsDisc; //[0,0,14]discriminants b-tagging algos |
149 |
> |
Double32_t fSoftMuonNoIPBJetTagsDisc; //[0,0,14]discriminants b-tagging algos |
150 |
> |
Double32_t fSoftElectronBJetTagsDisc; //[0,0,14]discriminants b-tagging algos |
151 |
> |
Double32_t fL2RelativeCorrectionScale; //[0,0,14]L2 correction scale |
152 |
> |
Double32_t fL3AbsoluteCorrectionScale; //[0,0,14]L3 correction scale |
153 |
> |
Double32_t fL4EMFCorrectionScale; //[0,0,14]L4 correction scale |
154 |
> |
Double32_t fL5FlavorCorrectionScale; //[0,0,14]L5 correction scale |
155 |
> |
Double32_t fL7PartonCorrectionScale; //[0,0,14]L7 correction scale |
156 |
> |
Double32_t fCustomCorrectionScale; //[0,0,14]custom correction scale |
157 |
|
BitMask8 fCorrections; //mask of corrections to be applied |
158 |
|
|
159 |
|
ClassDef(Jet, 1) // Jet class |
165 |
|
{ |
166 |
|
// Get raw momentum values from stored values and apply all enabled corrections. |
167 |
|
|
168 |
< |
fCachedMom = fRawMom; |
169 |
< |
|
168 |
> |
fCachedMom.SetCoordinates(fRawMom.Pt(),fRawMom.Eta(),fRawMom.Phi(),fRawMom.M()); |
169 |
> |
|
170 |
|
if (CorrectionActive(L2)) |
171 |
|
fCachedMom *= fL2RelativeCorrectionScale; |
172 |
|
|