ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/VHbbAnalysis/HbbAnalyzer/plugins/HbbAnalyzerNew.cc
(Generate patch)

Comparing UserCode/VHbbAnalysis/HbbAnalyzer/plugins/HbbAnalyzerNew.cc (file contents):
Revision 1.73 by degrutto, Wed May 16 15:13:51 2012 UTC vs.
Revision 1.75 by arizzi, Thu May 24 15:55:16 2012 UTC

# Line 221 | Line 221 | HbbAnalyzerNew::produce(edm::Event& iEve
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;
# Line 387 | Line 388 | HbbAnalyzerNew::produce(edm::Event& iEve
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);
# Line 1357 | Line 1362 | BTagSFContainer btagSFs;
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()){
# Line 1495 | Line 1500 | BTagSFContainer btagSFs;
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      //
# Line 1515 | Line 1529 | BTagSFContainer btagSFs;
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*/

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines