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

Comparing UserCode/MitPhysics/Utils/src/MetLeptonTools.cc (file contents):
Revision 1.2 by pharris, Thu Aug 23 13:32:38 2012 UTC vs.
Revision 1.4 by pharris, Sat Jan 12 11:49:50 2013 UTC

# Line 1 | Line 1
1   #include "MitPhysics/Utils/interface/MetLeptonTools.h"
2   #include <algorithm>
3   #include <vector>
4 + #include "TString.h"
5  
6   using namespace mithep;
7  
8   ClassImp(mithep::MetLeptonTools)
9  
10 < bool MetLeptonTools::looseTauId(const PFTau *iTau) {
11 <  if(iTau->Pt() < 19)                                  return false;
12 <  if(fabs(iTau->Eta()) > fabs(2.3) )                   return false;
13 <  if(!iTau->DiscriminationByDecayModeFinding())        return false;
14 <  if(!iTau->DiscriminationByLooseElectronRejection())  return false;
15 <  if(!iTau->DiscriminationByLooseMuonRejection())      return false;
16 <  if(!iTau->DiscriminationByVLooseIsolation()   )      return false;
10 > MetLeptonTools::MetLeptonTools() {
11 >  fTauIsoMVA = new TauIsoMVA();
12 >  fTauIsoMVA->Initialize(TString(getenv("CMSSW_BASE")+std::string("/src/MitPhysics/data/SXIsoMVA_BDTG.weights.xml")));
13 > }
14 >
15 > bool MetLeptonTools::looseTauId(const PFTau *iTau,const PileupEnergyDensityCol* iPUEnergyDensity) {
16 >  if(iTau->Pt() < 19)                                                 return false;
17 >  if(fabs(iTau->Eta()) > fabs(2.3) )                                  return false;
18 >  if(!iTau->DiscriminationByDecayModeFinding())                       return false;
19 >  if(!iTau->DiscriminationByLooseElectronRejection())                 return false;
20 >  if(!iTau->DiscriminationByLooseMuonRejection())                     return false;
21 >  //if(!iTau->DiscriminationByVLooseIsolation()   )                   return false;
22 >  if(fTauIsoMVA->MVAValue(iTau,iPUEnergyDensity->At(0)->Rho()) < 0.7) return false;
23    return true;
24   }
25   bool MetLeptonTools::looseEleId(const Electron *iElectron,const PileupEnergyDensityCol* iPUEnergyDensity,
# Line 73 | Line 80 | bool MetLeptonTools::looseMuId(const Muo
80    if(iMu->IsoR03SumPt()/iMu->Pt()                > 0.2)         return false;
81    return true;
82   }
83 + bool MetLeptonTools::loosePhotonId(const Photon *iPhoton) {
84 +  if(iPhoton->Pt()        <   20)                                   return false;
85 +  if(fabs(iPhoton->Eta()) > 1.45)                                   return false;
86 +  if(iPhoton->HadOverEm() > 0.05)                                   return false;
87 +  if(iPhoton->CoviEtaiEta() > 0.01)                                 return false;
88 +  if(iPhoton->HollowConeTrkIsoDr04()    > (2.+0.002*iPhoton->Pt())) return false;
89 +  return true;
90 + }
91   double MetLeptonTools::vis(const PFTau *iTau) {
92    double lPtTot        = 0.;
93    double lChargedPtTot = 0.;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines