forked from ltikvica/WZanalysis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWZEventMCOld.h
147 lines (103 loc) · 2.89 KB
/
WZEventMCOld.h
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
#ifndef WZEventMCOld_h
#define WZEventMCOld_h
#ifdef DATA
#define WZBASECLASS WZ2012Data
#include "WZ2012Data.h"
#endif
#ifdef OLDMC
#define WZBASECLASS WZ
#include "WZ.h"
#endif
#ifdef NEWMC
#define WZBASECLASS WZGenEvent
#include "WZGenEvent.h"
#endif
#ifdef TZMC
#define WZBASECLASS TZJets
#include "TZJets.h"
#endif
//Lucija commented it
//#define WZBASECLASS WZGenEvent
#include "TLorentzVector.h"
#include "TH2F.h"
#include <vector>
class RecoLepton : public TLorentzVector {
public:
RecoLepton(double pt, double eta, double phi,
float ch, float id ) {
SetPtEtaPhiM(pt, eta, phi, 0.);
charge = ch;
pdgid = id;
};
float GetScaleFactor();
protected:
float pdgid;
float charge;
static TH2F * MuonSF;
static TH2F * ElecSF;
};
class WZEventMCOld : public WZBASECLASS
{
public:
WZEventMCOld(TTree *tree);
bool passesSelection();
void ReadEvent();
void DumpEvent(std::ostream & out);
void PrintSummary();
// bool PassesGenCuts();
float LeptonPt(int i);
float LeptonBDT(int i);
float LeptonCharge(int i);
float LeptonEta(int i);
float LeptonPhi(int i);
int LeptonPass2012ICHEP(int i);
float LeptonIso(int i);
float LeptonIsomva(int i);
float GetMCWeight();
float GetTriggerEfficiency();
// FinalState GetFinalState(){return final_state;}
// PassedSelectionStep GetSelectionLevel() { return selection_level;}
// float pt[leptonNumber]={cWZ->pt1, cWZ->pt2, cWZ->pt3, cWZ->pt4};
// float bdt[leptonNumber]={cWZ->bdt1, cWZ->bdt2, cWZ->bdt3, cWZ->bdt4};
// float ch[leptonNumber]={cWZ->ch1, cWZ->ch2, cWZ->ch3, cWZ->ch4};
// float eta[leptonNumber]={cWZ->eta1, cWZ->eta2, cWZ->eta3, cWZ->eta4};
// float phi[leptonNumber]={cWZ->phi1, cWZ->phi2, cWZ->phi3, cWZ->phi4};
// int pass2012ICHEP[leptonNumber]={cWZ->pass2012ICHEP1, cWZ->pass2012ICHEP2, cWZ->pass2012ICHEP3, cWZ->pass2012ICHEP4};
// float iso[leptonNumber]={cWZ->iso1, cWZ->iso2, cWZ->iso3, cWZ->iso4};
// float isomva[leptonNumber]={cWZ->isomva1, cWZ->isomva2, cWZ->isomva3, cWZ->isomva4};
// std::vector<TLorentzVector> genLeptons;
std::vector<TLorentzVector> recoJets;
std::vector<RecoLepton> leptons;
float NumZ() { return numZ;}
float NumW() { return numW;}
double SelectedZPt() {
return selectedZPt;
}
protected:
std::vector<float*> pt;
std::vector<float*> bdt;
std::vector<float*> pdgid;
std::vector<float*> ch;
std::vector<float*> eta;
std::vector<float*> phi;
std::vector<int*> pass2012ICHEP;
std::vector<float*> iso;
std::vector<float*> isomva;
// FinalState final_state;
// PassedSelectionStep selection_level;
int wLeptonIndex;
int zLeptonsIndex[2];
double selectedZPt;
float numZ;
float numW;
float numMET;
float num3e;
float num2e1mu;
float num1e2mu;
float num3mu;
float numMET3e;
float numMET2e1mu;
float numMET1e2mu;
float numMET3mu;
};
#endif // #ifdef WZ_cxx