37 |
|
#include "PFCandidateCol.h" |
38 |
|
#include "PileupInfoCol.h" |
39 |
|
#include "PileupEnergyDensity.h" |
40 |
+ |
#include "MCParticle.h" |
41 |
|
#include "TriggerMask.h" |
42 |
|
#include "TriggerTable.h" |
43 |
|
#include "Names.h" |
273 |
|
mithep::Array<mithep::PileupInfo> *puArr = new mithep::Array<mithep::PileupInfo>(); |
274 |
|
mithep::Array<mithep::PileupEnergyDensity> *puDArr = new mithep::Array<mithep::PileupEnergyDensity>(); |
275 |
|
mithep::Array<mithep::Track> *trkArr = new mithep::Array<mithep::Track>(); |
276 |
+ |
mithep::Array<mithep::MCParticle> *mcArr = new mithep::Array<mithep::MCParticle>(); |
277 |
|
mithep::TriggerMask *trigMask = new mithep::TriggerMask(); |
278 |
|
mithep::TriggerTable *hltTable = new mithep::TriggerTable(); |
279 |
|
vector<string> *hltTableStrings = new vector<string>(); |
286 |
|
TString fPileupInfoName(Names::gkPileupInfoBrn); |
287 |
|
TString fPileupEnergyDensityName(Names::gkPileupEnergyDensityBrn); |
288 |
|
TString fTrackName(Names::gkTrackBrn); |
289 |
+ |
TString fMCParticleName(Names::gkMCPartBrn); |
290 |
|
TString fTriggerMaskName(Names::gkHltBitBrn); |
291 |
|
TString fTriggerTableName(Names::gkHltTableBrn); |
292 |
|
|
295 |
|
chain->SetBranchAddress(fMuonName, &muonArr); |
296 |
|
chain->SetBranchAddress(fPrimVtxName, &vtxArr); |
297 |
|
chain->SetBranchAddress(fPFCandidateName, &pfArr); |
298 |
< |
if( ctrl.mc ) chain->SetBranchAddress(fPileupInfoName, &puArr); |
298 |
> |
if( ctrl.mc ) { |
299 |
> |
chain->SetBranchAddress(fPileupInfoName, &puArr); |
300 |
> |
chain->SetBranchAddress(fMCParticleName, &mcArr); |
301 |
> |
} |
302 |
|
chain->SetBranchAddress(fPileupEnergyDensityName, &puDArr); |
303 |
|
chain->SetBranchAddress(fTrackName, &trkArr); |
304 |
|
chain->SetBranchAddress(fTriggerMaskName, &trigMask); |
331 |
|
{ |
332 |
|
chain->GetEntry(ientry); |
333 |
|
|
334 |
+ |
/* |
335 |
+ |
bool found_tau=false; |
336 |
+ |
if( ctrl.mc) { // && ctrl.debug |
337 |
+ |
cout << "nparticles: " << mcArr->GetEntries() << endl; |
338 |
+ |
cout << "-----------------------------------" << endl; |
339 |
+ |
for( int i=0; i<mcArr->GetEntries(); i++ ) { |
340 |
+ |
const mithep::MCParticle *mc = mcArr->At(i); |
341 |
+ |
cout << "i: " << i << "\t" |
342 |
+ |
<< "id: " << mc->AbsPdgId() |
343 |
+ |
<< endl; |
344 |
+ |
if( mc->Is(MCParticle::kTau) ) { |
345 |
+ |
found_tau=true; |
346 |
+ |
} |
347 |
+ |
} |
348 |
+ |
} |
349 |
+ |
cout << "-----------------------------------" << endl; |
350 |
+ |
cout << "found tau: " << found_tau << endl; |
351 |
+ |
*/ |
352 |
+ |
|
353 |
|
// events that fail bc ele overlaps w/ reco mu |
354 |
|
/* |
355 |
|
if( info->EvtNum() != 67315 && |
386 |
|
// xsec & PU weights |
387 |
|
// |
388 |
|
weights.w = getWeight(xstab,entrymap,chain)/ctrl.totalMC; |
389 |
+ |
cout << "xsec weight: " << weights.w << endl; |
390 |
|
int npu = -1; |
391 |
|
for(int i=0;i<puArr->GetEntries();i++) { |
392 |
|
if(puArr->At(i)->GetBunchCrossing() == 0) |
450 |
|
passingLeptons.clear(); |
451 |
|
EventData ret4l = |
452 |
|
|
453 |
+ |
|
454 |
+ |
// reference |
455 |
|
/* |
456 |
|
apply_HZZ4L_reference2_selection(ctrl, info, |
457 |
|
vtx, |
467 |
|
&muonIDPFSelection, |
468 |
|
&muonReferenceIsoSelection); |
469 |
|
*/ |
470 |
+ |
|
471 |
+ |
// evolved |
472 |
|
apply_HZZ4L_reference2_selection(ctrl, info, |
473 |
|
vtx, |
474 |
|
pfArr, |
476 |
|
puDArr, |
477 |
|
electronArr, |
478 |
|
&electronReferencePreSelection, |
479 |
+ |
//&electronPreSelection, |
480 |
|
&electronReferenceIDMVASelection, |
481 |
|
&electronIsoMVASelection, |
482 |
|
muonArr, |
483 |
|
&muonReferencePreSelection, |
484 |
+ |
//&muonPreSelection, |
485 |
|
&muonIDPFSelection, |
486 |
|
&muonIsoMVASelection); |
487 |
|
|
488 |
|
|
457 |
– |
|
458 |
– |
|
489 |
|
if( ctrl.debug ) cout << endl; |
490 |
|
|
491 |
|
|