1 |
fabstoec |
1.1 |
//--------------------------------------------------------------------------------------------------
|
2 |
mingyang |
1.10 |
// M.Yang 2011/10/12
|
3 |
bendavid |
1.36 |
// $Id: PhotonPairSelector.h,v 1.35 2013/11/22 14:28:23 veverka Exp $
|
4 |
fabstoec |
1.1 |
//
|
5 |
|
|
// PhotonPairSelector
|
6 |
|
|
//
|
7 |
|
|
// Authors: F. Stoeckli
|
8 |
|
|
//--------------------------------------------------------------------------------------------------
|
9 |
|
|
|
10 |
|
|
#ifndef MITPHYSICS_MODS_PHOTONPAIRSELECTOR_H
|
11 |
|
|
#define MITPHYSICS_MODS_PHOTONPAIRSELECTOR_H
|
12 |
|
|
|
13 |
|
|
#include "MitAna/TreeMod/interface/BaseMod.h"
|
14 |
|
|
#include "MitAna/DataTree/interface/PhotonFwd.h"
|
15 |
|
|
#include "MitAna/DataTree/interface/TrackCol.h"
|
16 |
|
|
#include "MitAna/DataTree/interface/VertexCol.h"
|
17 |
|
|
#include "MitAna/DataTree/interface/BeamSpotCol.h"
|
18 |
|
|
#include "MitAna/DataTree/interface/PFCandidateCol.h"
|
19 |
|
|
#include "MitAna/DataTree/interface/PileupEnergyDensityCol.h"
|
20 |
|
|
#include "MitAna/DataTree/interface/DecayParticleCol.h"
|
21 |
|
|
#include "MitAna/DataTree/interface/ElectronCol.h"
|
22 |
|
|
#include "MitAna/DataTree/interface/DecayParticleCol.h"
|
23 |
|
|
#include "MitAna/DataTree/interface/PileupInfoCol.h"
|
24 |
|
|
#include "MitAna/DataTree/interface/MCParticleCol.h"
|
25 |
bendavid |
1.20 |
#include "MitAna/DataTree/interface/JetCol.h"
|
26 |
|
|
#include "MitAna/DataTree/interface/PFMetCol.h"
|
27 |
fabstoec |
1.1 |
|
28 |
|
|
#include "MitPhysics/Utils/interface/PhotonTools.h"
|
29 |
bendavid |
1.8 |
#include "MitPhysics/Utils/interface/EGEnergyCorrector.h"
|
30 |
fabstoec |
1.1 |
|
31 |
mingyang |
1.10 |
#include "MitPhysics/Utils/interface/MVATools.h"
|
32 |
bendavid |
1.13 |
#include "MitPhysics/Utils/interface/VertexTools.h"
|
33 |
mingyang |
1.10 |
|
34 |
bendavid |
1.20 |
#include "MitPhysics/Utils/interface/MVAMet.h"
|
35 |
fabstoec |
1.30 |
#include "MitPhysics/Utils/interface/RhoUtilities.h"
|
36 |
|
|
|
37 |
bendavid |
1.20 |
|
38 |
fabstoec |
1.1 |
class TNtuple;
|
39 |
|
|
class TRandom3;
|
40 |
bendavid |
1.8 |
class TH1D;
|
41 |
fabstoec |
1.1 |
|
42 |
|
|
namespace mithep
|
43 |
bendavid |
1.7 |
{
|
44 |
fabstoec |
1.1 |
class PhotonPairSelector : public BaseMod
|
45 |
|
|
{
|
46 |
|
|
public:
|
47 |
paus |
1.18 |
PhotonPairSelector(const char *name = "PhotonPairSelector",
|
48 |
|
|
const char *title = "Selecting PhotonPairs");
|
49 |
fabstoec |
1.1 |
|
50 |
|
|
~PhotonPairSelector();
|
51 |
|
|
|
52 |
|
|
enum PhotonSelection {
|
53 |
|
|
kNoPhSelection = 0,
|
54 |
|
|
kCiCPhSelection,
|
55 |
mingyang |
1.34 |
kCiCPFPhSelection,
|
56 |
|
|
kCiCPFPhSelectionNoPFChargedIso,
|
57 |
mingyang |
1.10 |
kMVAPhSelection, //MVA
|
58 |
bendavid |
1.21 |
kMITPhSelection,
|
59 |
mingyang |
1.33 |
kMITPFPhSelection,
|
60 |
mingyang |
1.34 |
kMITPFPhSelectionNoEcal,
|
61 |
|
|
kMITPFPhSelectionNoEcalNoPFChargedIso
|
62 |
fabstoec |
1.1 |
};
|
63 |
|
|
enum VertexSelection {
|
64 |
|
|
kStdVtxSelection = 0,
|
65 |
|
|
kCiCVtxSelection,
|
66 |
bendavid |
1.13 |
kMITVtxSelection,
|
67 |
bendavid |
1.20 |
kCiCMVAVtxSelection,
|
68 |
|
|
kMetSigVtxSelection
|
69 |
fabstoec |
1.1 |
};
|
70 |
fabstoec |
1.29 |
|
71 |
|
|
// outsourced to MVATools (IdMVAType) (fab)
|
72 |
|
|
/* enum IdMVA { */
|
73 |
|
|
/* k2011IdMVA = 0, */
|
74 |
|
|
/* k2012IdMVA_globe */
|
75 |
|
|
/* }; */
|
76 |
fabstoec |
1.27 |
|
77 |
|
|
|
78 |
|
|
// outsourced to PhotonTools (fab)
|
79 |
|
|
/* enum ShowerShape { */
|
80 |
|
|
/* k2011ShowerShape = 0, */
|
81 |
|
|
/* k2012ShowerShape */
|
82 |
|
|
/* }; */
|
83 |
fabstoec |
1.1 |
|
84 |
|
|
// setting all the input Names
|
85 |
|
|
void SetInputPhotonsName(const char *n){ fPhotonBranchName= n; }
|
86 |
|
|
void SetPhotonsFromBranch(bool b) { fPhotonsFromBranch = b; }
|
87 |
|
|
void SetTrackName(const char *n) { fTrackBranchName = n; }
|
88 |
|
|
void SetElectronName(const char *n) { fElectronName = n; }
|
89 |
|
|
void SetConversionName(const char *n) { fConversionName = n; }
|
90 |
|
|
void SetPUDensityName(const char *n) { fPileUpDenName = n; }
|
91 |
|
|
void SetPVName(const char *n) { fPVName = n; }
|
92 |
|
|
void SetPVFromBranch(bool b) { fPVFromBranch = b; }
|
93 |
|
|
void SetMCParticle(const char *n) { fMCParticleName = n; }
|
94 |
|
|
void SetPUInfoName(const char *n) { fPileUpName = n; }
|
95 |
|
|
void SetBeamspotName(const char *n) { fBeamspotName = n; }
|
96 |
|
|
void SetPFCandName(const char *n) { fPFCandName = n; }
|
97 |
|
|
|
98 |
|
|
// set the type of selection
|
99 |
|
|
void SetPhotonSelType(const char *type){ fPhotonSelType = type; }
|
100 |
|
|
void SetVertexSelType(const char *type){ fVertexSelType = type; }
|
101 |
mingyang |
1.22 |
void SetIdMVAType(const char *type) { fIdMVAType = type; }
|
102 |
mingyang |
1.26 |
void SetShowerShapeType(const char *type) { fShowerShapeType = type; }
|
103 |
fabstoec |
1.1 |
|
104 |
|
|
// get/set the Names for the output Photon Collection
|
105 |
|
|
const char *GetOutputName() const { return fGoodPhotonsName; }
|
106 |
|
|
void SetOutputName(const char *n) { fGoodPhotonsName=n; }
|
107 |
|
|
|
108 |
fabstoec |
1.19 |
const char *GetOutputVtxName() const { return fChosenVtxName; }
|
109 |
|
|
void SetOutputVtxName(const char* n) { fChosenVtxName = n; }
|
110 |
|
|
|
111 |
|
|
|
112 |
fabstoec |
1.1 |
// set basic Cut variables (FOR PRE-SELECTION)
|
113 |
|
|
void SetPtMin(Double_t pt) { fPhotonPtMin = pt; }
|
114 |
|
|
void SetAbsEtaMax(Double_t eta) { fPhotonEtaMax = eta; }
|
115 |
|
|
|
116 |
|
|
void SetLeadingPtMin(Double_t pt) { fLeadingPtMin = pt; }
|
117 |
fabstoec |
1.6 |
void SetTrailingPtMin(Double_t pt) { fTrailingPtMin = pt; }
|
118 |
fabstoec |
1.1 |
|
119 |
|
|
// is Data Or Not?
|
120 |
mingyang |
1.31 |
void SetIsData (Bool_t b) { fIsData = b;}
|
121 |
|
|
|
122 |
|
|
void Set2012HCP (Bool_t b) { f2012HCP = b;};
|
123 |
|
|
|
124 |
fabstoec |
1.1 |
|
125 |
|
|
// methods to set the MC smearing/energy correction values
|
126 |
|
|
void AddEnCorrPerRun( UInt_t sRun, UInt_t eRun,
|
127 |
bendavid |
1.14 |
Double_t corr_EBlowEta_hR9central,
|
128 |
|
|
Double_t corr_EBlowEta_hR9gap,
|
129 |
bendavid |
1.13 |
Double_t corr_EBlowEta_lR9,
|
130 |
|
|
Double_t corr_EBhighEta_hR9,
|
131 |
|
|
Double_t corr_EBhighEta_lR9,
|
132 |
|
|
Double_t corr_EElowEta_hR9,
|
133 |
|
|
Double_t corr_EElowEta_lR9,
|
134 |
|
|
Double_t corr_EEhighEta_hR9,
|
135 |
|
|
Double_t corr_EEhighEta_lR9) {
|
136 |
|
|
|
137 |
bendavid |
1.14 |
fDataEnCorr_EBlowEta_hR9central.push_back(corr_EBlowEta_hR9central);
|
138 |
|
|
fDataEnCorr_EBlowEta_hR9gap.push_back(corr_EBlowEta_hR9gap);
|
139 |
bendavid |
1.13 |
fDataEnCorr_EBlowEta_lR9.push_back(corr_EBlowEta_lR9);
|
140 |
|
|
fDataEnCorr_EBhighEta_hR9.push_back(corr_EBhighEta_hR9);
|
141 |
|
|
fDataEnCorr_EBhighEta_lR9.push_back(corr_EBhighEta_lR9);
|
142 |
|
|
fDataEnCorr_EElowEta_hR9.push_back(corr_EElowEta_hR9);
|
143 |
|
|
fDataEnCorr_EElowEta_lR9.push_back(corr_EElowEta_lR9);
|
144 |
|
|
fDataEnCorr_EEhighEta_hR9.push_back(corr_EEhighEta_hR9);
|
145 |
|
|
fDataEnCorr_EEhighEta_lR9.push_back(corr_EEhighEta_lR9);
|
146 |
fabstoec |
1.1 |
fRunStart.push_back (sRun);
|
147 |
|
|
fRunEnd.push_back (eRun);
|
148 |
|
|
};
|
149 |
|
|
|
150 |
bendavid |
1.14 |
void SetMCSmearFactors(Double_t _EBlowEta_hR9central,
|
151 |
|
|
Double_t _EBlowEta_hR9gap,
|
152 |
bendavid |
1.13 |
Double_t _EBlowEta_lR9,
|
153 |
|
|
Double_t _EBhighEta_hR9,
|
154 |
|
|
Double_t _EBhighEta_lR9,
|
155 |
|
|
Double_t _EElowEta_hR9,
|
156 |
|
|
Double_t _EElowEta_lR9,
|
157 |
|
|
Double_t _EEhighEta_hR9,
|
158 |
|
|
Double_t _EEhighEta_lR9) {
|
159 |
bendavid |
1.14 |
fMCSmear_EBlowEta_hR9central = _EBlowEta_hR9central;
|
160 |
|
|
fMCSmear_EBlowEta_hR9gap = _EBlowEta_hR9gap;
|
161 |
bendavid |
1.13 |
fMCSmear_EBlowEta_lR9 = _EBlowEta_lR9;
|
162 |
|
|
fMCSmear_EBhighEta_hR9 = _EBhighEta_hR9;
|
163 |
|
|
fMCSmear_EBhighEta_lR9 = _EBhighEta_lR9;
|
164 |
|
|
fMCSmear_EElowEta_hR9 = _EElowEta_hR9;
|
165 |
|
|
fMCSmear_EElowEta_lR9 = _EElowEta_lR9;
|
166 |
|
|
fMCSmear_EEhighEta_hR9 = _EEhighEta_hR9;
|
167 |
|
|
fMCSmear_EEhighEta_lR9 = _EEhighEta_lR9;
|
168 |
fabstoec |
1.1 |
};
|
169 |
fabstoec |
1.2 |
|
170 |
fabstoec |
1.32 |
// special routine in ordetr to use different smearing to compute mass-error for di-photon MVA input
|
171 |
|
|
void SetMCSmearFactorsMVA(Double_t _EBlowEta_hR9central,
|
172 |
|
|
Double_t _EBlowEta_hR9gap,
|
173 |
|
|
Double_t _EBlowEta_lR9,
|
174 |
|
|
Double_t _EBhighEta_hR9,
|
175 |
|
|
Double_t _EBhighEta_lR9,
|
176 |
|
|
Double_t _EElowEta_hR9,
|
177 |
|
|
Double_t _EElowEta_lR9,
|
178 |
|
|
Double_t _EEhighEta_hR9,
|
179 |
|
|
Double_t _EEhighEta_lR9) {
|
180 |
|
|
|
181 |
|
|
fMCSmearMVA_EBlowEta_hR9central = _EBlowEta_hR9central;
|
182 |
|
|
fMCSmearMVA_EBlowEta_hR9gap = _EBlowEta_hR9gap;
|
183 |
|
|
fMCSmearMVA_EBlowEta_lR9 = _EBlowEta_lR9;
|
184 |
|
|
fMCSmearMVA_EBhighEta_hR9 = _EBhighEta_hR9;
|
185 |
|
|
fMCSmearMVA_EBhighEta_lR9 = _EBhighEta_lR9;
|
186 |
|
|
fMCSmearMVA_EElowEta_hR9 = _EElowEta_hR9;
|
187 |
|
|
fMCSmearMVA_EElowEta_lR9 = _EElowEta_lR9;
|
188 |
|
|
fMCSmearMVA_EEhighEta_hR9 = _EEhighEta_hR9;
|
189 |
|
|
fMCSmearMVA_EEhighEta_lR9 = _EEhighEta_lR9;
|
190 |
|
|
};
|
191 |
|
|
|
192 |
mingyang |
1.31 |
|
193 |
|
|
void AddEnCorrPerRun2012HCP( UInt_t sRun, UInt_t eRun,
|
194 |
|
|
Double_t corr_EBlowEta_hR9central,
|
195 |
|
|
Double_t corr_EBlowEta_hR9gap,
|
196 |
|
|
Double_t corr_EBlowEta_lR9central,
|
197 |
|
|
Double_t corr_EBlowEta_lR9gap,
|
198 |
|
|
Double_t corr_EBhighEta_hR9,
|
199 |
|
|
Double_t corr_EBhighEta_lR9,
|
200 |
|
|
Double_t corr_EElowEta_hR9,
|
201 |
|
|
Double_t corr_EElowEta_lR9,
|
202 |
|
|
Double_t corr_EEhighEta_hR9,
|
203 |
|
|
Double_t corr_EEhighEta_lR9) {
|
204 |
|
|
fDataEnCorr_EBlowEta_hR9central.push_back(corr_EBlowEta_hR9central);
|
205 |
|
|
fDataEnCorr_EBlowEta_hR9gap.push_back(corr_EBlowEta_hR9gap);
|
206 |
|
|
fDataEnCorr_EBlowEta_lR9central.push_back(corr_EBlowEta_lR9central);
|
207 |
|
|
fDataEnCorr_EBlowEta_lR9gap.push_back(corr_EBlowEta_lR9gap);
|
208 |
|
|
fDataEnCorr_EBhighEta_hR9.push_back(corr_EBhighEta_hR9);
|
209 |
|
|
fDataEnCorr_EBhighEta_lR9.push_back(corr_EBhighEta_lR9);
|
210 |
|
|
fDataEnCorr_EElowEta_hR9.push_back(corr_EElowEta_hR9);
|
211 |
|
|
fDataEnCorr_EElowEta_lR9.push_back(corr_EElowEta_lR9);
|
212 |
|
|
fDataEnCorr_EEhighEta_hR9.push_back(corr_EEhighEta_hR9);
|
213 |
|
|
fDataEnCorr_EEhighEta_lR9.push_back(corr_EEhighEta_lR9);
|
214 |
|
|
fRunStart.push_back (sRun);
|
215 |
|
|
fRunEnd.push_back (eRun);
|
216 |
|
|
};
|
217 |
|
|
|
218 |
|
|
void SetMCSmearFactors2012HCP(Double_t _EBlowEta_hR9central,
|
219 |
|
|
Double_t _EBlowEta_hR9gap,
|
220 |
|
|
Double_t _EBlowEta_lR9central,
|
221 |
|
|
Double_t _EBlowEta_lR9gap,
|
222 |
|
|
Double_t _EBhighEta_hR9,
|
223 |
|
|
Double_t _EBhighEta_lR9,
|
224 |
|
|
Double_t _EElowEta_hR9,
|
225 |
|
|
Double_t _EElowEta_lR9,
|
226 |
|
|
Double_t _EEhighEta_hR9,
|
227 |
|
|
Double_t _EEhighEta_lR9) {
|
228 |
|
|
fMCSmear_EBlowEta_hR9central = _EBlowEta_hR9central;
|
229 |
|
|
fMCSmear_EBlowEta_hR9gap = _EBlowEta_hR9gap;
|
230 |
|
|
fMCSmear_EBlowEta_lR9central = _EBlowEta_lR9central;
|
231 |
|
|
fMCSmear_EBlowEta_lR9gap = _EBlowEta_lR9gap;
|
232 |
|
|
fMCSmear_EBhighEta_hR9 = _EBhighEta_hR9;
|
233 |
|
|
fMCSmear_EBhighEta_lR9 = _EBhighEta_lR9;
|
234 |
|
|
fMCSmear_EElowEta_hR9 = _EElowEta_hR9;
|
235 |
|
|
fMCSmear_EElowEta_lR9 = _EElowEta_lR9;
|
236 |
|
|
fMCSmear_EEhighEta_hR9 = _EEhighEta_hR9;
|
237 |
|
|
fMCSmear_EEhighEta_lR9 = _EEhighEta_lR9;
|
238 |
|
|
};
|
239 |
fabstoec |
1.32 |
|
240 |
|
|
// special routine in ordetr to use different smearing to compute mass-error for di-photon MVA input
|
241 |
|
|
void SetMCSmearFactors2012HCPMVA(Double_t _EBlowEta_hR9central,
|
242 |
|
|
Double_t _EBlowEta_hR9gap,
|
243 |
|
|
Double_t _EBlowEta_lR9central,
|
244 |
|
|
Double_t _EBlowEta_lR9gap,
|
245 |
|
|
Double_t _EBhighEta_hR9,
|
246 |
|
|
Double_t _EBhighEta_lR9,
|
247 |
|
|
Double_t _EElowEta_hR9,
|
248 |
|
|
Double_t _EElowEta_lR9,
|
249 |
|
|
Double_t _EEhighEta_hR9,
|
250 |
|
|
Double_t _EEhighEta_lR9) {
|
251 |
|
|
fMCSmearMVA_EBlowEta_hR9central = _EBlowEta_hR9central;
|
252 |
|
|
fMCSmearMVA_EBlowEta_hR9gap = _EBlowEta_hR9gap;
|
253 |
|
|
fMCSmearMVA_EBlowEta_lR9central = _EBlowEta_lR9central;
|
254 |
|
|
fMCSmearMVA_EBlowEta_lR9gap = _EBlowEta_lR9gap;
|
255 |
|
|
fMCSmearMVA_EBhighEta_hR9 = _EBhighEta_hR9;
|
256 |
|
|
fMCSmearMVA_EBhighEta_lR9 = _EBhighEta_lR9;
|
257 |
|
|
fMCSmearMVA_EElowEta_hR9 = _EElowEta_hR9;
|
258 |
|
|
fMCSmearMVA_EElowEta_lR9 = _EElowEta_lR9;
|
259 |
|
|
fMCSmearMVA_EEhighEta_hR9 = _EEhighEta_hR9;
|
260 |
|
|
fMCSmearMVA_EEhighEta_lR9 = _EEhighEta_lR9;
|
261 |
|
|
};
|
262 |
bendavid |
1.36 |
|
263 |
|
|
void SetMCStochasticPivot(Double_t pivot_lowEta_hR9,
|
264 |
|
|
Double_t pivot_lowEta_lR9,
|
265 |
|
|
Double_t pivot_highEta_hR9,
|
266 |
|
|
Double_t pivot_highEta_lR9) {
|
267 |
|
|
|
268 |
|
|
fMCStochasticPivot_EBlowEta_hR9 = pivot_lowEta_hR9;
|
269 |
|
|
fMCStochasticPivot_EBlowEta_lR9 = pivot_lowEta_lR9;
|
270 |
|
|
fMCStochasticPivot_EBhighEta_hR9 = pivot_highEta_hR9;
|
271 |
|
|
fMCStochasticPivot_EBhighEta_lR9 = pivot_highEta_lR9;
|
272 |
|
|
|
273 |
|
|
}
|
274 |
|
|
|
275 |
|
|
void SetMCStochasticRho(Double_t rho_lowEta_hR9,
|
276 |
|
|
Double_t rho_lowEta_lR9,
|
277 |
|
|
Double_t rho_highEta_hR9,
|
278 |
|
|
Double_t rho_highEta_lR9) {
|
279 |
|
|
|
280 |
|
|
fMCStochasticRho_EBlowEta_hR9 = rho_lowEta_hR9;
|
281 |
|
|
fMCStochasticRho_EBlowEta_lR9 = rho_lowEta_lR9;
|
282 |
|
|
fMCStochasticRho_EBhighEta_hR9 = rho_highEta_hR9;
|
283 |
|
|
fMCStochasticRho_EBhighEta_lR9 = rho_highEta_lR9;
|
284 |
|
|
|
285 |
|
|
}
|
286 |
|
|
|
287 |
|
|
void SetMCStochasticPhi(Double_t phi_lowEta_hR9,
|
288 |
|
|
Double_t phi_lowEta_lR9,
|
289 |
|
|
Double_t phi_highEta_hR9,
|
290 |
|
|
Double_t phi_highEta_lR9) {
|
291 |
|
|
|
292 |
|
|
fMCStochasticPhi_EBlowEta_hR9 = phi_lowEta_hR9;
|
293 |
|
|
fMCStochasticPhi_EBlowEta_lR9 = phi_lowEta_lR9;
|
294 |
|
|
fMCStochasticPhi_EBhighEta_hR9 = phi_highEta_hR9;
|
295 |
|
|
fMCStochasticPhi_EBhighEta_lR9 = phi_highEta_lR9;
|
296 |
|
|
|
297 |
|
|
}
|
298 |
|
|
|
299 |
fabstoec |
1.32 |
|
300 |
bendavid |
1.15 |
void SetApplyEleVeto(bool a) { fApplyEleVeto = a; }
|
301 |
bendavid |
1.7 |
void SetInvertElectronVeto(Bool_t b) { fInvertElectronVeto = b; }
|
302 |
fabstoec |
1.2 |
void DoDataEneCorr(bool a) { fDoDataEneCorr = a; }
|
303 |
|
|
void DoMCSmear(bool a) { fDoMCSmear = a; }
|
304 |
veverka |
1.35 |
void DoMCEneSmear(bool a) { fDoMCEneSmear = a; }
|
305 |
|
|
void DoEneErrSmear(bool a) { fDoEneErrSmear = a; }
|
306 |
fabstoec |
1.32 |
void UseSpecialSmearForDPMVA(bool a) { fUseSpecialSmearForDPMVA = a; }
|
307 |
bendavid |
1.36 |
void SetStochasticSmear(bool a) { fStochasticSmear = a; }
|
308 |
|
|
|
309 |
bendavid |
1.7 |
void SetGoodElectronsFromBranch(Bool_t b) { fGoodElectronsFromBranch = b; }
|
310 |
|
|
void SetGoodElectronName(TString name) { fGoodElectronName = name; }
|
311 |
bendavid |
1.24 |
void SetUseSingleLegConversions(Bool_t b) { fUseSingleLegConversions = b; }
|
312 |
bendavid |
1.8 |
void SetDoRegression(Bool_t b) { fDoRegression = b; }
|
313 |
|
|
void SetEtaCorrections(const TH1D *h) { fEtaCorrections = h; }
|
314 |
mingyang |
1.12 |
void SetBdtCutBarrel(Float_t x) { fbdtCutBarrel = x; }
|
315 |
|
|
void SetBdtCutEndcap(Float_t x) { fbdtCutEndcap = x; }
|
316 |
mingyang |
1.26 |
|
317 |
|
|
void SetDoShowerShapeScaling(Bool_t b) { fDoShowerShapeScaling = b; }
|
318 |
bendavid |
1.13 |
|
319 |
bendavid |
1.20 |
void SetJetsName(const char *n) { fJetsName = n; }
|
320 |
bendavid |
1.28 |
|
321 |
fabstoec |
1.30 |
void SetRhoType(RhoUtilities::RhoType type) { fRhoType = type ; }
|
322 |
|
|
|
323 |
mingyang |
1.31 |
void SetApplyLeptonTag(bool a) { fApplyLeptonTag = a; }
|
324 |
|
|
|
325 |
|
|
void SetLeptonTagElectronsName(TString name) { fLeptonTagElectronsName = name; }
|
326 |
|
|
void SetLeptonTagMuonsName (TString name) { fLeptonTagMuonsName = name; }
|
327 |
|
|
|
328 |
fabstoec |
1.1 |
protected:
|
329 |
|
|
void Process();
|
330 |
|
|
void SlaveBegin();
|
331 |
|
|
|
332 |
|
|
// private auxiliary methods...
|
333 |
bendavid |
1.7 |
void FindHiggsPtAndZ(Float_t& pt, Float_t& z, Float_t& mass);
|
334 |
fabstoec |
1.1 |
Int_t FindRunRangeIdx(UInt_t run);
|
335 |
bendavid |
1.13 |
Double_t GetDataEnCorr(Int_t runRange, PhotonTools::eScaleCats cat);
|
336 |
fabstoec |
1.32 |
Double_t GetMCSmearFac(PhotonTools::eScaleCats cat, bool useSpecialSmear = false); // last flag in case of special smearing for error computation
|
337 |
mingyang |
1.31 |
Double_t GetDataEnCorrHCP(Int_t runRange, PhotonTools::eScaleCats cat);
|
338 |
fabstoec |
1.32 |
Double_t GetMCSmearFacHCP(PhotonTools::eScaleCats cat, bool useSpecialSmear = false); // last flag in case of special smearing for error computation
|
339 |
bendavid |
1.36 |
|
340 |
|
|
Double_t GetMCSmearFacStochastic(const Photon *p) const;
|
341 |
|
|
|
342 |
fabstoec |
1.1 |
Float_t GetEventCat(PhotonTools::CiCBaseLineCats cat1, PhotonTools::CiCBaseLineCats cat2);
|
343 |
|
|
|
344 |
|
|
// Names for the input Collections
|
345 |
|
|
TString fPhotonBranchName;
|
346 |
|
|
TString fElectronName;
|
347 |
bendavid |
1.7 |
TString fGoodElectronName;
|
348 |
fabstoec |
1.1 |
TString fConversionName;
|
349 |
bendavid |
1.24 |
TString fPFConversionName;
|
350 |
fabstoec |
1.1 |
TString fTrackBranchName;
|
351 |
|
|
TString fPileUpDenName;
|
352 |
|
|
TString fPVName;
|
353 |
|
|
TString fBeamspotName;
|
354 |
|
|
TString fPFCandName;
|
355 |
|
|
TString fMCParticleName;
|
356 |
|
|
TString fPileUpName;
|
357 |
bendavid |
1.20 |
TString fJetsName;
|
358 |
|
|
TString fPFMetName;
|
359 |
fabstoec |
1.1 |
|
360 |
|
|
TString fGoodPhotonsName; //name of exported "good photon" collection
|
361 |
fabstoec |
1.19 |
TString fChosenVtxName; //name of exported "chosen Vtx" collection
|
362 |
mingyang |
1.31 |
|
363 |
|
|
TString fLeptonTagElectronsName;
|
364 |
|
|
TString fLeptonTagMuonsName;
|
365 |
fabstoec |
1.1 |
|
366 |
|
|
// Selection Types
|
367 |
|
|
TString fPhotonSelType;
|
368 |
|
|
TString fVertexSelType;
|
369 |
|
|
PhotonSelection fPhSelType;
|
370 |
|
|
VertexSelection fVtxSelType;
|
371 |
|
|
|
372 |
mingyang |
1.22 |
// Id Type
|
373 |
|
|
TString fIdMVAType;
|
374 |
fabstoec |
1.29 |
MVATools::IdMVAType fIdType;
|
375 |
|
|
//IdMVA fIdType;
|
376 |
mingyang |
1.22 |
|
377 |
mingyang |
1.26 |
// showershape
|
378 |
fabstoec |
1.27 |
TString fShowerShapeType;
|
379 |
|
|
PhotonTools::ShowerShapeScales fSSType;
|
380 |
mingyang |
1.26 |
|
381 |
fabstoec |
1.1 |
// Basic Pre-Selection kinematics
|
382 |
|
|
Double_t fPhotonPtMin; // min pt cut fro PRE-SELECTION!
|
383 |
|
|
Double_t fPhotonEtaMax; // max eta cut for PRE-SELECTION!
|
384 |
|
|
|
385 |
|
|
Double_t fLeadingPtMin;
|
386 |
|
|
Double_t fTrailingPtMin;
|
387 |
|
|
|
388 |
|
|
// is it Data or MC?
|
389 |
|
|
Bool_t fIsData;
|
390 |
|
|
|
391 |
|
|
// in case there's some PV pre-selection
|
392 |
|
|
Bool_t fPhotonsFromBranch;
|
393 |
|
|
Bool_t fPVFromBranch;
|
394 |
bendavid |
1.7 |
Bool_t fGoodElectronsFromBranch;
|
395 |
bendavid |
1.24 |
Bool_t fUseSingleLegConversions;
|
396 |
fabstoec |
1.1 |
|
397 |
mingyang |
1.31 |
Bool_t f2012HCP;
|
398 |
bendavid |
1.36 |
Bool_t fStochasticSmear;
|
399 |
mingyang |
1.31 |
|
400 |
fabstoec |
1.1 |
const PhotonCol *fPhotons;
|
401 |
|
|
const ElectronCol *fElectrons;
|
402 |
bendavid |
1.7 |
const ElectronCol *fGoodElectrons;
|
403 |
fabstoec |
1.1 |
const DecayParticleCol *fConversions;
|
404 |
bendavid |
1.24 |
const DecayParticleCol *fPFConversions;
|
405 |
fabstoec |
1.1 |
const TrackCol *fTracks;
|
406 |
|
|
const PileupEnergyDensityCol *fPileUpDen;
|
407 |
|
|
const VertexCol *fPV;
|
408 |
|
|
const BeamSpotCol *fBeamspot;
|
409 |
|
|
const PFCandidateCol *fPFCands;
|
410 |
|
|
const MCParticleCol *fMCParticles;
|
411 |
|
|
const PileupInfoCol *fPileUp;
|
412 |
bendavid |
1.20 |
const JetCol *fJets;
|
413 |
|
|
const PFMetCol *fPFMet;
|
414 |
mingyang |
1.31 |
const ElectronCol *fLeptonTagElectrons;
|
415 |
|
|
const MuonCol *fLeptonTagMuons;
|
416 |
bendavid |
1.20 |
|
417 |
fabstoec |
1.1 |
// Vectroes to hols smeraring/correction factors
|
418 |
bendavid |
1.14 |
std::vector<Double_t> fDataEnCorr_EBlowEta_hR9central;
|
419 |
|
|
std::vector<Double_t> fDataEnCorr_EBlowEta_hR9gap;
|
420 |
bendavid |
1.13 |
std::vector<Double_t> fDataEnCorr_EBlowEta_lR9;
|
421 |
mingyang |
1.31 |
std::vector<Double_t> fDataEnCorr_EBlowEta_lR9central;
|
422 |
|
|
std::vector<Double_t> fDataEnCorr_EBlowEta_lR9gap;
|
423 |
bendavid |
1.13 |
std::vector<Double_t> fDataEnCorr_EBhighEta_hR9;
|
424 |
|
|
std::vector<Double_t> fDataEnCorr_EBhighEta_lR9;
|
425 |
|
|
std::vector<Double_t> fDataEnCorr_EElowEta_hR9;
|
426 |
|
|
std::vector<Double_t> fDataEnCorr_EElowEta_lR9;
|
427 |
|
|
std::vector<Double_t> fDataEnCorr_EEhighEta_hR9;
|
428 |
|
|
std::vector<Double_t> fDataEnCorr_EEhighEta_lR9;
|
429 |
fabstoec |
1.1 |
|
430 |
paus |
1.18 |
std::vector<UInt_t> fRunStart;
|
431 |
|
|
std::vector<UInt_t> fRunEnd;
|
432 |
fabstoec |
1.1 |
|
433 |
paus |
1.18 |
Double_t fMCSmear_EBlowEta_hR9central;
|
434 |
|
|
Double_t fMCSmear_EBlowEta_hR9gap;
|
435 |
|
|
Double_t fMCSmear_EBlowEta_lR9;
|
436 |
mingyang |
1.31 |
Double_t fMCSmear_EBlowEta_lR9central;
|
437 |
|
|
Double_t fMCSmear_EBlowEta_lR9gap;
|
438 |
paus |
1.18 |
Double_t fMCSmear_EBhighEta_hR9;
|
439 |
|
|
Double_t fMCSmear_EBhighEta_lR9;
|
440 |
|
|
Double_t fMCSmear_EElowEta_hR9;
|
441 |
|
|
Double_t fMCSmear_EElowEta_lR9;
|
442 |
|
|
Double_t fMCSmear_EEhighEta_hR9;
|
443 |
|
|
Double_t fMCSmear_EEhighEta_lR9;
|
444 |
fabstoec |
1.1 |
|
445 |
fabstoec |
1.32 |
// special Smear factors for usage for diphoton MVA input, incase differrent from std smearing
|
446 |
|
|
Double_t fMCSmearMVA_EBlowEta_hR9central;
|
447 |
|
|
Double_t fMCSmearMVA_EBlowEta_hR9gap;
|
448 |
|
|
Double_t fMCSmearMVA_EBlowEta_lR9;
|
449 |
|
|
Double_t fMCSmearMVA_EBlowEta_lR9central;
|
450 |
|
|
Double_t fMCSmearMVA_EBlowEta_lR9gap;
|
451 |
|
|
Double_t fMCSmearMVA_EBhighEta_hR9;
|
452 |
|
|
Double_t fMCSmearMVA_EBhighEta_lR9;
|
453 |
|
|
Double_t fMCSmearMVA_EElowEta_hR9;
|
454 |
|
|
Double_t fMCSmearMVA_EElowEta_lR9;
|
455 |
|
|
Double_t fMCSmearMVA_EEhighEta_hR9;
|
456 |
|
|
Double_t fMCSmearMVA_EEhighEta_lR9;
|
457 |
bendavid |
1.36 |
|
458 |
|
|
Double_t fMCStochasticPivot_EBlowEta_hR9;
|
459 |
|
|
Double_t fMCStochasticPivot_EBlowEta_lR9;
|
460 |
|
|
Double_t fMCStochasticPivot_EBhighEta_hR9;
|
461 |
|
|
Double_t fMCStochasticPivot_EBhighEta_lR9;
|
462 |
|
|
|
463 |
|
|
Double_t fMCStochasticRho_EBlowEta_hR9;
|
464 |
|
|
Double_t fMCStochasticRho_EBlowEta_lR9;
|
465 |
|
|
Double_t fMCStochasticRho_EBhighEta_hR9;
|
466 |
|
|
Double_t fMCStochasticRho_EBhighEta_lR9;
|
467 |
|
|
|
468 |
|
|
Double_t fMCStochasticPhi_EBlowEta_hR9;
|
469 |
|
|
Double_t fMCStochasticPhi_EBlowEta_lR9;
|
470 |
|
|
Double_t fMCStochasticPhi_EBhighEta_hR9;
|
471 |
|
|
Double_t fMCStochasticPhi_EBhighEta_lR9;
|
472 |
fabstoec |
1.32 |
|
473 |
|
|
|
474 |
fabstoec |
1.1 |
// pointer to RNG ionstance for smearing
|
475 |
paus |
1.18 |
TRandom3* fRng;
|
476 |
|
|
EGEnergyCorrector fEgCor;
|
477 |
|
|
Bool_t fDoRegression;
|
478 |
|
|
TString fPhFixString;
|
479 |
|
|
TString fPhFixFile;
|
480 |
|
|
TString fRegWeights;
|
481 |
|
|
|
482 |
|
|
const TH1D *fEtaCorrections;
|
483 |
bendavid |
1.8 |
|
484 |
fabstoec |
1.1 |
// --------------------------------
|
485 |
|
|
// some streagin flags, not adjustable yet (FIX-ME)
|
486 |
paus |
1.18 |
bool fDoDataEneCorr;
|
487 |
|
|
bool fDoMCSmear;
|
488 |
veverka |
1.35 |
bool fDoMCEneSmear;
|
489 |
|
|
bool fDoEneErrSmear;
|
490 |
fabstoec |
1.32 |
bool fUseSpecialSmearForDPMVA; // if set to true, the special smearing numbers set in fMCSmearMVA_* are used to compute the mass-errors (input to diphoton MVA)
|
491 |
paus |
1.18 |
bool fDoVtxSelection;
|
492 |
|
|
bool fApplyEleVeto;
|
493 |
|
|
Bool_t fInvertElectronVeto; //=true (invert ele veto, for cic sel only atm)
|
494 |
mingyang |
1.31 |
|
495 |
|
|
// --------------------------------
|
496 |
|
|
bool fApplyLeptonTag;
|
497 |
|
|
|
498 |
mingyang |
1.10 |
//MVA
|
499 |
mingyang |
1.22 |
int fVariableType_2011;
|
500 |
|
|
TString fEndcapWeights_2011;
|
501 |
|
|
TString fBarrelWeights_2011;
|
502 |
|
|
int fVariableType_2012_globe;
|
503 |
|
|
TString fEndcapWeights_2012_globe;
|
504 |
|
|
TString fBarrelWeights_2012_globe;
|
505 |
paus |
1.18 |
MVATools fTool;
|
506 |
|
|
Float_t fbdtCutBarrel;
|
507 |
|
|
Float_t fbdtCutEndcap;
|
508 |
|
|
|
509 |
|
|
VertexTools fVtxTools;
|
510 |
|
|
|
511 |
mingyang |
1.26 |
Bool_t fDoShowerShapeScaling;
|
512 |
fabstoec |
1.27 |
|
513 |
paus |
1.18 |
Bool_t fDoMCErrScaling;
|
514 |
|
|
Double_t fMCErrScaleEB;
|
515 |
|
|
Double_t fMCErrScaleEE;
|
516 |
|
|
UInt_t fRegressionVersion;
|
517 |
|
|
|
518 |
|
|
Bool_t fRelativePtCuts;
|
519 |
bendavid |
1.13 |
|
520 |
bendavid |
1.20 |
MVAMet fMVAMet;
|
521 |
|
|
|
522 |
fabstoec |
1.30 |
RhoUtilities::RhoType fRhoType;
|
523 |
|
|
|
524 |
fabstoec |
1.1 |
ClassDef(PhotonPairSelector, 1) // Photon identification module
|
525 |
|
|
};
|
526 |
|
|
}
|
527 |
|
|
#endif
|