CMS 3D CMS Logo

Typedefs | Enumerations | Functions | Variables
EgammaCutBasedEleId Namespace Reference

Typedefs

typedef std::vector< edm::Handle< edm::ValueMap< reco::IsoDeposit > > > IsoDepositMaps
 
typedef std::vector< edm::Handle< edm::ValueMap< double > > > IsoDepositVals
 

Enumerations

enum  CutType {
  DETAIN = (1<<0), DPHIIN = (1<<1), SIGMAIETAIETA = (1<<2), HOE = (1<<3),
  OOEMOOP = (1<<4), D0VTX = (1<<5), DZVTX = (1<<6), ISO = (1<<7),
  VTXFIT = (1<<8), MHITS = (1<<9)
}
 
enum  TriggerWorkingPoint { TRIGGERTIGHT, TRIGGERWP70 }
 
enum  WorkingPoint { VETO, LOOSE, MEDIUM, TIGHT }
 

Functions

bool PassEoverPCuts (const reco::GsfElectronRef &ele)
 
bool PassEoverPCuts (const reco::GsfElectron &ele)
 
bool PassEoverPCuts (const float eta, const float eopin, const float fbrem)
 
bool PassTriggerCuts (const TriggerWorkingPoint triggerWorkingPoint, const reco::GsfElectronRef &ele)
 
bool PassTriggerCuts (const TriggerWorkingPoint triggerWorkingPoint, const reco::GsfElectron &ele)
 
bool PassTriggerCuts (const TriggerWorkingPoint triggerWorkingPoint, const bool isEB, const float pt, const float dEtaIn, const float dPhiIn, const float sigmaIEtaIEta, const float hoe, const float trackIso, const float ecalIso, const float hcalIso)
 
bool PassWP (const WorkingPoint workingPoint, const reco::GsfElectronRef &ele, const edm::Handle< reco::ConversionCollection > &conversions, const reco::BeamSpot &beamspot, const edm::Handle< reco::VertexCollection > &vtxs, const double &iso_ch, const double &iso_em, const double &iso_nh, const double &rho, ElectronEffectiveArea::ElectronEffectiveAreaTarget EAtarget)
 
bool PassWP (const WorkingPoint workingPoint, const reco::GsfElectron &ele, const edm::Handle< reco::ConversionCollection > &conversions, const reco::BeamSpot &beamspot, const edm::Handle< reco::VertexCollection > &vtxs, const double &iso_ch, const double &iso_em, const double &iso_nh, const double &rho, ElectronEffectiveArea::ElectronEffectiveAreaTarget EAtarget)
 
bool PassWP (WorkingPoint workingPoint, const bool isEB, const float pt, const float eta, const float dEtaIn, const float dPhiIn, const float sigmaIEtaIEta, const float hoe, const float ooemoop, const float d0vtx, const float dzvtx, const float iso_ch, const float iso_em, const float iso_nh, const bool vtxFitConversion, const unsigned int mHits, const double rho, ElectronEffectiveArea::ElectronEffectiveAreaTarget EAtarget)
 
void PrintDebug (unsigned int mask)
 
unsigned int TestWP (const WorkingPoint workingPoint, const reco::GsfElectronRef &ele, const edm::Handle< reco::ConversionCollection > &conversions, const reco::BeamSpot &beamspot, const edm::Handle< reco::VertexCollection > &vtxs, const double &iso_ch, const double &iso_em, const double &iso_nh, const double &rho, ElectronEffectiveArea::ElectronEffectiveAreaTarget EAtarget)
 
unsigned int TestWP (const WorkingPoint workingPoint, const reco::GsfElectron &ele, const edm::Handle< reco::ConversionCollection > &conversions, const reco::BeamSpot &beamspot, const edm::Handle< reco::VertexCollection > &vtxs, const double &iso_ch, const double &iso_em, const double &iso_nh, const double &rho, ElectronEffectiveArea::ElectronEffectiveAreaTarget EAtarget)
 
unsigned int TestWP (WorkingPoint workingPoint, const bool isEB, const float pt, const float eta, const float dEtaIn, const float dPhiIn, const float sigmaIEtaIEta, const float hoe, const float ooemoop, const float d0vtx, const float dzvtx, const float iso_ch, const float iso_em, const float iso_nh, const bool vtxFitConversion, const unsigned int mHits, const double rho, ElectronEffectiveArea::ElectronEffectiveAreaTarget EAtarget)
 

Variables

static const unsigned int PassAll = DETAIN | DPHIIN | SIGMAIETAIETA | HOE | OOEMOOP | D0VTX | DZVTX | ISO | VTXFIT | MHITS
 

Typedef Documentation

Definition at line 27 of file EGammaCutBasedEleId.h.

Definition at line 28 of file EGammaCutBasedEleId.h.

Enumeration Type Documentation

Enumerator
DETAIN 
DPHIIN 
SIGMAIETAIETA 
HOE 
OOEMOOP 
D0VTX 
DZVTX 
ISO 
VTXFIT 
MHITS 

Definition at line 50 of file EGammaCutBasedEleId.h.

Enumerator
TRIGGERTIGHT 
TRIGGERWP70 

Definition at line 41 of file EGammaCutBasedEleId.h.

Enumerator
VETO 
LOOSE 
MEDIUM 
TIGHT 

Definition at line 34 of file EGammaCutBasedEleId.h.

Function Documentation

bool EgammaCutBasedEleId::PassEoverPCuts ( const reco::GsfElectronRef ele)

Definition at line 80 of file EGammaCutBasedEleId.cc.

Referenced by EGammaCutBasedEleIdAnalyzer::analyze(), and PassEoverPCuts().

80  {
81  return PassEoverPCuts(*ele);
82 }
bool PassEoverPCuts(const reco::GsfElectronRef &ele)
bool EgammaCutBasedEleId::PassEoverPCuts ( const reco::GsfElectron ele)

Definition at line 67 of file EGammaCutBasedEleId.cc.

References reco::GsfElectron::eSuperClusterOverP(), PVValHelper::eta, reco::GsfElectron::fbrem(), PassEoverPCuts(), and reco::GsfElectron::superCluster().

68 {
69 
70  // get the variables
71  float eta = ele.superCluster()->eta();
72  float eopin = ele.eSuperClusterOverP();
73  float fbrem = ele.fbrem();
74 
75  // test the eop/fbrem cuts
76  return EgammaCutBasedEleId::PassEoverPCuts(eta, eopin, fbrem);
77 
78 }
float eSuperClusterOverP() const
Definition: GsfElectron.h:245
float fbrem() const
Definition: GsfElectron.h:750
bool PassEoverPCuts(const reco::GsfElectronRef &ele)
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition: GsfElectron.h:184
bool EgammaCutBasedEleId::PassEoverPCuts ( const float  eta,
const float  eopin,
const float  fbrem 
)

Definition at line 212 of file EGammaCutBasedEleId.cc.

213 {
214  if (fbrem > 0.15) return true;
215  else if (fabs(eta) < 1.0 && eopin > 0.95) return true;
216  return false;
217 }
bool EgammaCutBasedEleId::PassTriggerCuts ( const TriggerWorkingPoint  triggerWorkingPoint,
const reco::GsfElectronRef ele 
)

Definition at line 62 of file EGammaCutBasedEleId.cc.

Referenced by EGammaCutBasedEleIdAnalyzer::analyze(), and PassTriggerCuts().

63 {
64  return EgammaCutBasedEleId::PassTriggerCuts(triggerWorkingPoint, *ele);
65 }
bool PassTriggerCuts(const TriggerWorkingPoint triggerWorkingPoint, const reco::GsfElectronRef &ele)
bool EgammaCutBasedEleId::PassTriggerCuts ( const TriggerWorkingPoint  triggerWorkingPoint,
const reco::GsfElectron ele 
)

Definition at line 43 of file EGammaCutBasedEleId.cc.

References reco::GsfElectron::deltaEtaSuperClusterTrackAtVtx(), reco::GsfElectron::deltaPhiSuperClusterTrackAtVtx(), reco::GsfElectron::dr03EcalRecHitSumEt(), reco::GsfElectron::dr03HcalTowerSumEt(), reco::GsfElectron::dr03TkSumPt(), reco::GsfElectron::hadronicOverEm(), electrons_cff::hoe, reco::GsfElectron::isEB(), PassTriggerCuts(), EnergyCorrector::pt, reco::LeafCandidate::pt(), and reco::GsfElectron::sigmaIetaIeta().

44 {
45 
46  // get the variables
47  bool isEB = ele.isEB() ? true : false;
48  float pt = ele.pt();
49  float dEtaIn = ele.deltaEtaSuperClusterTrackAtVtx();
50  float dPhiIn = ele.deltaPhiSuperClusterTrackAtVtx();
51  float sigmaIEtaIEta = ele.sigmaIetaIeta();
52  float hoe = ele.hadronicOverEm();
53  float trackIso = ele.dr03TkSumPt();
54  float ecalIso = ele.dr03EcalRecHitSumEt();
55  float hcalIso = ele.dr03HcalTowerSumEt();
56 
57  // test the trigger cuts
58  return EgammaCutBasedEleId::PassTriggerCuts(triggerWorkingPoint, isEB, pt, dEtaIn, dPhiIn, sigmaIEtaIEta, hoe, trackIso, ecalIso, hcalIso);
59 
60 }
double pt() const final
transverse momentum
bool isEB() const
Definition: GsfElectron.h:352
float deltaEtaSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:249
float sigmaIetaIeta() const
Definition: GsfElectron.h:434
float hadronicOverEm() const
Definition: GsfElectron.h:487
bool PassTriggerCuts(const TriggerWorkingPoint triggerWorkingPoint, const reco::GsfElectronRef &ele)
float deltaPhiSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:252
float dr03TkSumPt() const
Definition: GsfElectron.h:543
float dr03EcalRecHitSumEt() const
Definition: GsfElectron.h:544
float dr03HcalTowerSumEt() const
Definition: GsfElectron.h:547
bool EgammaCutBasedEleId::PassTriggerCuts ( const TriggerWorkingPoint  triggerWorkingPoint,
const bool  isEB,
const float  pt,
const float  dEtaIn,
const float  dPhiIn,
const float  sigmaIEtaIEta,
const float  hoe,
const float  trackIso,
const float  ecalIso,
const float  hcalIso 
)

Definition at line 163 of file EGammaCutBasedEleId.cc.

References gather_cfg::cout, training_settings::idx, TRIGGERTIGHT, and TRIGGERWP70.

167 {
168 
169 
170  // choose cut if barrel or endcap
171  unsigned int idx = isEB ? 0 : 1;
172 
173  if (triggerWorkingPoint == EgammaCutBasedEleId::TRIGGERTIGHT) {
174  float cut_dEtaIn[2] = {0.007, 0.009};
175  float cut_dPhiIn[2] = {0.15, 0.10};
176  float cut_sigmaIEtaIEta[2] = {0.01, 0.03};
177  float cut_hoe[2] = {0.12, 0.10};
178  float cut_trackIso[2] = {0.20, 0.20};
179  float cut_ecalIso[2] = {0.20, 0.20};
180  float cut_hcalIso[2] = {0.20, 0.20};
181  if (fabs(dEtaIn) > cut_dEtaIn[idx]) return false;
182  if (fabs(dPhiIn) > cut_dPhiIn[idx]) return false;
183  if (sigmaIEtaIEta > cut_sigmaIEtaIEta[idx]) return false;
184  if (hoe > cut_hoe[idx]) return false;
185  if (trackIso / pt > cut_trackIso[idx]) return false;
186  if (ecalIso / pt > cut_ecalIso[idx]) return false;
187  if (hcalIso / pt > cut_hcalIso[idx]) return false;
188  }
189  else if (triggerWorkingPoint == EgammaCutBasedEleId::TRIGGERWP70) {
190  float cut_dEtaIn[2] = {0.004, 0.005};
191  float cut_dPhiIn[2] = {0.03, 0.02};
192  float cut_sigmaIEtaIEta[2] = {0.01, 0.03};
193  float cut_hoe[2] = {0.025, 0.025};
194  float cut_trackIso[2] = {0.10, 0.10};
195  float cut_ecalIso[2] = {0.10, 0.05};
196  float cut_hcalIso[2] = {0.05, 0.05};
197  if (fabs(dEtaIn) > cut_dEtaIn[idx]) return false;
198  if (fabs(dPhiIn) > cut_dPhiIn[idx]) return false;
199  if (sigmaIEtaIEta > cut_sigmaIEtaIEta[idx]) return false;
200  if (hoe > cut_hoe[idx]) return false;
201  if (trackIso / pt > cut_trackIso[idx]) return false;
202  if (ecalIso / pt > cut_ecalIso[idx]) return false;
203  if (hcalIso / pt > cut_hcalIso[idx]) return false;
204  }
205  else {
206  std::cout << "[EgammaCutBasedEleId::PassTriggerCuts] Undefined working point" << std::endl;
207  }
208 
209  return true;
210 }
bool EgammaCutBasedEleId::PassWP ( const WorkingPoint  workingPoint,
const reco::GsfElectronRef ele,
const edm::Handle< reco::ConversionCollection > &  conversions,
const reco::BeamSpot beamspot,
const edm::Handle< reco::VertexCollection > &  vtxs,
const double &  iso_ch,
const double &  iso_em,
const double &  iso_nh,
const double &  rho,
ElectronEffectiveArea::ElectronEffectiveAreaTarget  EAtarget 
)

Definition at line 29 of file EGammaCutBasedEleId.cc.

Referenced by EGammaCutBasedEleIdAnalyzer::analyze().

39 {
40  return PassWP(workingPoint,*ele,conversions,beamspot,vtxs,iso_ch,iso_em,iso_nh,rho, EAtarget);
41 }
bool PassWP(const WorkingPoint workingPoint, const reco::GsfElectronRef &ele, const edm::Handle< reco::ConversionCollection > &conversions, const reco::BeamSpot &beamspot, const edm::Handle< reco::VertexCollection > &vtxs, const double &iso_ch, const double &iso_em, const double &iso_nh, const double &rho, ElectronEffectiveArea::ElectronEffectiveAreaTarget EAtarget)
bool EgammaCutBasedEleId::PassWP ( const WorkingPoint  workingPoint,
const reco::GsfElectron ele,
const edm::Handle< reco::ConversionCollection > &  conversions,
const reco::BeamSpot beamspot,
const edm::Handle< reco::VertexCollection > &  vtxs,
const double &  iso_ch,
const double &  iso_em,
const double &  iso_nh,
const double &  rho,
ElectronEffectiveArea::ElectronEffectiveAreaTarget  EAtarget 
)

Definition at line 9 of file EGammaCutBasedEleId.cc.

References RecoTauDiscriminantConfiguration::mask, PassAll, and TestWP().

19 {
20 
21  // get the mask
22  unsigned int mask = TestWP(workingPoint, ele, conversions, beamspot, vtxs, iso_ch, iso_em, iso_nh, rho, EAtarget);
23 
24  // check if the desired WP passed
25  if ((mask & PassAll) == PassAll) return true;
26  return false;
27 }
unsigned int TestWP(const WorkingPoint workingPoint, const reco::GsfElectronRef &ele, const edm::Handle< reco::ConversionCollection > &conversions, const reco::BeamSpot &beamspot, const edm::Handle< reco::VertexCollection > &vtxs, const double &iso_ch, const double &iso_em, const double &iso_nh, const double &rho, ElectronEffectiveArea::ElectronEffectiveAreaTarget EAtarget)
static const unsigned int PassAll
bool EgammaCutBasedEleId::PassWP ( WorkingPoint  workingPoint,
const bool  isEB,
const float  pt,
const float  eta,
const float  dEtaIn,
const float  dPhiIn,
const float  sigmaIEtaIEta,
const float  hoe,
const float  ooemoop,
const float  d0vtx,
const float  dzvtx,
const float  iso_ch,
const float  iso_em,
const float  iso_nh,
const bool  vtxFitConversion,
const unsigned int  mHits,
const double  rho,
ElectronEffectiveArea::ElectronEffectiveAreaTarget  EAtarget 
)

Definition at line 151 of file EGammaCutBasedEleId.cc.

References RecoTauDiscriminantConfiguration::mask, PassAll, and TestWP().

155 {
156  unsigned int mask = EgammaCutBasedEleId::TestWP(workingPoint, isEB, pt, eta, dEtaIn, dPhiIn,
157  sigmaIEtaIEta, hoe, ooemoop, d0vtx, dzvtx, iso_ch, iso_em, iso_nh, vtxFitConversion, mHits, rho, EAtarget);
158 
159  if ((mask & PassAll) == PassAll) return true;
160  return false;
161 }
unsigned int TestWP(const WorkingPoint workingPoint, const reco::GsfElectronRef &ele, const edm::Handle< reco::ConversionCollection > &conversions, const reco::BeamSpot &beamspot, const edm::Handle< reco::VertexCollection > &vtxs, const double &iso_ch, const double &iso_em, const double &iso_nh, const double &rho, ElectronEffectiveArea::ElectronEffectiveAreaTarget EAtarget)
static const unsigned int PassAll
void EgammaCutBasedEleId::PrintDebug ( unsigned int  mask)

Definition at line 335 of file EGammaCutBasedEleId.cc.

References D0VTX, DETAIN, DPHIIN, DZVTX, HOE, ISO, MHITS, OOEMOOP, SIGMAIETAIETA, and VTXFIT.

336 {
337  printf("detain(%i), ", bool(mask & DETAIN));
338  printf("dphiin(%i), ", bool(mask & DPHIIN));
339  printf("sieie(%i), ", bool(mask & SIGMAIETAIETA));
340  printf("hoe(%i), ", bool(mask & HOE));
341  printf("ooemoop(%i), ", bool(mask & OOEMOOP));
342  printf("d0vtx(%i), ", bool(mask & D0VTX));
343  printf("dzvtx(%i), ", bool(mask & DZVTX));
344  printf("iso(%i), ", bool(mask & ISO));
345  printf("vtxfit(%i), ", bool(mask & VTXFIT));
346  printf("mhits(%i)\n", bool(mask & MHITS));
347 }
unsigned int EgammaCutBasedEleId::TestWP ( const WorkingPoint  workingPoint,
const reco::GsfElectronRef ele,
const edm::Handle< reco::ConversionCollection > &  conversions,
const reco::BeamSpot beamspot,
const edm::Handle< reco::VertexCollection > &  vtxs,
const double &  iso_ch,
const double &  iso_em,
const double &  iso_nh,
const double &  rho,
ElectronEffectiveArea::ElectronEffectiveAreaTarget  EAtarget 
)

Definition at line 135 of file EGammaCutBasedEleId.cc.

Referenced by PassWP(), and TestWP().

144  {
145  return TestWP(workingPoint,*ele,conversions,beamspot,vtxs,iso_ch,iso_em,iso_nh,rho, EAtarget);
146 }
unsigned int TestWP(const WorkingPoint workingPoint, const reco::GsfElectronRef &ele, const edm::Handle< reco::ConversionCollection > &conversions, const reco::BeamSpot &beamspot, const edm::Handle< reco::VertexCollection > &vtxs, const double &iso_ch, const double &iso_em, const double &iso_nh, const double &rho, ElectronEffectiveArea::ElectronEffectiveAreaTarget EAtarget)
unsigned int EgammaCutBasedEleId::TestWP ( const WorkingPoint  workingPoint,
const reco::GsfElectron ele,
const edm::Handle< reco::ConversionCollection > &  conversions,
const reco::BeamSpot beamspot,
const edm::Handle< reco::VertexCollection > &  vtxs,
const double &  iso_ch,
const double &  iso_em,
const double &  iso_nh,
const double &  rho,
ElectronEffectiveArea::ElectronEffectiveAreaTarget  EAtarget 
)

Definition at line 85 of file EGammaCutBasedEleId.cc.

References reco::GsfElectron::deltaEtaSuperClusterTrackAtVtx(), reco::GsfElectron::deltaPhiSuperClusterTrackAtVtx(), reco::GsfElectron::ecalEnergy(), reco::GsfElectron::eSuperClusterOverP(), PVValHelper::eta, reco::GsfElectron::gsfTrack(), reco::GsfElectron::hadronicOverEm(), ConversionTools::hasMatchedConversion(), electrons_cff::hoe, reco::GsfElectron::isEB(), RecoTauDiscriminantConfiguration::mask, reco::HitPattern::MISSING_INNER_HITS, reco::BeamSpot::position(), EnergyCorrector::pt, reco::LeafCandidate::pt(), reco::GsfElectron::sigmaIetaIeta(), reco::GsfElectron::superCluster(), TestWP(), and badGlobalMuonTaggersAOD_cff::vtx.

95 {
96 
97  // get the ID variables from the electron object
98 
99  // kinematic variables
100  bool isEB = ele.isEB() ? true : false;
101  float pt = ele.pt();
102  float eta = ele.superCluster()->eta();
103 
104  // id variables
105  float dEtaIn = ele.deltaEtaSuperClusterTrackAtVtx();
106  float dPhiIn = ele.deltaPhiSuperClusterTrackAtVtx();
107  float sigmaIEtaIEta = ele.sigmaIetaIeta();
108  float hoe = ele.hadronicOverEm();
109  float ooemoop = (1.0/ele.ecalEnergy() - ele.eSuperClusterOverP()/ele.ecalEnergy());
110 
111  // impact parameter variables
112  float d0vtx = 0.0;
113  float dzvtx = 0.0;
114  if (!vtxs->empty()) {
115  reco::VertexRef vtx(vtxs, 0);
116  d0vtx = ele.gsfTrack()->dxy(vtx->position());
117  dzvtx = ele.gsfTrack()->dz(vtx->position());
118  } else {
119  d0vtx = ele.gsfTrack()->dxy();
120  dzvtx = ele.gsfTrack()->dz();
121  }
122 
123  // conversion rejection variables
124  bool vtxFitConversion = ConversionTools::hasMatchedConversion(ele, conversions, beamspot.position());
125  float mHits = ele.gsfTrack()->hitPattern().numberOfLostHits(reco::HitPattern::MISSING_INNER_HITS);
126 
127  // get the mask value
128  unsigned int mask = EgammaCutBasedEleId::TestWP(workingPoint, isEB, pt, eta, dEtaIn, dPhiIn,
129  sigmaIEtaIEta, hoe, ooemoop, d0vtx, dzvtx, iso_ch, iso_em, iso_nh, vtxFitConversion, mHits, rho, EAtarget);
130 
131  // return the mask value
132  return mask;
133 }
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
Definition: GsfElectron.h:185
float eSuperClusterOverP() const
Definition: GsfElectron.h:245
unsigned int TestWP(const WorkingPoint workingPoint, const reco::GsfElectronRef &ele, const edm::Handle< reco::ConversionCollection > &conversions, const reco::BeamSpot &beamspot, const edm::Handle< reco::VertexCollection > &vtxs, const double &iso_ch, const double &iso_em, const double &iso_nh, const double &rho, ElectronEffectiveArea::ElectronEffectiveAreaTarget EAtarget)
double pt() const final
transverse momentum
bool isEB() const
Definition: GsfElectron.h:352
float deltaEtaSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:249
float sigmaIetaIeta() const
Definition: GsfElectron.h:434
float hadronicOverEm() const
Definition: GsfElectron.h:487
float deltaPhiSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:252
static bool hasMatchedConversion(const reco::GsfElectron &ele, const edm::Handle< reco::ConversionCollection > &convCol, const math::XYZPoint &beamspot, bool allowCkfMatch=true, float lxyMin=2.0, float probMin=1e-6, unsigned int nHitsBeforeVtxMax=0)
float ecalEnergy() const
Definition: GsfElectron.h:837
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition: GsfElectron.h:184
const Point & position() const
position
Definition: BeamSpot.h:62
unsigned int EgammaCutBasedEleId::TestWP ( WorkingPoint  workingPoint,
const bool  isEB,
const float  pt,
const float  eta,
const float  dEtaIn,
const float  dPhiIn,
const float  sigmaIEtaIEta,
const float  hoe,
const float  ooemoop,
const float  d0vtx,
const float  dzvtx,
const float  iso_ch,
const float  iso_em,
const float  iso_nh,
const bool  vtxFitConversion,
const unsigned int  mHits,
const double  rho,
ElectronEffectiveArea::ElectronEffectiveAreaTarget  EAtarget 
)

Definition at line 219 of file EGammaCutBasedEleId.cc.

References gather_cfg::cout, D0VTX, DETAIN, DPHIIN, DZVTX, ElectronEffectiveArea::GetElectronEffectiveArea(), HOE, training_settings::idx, ISO, ElectronEffectiveArea::kEleGammaAndNeutralHadronIso03, LOOSE, RecoTauDiscriminantConfiguration::mask, SiStripPI::max, MEDIUM, MHITS, OOEMOOP, SIGMAIETAIETA, TIGHT, funct::true, VETO, and VTXFIT.

223 {
224 
225  unsigned int mask = 0;
226  float cut_dEtaIn[2] = {999.9, 999.9};
227  float cut_dPhiIn[2] = {999.9, 999.9};
228  float cut_sigmaIEtaIEta[2] = {999.9, 999.9};
229  float cut_hoe[2] = {999.9, 999.9};
230  float cut_ooemoop[2] = {999.9, 999.9};
231  float cut_d0vtx[2] = {999.9, 999.9};
232  float cut_dzvtx[2] = {999.9, 999.9};
233  float cut_iso[2] = {999.9, 999.9};
234  bool cut_vtxFit[2] = {false, false};
235  unsigned int cut_mHits[2] = {999, 999};
236 
237  if (workingPoint == EgammaCutBasedEleId::VETO) {
238  cut_dEtaIn[0] = 0.007; cut_dEtaIn[1] = 0.010;
239  cut_dPhiIn[0] = 0.800; cut_dPhiIn[1] = 0.700;
240  cut_sigmaIEtaIEta[0] = 0.010; cut_sigmaIEtaIEta[1] = 0.030;
241  cut_hoe[0] = 0.150; cut_hoe[1] = 999.9;
242  cut_ooemoop[0] = 999.9; cut_ooemoop[1] = 999.9;
243  cut_d0vtx[0] = 0.040; cut_d0vtx[1] = 0.040;
244  cut_dzvtx[0] = 0.200; cut_dzvtx[1] = 0.200;
245  cut_vtxFit[0] = false; cut_vtxFit[1] = false;
246  cut_mHits[0] = 999 ; cut_mHits[1] = 999;
247  cut_iso[0] = 0.150; cut_iso[1] = 0.150;
248  }
249  else if (workingPoint == EgammaCutBasedEleId::LOOSE) {
250  cut_dEtaIn[0] = 0.007; cut_dEtaIn[1] = 0.009;
251  cut_dPhiIn[0] = 0.150; cut_dPhiIn[1] = 0.100;
252  cut_sigmaIEtaIEta[0] = 0.010; cut_sigmaIEtaIEta[1] = 0.030;
253  cut_hoe[0] = 0.120; cut_hoe[1] = 0.100;
254  cut_ooemoop[0] = 0.050; cut_ooemoop[1] = 0.050;
255  cut_d0vtx[0] = 0.020; cut_d0vtx[1] = 0.020;
256  cut_dzvtx[0] = 0.200; cut_dzvtx[1] = 0.200;
257  cut_vtxFit[0] = true ; cut_vtxFit[1] = true;
258  cut_mHits[0] = 1 ; cut_mHits[1] = 1;
259  if (pt >= 20.0) {
260  cut_iso[0] = 0.150; cut_iso[1] = 0.150;
261  }
262  else {
263  cut_iso[0] = 0.150; cut_iso[1] = 0.100;
264  }
265  }
266  else if (workingPoint == EgammaCutBasedEleId::MEDIUM) {
267  cut_dEtaIn[0] = 0.004; cut_dEtaIn[1] = 0.007;
268  cut_dPhiIn[0] = 0.060; cut_dPhiIn[1] = 0.030;
269  cut_sigmaIEtaIEta[0] = 0.010; cut_sigmaIEtaIEta[1] = 0.030;
270  cut_hoe[0] = 0.120; cut_hoe[1] = 0.100;
271  cut_ooemoop[0] = 0.050; cut_ooemoop[1] = 0.050;
272  cut_d0vtx[0] = 0.020; cut_d0vtx[1] = 0.020;
273  cut_dzvtx[0] = 0.100; cut_dzvtx[1] = 0.100;
274  cut_vtxFit[0] = true ; cut_vtxFit[1] = true;
275  cut_mHits[0] = 1 ; cut_mHits[1] = 1;
276  if (pt >= 20.0) {
277  cut_iso[0] = 0.150; cut_iso[1] = 0.150;
278  }
279  else {
280  cut_iso[0] = 0.150; cut_iso[1] = 0.100;
281  }
282  }
283  else if (workingPoint == EgammaCutBasedEleId::TIGHT) {
284  cut_dEtaIn[0] = 0.004; cut_dEtaIn[1] = 0.005;
285  cut_dPhiIn[0] = 0.030; cut_dPhiIn[1] = 0.020;
286  cut_sigmaIEtaIEta[0] = 0.010; cut_sigmaIEtaIEta[1] = 0.030;
287  cut_hoe[0] = 0.120; cut_hoe[1] = 0.100;
288  cut_ooemoop[0] = 0.050; cut_ooemoop[1] = 0.050;
289  cut_d0vtx[0] = 0.020; cut_d0vtx[1] = 0.020;
290  cut_dzvtx[0] = 0.100; cut_dzvtx[1] = 0.100;
291  cut_vtxFit[0] = true ; cut_vtxFit[1] = true;
292  cut_mHits[0] = 0 ; cut_mHits[1] = 0;
293  if (pt >= 20.0) {
294  cut_iso[0] = 0.100; cut_iso[1] = 0.100;
295  }
296  else {
297  cut_iso[0] = 0.100; cut_iso[1] = 0.070;
298  }
299  }
300  else {
301  std::cout << "[EgammaCutBasedEleId::TestWP] Undefined working point" << std::endl;
302  }
303 
304  // choose cut if barrel or endcap
305  unsigned int idx = isEB ? 0 : 1;
306 
307  // effective area for isolation
309  //float AEff = ElectronEffectiveArea::GetElectronEffectiveArea(ElectronEffectiveArea::kEleGammaAndNeutralHadronIso03, eta, ElectronEffectiveArea::kEleEAData2011);
310 
311  // apply to neutrals
312  double rhoPrime = std::max(rho, 0.0);
313  double iso_n = std::max(iso_nh + iso_em - rhoPrime * AEff, 0.0);
314 
315  // compute final isolation
316  double iso = (iso_n + iso_ch) / pt;
317 
318  // test cuts
319  if (fabs(dEtaIn) < cut_dEtaIn[idx]) mask |= DETAIN;
320  if (fabs(dPhiIn) < cut_dPhiIn[idx]) mask |= DPHIIN;
321  if (sigmaIEtaIEta < cut_sigmaIEtaIEta[idx]) mask |= SIGMAIETAIETA;
322  if (hoe < cut_hoe[idx]) mask |= HOE;
323  if (fabs(ooemoop) < cut_ooemoop[idx]) mask |= OOEMOOP;
324  if (fabs(d0vtx) < cut_d0vtx[idx]) mask |= D0VTX;
325  if (fabs(dzvtx) < cut_dzvtx[idx]) mask |= DZVTX;
326  if (!cut_vtxFit[idx] || !vtxFitConversion) mask |= VTXFIT;
327  if (mHits <= cut_mHits[idx]) mask |= MHITS;
328  if (iso < cut_iso[idx]) mask |= ISO;
329 
330  // return the mask
331  return mask;
332 
333 }
static Double_t GetElectronEffectiveArea(ElectronEffectiveAreaType type, Double_t SCEta, ElectronEffectiveAreaTarget EffectiveAreaTarget=kEleEAData2011)

Variable Documentation

const unsigned int EgammaCutBasedEleId::PassAll = DETAIN | DPHIIN | SIGMAIETAIETA | HOE | OOEMOOP | D0VTX | DZVTX | ISO | VTXFIT | MHITS
static

Definition at line 67 of file EGammaCutBasedEleId.h.

Referenced by PassWP().