-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRedHiggsTree.cc
More file actions
564 lines (480 loc) · 21 KB
/
RedHiggsTree.cc
File metadata and controls
564 lines (480 loc) · 21 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
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
#include "HiggsAnalysisTools/include/RedHiggsTree.h"
// C++
#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <cmath>
// Root
#include "TFile.h"
#include "TTree.h"
RedHiggsTree::RedHiggsTree(const char * filename) {
myFile = new TFile(filename,"RECREATE");
myTree = new TTree("latino","latino tree");
// GENERAL block
myTree->Branch("puweight", &myPUWeight, "puweight/F");
myTree->Branch("hlt", &myHLT, "hlt/O");
myTree->Branch("met", &myMet, "met/F");
myTree->Branch("pfMet", &myPFMet, "pfMet/F");
myTree->Branch("caloMet", &myCaloMet, "caloMet/F");
myTree->Branch("projMet", &myProjectedMet, "projMet/F");
myTree->Branch("deltaPhi", &myDeltaPhi, "deltaPhi/F");
myTree->Branch("deltaR", &myDeltaR, "deltaR/F");
myTree->Branch("transvMass", &myTransvMass, "transvMass/F");
myTree->Branch("eleInvMass", &myEleInvMass, "eleInvMass/F");
myTree->Branch("maxPtEle", &maxPtEle, "maxPtEle/F");
myTree->Branch("minPtEle", &minPtEle, "minPtEle/F");
myTree->Branch("maxEtaEle", &maxEtaEle, "maxEtaEle/F");
myTree->Branch("minEtaEle", &minEtaEle, "minEtaEle/F");
myTree->Branch("detaLeptons", &myDetaLeptons, "detaLeptons/F");
myTree->Branch("nVtx", &myNVtx, "nVtx/I");
myTree->Branch("finalLeptons", &myFinalLeptons, "finalLeptons/O");
myTree->Branch("jetVeto", &myJetVeto, "jetVeto/O");
myTree->Branch("uncorrJetVeto", &myUncorrJetVeto, "uncorrJetVeto/O");
myTree->Branch("preDeltaPhi", &myPreDeltaPhi, "preDeltaPhi/O");
myTree->Branch("finalSelection", &myFinalSelection, "finalSelection/O");
}
RedHiggsTree::~RedHiggsTree()
{
delete myFile;
}
void RedHiggsTree::addMLVars() {
myTree->Branch("njets", &myNjets, "njets/I");
myTree->Branch("nuncorrjets", &myNuncorrjets, "nuncorrjets/I");
myTree->Branch("dxyEVT", &myDxyEVT, "dxyEVT/F");
myTree->Branch("dszEVT", &myDszEVT, "dszEVT/F");
myTree->Branch("softtche", &mySoftBdisc, "softtcche/F");
myTree->Branch("hardbjpb", &myHardBdisc, "hardbjbp/F");
myTree->Branch("bTagSecVertex", &myBTagSecVertex, "bTagSecVertex/F");
myTree->Branch("nSoftMu", &myNSoftMu, "nSoftMu/I");
myTree->Branch("nSoftMuNoJets", &myNSoftMuNoJets, "nSoftMuNoJets/I");
myTree->Branch("leadingJetBTagTrackCount", &myLeadingJetBTagTrackCount, "leadingJetBTagTrackCount/F");
myTree->Branch("subleadingJetBTagTrackCount", &mySubleadingJetBTagTrackCount, "subleadingJetBTagTrackCount/F");
myTree->Branch("subleadingJetsMaxBTagTrackCount", &mySubleadingJetsMaxBTagTrackCount, "subleadingJetsMaxBTagTrackCount/F");
myTree->Branch("leadingJetBTagJetBProb", &myLeadingJetBTagJetBProb, "leadingJetBTagJetBProb/F");
myTree->Branch("subleadingJetBTagJetBProb", &mySubleadingJetBTagJetBProb, "subleadingJetBTagJetBProb/F");
myTree->Branch("subleadingJetsMaxBTagJetBProb", &mySubleadingJetsMaxBTagJetBProb, "subleadingJetsMaxBTagJetBProb/F");
myTree->Branch("numExtraLep", &myNumExtraLep, "numExtraLep/I");
myTree->Branch("nsoftjet", &myNumSoftJets, "nsoftjet/I");
myTree->Branch("nsoftbjet", &myNumSoftBJets, "nsoftbjet/I");
}
void RedHiggsTree::addJetsVars() {
myTree->Branch("leadJetPt", &myLeadJetPt, "leadJetPt/F");
myTree->Branch("leadJetEta", &myLeadJetEta, "leadJetEta/F");
myTree->Branch("leadJetLooseId", &myLeadJetLooseId, "leadJetLooseId/I");
myTree->Branch("leadJetGenMatch", &myLeadJetGenMatch, "leadJetGenMatch/I");
myTree->Branch("jetmva1", &myLeadJetIdMva, "jetmva1/F");
myTree->Branch("jetid1", &myLeadJetPassLooseId, "jetid1/I");
myTree->Branch("subleadJetPt", &mySubleadJetPt, "subleadJetPt/F");
myTree->Branch("subleadJetEta", &mySubleadJetEta, "subleadJetEta/F");
myTree->Branch("subleadJetLooseId", &mySubleadJetLooseId, "subleadJetLooseId/I");
myTree->Branch("subleadJetGenMatch", &mySubleadJetGenMatch, "subleadJetGenMatch/I");
myTree->Branch("jetmva2", &mySubleadJetIdMva, "jetmva2/F");
myTree->Branch("jetid2", &mySubleadJetPassLooseId, "jetid2/I");
}
void RedHiggsTree::addSystematics() {
myTree->Branch("scEnergy", myScEnergy, "scEnergy[2]/F");
myTree->Branch("R9", myR9, "R9[2]/F");
myTree->Branch("eneL1", &myEneL1, "eneL1/F");
myTree->Branch("eneL2", &myEneL2, " eneL2/F");
myTree->Branch("typeL1", &myTypeL1, "typeL1/I");
myTree->Branch("typeL2", &myTypeL2, "typeL2/I");
myMetFromJets = 0;
myPfMetUp = 0;
myPfMetDown = 0;
myTree->Branch("metFromJets", "TVector3", &myMetFromJets);
myTree->Branch("pfMetUp", "TVector3", &myPfMetUp);
myTree->Branch("pfMetDown", "TVector3", &myPfMetDown);
myTree->Branch("transvMassUp", &myMtUp, "transvMassUp/F");
myTree->Branch("transvMassDown", &myMtDown, "transvMassDown/F");
}
void RedHiggsTree::addLeptonInfos() {
myTree->Branch("pt", myPt, "pt[2]/F");
myTree->Branch("eta", myEta, "eta[2]/F");
myTree->Branch("phi", myPhi, "phi[2]/F");
myTree->Branch("lepid", myLepId, "lepid[2]/F");
myTree->Branch("lepiso", myLepIso, "lepiso[2]/F");
myTree->Branch("lepconv", myLepConv, "lepconv[2]/F");
}
void RedHiggsTree::addCSA07Infos() {
myTree->Branch("CSA07weight", &myWeight, "CSA07weight/D");
myTree->Branch("CSA07processId", &myProcesId, "CSA07processId/D");
myTree->Branch("CSA07lumi", &myLumi, "CSA07lumi/F");
}
void RedHiggsTree::addLatinos() {
myTree->Branch("step", mySteps, "step[29]/O");
}
void RedHiggsTree::addPDFs() {
myTree->Branch("cteq66W", myCTEQ66, "cteq66W[45]/D");
myTree->Branch("mstwW", myMSTW, "mstwW[31]/D");
myTree->Branch("nnpdfW", myNNPDF, "nnpdfW[101]/D");
}
void RedHiggsTree::addRazor() {
myTree->Branch("mtr", &myMTR, "mtr/F");
myTree->Branch("mr", &myMR, "mr/F");
myTree->Branch("gammamr", &myGammaMR, "gammamr/F");
}
void RedHiggsTree::addFake() {
myTree->Branch("tight", &myTight, "tight/I");
myTree->Branch("weightFP", &myWeightFP, "weightFP/F");
myTree->Branch("weightStatFP", &myWeightStatFP, "weightStatFP/F");
myTree->Branch("weightFP15", &myWeightFP15, "weightFP15/F");
myTree->Branch("weightStatFP15", &myWeightStatFP15, "weightStatFP15/F");
myTree->Branch("weightFF15", &myWeightFF15, "weightFF15/F");
myTree->Branch("weightStatFF15", &myWeightStatFF15, "weightStatFF15/F");
myTree->Branch("weightPP15", &myWeightPP15, "weightPP15/F");
myTree->Branch("weightStatPP15", &myWeightStatPP15, "weightStatPP15/F");
myTree->Branch("weightFP35", &myWeightFP35, "weightFP35/F");
myTree->Branch("weightStatFP35", &myWeightStatFP35, "weightStatFP35/F");
myTree->Branch("weightFF35", &myWeightFF35, "weightFF35/F");
myTree->Branch("weightStatFF35", &myWeightStatFF35, "weightStatFF35/F");
myTree->Branch("weightPP35", &myWeightPP35, "weightPP35/F");
myTree->Branch("weightStatPP35", &myWeightStatPP35, "weightStatPP35/F");
myTree->Branch("weightFP50", &myWeightFP50, "weightFP50/F");
myTree->Branch("weightStatFP50", &myWeightStatFP50, "weightStatFP50/F");
myTree->Branch("weightFF50", &myWeightFF50, "weightFF50/F");
myTree->Branch("weightStatFF50", &myWeightStatFF50, "weightStatFF50/F");
myTree->Branch("weightPP50", &myWeightPP50, "weightPP50/F");
myTree->Branch("weightStatPP50", &myWeightStatPP50, "weightStatPP50/F");
myTree->Branch("weightFPQCD", &myWeightFPQCD, "weightFPQCD/F");
myTree->Branch("weightStatFPQCD", &myWeightStatFPQCD, "weightStatFPQCD/F");
myTree->Branch("weightFFQCD", &myWeightFFQCD, "weightFFQCD/F");
myTree->Branch("weightStatFFQCD", &myWeightStatFFQCD, "weightStatFFQCD/F");
myTree->Branch("weightPPQCD", &myWeightPPQCD, "weightPPQCD/F");
myTree->Branch("weightStatPPQCD", &myWeightStatPPQCD, "weightStatPPQCD/F");
}
void RedHiggsTree::addKinematics() {
myTree->Branch("pxChMet", &myPxTkMet, "pxChMet/F");
myTree->Branch("pyChMet", &myPyTkMet, "pyChMet/F");
myTree->Branch("pzChMet", &myPzTkMet, "pzChMet/F");
myTree->Branch("pxLeadJet", myPxLeadJet, "pxLeadJet[3]/F"); // 0th is nominal JEC, 1st=+1sigma JES, 2nd=-1sigma JES
myTree->Branch("pyLeadJet", myPyLeadJet, "pyLeadJet[3]/F");
myTree->Branch("pzLeadJet", myPzLeadJet, "pzLeadJet[3]/F");
myTree->Branch("pxSecondJet", myPxSecondJet, "pxSecondJet[3]/F");
myTree->Branch("pySecondJet", myPySecondJet, "pySecondJet[3]/F");
myTree->Branch("pzSecondJet", myPzSecondJet, "pzSecondJet[3]/F");
myTree->Branch("pxL1", &myPxL1, "pxL1/F");
myTree->Branch("pyL1", &myPyL1, "pyL1/F");
myTree->Branch("pzL1", &myPzL1, "pzL1/F");
myTree->Branch("pxL2", &myPxL2, "pxL2/F");
myTree->Branch("pyL2", &myPyL2, "pyL2/F");
myTree->Branch("pzL2", &myPzL2, "pzL2/F");
myTree->Branch("ch", myLepCharge, "ch[2]/I");
myJetsSum = 0;
myUncorrJetsSum = 0;
myPfMet = 0;
myTree->Branch("sumJetsV4", "TLorentzVector", &myJetsSum);
myTree->Branch("uncorrSumJetsV4", "TLorentzVector", &myUncorrJetsSum);
myTree->Branch("pfmetV", "TVector3", &myPfMet);
}
void RedHiggsTree::addKFactor() {
myTree->Branch("KFactor", &myKFactor, "KFactor/F");
myTree->Branch("GenHPt", &myGenHPt, "GenHPt/F");
myTree->Branch("leadingJetPt", &myLeadingJetPt, "leadingJetPt/F");
}
void RedHiggsTree::addMcTruthInfos() {
myTree->Branch("promptDecay", &myPromptDecay, "promptDecay/O");
myTree->Branch("genmll", &myGenmll, "genmll/F");
myTree->Branch("genptll", &myGenptll, "genptll/F");
myTree->Branch("genyll", &myGenyll, "genyll/F");
}
void RedHiggsTree::addHLTElectronsInfos() {
myTree->Branch("HLTSingleElectron", &myHLTSingleElectron, "HLTSingleElectron/O");
myTree->Branch("HLTSingleElectronRelaxed", &myHLTSingleElectronRelaxed, "HLTSingleElectronRelaxed/O");
myTree->Branch("HLTSingleElectronOR", &myHLTSingleElectronOR, "HLTSingleElectronOR/O");
}
void RedHiggsTree::addHLTMuonsInfos() {
myTree->Branch("HLTSingleMuon", &myHLTSingleMuon, "HLTSingleMuon/O");
myTree->Branch("HLTSingleMuonRelaxed", &myHLTSingleMuonRelaxed, "HLTSingleMuonRelaxed/O");
myTree->Branch("HLTSingleMuonOR", &myHLTSingleMuonOR, "HLTSingleMuonOR/O");
}
void RedHiggsTree::addRunInfos() {
myTree->Branch("run", &myRun, "run/I");
myTree->Branch("lumi", &myLS, "lumi/I");
myTree->Branch("event", &myEvent, "event/l");
myTree->Branch("npu", myNpu, "npu[3]/F");
}
void RedHiggsTree::addMetStudies() {
myTree->Branch("projPFMet", &myProjPFMet, "projPFMet/F");
myTree->Branch("projPFChargedMet", &myProjPFChargedMet, "projPFChargedMet/F");
myTree->Branch("signPFMet", &mySignPFMet, "signPFMet/F");
myTree->Branch("signPFChargedMet", &mySignPFChargedMet, "signPFChargedMet/F");
myTree->Branch("mtrchargedMet", &myMTRchargedMet, "mtrchargedMet/F");
myTree->Branch("dymva1", &myDYMVA, "dymva1/F");
myTree->Branch("rho", &myRho, "rho/F");
myTree->Branch("rhoJet", &myRhoJet, "rhoJet/F");
}
void RedHiggsTree::store()
{
myTree->Fill();
}
void RedHiggsTree::save()
{
myFile->cd();
myTree->Write();
myFile->Close();
}
void RedHiggsTree::fillAll(float met, float pfmet, float cmet, float projmet,
float dphi, float derre, float tmass, float mee, float max, float min, float deta, int nvtx,
bool finalLeptons, bool jetVeto, bool uncorrjetVeto, bool preDeltaPhi, bool finalSelection)
{
myMet = met;
myPFMet = pfmet;
myCaloMet = cmet;
myProjectedMet = projmet;
myDeltaPhi = dphi;
myDeltaR = derre;
myTransvMass = tmass;
myEleInvMass = mee;
maxPtEle = max;
minPtEle = min;
myDetaLeptons = deta;
myNVtx = nvtx;
myFinalLeptons = finalLeptons;
myJetVeto = jetVeto;
myUncorrJetVeto = uncorrjetVeto;
myPreDeltaPhi = preDeltaPhi;
myFinalSelection = finalSelection;
}
void RedHiggsTree::fillAll(float met, float pfmet, float cmet, float projmet,
float dphi, float derre, float tmass, float mee,
float max, float min, float maxEta, float minEta, float deta, int nvtx,
bool finalLeptons, bool jetVeto, bool uncorrjetVeto, bool preDeltaPhi, bool finalSelection)
{
myMet = met;
myPFMet = pfmet;
myCaloMet = cmet;
myProjectedMet = projmet;
myDeltaPhi = dphi;
myDeltaR = derre;
myTransvMass = tmass;
myEleInvMass = mee;
maxPtEle = max;
minPtEle = min;
maxEtaEle = maxEta;
minEtaEle = minEta;
myDetaLeptons = deta;
myNVtx = nvtx;
myFinalLeptons = finalLeptons;
myJetVeto = jetVeto;
myUncorrJetVeto = uncorrjetVeto;
myPreDeltaPhi = preDeltaPhi;
myFinalSelection = finalSelection;
}
void RedHiggsTree::fillMLVars(int njets, int nuncorrjets, float dxyEVT, float dszEVT,
float softbdisc, float hardbdisc, float bTagSecVertex, int nsoftmu,
float leadJetBTagTrackCount, float subleadJetBTagTrackCount, float subleadJetsMaxBTagTrackCount,
float leadJetBTagJetBProb, float subleadJetBTagJetBProb, float subleadJetsMaxBTagJetBProb,
int numExtraLep, int nsoftmunojets, int nSoftBJets, int nSoftJets) {
myNjets = njets;
myNuncorrjets = nuncorrjets;
myDxyEVT = dxyEVT;
myDszEVT = dszEVT;
mySoftBdisc = softbdisc;
myHardBdisc = hardbdisc;
myBTagSecVertex = bTagSecVertex;
myNSoftMu = nsoftmu;
myNSoftMuNoJets = nsoftmunojets;
myLeadingJetBTagTrackCount = leadJetBTagTrackCount;
mySubleadingJetBTagTrackCount = subleadJetBTagTrackCount;
mySubleadingJetsMaxBTagTrackCount = subleadJetsMaxBTagTrackCount;
myLeadingJetBTagJetBProb = leadJetBTagJetBProb;
mySubleadingJetBTagJetBProb = subleadJetBTagJetBProb;
mySubleadingJetsMaxBTagJetBProb = subleadJetsMaxBTagJetBProb;
myNumExtraLep = numExtraLep;
myNumSoftBJets = nSoftBJets;
myNumSoftJets = nSoftJets;
}
void RedHiggsTree::fillJetsVars(float ljpt, float ljeta, int ljpfid, int ljmatch, float ljmva, int ljl, float sljpt, float sljeta, int sljpfid, int sljmatch, float sljmva, int sljl) {
myLeadJetPt = ljpt;
myLeadJetEta = ljeta;
myLeadJetLooseId = ljpfid;
myLeadJetGenMatch = ljmatch;
myLeadJetIdMva = ljmva;
myLeadJetPassLooseId = ljl;
mySubleadJetPt = sljpt;
mySubleadJetEta = sljeta;
mySubleadJetLooseId = sljpfid;
mySubleadJetGenMatch = sljmatch;
mySubleadJetIdMva = sljmva;
mySubleadJetPassLooseId = sljl;
}
void RedHiggsTree::fillLatinos(bool s0, bool s1, bool s2, bool s3, bool s4, bool s5, bool s6, bool s7, bool s8, bool s9, bool s10, bool s11, bool s12, bool s13, bool s14, bool s15, bool s16, bool s17,
bool s18, bool s19, bool s20, bool s21, bool s22, bool s23, bool s24, bool s25, bool s26) {
mySteps[0] = s0;
mySteps[1] = s1;
mySteps[2] = s2;
mySteps[3] = s3;
mySteps[4] = s4;
mySteps[5] = s5;
mySteps[6] = s6;
mySteps[7] = s7;
mySteps[8] = s8;
mySteps[9] = s9;
mySteps[10] = s10;
mySteps[11] = s11;
mySteps[12] = s12;
mySteps[13] = s13;
mySteps[14] = s14;
mySteps[15] = s15;
mySteps[16] = s16;
mySteps[17] = s17;
mySteps[18] = s18;
mySteps[19] = s19;
mySteps[20] = s20;
mySteps[21] = s21;
mySteps[22] = s22;
mySteps[23] = s23;
mySteps[24] = s24;
mySteps[25] = s25;
mySteps[26] = s26;
}
void RedHiggsTree::fillPDFs(double cteq66[45], double mstw[31], double nnpdf[101]) {
for(int i=0;i<45;++i) myCTEQ66[i] = cteq66[i];
for(int i=0;i<31;++i) myMSTW[i] = mstw[i];
for(int i=0;i<101;++i) myNNPDF[i] = nnpdf[i];
}
void RedHiggsTree::fillRazor(float MTR, float mR, float gammaMR) {
myMTR = MTR;
myMR = mR;
myGammaMR = gammaMR;
}
void RedHiggsTree::fillFake(int ntigh, float wfp, float wsfp,
float wfp15, float wsfp15, float wff15, float wsff15, float wpp15, float wspp15,
float wfp35, float wsfp35, float wff35, float wsff35, float wpp35, float wspp35,
float wfp50, float wsfp50, float wff50, float wsff50, float wpp50, float wspp50,
float wfpQCD, float wsfpQCD, float wffQCD, float wsffQCD, float wppQCD, float wsppQCD) {
myTight = ntigh;
myWeightFP = wfp;
myWeightStatFP = wsfp;
//
myWeightFP15 = wfp15;
myWeightStatFP15 = wsfp15;
myWeightFF15 = wff15;
myWeightStatFF15 = wsff15;
myWeightPP15 = wpp15;
myWeightStatPP15 = wspp15;
//
myWeightFP35 = wfp35;
myWeightStatFP35 = wsfp35;
myWeightFF35 = wff35;
myWeightStatFF35 = wsff35;
myWeightPP35 = wpp35;
myWeightStatPP35 = wspp35;
//
myWeightFP50 = wfp50;
myWeightStatFP50 = wsfp50;
myWeightFF50 = wff50;
myWeightStatFF50 = wsff50;
myWeightPP50 = wpp50;
myWeightStatPP50 = wspp50;
//
myWeightFPQCD = wfpQCD;
myWeightStatFPQCD = wsfpQCD;
myWeightFFQCD = wffQCD;
myWeightStatFFQCD = wsffQCD;
myWeightPPQCD = wppQCD;
myWeightStatPPQCD = wsppQCD;
}
void RedHiggsTree::fillKinematics(float pxTkMet, float pyTkMet, float pzTkMet,
float pxLeadJet[3], float pyLeadJet[3], float pzLeadJet[3],
float pxSecJet[3], float pySecJet[3], float pzSecJet[3],
float pxL1, float pyL1, float pzL1,
float pxL2, float pyL2, float pzL2,
int ch[2],
TLorentzVector *jetSum, TLorentzVector *uncorrJetSum, TVector3 *pfmet) {
myPxTkMet = pxTkMet;
myPyTkMet = pyTkMet;
myPzTkMet = pzTkMet;
for(int jes=0; jes<3; jes++) {
myPxLeadJet[jes] = pxLeadJet[jes];
myPyLeadJet[jes] = pyLeadJet[jes];
myPzLeadJet[jes] = pzLeadJet[jes];
myPxSecondJet[jes] = pxSecJet[jes];
myPySecondJet[jes] = pySecJet[jes];
myPzSecondJet[jes] = pzSecJet[jes];
}
myPxL1 = pxL1;
myPyL1 = pyL1;
myPzL1 = pzL1;
myPxL2 = pxL2;
myPyL2 = pyL2;
myPzL2 = pzL2;
myJetsSum = jetSum;
myUncorrJetsSum = uncorrJetSum;
myPfMet = pfmet;
for(int i=0; i<2; i++) {
myLepCharge[i] = ch[i];
}
}
void RedHiggsTree::fillSystematics(float scE[2], float r9[2], float ene1, float ene2, int ty1, int ty2,
TVector3 *metFromJets, TVector3 *pfMetUp, TVector3 *pfMetDown, float mtUp, float mtDown) {
for(int i=0; i<2; i++) {
myScEnergy[i] = scE[i];
myR9[i] = r9[i];
}
myEneL1 = ene1;
myEneL2 = ene2;
myTypeL1 = ty1;
myTypeL2 = ty2;
myMetFromJets = metFromJets;
myPfMetUp = pfMetUp;
myPfMetDown = pfMetDown;
myMtUp = mtUp;
myMtDown = mtDown;
}
void RedHiggsTree::fillLeptons(float pt[2], float eta[2], float phi[2], float lepid[2], float lepiso[2], float lepconv[2]) {
for(int i=0; i<2; i++) {
myPt[i] = pt[i];
myEta[i] = eta[i];
myPhi[i] = phi[i];
myLepId[i] = lepid[i];
myLepIso[i] = lepiso[i];
myLepConv[i] = lepconv[i];
}
}
void RedHiggsTree::fillCSA07(double weight, double processId, float lumi)
{
myWeight = weight;
myProcesId = processId;
myLumi = lumi;
}
void RedHiggsTree::fillKFactor(float kfactor, float genh, float ptlj ) {
myKFactor = kfactor;
myGenHPt = genh;
myLeadingJetPt = ptlj;
}
void RedHiggsTree::fillMcTruth(bool prompt, float genmll, float genptll, float genyll) {
myPromptDecay = prompt;
myGenptll = genptll;
myGenyll = genyll;
myGenmll = genmll;
}
void RedHiggsTree::fillHLTElectrons(bool singleEle, bool singleEleRelaxed, bool singleEleOR) {
myHLTSingleElectron = singleEle;
myHLTSingleElectronRelaxed = singleEleRelaxed;
myHLTSingleElectronOR = singleEleOR;
}
void RedHiggsTree::fillHLTMuons(bool singleMuon, bool singleMuonRelaxed, bool singleMuonOR) {
myHLTSingleMuon = singleMuon;
myHLTSingleMuonRelaxed = singleMuonRelaxed;
myHLTSingleMuonOR = singleMuonOR;
}
void RedHiggsTree::fillRunInfos(int run, int lumi, long event, float puweight, bool HLT, float npu[3]) {
myRun = run;
myLS = lumi;
myEvent = event;
myPUWeight = puweight;
myHLT = HLT;
for(int i=0; i<3; i++) myNpu[i] = npu[i];
}
void RedHiggsTree::fillMetStudies(float projPF, float projTk, float signPFMet, float signChMet, float m_MTRcha, float DYMVA, float rho, float rhojet) {
myProjPFMet = projPF;
myProjPFChargedMet = projTk;
mySignPFMet = signPFMet;
mySignPFChargedMet = signChMet;
myMTRchargedMet = m_MTRcha;
myDYMVA = DYMVA;
myRho = rho;
myRhoJet = rhojet;
}