221 |
|
std::vector< PileupSummaryInfo> pu = (*puHandle); |
222 |
|
for (std::vector<PileupSummaryInfo>::const_iterator it= pu.begin(); it!=pu.end(); ++it){ |
223 |
|
int bx = (*it).getBunchCrossing(); |
224 |
+ |
if(bx == 0) { auxInfo->puInfo.truePU = (*it).getTrueNumInteractions();} |
225 |
|
unsigned int num = (*it).getPU_NumInteractions(); |
226 |
|
// std::cout <<" PU PUSHING "<<bx<<" " <<num<<std::endl; |
227 |
|
auxInfo->puInfo.pus[bx] =num; |
388 |
|
|
389 |
|
/////// end generator block |
390 |
|
|
391 |
+ |
/// photon used in isolation |
392 |
+ |
edm::Handle<edm::View<reco::PFCandidate> > photonIsoH; |
393 |
+ |
iEvent.getByLabel("pfAllPhotons",photonIsoH); |
394 |
+ |
edm::View<reco::PFCandidate> photonsForIso = *photonIsoH; |
395 |
|
|
396 |
|
edm::Handle<edm::View<pat::Muon> > muonHandle; |
397 |
|
iEvent.getByLabel(muoLabel_,muonHandle); |
1362 |
|
} |
1363 |
|
|
1364 |
|
edm::Handle<edm::View<pat::MET> > metPFHandle; |
1365 |
< |
iEvent.getByLabel("patMETs",metPFHandle); |
1365 |
> |
iEvent.getByLabel("patMETsPFlow",metPFHandle); |
1366 |
|
edm::View<pat::MET> metsPF = *metPFHandle; |
1367 |
|
|
1368 |
|
if(metsPF.size()){ |
1500 |
|
ef.pfChaIso=elec->chargedHadronIso(); |
1501 |
|
ef.pfChaPUIso=elec->puChargedHadronIso();//userIso(5); |
1502 |
|
ef.pfPhoIso=elec->photonIso(); |
1503 |
+ |
ef.pfPhoIsoDoubleCounted=0; |
1504 |
+ |
|
1505 |
+ |
/* Check if there are photons sharing the super cluster*/ |
1506 |
+ |
for(size_t k=0;k<photonsForIso.size();k++) { |
1507 |
+ |
if(deltaR(elec->eta(),elec->phi(),photonsForIso[k].eta(),photonsForIso[k].phi()) < 0.05 && abs(photonsForIso[k].pt()-elec->pt())/(photonsForIso[k].pt()+elec->pt()) < 0.05 ) { |
1508 |
+ |
std::cout << "Double counting of supercluster!" << std::endl; |
1509 |
+ |
ef.pfPhoIsoDoubleCounted+=photonsForIso[k].pt(); |
1510 |
+ |
} |
1511 |
+ |
} |
1512 |
|
ef.pfNeuIso=elec->neutralHadronIso(); |
1513 |
|
|
1514 |
|
// |
1529 |
|
ef.HoE = elec->hadronicOverEm(); |
1530 |
|
ef.convDist = elec->convDist(); |
1531 |
|
ef.convDcot = elec->convDcot(); |
1532 |
< |
if(elec->gsfTrack().isNonnull()) ef.innerHits = elec->gsfTrack()->trackerExpectedHitsInner().numberOfHits(); |
1532 |
> |
if(elec->gsfTrack().isNonnull()) |
1533 |
> |
{ |
1534 |
> |
ef.innerHits = elec->gsfTrack()->trackerExpectedHitsInner().numberOfHits(); |
1535 |
> |
} |
1536 |
|
ef.isEB = elec->isEB(); |
1537 |
|
ef.isEE = elec->isEE(); |
1538 |
|
/* 2012 ELEID*/ |