295 |
|
if(!(ientry%1000)) cerr << "entry: " << ientry << "\t" << float(ientry)/imax << endl; |
296 |
|
|
297 |
|
string fname = string(chain->GetFile()->GetEndpointUrl()->GetFile()); |
298 |
< |
setEra( fname, ctrl ); |
299 |
< |
|
298 |
> |
if( ctrl.era == 0 ) |
299 |
> |
setEra( fname, ctrl ); |
300 |
|
|
301 |
|
// pfNoPU |
302 |
|
PFnoPUflag.clear(); |
333 |
|
// lepton/kinematic selection ... |
334 |
|
failingLeptons.clear(); |
335 |
|
passingLeptons.clear(); |
336 |
< |
EventData ret4l = |
336 |
> |
EventData ret4l; |
337 |
|
|
338 |
< |
apply_HZZ4L_EMU_selection(ctrl, info, |
339 |
< |
hltTable, |
340 |
< |
hltObjArr, |
341 |
< |
fTrigObjs, |
342 |
< |
vtxArr, |
343 |
< |
pfArr, |
344 |
< |
puDArr, |
345 |
< |
electronArr, |
346 |
< |
&electronReferencePreSelection, |
347 |
< |
&electronReferenceIDMVASelectionV1, |
348 |
< |
&electronReferenceIsoSelection, |
349 |
< |
muonArr, |
350 |
< |
&muonReferencePreSelection, |
351 |
< |
&muonIDPFSelection, |
352 |
< |
&muonReferenceIsoSelection); |
353 |
< |
|
338 |
> |
ret4l = apply_HZZ4L_EMU_selection(ctrl, info, |
339 |
> |
hltTable, |
340 |
> |
hltObjArr, |
341 |
> |
fTrigObjs, |
342 |
> |
vtxArr, |
343 |
> |
pfArr, |
344 |
> |
puDArr, |
345 |
> |
fConversions, |
346 |
> |
electronArr, |
347 |
> |
&electronReferencePreSelection, |
348 |
> |
&electronReferenceIDMVASelectionV1, |
349 |
> |
&electronReferenceIsoSelection, |
350 |
> |
muonArr, |
351 |
> |
&muonReferencePreSelection, |
352 |
> |
&muonIDPFSelection, |
353 |
> |
&muonReferenceIsoSelection); |
354 |
|
|
355 |
|
if( ret4l.status.pass() ) { |
356 |
< |
|
356 |
> |
fillKinematics(ret4l,kinematics); |
357 |
|
TLorentzVector pfmet; pfmet.SetPxPyPzE(metArr->At(0)->Mex(),metArr->At(0)->Mey(),0,0); |
358 |
|
fillEventInfo( info, pfmet, evtinfo, ctrl.mc ? getNPU(puArr) : 0, vtxArr->GetEntries()); |
359 |
|
foTree.Fill(); |
360 |
– |
|
361 |
– |
// if( ctrl.mc) |
362 |
– |
// setEffiencyWeights(ctrl.era, ret4l, weights); |
363 |
– |
if(ientry<10000) cout << "\n\nWARNING: not setting eff weights\n\n" << endl; |
364 |
– |
|
360 |
|
nt.Fill(); |
361 |
|
} |
362 |
< |
|
362 |
> |
|
363 |
|
} |
364 |
|
foTree.getFile()->cd(); |
365 |
|
foTree.getTree()->Write(); |