80 |
|
// |
81 |
|
// globals |
82 |
|
//---------------------------------------------------------------------------- |
83 |
< |
TH1D * hpu; |
83 |
> |
TH1D *hpu_2011, *hpu_2012; |
84 |
|
mithep::RunLumiRangeMap rlrm; |
85 |
|
vector<SimpleLepton> failingLeptons ; // for fake estimation |
86 |
|
vector<SimpleLepton> passingLeptons; // for fake estimation |
96 |
|
// prototypes |
97 |
|
//---------------------------------------------------------------------------- |
98 |
|
void initRunLumiRangeMap(); |
99 |
< |
void initPUWeights(); |
100 |
< |
double getPUWeight(unsigned npu); |
99 |
> |
|
100 |
|
|
101 |
|
// |
102 |
|
// MAIN |
356 |
|
foTree.Fill(); |
357 |
|
|
358 |
|
if( ctrl.mc) |
359 |
< |
setEffiencyWeights(ret4l, weights); |
359 |
> |
setEffiencyWeights(ctrl.era, ret4l, weights); |
360 |
|
|
361 |
|
nt.Fill(); |
362 |
|
} |
384 |
|
rlrm.AddJSONFile(std::string("./data/Cert_190456-194479_8TeV_PromptReco_Collisions12_JSON.txt")); |
385 |
|
|
386 |
|
}; |
388 |
– |
|
389 |
– |
|
390 |
– |
//---------------------------------------------------------------------------- |
391 |
– |
void initPUWeights() |
392 |
– |
//---------------------------------------------------------------------------- |
393 |
– |
{ |
394 |
– |
TFile * puf = new TFile("data/PileupReweighting.Summer11DYmm_To_Full2011.root"); |
395 |
– |
hpu = (TH1D*)(puf->Get("puWeights")); |
396 |
– |
} |
397 |
– |
|
398 |
– |
//---------------------------------------------------------------------------- |
399 |
– |
double getPUWeight(unsigned npu) |
400 |
– |
//---------------------------------------------------------------------------- |
401 |
– |
{ |
402 |
– |
return hpu->GetBinContent(hpu->FindBin(npu)); |
403 |
– |
} |
404 |
– |
|