23 |
|
#include "MitAna/DataTree/interface/DecayParticleCol.h" |
24 |
|
#include "MitAna/DataTree/interface/PileupInfoCol.h" |
25 |
|
#include "MitAna/DataTree/interface/MCParticleCol.h" |
26 |
+ |
#include "MitAna/DataTree/interface/PFCandidateCol.h" |
27 |
|
|
28 |
|
#include "MitPhysics/Utils/interface/MVATools.h" |
29 |
+ |
#include "MitPhysics/Utils/interface/PhotonTools.h" |
30 |
+ |
|
31 |
+ |
class TRandom3; |
32 |
|
|
33 |
|
namespace mithep |
34 |
|
{ |
86 |
|
} |
87 |
|
void SetTriggerObjectsName(const char *n) { fTrigObjectsName = n; } |
88 |
|
|
89 |
+ |
|
90 |
+ |
void SetPhotonsFromBranch(bool b) { fPhotonsFromBranch = b; } |
91 |
+ |
|
92 |
|
void SetPVName(const char *n) { fPVName = n; } |
93 |
|
void SetPVFromBranch(bool b) { fPVFromBranch = b; } |
94 |
|
void SetIsData (Bool_t b) { fIsData = b;}; |
95 |
+ |
|
96 |
+ |
|
97 |
+ |
void SetShowerShapeType(const char *type) { fShowerShapeType = type; } |
98 |
+ |
|
99 |
+ |
// methods to set the MC smearing/energy correction values |
100 |
+ |
void AddEnCorrPerRun( UInt_t sRun, UInt_t eRun, |
101 |
+ |
Double_t corr_EBlowEta_hR9central, |
102 |
+ |
Double_t corr_EBlowEta_hR9gap, |
103 |
+ |
Double_t corr_EBlowEta_lR9, |
104 |
+ |
Double_t corr_EBhighEta_hR9, |
105 |
+ |
Double_t corr_EBhighEta_lR9, |
106 |
+ |
Double_t corr_EElowEta_hR9, |
107 |
+ |
Double_t corr_EElowEta_lR9, |
108 |
+ |
Double_t corr_EEhighEta_hR9, |
109 |
+ |
Double_t corr_EEhighEta_lR9) { |
110 |
+ |
|
111 |
+ |
fDataEnCorr_EBlowEta_hR9central.push_back(corr_EBlowEta_hR9central); |
112 |
+ |
fDataEnCorr_EBlowEta_hR9gap.push_back(corr_EBlowEta_hR9gap); |
113 |
+ |
fDataEnCorr_EBlowEta_lR9.push_back(corr_EBlowEta_lR9); |
114 |
+ |
fDataEnCorr_EBhighEta_hR9.push_back(corr_EBhighEta_hR9); |
115 |
+ |
fDataEnCorr_EBhighEta_lR9.push_back(corr_EBhighEta_lR9); |
116 |
+ |
fDataEnCorr_EElowEta_hR9.push_back(corr_EElowEta_hR9); |
117 |
+ |
fDataEnCorr_EElowEta_lR9.push_back(corr_EElowEta_lR9); |
118 |
+ |
fDataEnCorr_EEhighEta_hR9.push_back(corr_EEhighEta_hR9); |
119 |
+ |
fDataEnCorr_EEhighEta_lR9.push_back(corr_EEhighEta_lR9); |
120 |
+ |
fRunStart.push_back (sRun); |
121 |
+ |
fRunEnd.push_back (eRun); |
122 |
+ |
}; |
123 |
+ |
|
124 |
+ |
void SetMCSmearFactors(Double_t _EBlowEta_hR9central, |
125 |
+ |
Double_t _EBlowEta_hR9gap, |
126 |
+ |
Double_t _EBlowEta_lR9, |
127 |
+ |
Double_t _EBhighEta_hR9, |
128 |
+ |
Double_t _EBhighEta_lR9, |
129 |
+ |
Double_t _EElowEta_hR9, |
130 |
+ |
Double_t _EElowEta_lR9, |
131 |
+ |
Double_t _EEhighEta_hR9, |
132 |
+ |
Double_t _EEhighEta_lR9) { |
133 |
+ |
fMCSmear_EBlowEta_hR9central = _EBlowEta_hR9central; |
134 |
+ |
fMCSmear_EBlowEta_hR9gap = _EBlowEta_hR9gap; |
135 |
+ |
fMCSmear_EBlowEta_lR9 = _EBlowEta_lR9; |
136 |
+ |
fMCSmear_EBhighEta_hR9 = _EBhighEta_hR9; |
137 |
+ |
fMCSmear_EBhighEta_lR9 = _EBhighEta_lR9; |
138 |
+ |
fMCSmear_EElowEta_hR9 = _EElowEta_hR9; |
139 |
+ |
fMCSmear_EElowEta_lR9 = _EElowEta_lR9; |
140 |
+ |
fMCSmear_EEhighEta_hR9 = _EEhighEta_hR9; |
141 |
+ |
fMCSmear_EEhighEta_lR9 = _EEhighEta_lR9; |
142 |
+ |
}; |
143 |
+ |
|
144 |
|
void SetGoodElectronsFromBranch(Bool_t b) { fGoodElectronsFromBranch = b; } |
145 |
|
void SetGoodElectronName(TString name) { fGoodElectronName = name; } |
146 |
|
|
148 |
|
void SetBdtCutEndcap(double a) {fbdtCutEndcap = a; } |
149 |
|
|
150 |
|
|
151 |
+ |
void DoDataEneCorr(bool a) { fDoDataEneCorr = a; } |
152 |
+ |
void DoMCSmear(bool a) { fDoMCSmear = a; } |
153 |
+ |
void SetDoShowerShapeScaling(Bool_t b) { fDoShowerShapeScaling = b; } |
154 |
+ |
|
155 |
+ |
// replaced by ShowerShapeScaling (fab) |
156 |
+ |
/* void SetDoMCR9Scaling(Bool_t b) { fDoMCR9Scaling = b; } */ |
157 |
+ |
/* void SetMCR9Scale(Double_t ebscale, Double_t eescale) { fMCR9ScaleEB = ebscale; fMCR9ScaleEE = eescale; } */ |
158 |
+ |
/* void SetDoMCSigIEtaIEtaScaling(Bool_t b) { fDoMCSigIEtaIEtaScaling = b; } */ |
159 |
+ |
/* void SetDoMCWidthScaling(Bool_t b) { fDoMCWidthScaling = b; } */ |
160 |
+ |
|
161 |
+ |
void SetDoMCErrScaling(Bool_t b) { fDoMCErrScaling = b; } |
162 |
+ |
void SetMCErrScale(Double_t ebscale, Double_t eescale) { fMCErrScaleEB = ebscale; fMCErrScaleEE = eescale; } |
163 |
+ |
|
164 |
|
enum EPhIdType { |
165 |
|
kIdUndef = 0, //not defined |
166 |
|
kTight, //"Tight" |
167 |
|
kLoose, //"Loose" |
168 |
|
kLooseEM, //"LooseEM" |
169 |
|
kBaseLineCiC, //"2011" Hgg BaseLine CiC |
170 |
+ |
kBaseLineCiCPF, //"2012" Hgg BaseLine CiC |
171 |
|
kMITMVAId, // MingMing MVA ID |
172 |
+ |
kMITPhSelection, //MIT loose preselection (for mva) |
173 |
+ |
kMITPFPhSelection, //MIT loose preselection (for mva) |
174 |
|
kCustomId //"Custom" |
175 |
|
}; |
176 |
|
|
186 |
|
void Process(); |
187 |
|
void SlaveBegin(); |
188 |
|
|
189 |
+ |
Int_t FindRunRangeIdx(UInt_t run); |
190 |
+ |
Double_t GetDataEnCorr(Int_t runRange, PhotonTools::eScaleCats cat); |
191 |
+ |
Double_t GetMCSmearFac(PhotonTools::eScaleCats cat); |
192 |
+ |
|
193 |
|
TString fPhotonBranchName; //name of photon collection (input) |
194 |
|
TString fGoodPhotonsName; //name of exported "good photon" collection |
195 |
|
TString fTrackBranchName; // name of the track collection (only needed for PU corrected isolation) |
202 |
|
TString fPVName; |
203 |
|
TString fMCParticleName; |
204 |
|
TString fPileUpName; |
205 |
+ |
TString fPFCandsName; |
206 |
|
TString fPhotonIDType; //type of photon identification we impose |
207 |
|
TString fPhotonIsoType; //type of photon isolation we impose |
208 |
|
Double_t fPhotonPtMin; //min pt cut |
218 |
|
EPhIdType fPhIdType; //!identification scheme |
219 |
|
EPhIsoType fPhIsoType; //!isolation scheme |
220 |
|
Bool_t fFiduciality; //=true then apply fiducual requirement |
221 |
+ |
|
222 |
|
Double_t fEtaWidthEB; //max Eta Width in ECAL Barrel |
223 |
|
Double_t fEtaWidthEE; //max Eta Width in ECAL End Cap |
224 |
|
Double_t fAbsEtaMax; //max Abs Eta |
239 |
|
const VertexCol* fPV; //! |
240 |
|
const MCParticleCol *fMCParticles;//! |
241 |
|
const PileupInfoCol *fPileUp; //! |
242 |
+ |
const PFCandidateCol *fPFCands; //! |
243 |
|
|
244 |
|
Double_t fbdtCutBarrel; |
245 |
|
Double_t fbdtCutEndcap; |
248 |
|
TString fBarrelWeights; |
249 |
|
MVATools fTool; |
250 |
|
|
251 |
< |
bool fPVFromBranch; |
251 |
> |
Bool_t fDoMCR9Scaling; |
252 |
> |
Double_t fMCR9ScaleEB; |
253 |
> |
Double_t fMCR9ScaleEE; |
254 |
> |
|
255 |
> |
Bool_t fDoMCSigIEtaIEtaScaling; |
256 |
> |
Bool_t fDoMCWidthScaling; |
257 |
> |
|
258 |
> |
Bool_t fDoMCErrScaling; |
259 |
> |
Double_t fMCErrScaleEB; |
260 |
> |
Double_t fMCErrScaleEE; |
261 |
> |
|
262 |
> |
Bool_t fPhotonsFromBranch; |
263 |
> |
Bool_t fPVFromBranch; |
264 |
|
Bool_t fGoodElectronsFromBranch; |
265 |
|
Bool_t fIsData; |
266 |
|
|
267 |
|
|
268 |
+ |
// showershape |
269 |
+ |
TString fShowerShapeType; |
270 |
+ |
PhotonTools::ShowerShapeScales fSSType; |
271 |
+ |
|
272 |
+ |
bool fDoDataEneCorr; |
273 |
+ |
bool fDoMCSmear; |
274 |
+ |
Bool_t fDoShowerShapeScaling; |
275 |
+ |
|
276 |
+ |
|
277 |
+ |
// Vectroes to hols smeraring/correction factors |
278 |
+ |
std::vector<Double_t> fDataEnCorr_EBlowEta_hR9central; |
279 |
+ |
std::vector<Double_t> fDataEnCorr_EBlowEta_hR9gap; |
280 |
+ |
std::vector<Double_t> fDataEnCorr_EBlowEta_lR9; |
281 |
+ |
std::vector<Double_t> fDataEnCorr_EBhighEta_hR9; |
282 |
+ |
std::vector<Double_t> fDataEnCorr_EBhighEta_lR9; |
283 |
+ |
std::vector<Double_t> fDataEnCorr_EElowEta_hR9; |
284 |
+ |
std::vector<Double_t> fDataEnCorr_EElowEta_lR9; |
285 |
+ |
std::vector<Double_t> fDataEnCorr_EEhighEta_hR9; |
286 |
+ |
std::vector<Double_t> fDataEnCorr_EEhighEta_lR9; |
287 |
+ |
|
288 |
+ |
std::vector<UInt_t> fRunStart; |
289 |
+ |
std::vector<UInt_t> fRunEnd; |
290 |
+ |
|
291 |
+ |
Double_t fMCSmear_EBlowEta_hR9central; |
292 |
+ |
Double_t fMCSmear_EBlowEta_hR9gap; |
293 |
+ |
Double_t fMCSmear_EBlowEta_lR9; |
294 |
+ |
Double_t fMCSmear_EBhighEta_hR9; |
295 |
+ |
Double_t fMCSmear_EBhighEta_lR9; |
296 |
+ |
Double_t fMCSmear_EElowEta_hR9; |
297 |
+ |
Double_t fMCSmear_EElowEta_lR9; |
298 |
+ |
Double_t fMCSmear_EEhighEta_hR9; |
299 |
+ |
Double_t fMCSmear_EEhighEta_lR9; |
300 |
+ |
|
301 |
+ |
TRandom3* fRng; |
302 |
+ |
|
303 |
|
|
304 |
|
ClassDef(PhotonIDMod, 1) // Photon identification module |
305 |
|
}; |