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.76 by arizzi, Tue Jun 12 19:40:16 2012 UTC

# Line 206 | Line 206 | HbbAnalyzerNew::produce(edm::Event& iEve
206    edm::Handle<double> rho25Handle;
207    iEvent.getByLabel(edm::InputTag("kt6PFJets25", "rho"),rho25Handle);  
208    auxInfo->puInfo.rho25 = *rho25Handle;
209 +  edm::Handle<double> rho25HandleIso;
210 +  iEvent.getByLabel(edm::InputTag("kt6PFJetsForIsolation", "rho"),rho25HandleIso);  
211 +  auxInfo->puInfo.rho25Iso = *rho25HandleIso;
212  
213    edm::Handle<double> rhoNeutralHandle;
214    iEvent.getByLabel(edm::InputTag("kt6PFJetsCentralNeutral", "rho"),rhoNeutralHandle);  
# Line 221 | Line 224 | HbbAnalyzerNew::produce(edm::Event& iEve
224        std::vector< PileupSummaryInfo> pu = (*puHandle);
225        for (std::vector<PileupSummaryInfo>::const_iterator it= pu.begin(); it!=pu.end(); ++it){
226           int bx = (*it).getBunchCrossing();
227 +         if(bx == 0) { auxInfo->puInfo.truePU = (*it).getTrueNumInteractions();}
228          unsigned int num = (*it).getPU_NumInteractions();
229          //      std::cout <<" PU PUSHING "<<bx<<" " <<num<<std::endl;
230          auxInfo->puInfo.pus[bx]  =num;
# Line 387 | Line 391 | HbbAnalyzerNew::produce(edm::Event& iEve
391  
392    /////// end generator block    
393  
394 + /// photon used in isolation
395 +  edm::Handle<edm::View<reco::PFCandidate> > photonIsoH;
396 +  iEvent.getByLabel("pfAllPhotons",photonIsoH);
397 +  edm::View<reco::PFCandidate> photonsForIso = *photonIsoH;
398  
399    edm::Handle<edm::View<pat::Muon> > muonHandle;
400    iEvent.getByLabel(muoLabel_,muonHandle);
# Line 1357 | Line 1365 | BTagSFContainer btagSFs;
1365    }
1366    
1367    edm::Handle<edm::View<pat::MET> > metPFHandle;
1368 <  iEvent.getByLabel("patMETs",metPFHandle);
1368 >  iEvent.getByLabel("patMETsPFlow",metPFHandle);
1369    edm::View<pat::MET> metsPF = *metPFHandle;
1370    
1371    if(metsPF.size()){
# Line 1495 | Line 1503 | BTagSFContainer btagSFs;
1503      ef.pfChaIso=elec->chargedHadronIso();
1504      ef.pfChaPUIso=elec->puChargedHadronIso();//userIso(5);
1505      ef.pfPhoIso=elec->photonIso();
1506 +    ef.pfPhoIsoDoubleCounted=0;
1507 +
1508 + /* Check if there are photons sharing the super cluster*/
1509 +    for(size_t k=0;k<photonsForIso.size();k++) {
1510 +       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 ) {
1511 +          std::cout << "Double counting of supercluster!" << std::endl;
1512 +          ef.pfPhoIsoDoubleCounted+=photonsForIso[k].pt();
1513 +     }
1514 +    }
1515      ef.pfNeuIso=elec->neutralHadronIso();
1516  
1517      //
# Line 1515 | Line 1532 | BTagSFContainer btagSFs;
1532      ef.HoE = elec->hadronicOverEm();
1533      ef.convDist = elec->convDist();
1534      ef.convDcot = elec->convDcot();
1535 <    if(elec->gsfTrack().isNonnull()) ef.innerHits = elec->gsfTrack()->trackerExpectedHitsInner().numberOfHits();  
1535 >    if(elec->gsfTrack().isNonnull())
1536 >    {
1537 >     ef.innerHits = elec->gsfTrack()->trackerExpectedHitsInner().numberOfHits();  
1538 >    }
1539      ef.isEB = elec->isEB();
1540      ef.isEE = elec->isEE();
1541   /* 2012 ELEID*/

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines