CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 

Variables

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

Typedef Documentation

Definition at line 26 of file EGammaCutBasedEleId.h.

Definition at line 27 of file EGammaCutBasedEleId.h.

Enumeration Type Documentation

Enumerator
DETAIN 
DPHIIN 
SIGMAIETAIETA 
HOE 
OOEMOOP 
D0VTX 
DZVTX 
ISO 
VTXFIT 
MHITS 

Definition at line 49 of file EGammaCutBasedEleId.h.

Enumerator
TRIGGERTIGHT 
TRIGGERWP70 

Definition at line 40 of file EGammaCutBasedEleId.h.

Enumerator
VETO 
LOOSE 
MEDIUM 
TIGHT 

Definition at line 33 of file EGammaCutBasedEleId.h.

Function Documentation

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

Definition at line 78 of file EGammaCutBasedEleId.cc.

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

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

Definition at line 65 of file EGammaCutBasedEleId.cc.

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

66 {
67 
68  // get the variables
69  float eta = ele.superCluster()->eta();
70  float eopin = ele.eSuperClusterOverP();
71  float fbrem = ele.fbrem();
72 
73  // test the eop/fbrem cuts
74  return EgammaCutBasedEleId::PassEoverPCuts(eta, eopin, fbrem);
75 
76 }
float eSuperClusterOverP() const
Definition: GsfElectron.h:229
float fbrem() const
Definition: GsfElectron.h:646
T eta() const
virtual SuperClusterRef superCluster() const
reference to a SuperCluster
Definition: GsfElectron.h:168
bool PassEoverPCuts(const reco::GsfElectronRef &ele)
bool EgammaCutBasedEleId::PassEoverPCuts ( const float  eta,
const float  eopin,
const float  fbrem 
)

Definition at line 209 of file EGammaCutBasedEleId.cc.

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

Definition at line 60 of file EGammaCutBasedEleId.cc.

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

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

Definition at line 41 of file EGammaCutBasedEleId.cc.

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

42 {
43 
44  // get the variables
45  bool isEB = ele.isEB() ? true : false;
46  float pt = ele.pt();
47  float dEtaIn = ele.deltaEtaSuperClusterTrackAtVtx();
48  float dPhiIn = ele.deltaPhiSuperClusterTrackAtVtx();
49  float sigmaIEtaIEta = ele.sigmaIetaIeta();
50  float hoe = ele.hadronicOverEm();
51  float trackIso = ele.dr03TkSumPt();
52  float ecalIso = ele.dr03EcalRecHitSumEt();
53  float hcalIso = ele.dr03HcalTowerSumEt();
54 
55  // test the trigger cuts
56  return EgammaCutBasedEleId::PassTriggerCuts(triggerWorkingPoint, isEB, pt, dEtaIn, dPhiIn, sigmaIEtaIEta, hoe, trackIso, ecalIso, hcalIso);
57 
58 }
bool isEB() const
Definition: GsfElectron.h:330
float deltaEtaSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:233
float sigmaIetaIeta() const
Definition: GsfElectron.h:382
float hadronicOverEm() const
Definition: GsfElectron.h:403
bool PassTriggerCuts(const TriggerWorkingPoint triggerWorkingPoint, const reco::GsfElectronRef &ele)
float deltaPhiSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:236
float dr03TkSumPt() const
Definition: GsfElectron.h:436
float dr03EcalRecHitSumEt() const
Definition: GsfElectron.h:437
float dr03HcalTowerSumEt() const
Definition: GsfElectron.h:440
virtual float pt() const GCC11_FINAL
transverse momentum
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 160 of file EGammaCutBasedEleId.cc.

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

164 {
165 
166 
167  // choose cut if barrel or endcap
168  unsigned int idx = isEB ? 0 : 1;
169 
170  if (triggerWorkingPoint == EgammaCutBasedEleId::TRIGGERTIGHT) {
171  float cut_dEtaIn[2] = {0.007, 0.009};
172  float cut_dPhiIn[2] = {0.15, 0.10};
173  float cut_sigmaIEtaIEta[2] = {0.01, 0.03};
174  float cut_hoe[2] = {0.12, 0.10};
175  float cut_trackIso[2] = {0.20, 0.20};
176  float cut_ecalIso[2] = {0.20, 0.20};
177  float cut_hcalIso[2] = {0.20, 0.20};
178  if (fabs(dEtaIn) > cut_dEtaIn[idx]) return false;
179  if (fabs(dPhiIn) > cut_dPhiIn[idx]) return false;
180  if (sigmaIEtaIEta > cut_sigmaIEtaIEta[idx]) return false;
181  if (hoe > cut_hoe[idx]) return false;
182  if (trackIso / pt > cut_trackIso[idx]) return false;
183  if (ecalIso / pt > cut_ecalIso[idx]) return false;
184  if (hcalIso / pt > cut_hcalIso[idx]) return false;
185  }
186  else if (triggerWorkingPoint == EgammaCutBasedEleId::TRIGGERWP70) {
187  float cut_dEtaIn[2] = {0.004, 0.005};
188  float cut_dPhiIn[2] = {0.03, 0.02};
189  float cut_sigmaIEtaIEta[2] = {0.01, 0.03};
190  float cut_hoe[2] = {0.025, 0.025};
191  float cut_trackIso[2] = {0.10, 0.10};
192  float cut_ecalIso[2] = {0.10, 0.05};
193  float cut_hcalIso[2] = {0.05, 0.05};
194  if (fabs(dEtaIn) > cut_dEtaIn[idx]) return false;
195  if (fabs(dPhiIn) > cut_dPhiIn[idx]) return false;
196  if (sigmaIEtaIEta > cut_sigmaIEtaIEta[idx]) return false;
197  if (hoe > cut_hoe[idx]) return false;
198  if (trackIso / pt > cut_trackIso[idx]) return false;
199  if (ecalIso / pt > cut_ecalIso[idx]) return false;
200  if (hcalIso / pt > cut_hcalIso[idx]) return false;
201  }
202  else {
203  std::cout << "[EgammaCutBasedEleId::PassTriggerCuts] Undefined working point" << std::endl;
204  }
205 
206  return true;
207 }
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
tuple cout
Definition: gather_cfg.py:121
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 
)

Definition at line 28 of file EGammaCutBasedEleId.cc.

Referenced by EGammaCutBasedEleIdAnalyzer::analyze().

37 {
38  return PassWP(workingPoint,*ele,conversions,beamspot,vtxs,iso_ch,iso_em,iso_nh,rho);
39 }
Definition: DDAxes.h:10
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)
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 
)

Definition at line 9 of file EGammaCutBasedEleId.cc.

References PassAll, and TestWP().

18 {
19 
20  // get the mask
21  unsigned int mask = TestWP(workingPoint, ele, conversions, beamspot, vtxs, iso_ch, iso_em, iso_nh, rho);
22 
23  // check if the desired WP passed
24  if ((mask & PassAll) == PassAll) return true;
25  return false;
26 }
Definition: DDAxes.h:10
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)
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 
)

Definition at line 148 of file EGammaCutBasedEleId.cc.

References PassAll, and TestWP().

152 {
153  unsigned int mask = EgammaCutBasedEleId::TestWP(workingPoint, isEB, pt, eta, dEtaIn, dPhiIn,
154  sigmaIEtaIEta, hoe, ooemoop, d0vtx, dzvtx, iso_ch, iso_em, iso_nh, vtxFitConversion, mHits, rho);
155 
156  if ((mask & PassAll) == PassAll) return true;
157  return false;
158 }
Definition: DDAxes.h:10
T eta() const
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)
static const unsigned int PassAll
void EgammaCutBasedEleId::PrintDebug ( unsigned int  mask)

Definition at line 331 of file EGammaCutBasedEleId.cc.

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

332 {
333  printf("detain(%i), ", bool(mask & DETAIN));
334  printf("dphiin(%i), ", bool(mask & DPHIIN));
335  printf("sieie(%i), ", bool(mask & SIGMAIETAIETA));
336  printf("hoe(%i), ", bool(mask & HOE));
337  printf("ooemoop(%i), ", bool(mask & OOEMOOP));
338  printf("d0vtx(%i), ", bool(mask & D0VTX));
339  printf("dzvtx(%i), ", bool(mask & DZVTX));
340  printf("iso(%i), ", bool(mask & ISO));
341  printf("vtxfit(%i), ", bool(mask & VTXFIT));
342  printf("mhits(%i)\n", bool(mask & MHITS));
343 }
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 
)

Definition at line 133 of file EGammaCutBasedEleId.cc.

Referenced by PassWP(), and TestWP().

141  {
142  return TestWP(workingPoint,*ele,conversions,beamspot,vtxs,iso_ch,iso_em,iso_nh,rho);
143 }
Definition: DDAxes.h:10
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)
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 
)

Definition at line 83 of file EGammaCutBasedEleId.cc.

References reco::GsfElectron::deltaEtaSuperClusterTrackAtVtx(), reco::GsfElectron::deltaPhiSuperClusterTrackAtVtx(), reco::GsfElectron::ecalEnergy(), reco::GsfElectron::eSuperClusterOverP(), eta(), reco::GsfElectron::gsfTrack(), reco::GsfElectron::hadronicOverEm(), ConversionTools::hasMatchedConversion(), reco::GsfElectron::isEB(), reco::BeamSpot::position(), RecoTauCleanerPlugins::pt, reco::LeafCandidate::pt(), reco::GsfElectron::sigmaIetaIeta(), reco::GsfElectron::superCluster(), and TestWP().

92 {
93 
94  // get the ID variables from the electron object
95 
96  // kinematic variables
97  bool isEB = ele.isEB() ? true : false;
98  float pt = ele.pt();
99  float eta = ele.superCluster()->eta();
100 
101  // id variables
102  float dEtaIn = ele.deltaEtaSuperClusterTrackAtVtx();
103  float dPhiIn = ele.deltaPhiSuperClusterTrackAtVtx();
104  float sigmaIEtaIEta = ele.sigmaIetaIeta();
105  float hoe = ele.hadronicOverEm();
106  float ooemoop = (1.0/ele.ecalEnergy() - ele.eSuperClusterOverP()/ele.ecalEnergy());
107 
108  // impact parameter variables
109  float d0vtx = 0.0;
110  float dzvtx = 0.0;
111  if (vtxs->size() > 0) {
112  reco::VertexRef vtx(vtxs, 0);
113  d0vtx = ele.gsfTrack()->dxy(vtx->position());
114  dzvtx = ele.gsfTrack()->dz(vtx->position());
115  } else {
116  d0vtx = ele.gsfTrack()->dxy();
117  dzvtx = ele.gsfTrack()->dz();
118  }
119 
120  // conversion rejection variables
121  bool vtxFitConversion = ConversionTools::hasMatchedConversion(ele, conversions, beamspot.position());
122  float mHits = ele.gsfTrack()->trackerExpectedHitsInner().numberOfHits();
123 
124  // get the mask value
125  unsigned int mask = EgammaCutBasedEleId::TestWP(workingPoint, isEB, pt, eta, dEtaIn, dPhiIn,
126  sigmaIEtaIEta, hoe, ooemoop, d0vtx, dzvtx, iso_ch, iso_em, iso_nh, vtxFitConversion, mHits, rho);
127 
128  // return the mask value
129  return mask;
130 
131 }
float eSuperClusterOverP() const
Definition: GsfElectron.h:229
Definition: DDAxes.h:10
T eta() const
bool isEB() const
Definition: GsfElectron.h:330
float deltaEtaSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:233
float sigmaIetaIeta() const
Definition: GsfElectron.h:382
float hadronicOverEm() const
Definition: GsfElectron.h:403
virtual SuperClusterRef superCluster() const
reference to a SuperCluster
Definition: GsfElectron.h:168
float deltaPhiSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:236
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)
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:731
const Point & position() const
position
Definition: BeamSpot.h:62
virtual float pt() const GCC11_FINAL
transverse momentum
virtual GsfTrackRef gsfTrack() const
reference to a GsfTrack
Definition: GsfElectron.h:169
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 
)

Definition at line 216 of file EGammaCutBasedEleId.cc.

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

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

Variable Documentation

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

Definition at line 66 of file EGammaCutBasedEleId.h.

Referenced by PassWP().