babymaker  e95a6a9342d4604277fe7cc6149b6b5b24447d89
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Private Member Functions | Static Private Attributes | List of all members
lepton_tools Class Reference

#include <lepton_tools.hh>

Public Types

enum  CutLevel {
  kVeto, kLoose, kMedium, kMediumICHEP,
  kTight
}
 

Public Member Functions

 lepton_tools ()
 
 ~lepton_tools ()
 
template<class T >
chooseVal (CutLevel threshold, T valVeto, T valLoose, T valMedium, T valTight)
 
bool isVetoMuon (const pat::Muon &lep, edm::Handle< reco::VertexCollection > vtx, double lepIso)
 
bool isSignalMuon (const pat::Muon &lep, edm::Handle< reco::VertexCollection > vtx, double lepIso)
 
bool idMuon (const pat::Muon &lep, edm::Handle< reco::VertexCollection > vtx, CutLevel threshold)
 
bool vertexMuon (const pat::Muon &lep, edm::Handle< reco::VertexCollection > vtx, double &dz, double &d0)
 
double getEffAreaMuon (double eta)
 
double getRelIsolation (const pat::Muon &lep, double rho)
 
bool isVetoElectron (const pat::Electron &lep, edm::Handle< reco::VertexCollection > vtx, double lepIso)
 
bool isSignalElectron (const pat::Electron &lep, edm::Handle< reco::VertexCollection > vtx, double lepIso)
 
bool idElectron (const pat::Electron &lep, edm::Handle< reco::VertexCollection > vtx, CutLevel threshold, bool doIso=false)
 
bool vertexElectron (const pat::Electron &lep, edm::Handle< reco::VertexCollection > vtx, double &dz, double &d0)
 
double getEffAreaElectron (double eta)
 
double getRelIsolation (const pat::Electron &lep, double rho)
 
double getPFIsolation (edm::Handle< pat::PackedCandidateCollection > pfcands, const reco::Candidate *ptcl, double r_iso_min, double r_iso_max, double kt_scale, double rho, bool charged_only)
 
vCands getIsoTracks (edm::Handle< pat::PackedCandidateCollection > pfcands, double met, double met_phi)
 
vCands getRA4IsoTracks (edm::Handle< pat::PackedCandidateCollection > pfcands, double met, double met_phi, double rhoEventCentral, std::vector< float > &isos, std::vector< float > &relisos, int primary_pdg)
 
bool outInOnly (const reco::Muon &mu) const
 
bool preselection (const reco::Muon &mu, bool selectClones) const
 
bool tighterId (const reco::Muon &mu) const
 
bool tightGlobal (const reco::Muon &mu) const
 
bool safeId (const reco::Muon &mu) const
 
bool partnerId (const reco::Muon &mu) const
 
std::set< unsigned > badGlobalMuonSelector (edm::Handle< reco::VertexCollection > vtx, edm::Handle< pat::MuonCollection > muons, bool selectClones)
 

Static Public Member Functions

static std::pair< double, double > getScaleFactor (const reco::Candidate &cand)
 
static std::pair< double, double > getScaleFactor (const vCands &sig_leps)
 
static std::pair< double, double > getScaleFactorFs (const reco::Candidate &cand)
 
static std::pair< double, double > getScaleFactorFs (const vCands &sig_leps)
 

Public Attributes

const float SignalLeptonPtCut = 20.0
 
const float VetoLeptonPtCut = 10.0
 
const float MuonEtaCut = 2.4
 
const float ElectronEtaCut = 2.5
 
const float MuonMiniIsoCut = 0.2
 
const float ElectronMiniIsoCut = 0.1
 

Static Private Member Functions

static std::pair< double, double > getScaleFactor (const reco::Muon &lep)
 
static std::pair< double, double > getScaleFactor (const pat::Electron &lep)
 
static std::pair< double, double > getScaleFactorFs (const reco::Muon &lep)
 
static std::pair< double, double > getScaleFactorFs (const pat::Electron &lep)
 

Static Private Attributes

static const TH2F sf_full_muon_medium
 
static const TH2F sf_full_muon_iso
 
static const TH2F sf_full_muon_vtx
 
static const TH2F sf_full_electron_medium
 
static const TH2F sf_full_electron_iso
 
static const TH2F sf_full_electron_tracking
 
static const TH2D sf_fast_muon_medium
 
static const TH2D sf_fast_muon_iso
 
static const TH2D sf_fast_electron_mediumiso
 

Detailed Description

Definition at line 22 of file lepton_tools.hh.

Member Enumeration Documentation

Enumerator
kVeto 
kLoose 
kMedium 
kMediumICHEP 
kTight 

Definition at line 36 of file lepton_tools.hh.

Constructor & Destructor Documentation

lepton_tools::lepton_tools ( )

Definition at line 749 of file lepton_tools.cc.

lepton_tools::~lepton_tools ( )

Definition at line 752 of file lepton_tools.cc.

Member Function Documentation

set< unsigned > lepton_tools::badGlobalMuonSelector ( edm::Handle< reco::VertexCollection >  vtx,
edm::Handle< pat::MuonCollection >  muons,
bool  selectClones 
)

Definition at line 692 of file lepton_tools.cc.

Referenced by chooseVal().

template<class T >
T lepton_tools::chooseVal ( CutLevel  threshold,
valVeto,
valLoose,
valMedium,
valTight 
)
inline
double lepton_tools::getEffAreaElectron ( double  eta)

Definition at line 391 of file lepton_tools.cc.

Referenced by chooseVal().

double lepton_tools::getEffAreaMuon ( double  eta)

Definition at line 251 of file lepton_tools.cc.

Referenced by chooseVal().

vCands lepton_tools::getIsoTracks ( edm::Handle< pat::PackedCandidateCollection >  pfcands,
double  met,
double  met_phi 
)

Definition at line 578 of file lepton_tools.cc.

References utilities::getMT().

Referenced by chooseVal().

double lepton_tools::getPFIsolation ( edm::Handle< pat::PackedCandidateCollection >  pfcands,
const reco::Candidate *  ptcl,
double  r_iso_min,
double  r_iso_max,
double  kt_scale,
double  rho,
bool  charged_only 
)

Definition at line 522 of file lepton_tools.cc.

Referenced by chooseVal().

vCands lepton_tools::getRA4IsoTracks ( edm::Handle< pat::PackedCandidateCollection >  pfcands,
double  met,
double  met_phi,
double  rhoEventCentral,
std::vector< float > &  isos,
std::vector< float > &  relisos,
int  primary_pdg 
)

Definition at line 622 of file lepton_tools.cc.

Referenced by chooseVal().

double lepton_tools::getRelIsolation ( const pat::Muon &  lep,
double  rho 
)

Definition at line 261 of file lepton_tools.cc.

Referenced by chooseVal().

double lepton_tools::getRelIsolation ( const pat::Electron &  lep,
double  rho 
)

Definition at line 403 of file lepton_tools.cc.

pair< double, double > lepton_tools::getScaleFactor ( const reco::Candidate &  cand)
static

Definition at line 417 of file lepton_tools.cc.

References ERROR.

Referenced by chooseVal(), bmaker_full::setDiLepMass(), and bmaker_full::setElMuMass().

pair< double, double > lepton_tools::getScaleFactor ( const vCands sig_leps)
static

Definition at line 428 of file lepton_tools.cc.

References ERROR, and anonymous_namespace{lepton_tools.cc}::MergeSF().

pair< double, double > lepton_tools::getScaleFactor ( const reco::Muon &  lep)
staticprivate
pair< double, double > lepton_tools::getScaleFactor ( const pat::Electron &  lep)
staticprivate
pair< double, double > lepton_tools::getScaleFactorFs ( const reco::Candidate &  cand)
static

Definition at line 436 of file lepton_tools.cc.

References ERROR.

Referenced by chooseVal().

pair< double, double > lepton_tools::getScaleFactorFs ( const vCands sig_leps)
static

Definition at line 447 of file lepton_tools.cc.

References ERROR, and anonymous_namespace{lepton_tools.cc}::MergeSF().

pair< double, double > lepton_tools::getScaleFactorFs ( const reco::Muon &  lep)
staticprivate
pair< double, double > lepton_tools::getScaleFactorFs ( const pat::Electron &  lep)
staticprivate
bool lepton_tools::idElectron ( const pat::Electron &  lep,
edm::Handle< reco::VertexCollection >  vtx,
CutLevel  threshold,
bool  doIso = false 
)

Definition at line 302 of file lepton_tools.cc.

Referenced by chooseVal().

bool lepton_tools::idMuon ( const pat::Muon &  lep,
edm::Handle< reco::VertexCollection >  vtx,
CutLevel  threshold 
)

Definition at line 214 of file lepton_tools.cc.

Referenced by chooseVal().

bool lepton_tools::isSignalElectron ( const pat::Electron &  lep,
edm::Handle< reco::VertexCollection >  vtx,
double  lepIso 
)

Definition at line 278 of file lepton_tools.cc.

Referenced by chooseVal().

bool lepton_tools::isSignalMuon ( const pat::Muon &  lep,
edm::Handle< reco::VertexCollection >  vtx,
double  lepIso 
)

Definition at line 190 of file lepton_tools.cc.

Referenced by chooseVal().

bool lepton_tools::isVetoElectron ( const pat::Electron &  lep,
edm::Handle< reco::VertexCollection >  vtx,
double  lepIso 
)

Definition at line 290 of file lepton_tools.cc.

Referenced by chooseVal().

bool lepton_tools::isVetoMuon ( const pat::Muon &  lep,
edm::Handle< reco::VertexCollection >  vtx,
double  lepIso 
)

Definition at line 202 of file lepton_tools.cc.

Referenced by chooseVal().

bool lepton_tools::outInOnly ( const reco::Muon &  mu) const

Definition at line 671 of file lepton_tools.cc.

Referenced by chooseVal().

bool lepton_tools::partnerId ( const reco::Muon &  mu) const

Definition at line 688 of file lepton_tools.cc.

Referenced by chooseVal().

bool lepton_tools::preselection ( const reco::Muon &  mu,
bool  selectClones 
) const

Definition at line 675 of file lepton_tools.cc.

Referenced by chooseVal().

bool lepton_tools::safeId ( const reco::Muon &  mu) const

Definition at line 684 of file lepton_tools.cc.

Referenced by chooseVal().

bool lepton_tools::tighterId ( const reco::Muon &  mu) const

Definition at line 678 of file lepton_tools.cc.

Referenced by chooseVal().

bool lepton_tools::tightGlobal ( const reco::Muon &  mu) const

Definition at line 681 of file lepton_tools.cc.

Referenced by chooseVal().

bool lepton_tools::vertexElectron ( const pat::Electron &  lep,
edm::Handle< reco::VertexCollection >  vtx,
double &  dz,
double &  d0 
)

Definition at line 380 of file lepton_tools.cc.

Referenced by chooseVal().

bool lepton_tools::vertexMuon ( const pat::Muon &  lep,
edm::Handle< reco::VertexCollection >  vtx,
double &  dz,
double &  d0 
)

Definition at line 240 of file lepton_tools.cc.

Referenced by chooseVal().

Member Data Documentation

const float lepton_tools::ElectronEtaCut = 2.5

Definition at line 32 of file lepton_tools.hh.

const float lepton_tools::ElectronMiniIsoCut = 0.1

Definition at line 34 of file lepton_tools.hh.

const float lepton_tools::MuonEtaCut = 2.4

Definition at line 31 of file lepton_tools.hh.

const float lepton_tools::MuonMiniIsoCut = 0.2

Definition at line 33 of file lepton_tools.hh.

const TH2D lepton_tools::sf_fast_electron_mediumiso
staticprivate
Initial value:
= GetSF<TH2D>("sf_fast_electron_mediumiso.root",
"histo2D")

Definition at line 97 of file lepton_tools.hh.

Referenced by anonymous_namespace{lepton_tools.cc}::GraphToHist().

const TH2D lepton_tools::sf_fast_muon_iso
staticprivate
Initial value:
= GetSF<TH2D>("sf_fast_muon_iso.root",
"histo2D")

Definition at line 97 of file lepton_tools.hh.

Referenced by anonymous_namespace{lepton_tools.cc}::GraphToHist().

const TH2D lepton_tools::sf_fast_muon_medium
staticprivate
Initial value:
= GetSF<TH2D>("sf_fast_muon_medium.root",
"histo2D")

Definition at line 97 of file lepton_tools.hh.

Referenced by anonymous_namespace{lepton_tools.cc}::GraphToHist().

const TH2F lepton_tools::sf_full_electron_iso
staticprivate
Initial value:
= GetSF<TH2F>("sf_full_electron_ID_and_iso_25_01_2017.root",
"MVAVLooseElectronToMini")

Definition at line 96 of file lepton_tools.hh.

Referenced by anonymous_namespace{lepton_tools.cc}::GraphToHist().

const TH2F lepton_tools::sf_full_electron_medium
staticprivate
Initial value:
= GetSF<TH2F>("sf_full_electron_ID_and_iso_25_01_2017.root",
"GsfElectronToCutBasedSpring15M")

Definition at line 96 of file lepton_tools.hh.

Referenced by anonymous_namespace{lepton_tools.cc}::GraphToHist().

const TH2F lepton_tools::sf_full_electron_tracking
staticprivate
Initial value:
= GetSF<TH2F>("egammaEffi_EGM2D.root",
"EGamma_SF2D")

Definition at line 96 of file lepton_tools.hh.

Referenced by anonymous_namespace{lepton_tools.cc}::GraphToHist().

const TH2F lepton_tools::sf_full_muon_iso
staticprivate
Initial value:
= GetSF<TH2F>("TnP_NUM_MiniIsoTight_DENOM_MediumID_VAR_map_pt_eta.root",
"SF")

Definition at line 96 of file lepton_tools.hh.

Referenced by anonymous_namespace{lepton_tools.cc}::GraphToHist().

const TH2F lepton_tools::sf_full_muon_medium
staticprivate
Initial value:
= GetSF<TH2F>("TnP_NUM_MediumID_DENOM_generalTracks_VAR_map_pt_eta.root",
"SF")

Definition at line 96 of file lepton_tools.hh.

Referenced by anonymous_namespace{lepton_tools.cc}::GraphToHist().

const TH2F lepton_tools::sf_full_muon_vtx
staticprivate
Initial value:
= GetSF<TH2F>("TnP_NUM_MediumIP2D_DENOM_LooseID_VAR_map_pt_eta.root",
"SF")

Definition at line 96 of file lepton_tools.hh.

Referenced by anonymous_namespace{lepton_tools.cc}::GraphToHist().

const float lepton_tools::SignalLeptonPtCut = 20.0

Definition at line 29 of file lepton_tools.hh.

const float lepton_tools::VetoLeptonPtCut = 10.0

Definition at line 30 of file lepton_tools.hh.


The documentation for this class was generated from the following files: