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

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

References PVValHelper::eta.

◆ PassEoverPCuts() [2/3]

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

Definition at line 63 of file EGammaCutBasedEleId.cc.

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

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

73 { 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 196 of file EGammaCutBasedEleId.cc.

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

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

◆ PassTriggerCuts() [2/3]

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

Definition at line 42 of file EGammaCutBasedEleId.cc.

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

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

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

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

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

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

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

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

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

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

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

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

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

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, extraflags_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 139 of file EGammaCutBasedEleId.cc.

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

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

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

References gather_cfg::cout, D0VTX, EgHLTOffHistBins_cfi::dEtaIn, DETAIN, EgHLTOffHistBins_cfi::dPhiIn, DPHIIN, DZVTX, PVValHelper::eta, ElectronEffectiveArea::GetElectronEffectiveArea(), HOE, electrons_cff::hoe, heavyIonCSV_trainingSettings::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:528
reco::GsfElectron::isEB
bool isEB() const
Definition: GsfElectron.h:335
reco::GsfElectron::gsfTrack
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
Definition: GsfElectron.h:163
EgammaCutBasedEleId::TIGHT
Definition: EGammaCutBasedEleId.h:34
EgammaCutBasedEleId::MHITS
Definition: EGammaCutBasedEleId.h:52
reco::GsfElectron::deltaPhiSuperClusterTrackAtVtx
float deltaPhiSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:235
TIGHT
Definition: ElectronIdentifier.h:38
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:475
reco::GsfElectron::fbrem
float fbrem() const
Definition: GsfElectron.h:732
EgammaCutBasedEleId::VETO
Definition: EGammaCutBasedEleId.h:34
edm::Ref< VertexCollection >
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
EgammaCutBasedEleId::DETAIN
Definition: EGammaCutBasedEleId.h:43
EgammaCutBasedEleId::TRIGGERTIGHT
Definition: EGammaCutBasedEleId.h:36
PVValHelper::eta
Definition: PVValidationHelpers.h:70
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:181
beamspot
Definition: BeamSpotWrite2Txt.h:8
EgammaCutBasedEleId::TRIGGERWP70
Definition: EGammaCutBasedEleId.h:36
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:232
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:31
LOOSE
Definition: ElectronIdentifier.h:38
EgammaCutBasedEleId::SIGMAIETAIETA
Definition: EGammaCutBasedEleId.h:45
VETO
Definition: ElectronIdentifier.h:38
EgammaCutBasedEleId::PassTriggerCuts
bool PassTriggerCuts(const TriggerWorkingPoint triggerWorkingPoint, const reco::GsfElectronRef &ele)
Definition: EGammaCutBasedEleId.cc:59
EgammaCutBasedEleId::VTXFIT
Definition: EGammaCutBasedEleId.h:51
EgammaCutBasedEleId::PassEoverPCuts
bool PassEoverPCuts(const reco::GsfElectronRef &ele)
Definition: EGammaCutBasedEleId.cc:73
ISO
Definition: ElectronIdentifier.h:33
EgammaCutBasedEleId::HOE
Definition: EGammaCutBasedEleId.h:46
electrons_cff.hoe
hoe
Definition: electrons_cff.py:398
reco::GsfElectron::sigmaIetaIeta
float sigmaIetaIeta() const
Definition: GsfElectron.h:418
extraflags_cff.vtx
vtx
Definition: extraflags_cff.py:18
reco::HitPattern::MISSING_INNER_HITS
Definition: HitPattern.h:155
reco::GsfElectron::eSuperClusterOverP
float eSuperClusterOverP() const
Definition: GsfElectron.h:228
reco::GsfElectron::superCluster
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition: GsfElectron.h:162
EgammaCutBasedEleId::MEDIUM
Definition: EGammaCutBasedEleId.h:34
MEDIUM
Definition: ElectronIdentifier.h:38
pwdgSkimBPark_cfi.conversions
conversions
Definition: pwdgSkimBPark_cfi.py:10
reco::GsfElectron::dr03HcalTowerSumEt
float dr03HcalTowerSumEt() const
Definition: GsfElectron.h:533
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:139
reco::GsfElectron::dr03EcalRecHitSumEt
float dr03EcalRecHitSumEt() const
Definition: GsfElectron.h:530
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:29
reco::GsfElectron::ecalEnergy
float ecalEnergy() const
Definition: GsfElectron.h:818