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 float eta, const float eopin, const float fbrem)
 
bool PassEoverPCuts (const reco::GsfElectron &ele)
 
bool PassEoverPCuts (const reco::GsfElectronRef &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 PassTriggerCuts (const TriggerWorkingPoint triggerWorkingPoint, const reco::GsfElectron &ele)
 
bool PassTriggerCuts (const TriggerWorkingPoint triggerWorkingPoint, const reco::GsfElectronRef &ele)
 
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 (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 (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::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 (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 (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
 

Typedef Documentation

◆ IsoDepositMaps

Definition at line 27 of file EGammaCutBasedEleId.h.

◆ IsoDepositVals

Definition at line 28 of file EGammaCutBasedEleId.h.

Enumeration Type Documentation

◆ CutType

Enumerator
DETAIN 
DPHIIN 
SIGMAIETAIETA 
HOE 
OOEMOOP 
D0VTX 
DZVTX 
ISO 
VTXFIT 
MHITS 

Definition at line 42 of file EGammaCutBasedEleId.h.

42  {
43  DETAIN = (1 << 0),
44  DPHIIN = (1 << 1),
45  SIGMAIETAIETA = (1 << 2),
46  HOE = (1 << 3),
47  OOEMOOP = (1 << 4),
48  D0VTX = (1 << 5),
49  DZVTX = (1 << 6),
50  ISO = (1 << 7),
51  VTXFIT = (1 << 8),
52  MHITS = (1 << 9)
53  };

◆ TriggerWorkingPoint

Enumerator
TRIGGERTIGHT 
TRIGGERWP70 

Definition at line 36 of file EGammaCutBasedEleId.h.

◆ WorkingPoint

Enumerator
VETO 
LOOSE 
MEDIUM 
TIGHT 

Definition at line 34 of file EGammaCutBasedEleId.h.

34 { VETO, LOOSE, MEDIUM, TIGHT };

Function Documentation

◆ PassEoverPCuts() [1/3]

bool EgammaCutBasedEleId::PassEoverPCuts ( const float  eta,
const float  eopin,
const float  fbrem 
)

Definition at line 259 of file EGammaCutBasedEleId.cc.

259  {
260  if (fbrem > 0.15)
261  return true;
262  else if (fabs(eta) < 1.0 && eopin > 0.95)
263  return true;
264  return false;
265 }

References PVValHelper::eta.

◆ PassEoverPCuts() [2/3]

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

Definition at line 62 of file EGammaCutBasedEleId.cc.

62  {
63  // get the variables
64  float eta = ele.superCluster()->eta();
65  float eopin = ele.eSuperClusterOverP();
66  float fbrem = ele.fbrem();
67 
68  // test the eop/fbrem cuts
69  return EgammaCutBasedEleId::PassEoverPCuts(eta, eopin, fbrem);
70 }

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

◆ PassEoverPCuts() [3/3]

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

Definition at line 72 of file EGammaCutBasedEleId.cc.

72 { return PassEoverPCuts(*ele); }

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

◆ PassTriggerCuts() [1/3]

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 195 of file EGammaCutBasedEleId.cc.

204  {
205  // choose cut if barrel or endcap
206  unsigned int idx = isEB ? 0 : 1;
207 
208  if (triggerWorkingPoint == EgammaCutBasedEleId::TRIGGERTIGHT) {
209  float cut_dEtaIn[2] = {0.007, 0.009};
210  float cut_dPhiIn[2] = {0.15, 0.10};
211  float cut_sigmaIEtaIEta[2] = {0.01, 0.03};
212  float cut_hoe[2] = {0.12, 0.10};
213  float cut_trackIso[2] = {0.20, 0.20};
214  float cut_ecalIso[2] = {0.20, 0.20};
215  float cut_hcalIso[2] = {0.20, 0.20};
216  if (fabs(dEtaIn) > cut_dEtaIn[idx])
217  return false;
218  if (fabs(dPhiIn) > cut_dPhiIn[idx])
219  return false;
220  if (sigmaIEtaIEta > cut_sigmaIEtaIEta[idx])
221  return false;
222  if (hoe > cut_hoe[idx])
223  return false;
224  if (trackIso / pt > cut_trackIso[idx])
225  return false;
226  if (ecalIso / pt > cut_ecalIso[idx])
227  return false;
228  if (hcalIso / pt > cut_hcalIso[idx])
229  return false;
230  } else if (triggerWorkingPoint == EgammaCutBasedEleId::TRIGGERWP70) {
231  float cut_dEtaIn[2] = {0.004, 0.005};
232  float cut_dPhiIn[2] = {0.03, 0.02};
233  float cut_sigmaIEtaIEta[2] = {0.01, 0.03};
234  float cut_hoe[2] = {0.025, 0.025};
235  float cut_trackIso[2] = {0.10, 0.10};
236  float cut_ecalIso[2] = {0.10, 0.05};
237  float cut_hcalIso[2] = {0.05, 0.05};
238  if (fabs(dEtaIn) > cut_dEtaIn[idx])
239  return false;
240  if (fabs(dPhiIn) > cut_dPhiIn[idx])
241  return false;
242  if (sigmaIEtaIEta > cut_sigmaIEtaIEta[idx])
243  return false;
244  if (hoe > cut_hoe[idx])
245  return false;
246  if (trackIso / pt > cut_trackIso[idx])
247  return false;
248  if (ecalIso / pt > cut_ecalIso[idx])
249  return false;
250  if (hcalIso / pt > cut_hcalIso[idx])
251  return false;
252  } else {
253  std::cout << "[EgammaCutBasedEleId::PassTriggerCuts] Undefined working point" << std::endl;
254  }
255 
256  return true;
257 }

References gather_cfg::cout, EgHLTOffHistBins_cfi::dEtaIn, EgHLTOffHistBins_cfi::dPhiIn, electrons_cff::hoe, training_settings::idx, DiDispStaMuonMonitor_cfi::pt, TRIGGERTIGHT, and TRIGGERWP70.

◆ PassTriggerCuts() [2/3]

bool EgammaCutBasedEleId::PassTriggerCuts ( const TriggerWorkingPoint  triggerWorkingPoint,
const reco::GsfElectron ele 
)

Definition at line 41 of file EGammaCutBasedEleId.cc.

41  {
42  // get the variables
43  bool isEB = ele.isEB() ? true : false;
44  float pt = ele.pt();
47  float sigmaIEtaIEta = ele.sigmaIetaIeta();
48  float hoe = ele.hadronicOverEm();
49  float trackIso = ele.dr03TkSumPt();
50  float ecalIso = ele.dr03EcalRecHitSumEt();
51  float hcalIso = ele.dr03HcalTowerSumEt();
52 
53  // test the trigger cuts
55  triggerWorkingPoint, isEB, pt, dEtaIn, dPhiIn, sigmaIEtaIEta, hoe, trackIso, ecalIso, hcalIso);
56 }

References reco::GsfElectron::deltaEtaSuperClusterTrackAtVtx(), reco::GsfElectron::deltaPhiSuperClusterTrackAtVtx(), EgHLTOffHistBins_cfi::dEtaIn, EgHLTOffHistBins_cfi::dPhiIn, reco::GsfElectron::dr03EcalRecHitSumEt(), reco::GsfElectron::dr03HcalTowerSumEt(), reco::GsfElectron::dr03TkSumPt(), reco::GsfElectron::hadronicOverEm(), electrons_cff::hoe, reco::GsfElectron::isEB(), PassTriggerCuts(), DiDispStaMuonMonitor_cfi::pt, reco::LeafCandidate::pt(), reco::GsfElectron::sigmaIetaIeta(), and funct::true.

◆ PassTriggerCuts() [3/3]

bool EgammaCutBasedEleId::PassTriggerCuts ( const TriggerWorkingPoint  triggerWorkingPoint,
const reco::GsfElectronRef ele 
)

Definition at line 58 of file EGammaCutBasedEleId.cc.

58  {
59  return EgammaCutBasedEleId::PassTriggerCuts(triggerWorkingPoint, *ele);
60 }

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

◆ PassWP() [1/3]

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.

18  {
19  // get the mask
20  unsigned int mask = TestWP(workingPoint, ele, conversions, beamspot, vtxs, iso_ch, iso_em, iso_nh, rho, EAtarget);
21 
22  // check if the desired WP passed
23  if ((mask & PassAll) == PassAll)
24  return true;
25  return false;
26 }

References pwdgSkimBPark_cfi::conversions, PassAll, ZElectronSkim_cff::rho, TestWP(), and singleTopDQM_cfi::workingPoint.

◆ PassWP() [2/3]

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 28 of file EGammaCutBasedEleId.cc.

37  {
38  return PassWP(workingPoint, *ele, conversions, beamspot, vtxs, iso_ch, iso_em, iso_nh, rho, EAtarget);
39 }

References pwdgSkimBPark_cfi::conversions, ZElectronSkim_cff::rho, and singleTopDQM_cfi::workingPoint.

Referenced by EGammaCutBasedEleIdAnalyzer::analyze().

◆ PassWP() [3/3]

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 153 of file EGammaCutBasedEleId.cc.

170  {
171  unsigned int mask = EgammaCutBasedEleId::TestWP(workingPoint,
172  isEB,
173  pt,
174  eta,
175  dEtaIn,
176  dPhiIn,
177  sigmaIEtaIEta,
178  hoe,
179  ooemoop,
180  d0vtx,
181  dzvtx,
182  iso_ch,
183  iso_em,
184  iso_nh,
185  vtxFitConversion,
186  mHits,
187  rho,
188  EAtarget);
189 
190  if ((mask & PassAll) == PassAll)
191  return true;
192  return false;
193 }

References EgHLTOffHistBins_cfi::dEtaIn, EgHLTOffHistBins_cfi::dPhiIn, PVValHelper::eta, electrons_cff::hoe, PassAll, DiDispStaMuonMonitor_cfi::pt, ZElectronSkim_cff::rho, TestWP(), and singleTopDQM_cfi::workingPoint.

◆ PrintDebug()

void EgammaCutBasedEleId::PrintDebug ( unsigned int  mask)

Definition at line 441 of file EGammaCutBasedEleId.cc.

441  {
442  printf("detain(%i), ", bool(mask & DETAIN));
443  printf("dphiin(%i), ", bool(mask & DPHIIN));
444  printf("sieie(%i), ", bool(mask & SIGMAIETAIETA));
445  printf("hoe(%i), ", bool(mask & HOE));
446  printf("ooemoop(%i), ", bool(mask & OOEMOOP));
447  printf("d0vtx(%i), ", bool(mask & D0VTX));
448  printf("dzvtx(%i), ", bool(mask & DZVTX));
449  printf("iso(%i), ", bool(mask & ISO));
450  printf("vtxfit(%i), ", bool(mask & VTXFIT));
451  printf("mhits(%i)\n", bool(mask & MHITS));
452 }

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

◆ TestWP() [1/3]

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 74 of file EGammaCutBasedEleId.cc.

83  {
84  // get the ID variables from the electron object
85 
86  // kinematic variables
87  bool isEB = ele.isEB() ? true : false;
88  float pt = ele.pt();
89  float eta = ele.superCluster()->eta();
90 
91  // id variables
94  float sigmaIEtaIEta = ele.sigmaIetaIeta();
95  float hoe = ele.hadronicOverEm();
96  float ooemoop = (1.0 / ele.ecalEnergy() - ele.eSuperClusterOverP() / ele.ecalEnergy());
97 
98  // impact parameter variables
99  float d0vtx = 0.0;
100  float dzvtx = 0.0;
101  if (!vtxs->empty()) {
102  reco::VertexRef vtx(vtxs, 0);
103  d0vtx = ele.gsfTrack()->dxy(vtx->position());
104  dzvtx = ele.gsfTrack()->dz(vtx->position());
105  } else {
106  d0vtx = ele.gsfTrack()->dxy();
107  dzvtx = ele.gsfTrack()->dz();
108  }
109 
110  // conversion rejection variables
111  bool vtxFitConversion = ConversionTools::hasMatchedConversion(ele, *conversions, beamspot.position());
112  float mHits = ele.gsfTrack()->hitPattern().numberOfLostHits(reco::HitPattern::MISSING_INNER_HITS);
113 
114  // get the mask value
115  unsigned int mask = EgammaCutBasedEleId::TestWP(workingPoint,
116  isEB,
117  pt,
118  eta,
119  dEtaIn,
120  dPhiIn,
121  sigmaIEtaIEta,
122  hoe,
123  ooemoop,
124  d0vtx,
125  dzvtx,
126  iso_ch,
127  iso_em,
128  iso_nh,
129  vtxFitConversion,
130  mHits,
131  rho,
132  EAtarget);
133 
134  // return the mask value
135  return mask;
136 }

References pwdgSkimBPark_cfi::conversions, reco::GsfElectron::deltaEtaSuperClusterTrackAtVtx(), reco::GsfElectron::deltaPhiSuperClusterTrackAtVtx(), EgHLTOffHistBins_cfi::dEtaIn, EgHLTOffHistBins_cfi::dPhiIn, reco::GsfElectron::ecalEnergy(), reco::GsfElectron::eSuperClusterOverP(), PVValHelper::eta, reco::GsfElectron::gsfTrack(), reco::GsfElectron::hadronicOverEm(), ConversionTools::hasMatchedConversion(), electrons_cff::hoe, reco::GsfElectron::isEB(), reco::HitPattern::MISSING_INNER_HITS, DiDispStaMuonMonitor_cfi::pt, reco::LeafCandidate::pt(), ZElectronSkim_cff::rho, reco::GsfElectron::sigmaIetaIeta(), reco::GsfElectron::superCluster(), TestWP(), funct::true, badGlobalMuonTaggersAOD_cff::vtx, and singleTopDQM_cfi::workingPoint.

◆ TestWP() [2/3]

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 138 of file EGammaCutBasedEleId.cc.

147  {
148  return TestWP(workingPoint, *ele, conversions, beamspot, vtxs, iso_ch, iso_em, iso_nh, rho, EAtarget);
149 }

References pwdgSkimBPark_cfi::conversions, ZElectronSkim_cff::rho, and singleTopDQM_cfi::workingPoint.

Referenced by PassWP(), and TestWP().

◆ TestWP() [3/3]

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 267 of file EGammaCutBasedEleId.cc.

284  {
285  unsigned int mask = 0;
286  float cut_dEtaIn[2] = {999.9, 999.9};
287  float cut_dPhiIn[2] = {999.9, 999.9};
288  float cut_sigmaIEtaIEta[2] = {999.9, 999.9};
289  float cut_hoe[2] = {999.9, 999.9};
290  float cut_ooemoop[2] = {999.9, 999.9};
291  float cut_d0vtx[2] = {999.9, 999.9};
292  float cut_dzvtx[2] = {999.9, 999.9};
293  float cut_iso[2] = {999.9, 999.9};
294  bool cut_vtxFit[2] = {false, false};
295  unsigned int cut_mHits[2] = {999, 999};
296 
298  cut_dEtaIn[0] = 0.007;
299  cut_dEtaIn[1] = 0.010;
300  cut_dPhiIn[0] = 0.800;
301  cut_dPhiIn[1] = 0.700;
302  cut_sigmaIEtaIEta[0] = 0.010;
303  cut_sigmaIEtaIEta[1] = 0.030;
304  cut_hoe[0] = 0.150;
305  cut_hoe[1] = 999.9;
306  cut_ooemoop[0] = 999.9;
307  cut_ooemoop[1] = 999.9;
308  cut_d0vtx[0] = 0.040;
309  cut_d0vtx[1] = 0.040;
310  cut_dzvtx[0] = 0.200;
311  cut_dzvtx[1] = 0.200;
312  cut_vtxFit[0] = false;
313  cut_vtxFit[1] = false;
314  cut_mHits[0] = 999;
315  cut_mHits[1] = 999;
316  cut_iso[0] = 0.150;
317  cut_iso[1] = 0.150;
319  cut_dEtaIn[0] = 0.007;
320  cut_dEtaIn[1] = 0.009;
321  cut_dPhiIn[0] = 0.150;
322  cut_dPhiIn[1] = 0.100;
323  cut_sigmaIEtaIEta[0] = 0.010;
324  cut_sigmaIEtaIEta[1] = 0.030;
325  cut_hoe[0] = 0.120;
326  cut_hoe[1] = 0.100;
327  cut_ooemoop[0] = 0.050;
328  cut_ooemoop[1] = 0.050;
329  cut_d0vtx[0] = 0.020;
330  cut_d0vtx[1] = 0.020;
331  cut_dzvtx[0] = 0.200;
332  cut_dzvtx[1] = 0.200;
333  cut_vtxFit[0] = true;
334  cut_vtxFit[1] = true;
335  cut_mHits[0] = 1;
336  cut_mHits[1] = 1;
337  if (pt >= 20.0) {
338  cut_iso[0] = 0.150;
339  cut_iso[1] = 0.150;
340  } else {
341  cut_iso[0] = 0.150;
342  cut_iso[1] = 0.100;
343  }
345  cut_dEtaIn[0] = 0.004;
346  cut_dEtaIn[1] = 0.007;
347  cut_dPhiIn[0] = 0.060;
348  cut_dPhiIn[1] = 0.030;
349  cut_sigmaIEtaIEta[0] = 0.010;
350  cut_sigmaIEtaIEta[1] = 0.030;
351  cut_hoe[0] = 0.120;
352  cut_hoe[1] = 0.100;
353  cut_ooemoop[0] = 0.050;
354  cut_ooemoop[1] = 0.050;
355  cut_d0vtx[0] = 0.020;
356  cut_d0vtx[1] = 0.020;
357  cut_dzvtx[0] = 0.100;
358  cut_dzvtx[1] = 0.100;
359  cut_vtxFit[0] = true;
360  cut_vtxFit[1] = true;
361  cut_mHits[0] = 1;
362  cut_mHits[1] = 1;
363  if (pt >= 20.0) {
364  cut_iso[0] = 0.150;
365  cut_iso[1] = 0.150;
366  } else {
367  cut_iso[0] = 0.150;
368  cut_iso[1] = 0.100;
369  }
371  cut_dEtaIn[0] = 0.004;
372  cut_dEtaIn[1] = 0.005;
373  cut_dPhiIn[0] = 0.030;
374  cut_dPhiIn[1] = 0.020;
375  cut_sigmaIEtaIEta[0] = 0.010;
376  cut_sigmaIEtaIEta[1] = 0.030;
377  cut_hoe[0] = 0.120;
378  cut_hoe[1] = 0.100;
379  cut_ooemoop[0] = 0.050;
380  cut_ooemoop[1] = 0.050;
381  cut_d0vtx[0] = 0.020;
382  cut_d0vtx[1] = 0.020;
383  cut_dzvtx[0] = 0.100;
384  cut_dzvtx[1] = 0.100;
385  cut_vtxFit[0] = true;
386  cut_vtxFit[1] = true;
387  cut_mHits[0] = 0;
388  cut_mHits[1] = 0;
389  if (pt >= 20.0) {
390  cut_iso[0] = 0.100;
391  cut_iso[1] = 0.100;
392  } else {
393  cut_iso[0] = 0.100;
394  cut_iso[1] = 0.070;
395  }
396  } else {
397  std::cout << "[EgammaCutBasedEleId::TestWP] Undefined working point" << std::endl;
398  }
399 
400  // choose cut if barrel or endcap
401  unsigned int idx = isEB ? 0 : 1;
402 
403  // effective area for isolation
406  //float AEff = ElectronEffectiveArea::GetElectronEffectiveArea(ElectronEffectiveArea::kEleGammaAndNeutralHadronIso03, eta, ElectronEffectiveArea::kEleEAData2011);
407 
408  // apply to neutrals
409  double rhoPrime = std::max(rho, 0.0);
410  double iso_n = std::max(iso_nh + iso_em - rhoPrime * AEff, 0.0);
411 
412  // compute final isolation
413  double iso = (iso_n + iso_ch) / pt;
414 
415  // test cuts
416  if (fabs(dEtaIn) < cut_dEtaIn[idx])
417  mask |= DETAIN;
418  if (fabs(dPhiIn) < cut_dPhiIn[idx])
419  mask |= DPHIIN;
420  if (sigmaIEtaIEta < cut_sigmaIEtaIEta[idx])
421  mask |= SIGMAIETAIETA;
422  if (hoe < cut_hoe[idx])
423  mask |= HOE;
424  if (fabs(ooemoop) < cut_ooemoop[idx])
425  mask |= OOEMOOP;
426  if (fabs(d0vtx) < cut_d0vtx[idx])
427  mask |= D0VTX;
428  if (fabs(dzvtx) < cut_dzvtx[idx])
429  mask |= DZVTX;
430  if (!cut_vtxFit[idx] || !vtxFitConversion)
431  mask |= VTXFIT;
432  if (mHits <= cut_mHits[idx])
433  mask |= MHITS;
434  if (iso < cut_iso[idx])
435  mask |= ISO;
436 
437  // return the mask
438  return mask;
439 }

References gather_cfg::cout, D0VTX, EgHLTOffHistBins_cfi::dEtaIn, DETAIN, EgHLTOffHistBins_cfi::dPhiIn, DPHIIN, DZVTX, PVValHelper::eta, ElectronEffectiveArea::GetElectronEffectiveArea(), HOE, electrons_cff::hoe, training_settings::idx, ISO, ElectronEffectiveArea::kEleGammaAndNeutralHadronIso03, LOOSE, SiStripPI::max, MEDIUM, MHITS, OOEMOOP, DiDispStaMuonMonitor_cfi::pt, ZElectronSkim_cff::rho, SIGMAIETAIETA, TIGHT, VETO, VTXFIT, and singleTopDQM_cfi::workingPoint.

Variable Documentation

◆ PassAll

const unsigned int EgammaCutBasedEleId::PassAll
static
Initial value:

Definition at line 59 of file EGammaCutBasedEleId.h.

Referenced by PassWP().

ElectronEffectiveArea::GetElectronEffectiveArea
static Double_t GetElectronEffectiveArea(ElectronEffectiveAreaType type, Double_t SCEta, ElectronEffectiveAreaTarget EffectiveAreaTarget=kEleEAData2011)
Definition: ElectronEffectiveArea.h:59
EgammaCutBasedEleId::DZVTX
Definition: EGammaCutBasedEleId.h:49
reco::GsfElectron::dr03TkSumPt
float dr03TkSumPt() const
Definition: GsfElectron.h:529
reco::GsfElectron::isEB
bool isEB() const
Definition: GsfElectron.h:336
reco::GsfElectron::gsfTrack
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
Definition: GsfElectron.h:164
EgammaCutBasedEleId::TIGHT
Definition: EGammaCutBasedEleId.h:34
EgammaCutBasedEleId::MHITS
Definition: EGammaCutBasedEleId.h:52
reco::GsfElectron::deltaPhiSuperClusterTrackAtVtx
float deltaPhiSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:236
TIGHT
Definition: ElectronIdentifier.h:37
ElectronEffectiveArea::kEleGammaAndNeutralHadronIso03
Definition: ElectronEffectiveArea.h:40
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
EgHLTOffHistBins_cfi.dEtaIn
dEtaIn
Definition: EgHLTOffHistBins_cfi.py:19
gather_cfg.cout
cout
Definition: gather_cfg.py:144
ZElectronSkim_cff.rho
rho
Definition: ZElectronSkim_cff.py:38
reco::LeafCandidate::pt
double pt() const final
transverse momentum
Definition: LeafCandidate.h:146
reco::GsfElectron::hadronicOverEm
float hadronicOverEm() const
Definition: GsfElectron.h:476
training_settings.idx
idx
Definition: training_settings.py:16
reco::GsfElectron::fbrem
float fbrem() const
Definition: GsfElectron.h:734
EgammaCutBasedEleId::VETO
Definition: EGammaCutBasedEleId.h:34
edm::Ref< VertexCollection >
EgammaCutBasedEleId::DETAIN
Definition: EGammaCutBasedEleId.h:43
EgammaCutBasedEleId::TRIGGERTIGHT
Definition: EGammaCutBasedEleId.h:36
PVValHelper::eta
Definition: PVValidationHelpers.h:69
ConversionTools::hasMatchedConversion
static bool hasMatchedConversion(const reco::GsfElectron &ele, const reco::ConversionCollection &convCol, const math::XYZPoint &beamspot, bool allowCkfMatch=true, float lxyMin=2.0, float probMin=1e-6, unsigned int nHitsBeforeVtxMax=0)
Definition: ConversionTools.cc:184
beamspot
Definition: BeamSpotWrite2Txt.h:8
EgammaCutBasedEleId::TRIGGERWP70
Definition: EGammaCutBasedEleId.h:36
badGlobalMuonTaggersAOD_cff.vtx
vtx
Definition: badGlobalMuonTaggersAOD_cff.py:5
singleTopDQM_cfi.workingPoint
workingPoint
Definition: singleTopDQM_cfi.py:66
funct::true
true
Definition: Factorize.h:173
reco::GsfElectron::deltaEtaSuperClusterTrackAtVtx
float deltaEtaSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:233
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
EgHLTOffHistBins_cfi.dPhiIn
dPhiIn
Definition: EgHLTOffHistBins_cfi.py:18
EgammaCutBasedEleId::D0VTX
Definition: EGammaCutBasedEleId.h:48
EgammaCutBasedEleId::PassAll
static const unsigned int PassAll
Definition: EGammaCutBasedEleId.h:59
DPHIIN
Definition: ElectronIdentifier.h:30
LOOSE
Definition: ElectronIdentifier.h:37
EgammaCutBasedEleId::SIGMAIETAIETA
Definition: EGammaCutBasedEleId.h:45
VETO
Definition: ElectronIdentifier.h:37
EgammaCutBasedEleId::PassTriggerCuts
bool PassTriggerCuts(const TriggerWorkingPoint triggerWorkingPoint, const reco::GsfElectronRef &ele)
Definition: EGammaCutBasedEleId.cc:58
EgammaCutBasedEleId::VTXFIT
Definition: EGammaCutBasedEleId.h:51
EgammaCutBasedEleId::PassEoverPCuts
bool PassEoverPCuts(const reco::GsfElectronRef &ele)
Definition: EGammaCutBasedEleId.cc:72
ISO
Definition: ElectronIdentifier.h:32
EgammaCutBasedEleId::HOE
Definition: EGammaCutBasedEleId.h:46
electrons_cff.hoe
hoe
Definition: electrons_cff.py:404
reco::GsfElectron::sigmaIetaIeta
float sigmaIetaIeta() const
Definition: GsfElectron.h:419
reco::HitPattern::MISSING_INNER_HITS
Definition: HitPattern.h:155
reco::GsfElectron::eSuperClusterOverP
float eSuperClusterOverP() const
Definition: GsfElectron.h:229
reco::GsfElectron::superCluster
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition: GsfElectron.h:163
EgammaCutBasedEleId::MEDIUM
Definition: EGammaCutBasedEleId.h:34
MEDIUM
Definition: ElectronIdentifier.h:37
pwdgSkimBPark_cfi.conversions
conversions
Definition: pwdgSkimBPark_cfi.py:10
reco::GsfElectron::dr03HcalTowerSumEt
float dr03HcalTowerSumEt() const
Definition: GsfElectron.h:534
EgammaCutBasedEleId::LOOSE
Definition: EGammaCutBasedEleId.h:34
EgammaCutBasedEleId::TestWP
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)
Definition: EGammaCutBasedEleId.cc:138
reco::GsfElectron::dr03EcalRecHitSumEt
float dr03EcalRecHitSumEt() const
Definition: GsfElectron.h:531
EgammaCutBasedEleId::OOEMOOP
Definition: EGammaCutBasedEleId.h:47
EgammaCutBasedEleId::PassWP
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)
Definition: EGammaCutBasedEleId.cc:28
reco::GsfElectron::ecalEnergy
float ecalEnergy() const
Definition: GsfElectron.h:820