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
 

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.

◆ 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.

Function Documentation

◆ PassEoverPCuts() [1/3]

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

Definition at line 73 of file EGammaCutBasedEleId.cc.

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

73 { return PassEoverPCuts(*ele); }
bool PassEoverPCuts(const reco::GsfElectronRef &ele)

◆ PassEoverPCuts() [2/3]

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

Definition at line 63 of file EGammaCutBasedEleId.cc.

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

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
71 }
float eSuperClusterOverP() const
Definition: GsfElectron.h:221
bool PassEoverPCuts(const reco::GsfElectronRef &ele)
float fbrem() const
Definition: GsfElectron.h:809
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition: GsfElectron.h:155

◆ PassEoverPCuts() [3/3]

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

Definition at line 260 of file EGammaCutBasedEleId.cc.

References PVValHelper::eta, and electrons_cff::fbrem.

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 }

◆ PassTriggerCuts() [1/3]

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

Definition at line 59 of file EGammaCutBasedEleId.cc.

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

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

◆ PassTriggerCuts() [2/3]

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

Definition at line 42 of file EGammaCutBasedEleId.cc.

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

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 }
double pt() const final
transverse momentum
float sigmaIetaIeta() const
Definition: GsfElectron.h:419
bool isEB() const
Definition: GsfElectron.h:328
float dr03TkSumPt() const
Definition: GsfElectron.h:557
bool PassTriggerCuts(const TriggerWorkingPoint triggerWorkingPoint, const reco::GsfElectronRef &ele)
float deltaPhiSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:228
float deltaEtaSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:225
float dr03EcalRecHitSumEt() const
Definition: GsfElectron.h:559
float dr03HcalTowerSumEt(int depth=0) const
Definition: GsfElectron.h:576
float hadronicOverEm() const
Definition: GsfElectron.h:500

◆ PassTriggerCuts() [3/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.

References gather_cfg::cout, EgHLTOffHistBins_cfi::dEtaIn, EgHLTOffHistBins_cfi::dPhiIn, run3scouting_cff::ecalIso, run3scouting_cff::hcalIso, electrons_cff::hoe, heavyIonCSV_trainingSettings::idx, electrons_cff::isEB, DiDispStaMuonMonitor_cfi::pt, run3scouting_cff::trackIso, TRIGGERTIGHT, and TRIGGERWP70.

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 }

◆ PassWP() [1/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.

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

Referenced by EGammaCutBasedEleIdAnalyzer::analyze().

38  {
39  return PassWP(workingPoint, *ele, conversions, beamspot, vtxs, iso_ch, iso_em, iso_nh, rho, EAtarget);
40 }
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)

◆ PassWP() [2/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.

References pwdgSkimBPark_cfi::conversions, ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::mask, PassAll, IsoPhotonEBSkim_cff::rho, TestWP(), and singleTopDQM_cfi::workingPoint.

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 }
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

◆ 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.

References EgHLTOffHistBins_cfi::dEtaIn, EgHLTOffHistBins_cfi::dPhiIn, PVValHelper::eta, electrons_cff::hoe, electrons_cff::isEB, ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::mask, PassAll, DiDispStaMuonMonitor_cfi::pt, IsoPhotonEBSkim_cff::rho, TestWP(), and singleTopDQM_cfi::workingPoint.

171  {
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 }
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

◆ PrintDebug()

void EgammaCutBasedEleId::PrintDebug ( unsigned int  mask)

Definition at line 442 of file EGammaCutBasedEleId.cc.

References D0VTX, DETAIN, DPHIIN, DZVTX, HOE, ISO, ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::mask, MHITS, OOEMOOP, SIGMAIETAIETA, and VTXFIT.

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 }

◆ TestWP() [1/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.

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

Referenced by PassWP(), and TestWP().

148  {
149  return TestWP(workingPoint, *ele, conversions, beamspot, vtxs, iso_ch, iso_em, iso_nh, rho, EAtarget);
150 }
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)

◆ TestWP() [2/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.

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, electrons_cff::isEB, reco::GsfElectron::isEB(), ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::mask, reco::HitPattern::MISSING_INNER_HITS, DiDispStaMuonMonitor_cfi::pt, reco::LeafCandidate::pt(), IsoPhotonEBSkim_cff::rho, reco::GsfElectron::sigmaIetaIeta(), reco::GsfElectron::superCluster(), TestWP(), funct::true, L1BJetProducer_cff::vtx, and singleTopDQM_cfi::workingPoint.

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
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 }
double pt() const final
transverse momentum
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)
float sigmaIetaIeta() const
Definition: GsfElectron.h:419
float eSuperClusterOverP() const
Definition: GsfElectron.h:221
bool isEB() const
Definition: GsfElectron.h:328
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
Definition: GsfElectron.h:156
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)
float deltaPhiSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:228
float deltaEtaSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:225
float ecalEnergy() const
Definition: GsfElectron.h:896
float hadronicOverEm() const
Definition: GsfElectron.h:500
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition: GsfElectron.h:155

◆ 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.

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, electrons_cff::isEB, ISO, genparticles_cff::iso, ElectronEffectiveArea::kEleGammaAndNeutralHadronIso03, LOOSE, ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::mask, SiStripPI::max, MEDIUM, MHITS, OOEMOOP, DiDispStaMuonMonitor_cfi::pt, IsoPhotonEBSkim_cff::rho, SIGMAIETAIETA, TIGHT, VETO, VTXFIT, and singleTopDQM_cfi::workingPoint.

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 }
static Double_t GetElectronEffectiveArea(ElectronEffectiveAreaType type, Double_t SCEta, ElectronEffectiveAreaTarget EffectiveAreaTarget=kEleEAData2011)

Variable Documentation

◆ PassAll

const unsigned int EgammaCutBasedEleId::PassAll
static