-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHWWAnalysis.h
More file actions
executable file
·389 lines (331 loc) · 8.8 KB
/
HWWAnalysis.h
File metadata and controls
executable file
·389 lines (331 loc) · 8.8 KB
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
#ifndef HWWANALYSIS_H
#define HWWANALYSIS_H 1
#include "packages/TCounterUI/TCounterUI.h"
#include "packages/CMSAnalysisSelectorMiniTrees/CMSAnalysisSelectorMiniTrees.h"
#include "TH1F.h"
#include "TH2F.h"
#include <vector>
#include "TString.h"
#include "TLorentzVector.h"
#include "TVector3.h"
#include "GlobalVariables.h"
class TLorentzVector;
class HWWAnalysis: public CMSAnalysisSelectorMiniTrees {
public:
HWWAnalysis(TTree *tree=0);
virtual ~HWWAnalysis() {}
class lepton{
public:
lepton(){};
lepton(TLorentzVector vec, int ch, int ty, int ind){
p = vec;
charge = ch;
type = ty;
index = ind;
};
TLorentzVector p;
int charge;
int type; // -1(unknown), 0(mu), 1(ele)
int index;
};
enum WorkingPoint {
VETO,
LOOSE,
MEDIUM,
TIGHT
};
enum RunRange {RunAB, RunC, RunD};
enum PFisolationType {
neutralHadron,
chargedHadron,
gamma,
//TIGHT
};
protected:
TH1F *passCuts;
TH1F* hkfchi2[9];
TH1F* hkfhits[9];
TH1F* hgsfchi2[9];
TH1F* hdetacalo[9];
TH1F* hsee[9];
TH1F* hspp[9];
TH1F* hetawidth[9];
TH1F* hphiwidth[9];
TH1F* he1x5e5x5[9];
TH1F* hr9[9];
TH1F* hEoP[9];
TH1F* hIoEmIeP[9];
TH1F* hEoPout[9];
TH1F* hPreShowerOverRaw[9];
TH1F* hd0[9];
TH1F* hIP3D[9];
TH1F* hdZ[9];
TH1F* hConbIsoHWW[9];
TH1F* hMVAid[9];
TH1F* hMvaiso[9];
TH1F* hRadiaIso[9];
TH1F* hRadiaIsoVeto[9];
TH1F* hRadiaIsoVetoMore[9];
TH1F* hchargedHadronIso[9];
TH1F* hneutralHadronIso[9];
TH1F* hphotonIso[9];
TH1F* hchargedHadronIso04[9];
TH1F* hneutralHadronIso04[9];
TH1F* hphotonIso04[9];
TH1F* hpassConversionVeto[9];
TH1F* hsigmaIetaIeta[9];
TH1F* hdeltaPhiIn[9];
TH1F* hdeltaEtaIn[9];
TH1F* hisEcalDriven[9];
TH1F* hnLost[9];
TH1F* hnHits[9];
TH1F* hfBrem[9];
TH1F* hPt[9];
TH1F* hEta[9];
TH1F* hMassUncut[9];
TH1F* hMass;
TH2F *noBias[2];
TH2F *eventHLT[2];
TH2F *eventFindApair[2];
TH2F *eventFindAtag[2];
TH2F *eventTagMatchedWithHlt[2];
TH2F *eventInMassWindows[2];
TH2F *eventProbeOnly0[2];
TH2F *eventProbeOnly1[2];
TH2F *eventProbeOnly2[2];
TH2F *eventBeforeSaving[2];
TTree *theTree;
TTree *testTree;
TTree *isoInfo;
TTree *treeClusterShape;
virtual void Initialise();
virtual void InsideLoop();
virtual void Summary();
virtual int isGenMatched(int, int, int);
virtual void compWeights(int);
virtual void fillTheHisto(int);
virtual void fillTheHistoMass(int , float );
virtual void fillTheTestTree(int, int);
virtual bool passTightIdNoIso(int, float, float, float, float, float, float, float, int, int);
virtual bool passTightIdNoIsoModified(int, float, float, float, float, float, float, float, int, int);
virtual float giveThePOGiso(float, float, float, float, float, float);
virtual float giveThePOGisoPU2012(float, float, float, float, float, float);
virtual float giveMyPOGiso(float, TLorentzVector *,float, bool, float, float);
virtual float calc03Iso(float, float, float,int);
virtual float calcPFIso(TLorentzVector*, float, PFisolationType, bool);
virtual float calcPFRadIso(TLorentzVector *,float , float , PFisolationType , bool , bool , bool );
virtual float giveRadIso(TLorentzVector *, float, bool , bool , bool );
virtual float calcPFRadIsoFonc(TLorentzVector *,float, float, PFisolationType, bool, bool, bool, int);
virtual float giveRadIsoFonc(TLorentzVector *, float, bool, bool, bool, int);
virtual float PFisolationWithDeltaBeta(int);
virtual void FillThePFtree(TLorentzVector *, float , bool , bool);
virtual float congPhi(float );
virtual bool passPreCuts(float, int, float, float, float,float);
virtual bool passIPcuts(float, float);
virtual bool FOnoDeta(float , int , float ,float ,float ,float , float ,bool , int , float , float , float );
virtual bool FO_full(float, int, float,float, float,float,float, float,bool, int, float, float, float);
virtual bool passMissItCons(bool , int );
virtual bool FOnoIso(float , int , float , float , float ,float ,float , float ,bool , int );
virtual void fillTheCLTree(int );
virtual float correctForNoise(float , bool , HWWAnalysis::RunRange , bool );
virtual float correctForHLTDefinition(float iso, bool isBarrel, HWWAnalysis::RunRange runRange);
// virtual bool isAGoodEvent(int, int);
RunRange runRange;
bool isMC;
bool doMuons;
bool runPF;
TString signal;
int runNumber;
int lumiSec;
int eventNumber;
float mass;
float pt;
float eta;
float SCeta;
float absEta;
float absSCeta;
float weight;
float weight_runA;
float weight_runB;
float weight_runC;
float weight_runD;
float weight_runAsingle;
float weight_runDsingle;
float weight_runAB_Rdep;
float weight_runC_Rdep;
float weight_runD_Rdep;
int isFSR;
int tag_isFSR;
float tag_pt;
float tag_absSCEta;
float tp_deltaR;
int nVtx;
int eventMatched;
int eventMatched2;
int eventMatched3;
int passTight;
int passLoose;
int passFO;
int passBDT;
int passISO;
int passFO_BDT;
int tag_passISO;
int pair_passISO;
int passFO_ISO;
int passFO_BDT_ISO;
int passBDT_ISO;
int passAllNoIsoDet;
int passNM1IP;
int passNM1presel;
int passNM1convs;
int trigSingle;
int trigDoubleLeg0;
int trigDoubleLeg1;
int passPreselec;
int passIP;
int passConvs;
int passFOnoIso;
int isSameSign;
int topSelection;
int passFO_plus;
int passFO_noDeta;
int passFO_full;
int passFO_full_HLT;
int passFO_full_HLT_noise;
int passFO_full_noise;
int passDeltaEta;
int topFO;
//for testTree
int isTriggering;
int theType;
int isPair;
float MVAidTrig;
float MVAiso;
float radIso;
float radIsoVeto;
float radIsoVetoMore;
float combIsoHWW;
int passMVA;
int PDGid;
int passTightIdNoIsoPart;
int passTightLooserIdNoIsoPart;
float POGisolation;
float POGisolation2012A;
float myPOGisolation;
float POGnoRho;
float PFisoDeltaBeta;
float radIsoStandard;
float radIsoNoInner;
float radisoNoThreshold;
float radisoNoThresholdNoInner;
float radisoFonc0;
float radisoFonc1;
float radisoFonc2;
float radisoFonc3;
float chRadisoFonc0;
float chRadisoFonc1;
float chRadisoFonc2;
float chRadisoFonc3;
float nhRadisoFonc0;
float nhRadisoFonc1;
float nhRadisoFonc2;
float nhRadisoFonc3;
float gRadisoFonc0;
float gRadisoFonc1;
float gRadisoFonc2;
float gRadisoFonc3;
float radIsoBeta;
int myTightID;
int myTightIDiso;
int nbRecoVertex;
float chIso0;
float chIso1;
float chIso2;
float chIso3;
float chIso4;
float nhIso0;
float nhIso1;
float nhIso2;
float nhIso3;
float nhIso4;
float gIso0;
float gIso1;
float gIso2;
float gIso3;
float gIso4;
float gComb0;
float gComb1;
float gComb2;
float gComb3;
float gComb4;
//iso Info
float PFdeltaEta;
float PFdeltaPhi;
float PFet;
int PFtype;
int PFisPU;
float mainEta;
float mainSCEta;
float mainPhi;
float mainEnergy;
float mainPt;
int isSignalBg;
float PFdeltaR;
// treeClusterShape
//general variables
// MVA tracking
float CL_fBrem;
float CL_hkfchi2;
float CL_hkfhits;
// Geometrical matiching
float CL_deltaPhiIn;
float CL_deltaEtaIn;
float CL_detacalo;
// ECAL shower variables
float CL_see;
float CL_spp;
float CL_etawidth;
float CL_phiwidth;
float CL_e1x5e5x5;
float CL_R9;
// energy matching
float CL_HoE;
float CL_EoP;
float CL_IoEmIoP;
float CL_eleEoPout;
float CL_preshowerOverRaw;
// IP
float CL_d0;
float CL_ip3d;
// more vars
float CL_sigmaIetaIeta;
float CL_passConversionVeto;
float CL_isEcalDriven;
float CL_hnHits;
float CL_dZ;
float CL_MVA;
float CL_CombIsoHWW;
// the detIsos
float CL_isoECAL;
float CL_isoECAL_HLT;
float CL_isoECAL_noise;
float CL_isoECAL_HLT_noise;
float CL_isoHCAL;
float CL_isoTracker;
// the detIsos
float CL_isoECALRelat;
float CL_isoECALRelatModif;
float CL_isoHCALRelat;
float CL_isoTrackerRelat;
// the non trig MVA
float CL_nonTrigMVA;
// passPreselection
float CL_passPreselection;
// PF isolation
float CL_PFchargedIso;
float CL_POGcombIso;
// relatIsoPF
float CL_relatPFiso03;
ClassDef(HWWAnalysis,0);
};
#endif