ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/src/PhotonTreeWriter.cc
(Generate patch)

Comparing UserCode/MitPhysics/Mods/src/PhotonTreeWriter.cc (file contents):
Revision 1.73 by bendavid, Tue Dec 10 15:31:21 2013 UTC vs.
Revision 1.74 by bendavid, Wed Dec 11 00:43:03 2013 UTC

# Line 510 | Line 510 | void PhotonTreeWriter::Process()
510          if (jet->AbsEta()<4.7 && MathUtils::DeltaR(jet,p1)>0.5 && MathUtils::DeltaR(jet,p2)>0.5) {
511            const PFJet *pfjet = dynamic_cast<const PFJet*>(jet);
512            if (!pfjet) continue;
513 +          //if (!JetTools::passPFLooseId(pfjet)) continue;
514            if (fApplyJetId && !fJetId.passCut(pfjet,selvtx,fPV)) continue;
515            if (!jet1) jet1 = jet;
516            else if (!jet2) jet2 = jet;
# Line 2463 | Line 2464 | const Electron* PhotonTreeWriter::GetLep
2464      const Electron *ele = fLeptonTagElectrons->At(iele);
2465      if (fLeptonTagElectrons->GetEntries() > 0                          &&
2466          fLeptonTagElectrons->At(0) != 0                                &&
2466        PhotonTools::ElectronVetoCiC(phHard, fLeptonTagElectrons) >= 1 &&
2467        PhotonTools::ElectronVetoCiC(phSoft, fLeptonTagElectrons) >= 1 &&
2467          PhotonTools::ElectronVetoCiC(phHard, fElectrons) >= 1          &&
2468          PhotonTools::ElectronVetoCiC(phSoft, fElectrons) >= 1          &&    
2469          MathUtils::DeltaR(ele, phHard) >= 1     &&
# Line 2632 | Line 2631 | bool PhotonTreeWriter::VHLepHasDielectro
2631                                            const Photon *phSoft) {
2632    if (fLeptonTagSoftElectrons->GetEntries() < 2) return false;
2633    
2634 <  if (PhotonTools::ElectronVetoCiC(phHard, fLeptonTagSoftElectrons) < 1 ||
2636 <      PhotonTools::ElectronVetoCiC(phSoft, fLeptonTagSoftElectrons) < 1 ||
2637 <      PhotonTools::ElectronVetoCiC(phHard, fElectrons)              < 1 ||
2634 >  if (PhotonTools::ElectronVetoCiC(phHard, fElectrons)              < 1 ||
2635        PhotonTools::ElectronVetoCiC(phSoft, fElectrons)              < 1) {
2636      return false;
2637    }
# Line 2749 | Line 2746 | UInt_t PhotonTreeWriter::VHLepNumberOfJe
2746      // Make sure we have a PF jet
2747      const PFJet *pfjet = dynamic_cast<const PFJet*>(jet);
2748      if (!pfjet) continue;
2749 <    if (!JetTools::passPFLooseId(pfjet)) continue;
2749 >    //if (!JetTools::passPFLooseId(pfjet)) continue;
2750      // Apply the jet ID / pileup removal as given in Table 4
2751 <    Double_t betaStar = JetTools::betaStarClassic(pfjet, selvtx, fPV);
2755 <    if (betaStar > 0.2 * log(fPV->GetEntries() - 0.64)) continue;
2756 <    if (JetTools::dR2Mean(pfjet, -1) > 0.065) continue;
2751 >    if (fApplyJetId && !fJetId.passCut(pfjet,selvtx,fPV)) continue;
2752      // this jet passes, count it in
2753      ++nJets;
2754    } // End of loop over jets  
# Line 2818 | Line 2813 | void PhotonTreeWriter::ApplyTTHTag(const
2813      // Make sure we have a PF jet
2814      const PFJet *pfjet = dynamic_cast<const PFJet*>(jet);
2815      if (!pfjet) continue;
2816 <    if (!JetTools::passPFLooseId(pfjet)) continue;
2816 >    //if (!JetTools::passPFLooseId(pfjet)) continue;
2817      // Apply the jet ID as given in Table 4
2818 <    Double_t betaStar = JetTools::betaStarClassic(pfjet, selvtx, fPV);
2824 <    if (betaStar > 0.2 * log(fPV->GetEntries() - 0.64)) continue;
2825 <    if (JetTools::dR2Mean(pfjet, -1) > 0.065) continue;
2818 >    if (fApplyJetId && !fJetId.passCut(pfjet,selvtx,fPV)) continue;
2819      // this jet passes, count it in
2820      ++nJets;
2821      // Select b-jets that pass the CSV medium working point, see L128 of the AN
# Line 2871 | Line 2864 | UInt_t PhotonTreeWriter::NumberOfJets(co
2864      // Make sure we have a PF jet
2865      const PFJet *pfjet = dynamic_cast<const PFJet*>(jet);
2866      if (!pfjet) continue;
2867 <    if (!JetTools::passPFLooseId(pfjet)) continue;
2867 >    //if (!JetTools::passPFLooseId(pfjet)) continue;
2868      // Apply the jet ID / pileup removal as given in Table 4
2869 <    Double_t betaStar = JetTools::betaStarClassic(pfjet, selvtx, fPV);
2877 <    if (betaStar > 0.2 * log(fPV->GetEntries() - 0.64)) continue;
2878 <    if (JetTools::dR2Mean(pfjet, -1) > 0.065) continue;
2869 >    if (fApplyJetId && !fJetId.passCut(pfjet,selvtx,fPV)) continue;
2870      // this jet passes, count it in
2871      ++nJets;
2872    } // End of loop over jets
# Line 2954 | Line 2945 | UInt_t PhotonTreeWriter::NumberOfBJets(c
2945      // Make sure we have a PF jet
2946      const PFJet *pfjet = dynamic_cast<const PFJet*>(jet);
2947      if (!pfjet) continue;
2948 <    if (!JetTools::passPFLooseId(pfjet)) continue;
2948 >    //if (!JetTools::passPFLooseId(pfjet)) continue;
2949      // Apply the jet ID / pileup removal as given in Table 4
2950 <    Double_t betaStar = JetTools::betaStarClassic(pfjet, selvtx, fPV);
2960 <    if (betaStar > 0.2 * log(fPV->GetEntries() - 0.64)) continue;
2961 <    if (JetTools::dR2Mean(pfjet, -1) > 0.065) continue;
2950 >    if (fApplyJetId && !fJetId.passCut(pfjet,selvtx,fPV)) continue;
2951      // Select b-jets that pass the CSV medium working point, see L128 of the AN
2952      // and https://twiki.cern.ch/twiki/bin/viewauth/CMS/BTagPerformanceOP
2953      if (jet->CombinedSecondaryVertexBJetTagsDisc() < 0.679) continue;
# Line 3024 | Line 3013 | PhotonTreeWriter::TTHSelectElectron(cons
3013           <<      PhotonTools::ElectronVetoCiC(phSoft, fElectrons) << endl;
3014    }  
3015    
3016 <  if (PhotonTools::ElectronVetoCiC(phHard, fLeptonTagElectrons) >= 1 &&
3028 <      PhotonTools::ElectronVetoCiC(phSoft, fLeptonTagElectrons) >= 1 &&
3029 <      PhotonTools::ElectronVetoCiC(phHard, fElectrons) >= 1          &&
3016 >  if (PhotonTools::ElectronVetoCiC(phHard, fElectrons) >= 1          &&
3017        PhotonTools::ElectronVetoCiC(phSoft, fElectrons) >= 1){
3018      // Loop over electrons, apply all cuts, find the one wiht hightes ID MVA
3019      for (UInt_t iele=0; iele < fLeptonTagElectrons->GetEntries(); ++iele) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines