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, |