21 |
|
void SetVertexFalse(){StoreVertex = kFALSE;} |
22 |
|
void SetTriggerFalse(){StoreTrigger = kFALSE;} |
23 |
|
void SetMetFalse(){StoreMet = kFALSE;} |
24 |
+ |
void SetGeneralFalse(){StoreGeneral = kFALSE;} |
25 |
|
|
26 |
|
//typedef struct MuonVariables{ |
27 |
|
typedef struct { |
102 |
|
*/ |
103 |
|
|
104 |
|
// B discriminator |
105 |
< |
Double_t bdisc_1st[NMAX]; |
106 |
< |
Double_t bdisc_2nd[NMAX]; |
107 |
< |
Double_t bdisc_3rd[NMAX]; |
108 |
< |
Double_t bdisc_4th[NMAX]; |
108 |
< |
Double_t bdisc_5th[NMAX]; |
109 |
< |
Double_t bdisc_6th[NMAX]; |
110 |
< |
Double_t bdisc_7th[NMAX]; |
105 |
> |
Double_t bdisc_1st; |
106 |
> |
Double_t bdisc_2nd; |
107 |
> |
Double_t bdisc_3rd; |
108 |
> |
Double_t bdisc_4th; |
109 |
|
|
110 |
|
}; |
111 |
|
|
126 |
|
|
127 |
|
struct MetVariables{ |
128 |
|
|
131 |
– |
/* |
129 |
|
Double_t met; |
130 |
|
Double_t metphi; |
131 |
|
Double_t mht; |
150 |
|
Int_t csvbtagjetnum_up; |
151 |
|
Int_t csvbtagjetnum_down; |
152 |
|
Int_t flavorhistory; |
153 |
< |
*/ |
153 |
> |
}; |
154 |
> |
|
155 |
> |
struct GeneralVariables { |
156 |
|
|
157 |
|
Int_t Run; |
158 |
|
Int_t Lumi; |
159 |
|
Int_t Event; |
160 |
+ |
Double_t PUWeight; |
161 |
|
|
162 |
|
}; |
163 |
|
|
169 |
|
VertexVariables *GetVertexVariable(){return &VStoreVertex;} |
170 |
|
TriggerVariables *GetTriggerVariable(){return &VStoreTrigger;} |
171 |
|
MetVariables *GetMetVariable(){return &VStoreMet;} |
172 |
+ |
GeneralVariables *GetGeneralVariable(){return &VStoreGeneral;} |
173 |
|
|
174 |
|
void InitialAll(); |
175 |
|
void InitialVertex(); |
178 |
|
void InitialJet(); |
179 |
|
void InitialTrigger(); |
180 |
|
void InitialMet(); |
181 |
+ |
void InitialGeneral(); |
182 |
|
|
183 |
|
private: |
184 |
|
|
190 |
|
bool StoreJet; |
191 |
|
bool StoreTrigger; |
192 |
|
bool StoreMet; |
193 |
+ |
bool StoreGeneral; |
194 |
|
|
195 |
|
//V mean variables |
196 |
|
MuonVariables VStoreMuon; |
199 |
|
VertexVariables VStoreVertex; |
200 |
|
TriggerVariables VStoreTrigger; |
201 |
|
MetVariables VStoreMet; |
202 |
+ |
GeneralVariables VStoreGeneral; |
203 |
|
|
204 |
|
}; |
205 |
|
|
216 |
|
StoreJet = kTRUE; |
217 |
|
StoreTrigger = kTRUE; |
218 |
|
StoreMet = kTRUE; |
219 |
+ |
StoreGeneral = kTRUE; |
220 |
|
|
221 |
|
} |
222 |
|
|
302 |
|
Top->Branch("jet_btag_csv",VStoreJet.jetcsv,"jetcsv[numjets]/D"); |
303 |
|
*/ |
304 |
|
//b discriminant |
305 |
< |
Top->Branch("jet_bdisc_1st",VStoreJet.bdisc_1st,"bdisc_1st[numjets]/D"); |
306 |
< |
Top->Branch("jet_bdisc_2nd",VStoreJet.bdisc_2nd,"bdisc_2nd[numjets]/D"); |
307 |
< |
Top->Branch("jet_bdisc_3rd",VStoreJet.bdisc_3rd,"bdisc_3rd[numjets]/D"); |
308 |
< |
Top->Branch("jet_bdisc_4th",VStoreJet.bdisc_4th,"bdisc_4th[numjets]/D"); |
304 |
< |
Top->Branch("jet_bdisc_5th",VStoreJet.bdisc_5th,"bdisc_5th[numjets]/D"); |
305 |
< |
Top->Branch("jet_bdisc_6th",VStoreJet.bdisc_6th,"bdisc_6th[numjets]/D"); |
306 |
< |
Top->Branch("jet_bdisc_7th",VStoreJet.bdisc_7th,"bdisc_7th[numjets]/D"); |
305 |
> |
Top->Branch("jet_bdisc_1st",&VStoreJet.bdisc_1st,"bdisc_1st/D"); |
306 |
> |
Top->Branch("jet_bdisc_2nd",&VStoreJet.bdisc_2nd,"bdisc_2nd/D"); |
307 |
> |
Top->Branch("jet_bdisc_3rd",&VStoreJet.bdisc_3rd,"bdisc_3rd/D"); |
308 |
> |
Top->Branch("jet_bdisc_4th",&VStoreJet.bdisc_4th,"bdisc_4th/D"); |
309 |
|
|
310 |
|
//Jet track size |
311 |
|
//Top->Branch("jet_tracksize",VStoreJet.jettracksize,"jettracksize[numjets]/I"); |
318 |
|
|
319 |
|
if(StoreMet){ |
320 |
|
cout<<"We are inital Met Branch"<<endl; |
321 |
< |
|
320 |
< |
/* |
321 |
> |
|
322 |
|
Top->Branch("MET_energy",&VStoreMet.met,"met/D"); |
323 |
|
Top->Branch("MET_phi",&VStoreMet.metphi,"metphi/D"); |
324 |
|
Top->Branch("MHT_energy",&VStoreMet.mht,"mht/D"); |
342 |
|
Top->Branch("csvbtagjetnum_up",&VStoreMet.csvbtagjetnum_up,"csvbtagjetnum_up/I"); |
343 |
|
Top->Branch("csvbtagjetnum_down",&VStoreMet.csvbtagjetnum_down,"csvbtagjetnum_down/I"); |
344 |
|
Top->Branch("flavorhistory",&VStoreMet.flavorhistory,"flavorhistory/I"); |
345 |
< |
*/ |
345 |
< |
Top->Branch("run",&VStoreMet.Run,"Run/I"); |
346 |
< |
Top->Branch("lumi",&VStoreMet.Lumi,"Lumi/I"); |
347 |
< |
Top->Branch("event",&VStoreMet.Event,"Event/I"); |
348 |
< |
|
345 |
> |
|
346 |
|
} |
347 |
+ |
} |
348 |
+ |
|
349 |
+ |
void StoreTreeVariable::InitialGeneral(){ |
350 |
|
|
351 |
+ |
if(StoreGeneral){ |
352 |
+ |
cout<<"We are inital General Branch"<<endl; |
353 |
+ |
|
354 |
+ |
Top->Branch("run",&VStoreGeneral.Run,"Run/I"); |
355 |
+ |
Top->Branch("lumi",&VStoreGeneral.Lumi,"Lumi/I"); |
356 |
+ |
Top->Branch("event",&VStoreGeneral.Event,"Event/I"); |
357 |
+ |
Top->Branch("PUWeight",&VStoreGeneral.PUWeight,"PUWeight/D"); |
358 |
+ |
|
359 |
+ |
} |
360 |
|
} |
361 |
|
|
362 |
|
void StoreTreeVariable::InitialTrigger(){ |
391 |
|
InitialElectron(); |
392 |
|
InitialJet(); |
393 |
|
InitialMet(); |
394 |
+ |
InitialGeneral(); |
395 |
|
} |