ATLAS Offline Software
AsgElectronIsEMSelector.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // Dear emacs, this is -*-c++-*-
6 
24 #include "TElectronIsEMSelector.h"
25 #include "TEnv.h"
27 #include "xAODEgamma/Electron.h"
28 #include "xAODEgamma/Photon.h"
30 #include <cstdint>
31 
32 //=============================================================================
33 // Standard constructor
34 //=============================================================================
35 AsgElectronIsEMSelector::AsgElectronIsEMSelector(const std::string& myname)
36  : AsgTool(myname)
37  , m_configFile("")
38  , m_rootTool(nullptr)
39  , m_useF3core(false)
40 {
41 
42  m_rootTool = new Root::TElectronIsEMSelector(myname.c_str());
43 
44  declareProperty("WorkingPoint", m_WorkingPoint = "", "The Working Point");
45  declareProperty("ConfigFile",
46  m_configFile = "",
47  "The config file to use (if not setting cuts one by one)");
48 
49  // Name of the quality to use
51  "isEMMask",
52  m_rootTool->m_isEMMask =
53  egammaPID::EgPidUndefined, // All pass by default, if not specified
54  "The mask to use");
55 
56  declareProperty("useF3core", m_useF3core = false, "Cut on f3 or f3core?");
57 
58  // for the trigger needs:
59  declareProperty("caloOnly",
60  m_caloOnly = false,
61  "Flag to tell the tool if its a calo only cutbase");
62  declareProperty("trigEtTh", m_trigEtTh = -999., "Trigger threshold");
63 }
64 
65 //=============================================================================
66 // Standard destructor
67 //=============================================================================
69 {
70  delete m_rootTool;
71 }
72 
75 {
76  // The standard status code
77  StatusCode sc = StatusCode::SUCCESS;
78 
79  if (!m_WorkingPoint.empty()) {
82  }
83 
84  // find the file and read it in
86  if (filename.empty()) {
87  ATH_MSG_ERROR("Could not locate " << m_configFile);
88  sc = StatusCode::FAILURE;
89  return sc;
90  }
91  TEnv env;
92  env.ReadFile(filename.c_str(), kEnvLocal);
93 
95 
96  // Override the mask via the config only if it is not set
98  int default_mask = static_cast<int>(egammaPID::EgPidUndefined);
99  int mask(env.GetValue("isEMMask", default_mask));
100  m_rootTool->m_isEMMask = static_cast<unsigned int>(mask);
101  }
102  //
103  // From here on the conf ovverides all other properties
104  bool useTRTOutliers(env.GetValue("useTRTOutliers", true));
105  m_rootTool->m_useTRTOutliers = useTRTOutliers;
106  bool useTRTXenonHits(env.GetValue(" useTRTXenonHits", false));
107  m_rootTool->m_useTRTXenonHits = useTRTXenonHits;
108 
114  AsgConfigHelper::HelperFloat("CutHadLeakage", env);
119  AsgConfigHelper::HelperFloat("CutDeltaEmax2", env);
134  AsgConfigHelper::HelperFloat("CutDeltaEtaTight", env);
136  AsgConfigHelper::HelperFloat("CutminDeltaPhi", env);
138  AsgConfigHelper::HelperFloat("CutmaxDeltaPhi", env);
142  AsgConfigHelper::HelperFloat("CutBinEta_TRT", env);
144  AsgConfigHelper::HelperFloat("CutBinET_TRT", env);
148  AsgConfigHelper::HelperFloat("CutTRTRatio90", env);
150  AsgConfigHelper::HelperFloat("CutEProbabilityHT", env);
151 
152  ATH_MSG_INFO("operating point : " << this->getOperatingPointName()
153  << " with mask: "
154  << m_rootTool->m_isEMMask);
155 
156  // Get the message level and set the underlying ROOT tool message level
157  // accordingly
158  m_rootTool->msg().setLevel(this->msg().level());
159 
160  // We need to initialize the underlying ROOT TSelectorTool
161  if (m_rootTool->initialize().isFailure()) {
162  ATH_MSG_ERROR("Could not initialize the TElectronIsEMSelector!");
163  sc = StatusCode::FAILURE;
164  return sc;
165  }
166 
167  return sc;
168 }
169 
170 //=============================================================================
171 // return the accept info object
172 //=============================================================================
173 
174 const asg::AcceptInfo&
176 {
177  return m_rootTool->getAcceptInfo();
178 }
179 
180 //=============================================================================
181 // The main accept method: the actual cuts are applied here
182 //=============================================================================
185 {
186  return accept(Gaudi::Hive::currentContext(), part);
187 }
188 
190 AsgElectronIsEMSelector::accept(const EventContext& ctx,
191  const xAOD::IParticle* part) const
192 {
193 
194  if (part->type() == xAOD::Type::Electron ||
195  part->type() == xAOD::Type::Photon) {
196  return accept(ctx, static_cast<const xAOD::Egamma*>(part));
197  }
198 
200  "AsgElectronIsEMSelector::could not convert argument to Electron/Photon");
201  return m_rootTool->accept();
202 }
203 
205 AsgElectronIsEMSelector::accept(const EventContext& ctx,
206  const xAOD::Egamma* eg) const
207 {
208 
209  if (eg) {
210  unsigned int isEM = ~0;
211  StatusCode sc = execute(ctx, eg, isEM);
212  if (sc.isFailure()) {
213  ATH_MSG_ERROR("could not calculate isEM");
214  return m_rootTool->accept();
215  }
216  return m_rootTool->fillAccept(isEM);
217  }
218 
219  ATH_MSG_ERROR("AsgElectronIsEMSelector::accept was given a bad argument");
220  return m_rootTool->accept();
221 }
222 
224 AsgElectronIsEMSelector::accept(const EventContext& ctx,
225  const xAOD::Electron* el) const
226 {
227  return accept(ctx, static_cast<const xAOD::Egamma*>(el));
228 }
229 
231 AsgElectronIsEMSelector::accept(const EventContext& ctx,
232  const xAOD::Photon* ph) const
233 {
234  return accept(ctx, static_cast<const xAOD::Egamma*>(ph));
235 }
236 
237 //=============================================================================
239 //=============================================================================
240 std::string
242 {
243 
244  if (!m_WorkingPoint.empty()) {
245  return m_WorkingPoint;
246  }
248  return "Loose";
249  }
251  return "Medium";
252  }
254  return "Tight";
255  }
257  return "Loose1";
258  }
260  return "Medium1";
261  }
263  return "Tight1";
264  }
266  return "LooseHLT";
267  }
269  return "MediumHLT";
270  }
272  return "TightHLT";
273  }
274  if (m_rootTool->m_isEMMask == 0) {
275  return "0 No cuts applied";
276  }
277 
278  ATH_MSG_INFO("Didn't recognize the given operating point with mask: "
279  << m_rootTool->m_isEMMask);
280  return "";
281 }
282 
283 // ==============================================================
285 AsgElectronIsEMSelector::execute(const EventContext& ctx,
286  const xAOD::Egamma* eg,
287  unsigned int& isEM) const
288 {
289  //
290  // Particle identification for electrons based on cuts
291  //
292  (void)ctx;
293  // initialisation
294  isEM = 0;
295  // protection against null pointer
296  if (eg == nullptr) {
297  // if object is bad then use the bit for "bad eta"
298  ATH_MSG_ERROR("exiting because el is NULL");
299  isEM = (0x1 << egammaPID::ClusterEtaRange_Electron);
300  return StatusCode::SUCCESS;
301  }
302  // retrieve associated cluster
303  const xAOD::CaloCluster* cluster = eg->caloCluster();
304  if (cluster == nullptr) {
305  // if object is bad then use the bit for "bad eta"
306  ATH_MSG_ERROR("exiting because cluster is NULL");
307  isEM = (0x1 << egammaPID::ClusterEtaRange_Electron);
308  return StatusCode::SUCCESS;
309  }
310  // eta position in second sampling
311  const float eta2 = fabsf(cluster->etaBE(2));
312  // energy in calorimeter
313  const double energy = cluster->e();
314  // transverse energy of the electron (using the track eta)
315  // const double et = el->pt();
316  double et = (cosh(eta2) != 0.) ? energy / cosh(eta2) : 0.;
317  ;
318 
319  // see if we have an electron, with track, for eta
320  const xAOD::Electron* el = nullptr;
321  if (eg->type() == xAOD::Type::Electron) {
322  el = static_cast<const xAOD::Electron*>(eg);
323  }
324  if (el && el->trackParticle() && !m_caloOnly) {
325  et = (cosh(el->trackParticle()->eta()) != 0.)
326  ? energy / cosh(el->trackParticle()->eta())
327  : 0.;
328  }
329 
330  // Call the calocuts using the egamma object
331  isEM = calocuts_electrons(eg, eta2, et, m_trigEtTh, 0);
332 
333  // Call the calo cuts using the el , if available and we want to apply them
334  if (el && el->trackParticle() && !m_caloOnly) {
335  isEM = TrackCut(el, eta2, et, energy, isEM);
336  }
337 
338  return StatusCode::SUCCESS;
339 }
340 
341 // ======================================================================
342 unsigned int
344  float eta2,
345  double et,
346  double trigEtTh,
347  unsigned int iflag) const
348 {
349 
350  //
351  // apply cut-based selection based on calo information
352  // eg : xAOD::Electron object
353  // trigETthr : threshold in ET to apply the cuts at trigger level
354  // iflag: the starting isEM
355  //
356 
357  float Reta(0);
358  float Rphi(0);
359  float Rhad1(0);
360  float Rhad(0);
361  float e277(0);
362  float weta1c(0);
363  float weta2c(0);
364  float f1(0);
365  float emax2(0);
366  float Eratio(0);
367  float DeltaE(0);
368  float wtot(0);
369  float fracm(0);
370  float f3(0);
371 
372  bool allFound = true;
373  // Reta
374  allFound =
375  allFound && eg->showerShapeValue(Reta, xAOD::EgammaParameters::Reta);
376  // Rphi
377  allFound =
378  allFound && eg->showerShapeValue(Rphi, xAOD::EgammaParameters::Rphi);
379  // transverse energy in 1st scintillator of hadronic calorimeter
380  allFound =
381  allFound && eg->showerShapeValue(Rhad1, xAOD::EgammaParameters::Rhad1);
382  // transverse energy in hadronic calorimeter
383  allFound =
384  allFound && eg->showerShapeValue(Rhad, xAOD::EgammaParameters::Rhad);
385  // E(7*7) in 2nd sampling
386  allFound =
387  allFound && eg->showerShapeValue(e277, xAOD::EgammaParameters::e277);
388  // shower width in 3 strips in 1st sampling
389  allFound =
390  allFound && eg->showerShapeValue(weta1c, xAOD::EgammaParameters::weta1);
391  // shower width in 2nd sampling
392  allFound =
393  allFound && eg->showerShapeValue(weta2c, xAOD::EgammaParameters::weta2);
394  // fraction of energy reconstructed in the 1st sampling
395  allFound = allFound && eg->showerShapeValue(f1, xAOD::EgammaParameters::f1);
396  // E of 2nd max between max and min in strips
397  allFound =
398  allFound && eg->showerShapeValue(Eratio, xAOD::EgammaParameters::Eratio);
399  // E of 1st max in strips
400  allFound =
401  allFound && eg->showerShapeValue(DeltaE, xAOD::EgammaParameters::DeltaE);
402  // total shower width in 1st sampling
403  allFound =
404  allFound && eg->showerShapeValue(wtot, xAOD::EgammaParameters::wtots1);
405  // E(+/-3)-E(+/-1)/E(+/-1)
406  allFound =
407  allFound && eg->showerShapeValue(fracm, xAOD::EgammaParameters::fracs1);
408 
409  if (m_useF3core) {
410  allFound =
411  allFound && eg->showerShapeValue(f3, xAOD::EgammaParameters::f3core);
412  } else {
413  allFound = allFound && eg->showerShapeValue(f3, xAOD::EgammaParameters::f3);
414  }
415 
416  if (!allFound) {
417  // if object is bad then use the bit for "bad eta"
418  ATH_MSG_WARNING("Have some variables missing.");
419  iflag = (0x1 << egammaPID::ClusterEtaRange_Electron);
420  return iflag;
421  }
422 
423  // For cut-based triggers above 20 GeV threshold, the online cut values on the
424  // discriminant variables are always taken from the 20 GeV optimisation.
425  // if(et > 20000 ) { if(trigEtTh > 0) et = trigEtTh*1.01; }
426 
428  et,
429  Reta, // replacing e233
430  Rphi, // replacing e237,
431  Rhad1, // replacing ethad1,
432  Rhad, // replacing ethad,
433  e277,
434  weta1c,
435  weta2c,
436  f1,
437  emax2, // emax2
438  Eratio, // emax
439  DeltaE, // emin,
440  wtot,
441  fracm,
442  f3,
443  iflag,
444  trigEtTh);
445 }
446 
447 //================================================================
448 unsigned int
450  float eta2,
451  double et,
452  double energy,
453  unsigned int iflag) const
454 {
455  // apply track cuts for electron identification
456  // - Track quality cuts
457  // - (eta,phi) and E/p matching between ID and ECAL
458  // - use of TRT
459  // eg : egamma object
460  // iflag: the starting isEM to use
461  //
462  // retrieve associated track
463  const xAOD::TrackParticle* t = eg->trackParticle();
464 
465  // protection against bad pointers
466  if (t == nullptr) {
467  ATH_MSG_ERROR("Something is bad with the variables as passed");
468  // if object is bad then use the bit for "bad eta"
469  iflag = (0x1 << egammaPID::ClusterEtaRange_Electron);
470  return iflag;
471  }
472 
473  // Track quality cuts
474  uint8_t nSiHitsPlusDeadSensors =
476  uint8_t nPixHitsPlusDeadSensors =
478  bool passBLayerRequirement =
480 
481  // TRT information
482  uint8_t nTRThigh = 0;
483  uint8_t nTRThighOutliers = 0;
484  uint8_t nTRT = 0;
485  uint8_t nTRTOutliers = 0;
486  uint8_t nTRTXenonHits = 0;
487  float TRT_PID = 0.0;
488 
489  bool allFound = true;
490 
491  allFound =
492  allFound && t->summaryValue(nTRThigh, xAOD::numberOfTRTHighThresholdHits);
493  allFound =
494  allFound &&
495  t->summaryValue(nTRThighOutliers, xAOD::numberOfTRTHighThresholdOutliers);
496  allFound = allFound && t->summaryValue(nTRT, xAOD::numberOfTRTHits);
497  allFound =
498  allFound && t->summaryValue(nTRTOutliers, xAOD::numberOfTRTOutliers);
499  allFound =
500  allFound && t->summaryValue(nTRTXenonHits, xAOD::numberOfTRTXenonHits);
501  allFound = allFound && t->summaryValue(TRT_PID, xAOD::eProbabilityHT);
502 
503  const float trackd0 = fabsf(t->d0());
504 
505  // Delta eta,phi matching
506  float deltaeta;
507  float deltaphi;
508 
509  allFound = allFound && eg->trackCaloMatchValue(
511  allFound = allFound && eg->trackCaloMatchValue(
513 
514  // E/p
515  const double ep = energy * fabs(t->qOverP());
516 
517  if (!allFound) {
518  // if object is bad then use the bit for "bad eta"
519  ATH_MSG_WARNING("Have some variables missing.");
520  iflag = (0x1 << egammaPID::ClusterEtaRange_Electron);
521  return iflag;
522  }
523 
524  return m_rootTool->TrackCut(eta2,
525  et,
527  nPixHitsPlusDeadSensors,
528  nSiHitsPlusDeadSensors,
529  nTRThigh,
530  nTRThighOutliers,
531  nTRT,
532  nTRTOutliers,
533  nTRTXenonHits,
534  TRT_PID,
535  trackd0,
536  deltaeta,
537  deltaphi,
538  ep,
539  iflag);
540 }
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
Root::TElectronIsEMSelector::accept
asg::AcceptData accept(float eta2, double et, float Reta, float Rphi, float Rhad1, float Rhad, float e277, float weta1c, float weta2c, float f1, float emax2, float Eratio, float DeltaE, float wtot, float fracm, float f3, bool passBLayerRequirement, int nPixHitsPlusDeadSensors, int nSiHitsPlusDeadSensors, int nTRThigh, int nTRThighOutliers, int nTRT, int nTRTOutliers, int nTRTXenonHits, float TRT_PID, float trackd0, float deltaeta, float deltaphi, double ep) const
The main accept method: the actual cuts are applied here.
Definition: TElectronIsEMSelector.cxx:373
Root::TElectronIsEMSelector::m_cutmaxDeltaPhi
std::vector< float > m_cutmaxDeltaPhi
cut max on delta phi for e-ID
Definition: TElectronIsEMSelector.h:298
Root::TElectronIsEMSelector::m_cutTRTRatio
std::vector< float > m_cutTRTRatio
cut on Ratio of TR hits to Number of TRT hits for e-ID
Definition: TElectronIsEMSelector.h:311
et
Extra patterns decribing particle interation process.
xAOD::Electron
Electron_v1 Electron
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Electron.h:17
Root::TElectronIsEMSelector::m_cutSi
std::vector< int > m_cutSi
cut min on precision hits for e-ID
Definition: TElectronIsEMSelector.h:286
Root::TElectronIsEMSelector::m_cutBinET_TRT
std::vector< float > m_cutBinET_TRT
Et binning for cuts on TRT for e-ID.
Definition: TElectronIsEMSelector.h:307
ParticleGun_SamplingFraction.eta2
eta2
Definition: ParticleGun_SamplingFraction.py:96
AsgElectronEfficiencyCorrectionTool::m_rootTool
std::unique_ptr< Root::TElectronEfficiencyCorrectionTool > m_rootTool
Pointer to the underlying ROOT based tool.
Definition: AsgElectronEfficiencyCorrectionTool.h:141
ElectronSelectorHelpers::numberOfSiliconHitsAndDeadSensors
std::size_t numberOfSiliconHitsAndDeadSensors(const xAOD::TrackParticle &tp)
return the number of Silicon hits plus dead sensors in the track particle
Definition: ElectronSelectorHelpers.cxx:51
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:575
Root::TElectronIsEMSelector::m_cutPi
std::vector< int > m_cutPi
cut min on pixel hits for e-ID
Definition: TElectronIsEMSelector.h:284
ParticleTest.eg
eg
Definition: ParticleTest.py:29
xAOD::EgammaParameters::Reta
@ Reta
e237/e277
Definition: EgammaEnums.h:154
egammaPID::ElectronMedium1
const unsigned int ElectronMedium1
Medium1 tunes electron selecton.
Definition: egammaPIDdefs.h:483
CurrentContext.h
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
AsgElectronIsEMSelector::initialize
virtual StatusCode initialize() override
Gaudi Service Interface method implementations.
Definition: AsgElectronIsEMSelector.cxx:74
xAOD::numberOfTRTXenonHits
@ numberOfTRTXenonHits
number of TRT hits on track in straws with xenon [unit8_t].
Definition: TrackingPrimitives.h:284
Root::TElectronIsEMSelector::m_cutNumTRT
std::vector< float > m_cutNumTRT
cut on Number of TRT hits for e-ID
Definition: TElectronIsEMSelector.h:309
egammaPID::ClusterEtaRange_Electron
@ ClusterEtaRange_Electron
cluster eta range
Definition: egammaPIDdefs.h:96
Root::TElectronIsEMSelector::m_cutminDeltaPhi
std::vector< float > m_cutminDeltaPhi
cut min on delta phi for e-ID (this should be negative)
Definition: TElectronIsEMSelector.h:296
Root::TElectronIsEMSelector::m_cutWeta1c
std::vector< float > m_cutWeta1c
cut on width in 1st sampling for e-ID
Definition: TElectronIsEMSelector.h:274
xAOD::numberOfTRTHits
@ numberOfTRTHits
number of TRT hits [unit8_t].
Definition: TrackingPrimitives.h:275
AsgElectronIsEMSelector::m_trigEtTh
float m_trigEtTh
Definition: AsgElectronIsEMSelector.h:122
AsgEGammaConfigHelper.h
xAOD::Egamma_v1
Definition: Egamma_v1.h:56
xAOD::EgammaParameters::Rphi
@ Rphi
e233/e237
Definition: EgammaEnums.h:156
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:40
Root::TElectronIsEMSelector::m_cutBinEta_TRT
std::vector< float > m_cutBinEta_TRT
Eta binning for cuts on TRT for e-ID.
Definition: TElectronIsEMSelector.h:305
ElectronSelectorHelpers::passBLayerRequirement
bool passBLayerRequirement(const xAOD::TrackParticle &tp)
return true if effective number of BL hits + outliers is at least one
Definition: ElectronSelectorHelpers.cxx:59
Root::TElectronIsEMSelector::m_cutBinEta
std::vector< float > m_cutBinEta
range of eta bins for e-ID
Definition: TElectronIsEMSelector.h:252
xAOD::EgammaParameters::wtots1
@ wtots1
shower width is determined in a window detaxdphi = 0,0625 ×~0,2, corresponding typically to 20 strips...
Definition: EgammaEnums.h:140
Root::TElectronIsEMSelector::m_cutRphi33
std::vector< float > m_cutRphi33
cut on ratio e233/e277 for e-ID
Definition: TElectronIsEMSelector.h:262
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
xAOD::numberOfTRTHighThresholdHits
@ numberOfTRTHighThresholdHits
number of TRT hits which pass the high threshold (only xenon counted) [unit8_t].
Definition: TrackingPrimitives.h:278
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
egammaPID::EgPidUndefined
const unsigned int EgPidUndefined
Definition: egammaPIDdefs.h:90
xAOD::EgammaParameters::f3
@ f3
fraction of energy reconstructed in 3rd sampling
Definition: EgammaEnums.h:54
xAOD::CaloCluster_v1::etaBE
float etaBE(const unsigned layer) const
Get the eta in one layer of the EM Calo.
Definition: CaloCluster_v1.cxx:644
ElectronSelectorHelpers.h
Root::TElectronIsEMSelector::m_cutReta37
std::vector< float > m_cutReta37
cut on ratio e237/e277 for e-ID
Definition: TElectronIsEMSelector.h:260
AsgElectronIsEMSelector::execute
virtual StatusCode execute(const EventContext &ctx, const xAOD::Egamma *eg, unsigned int &isEM) const override final
Add a legacy execute method - return isEM value.
Definition: AsgElectronIsEMSelector.cxx:285
AsgElectronIsEMSelector::m_WorkingPoint
std::string m_WorkingPoint
Working Point.
Definition: AsgElectronIsEMSelector.h:109
xAOD::numberOfTRTHighThresholdOutliers
@ numberOfTRTHighThresholdOutliers
number of TRT high threshold outliers (only xenon counted) [unit8_t].
Definition: TrackingPrimitives.h:281
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
egammaPID::ElectronTightHLT
const unsigned int ElectronTightHLT
Tight 2014 tunes electron selecton.
Definition: egammaPIDdefs.h:518
AsgElectronIsEMSelector::m_useF3core
bool m_useF3core
use f3core or f3 (default: use f3)
Definition: AsgElectronIsEMSelector.h:118
Root::TElectronIsEMSelector::m_useTRTOutliers
bool m_useTRTOutliers
use of TRT outliers
Definition: TElectronIsEMSelector.h:247
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
egammaPID::ElectronTightPP
const unsigned int ElectronTightPP
Tight++ electron selecton.
Definition: egammaPIDdefs.h:334
Root::TElectronIsEMSelector::m_cutEProbabilityHT
std::vector< float > m_cutEProbabilityHT
cut on on eProbabilityHT new TRT PID tool
Definition: TElectronIsEMSelector.h:315
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
asg::AcceptInfo
Definition: AcceptInfo.h:28
xAOD::EgammaParameters::f1
@ f1
E1/E = fraction of energy reconstructed in the first sampling, where E1 is energy in all strips belon...
Definition: EgammaEnums.h:52
Root::TElectronIsEMSelector::initialize
StatusCode initialize()
Initialize this class.
Definition: TElectronIsEMSelector.cxx:183
Root::TElectronIsEMSelector::m_cutDeltaE
std::vector< float > m_cutDeltaE
cut on Emax2 - Emin in 1st sampling for e-ID
Definition: TElectronIsEMSelector.h:268
CaloCluster.h
AsgElectronIsEMSelector::m_rootTool
Root::TElectronIsEMSelector * m_rootTool
Pointer to the underlying ROOT based tool.
Definition: AsgElectronIsEMSelector.h:115
Photon.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Root::TElectronIsEMSelector::m_cutF3
std::vector< float > m_cutF3
cut values for cut on f3
Definition: TElectronIsEMSelector.h:279
Root::TElectronIsEMSelector::m_cutDEmaxs1
std::vector< float > m_cutDEmaxs1
cut on (Emax1-Emax2)/(Emax1-Emax2) for e-ID
Definition: TElectronIsEMSelector.h:270
Root::TElectronIsEMSelector::m_cutDeltaEta
std::vector< float > m_cutDeltaEta
cut max on delta eta for e-ID
Definition: TElectronIsEMSelector.h:292
asg::AsgMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AsgMessaging.cxx:49
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
AsgElectronIsEMSelector::getAcceptInfo
virtual const asg::AcceptInfo & getAcceptInfo() const override final
Method to get the plain AcceptInfo.
Definition: AsgElectronIsEMSelector.cxx:175
Root::TElectronIsEMSelector::m_cutminEp
std::vector< float > m_cutminEp
cut min on E/p for e-ID
Definition: TElectronIsEMSelector.h:300
TElectronIsEMSelector.h
AsgElectronIsEMSelector::getOperatingPointName
virtual std::string getOperatingPointName() const override final
Method to get the operating point.
Definition: AsgElectronIsEMSelector.cxx:241
EgammaSelectors::ElectronCutPointToConfFile
const std::map< std::string, std::string > ElectronCutPointToConfFile
Definition: EGSelectorConfigurationMapping.h:108
xAOD::EgammaParameters::Rhad1
@ Rhad1
ethad1/et
Definition: EgammaEnums.h:162
AsgConfigHelper::HelperInt
std::vector< int > HelperInt(const std::string &input, TEnv &env)
Definition: AsgEGammaConfigHelper.cxx:115
Root::TElectronIsEMSelector::calocuts_electrons
unsigned int calocuts_electrons(float eta2, double et, float Reta, float Rphi, float Rhad1, float Rhad, float e277, float weta1c, float weta2c, float f1, float emax2, float Eratio, float DeltaE, float wtot, float fracm, float f3, unsigned int iflag, double trigEtTh=0) const
Definition: TElectronIsEMSelector.cxx:564
AsgElectronIsEMSelector::~AsgElectronIsEMSelector
virtual ASG_TOOL_CLASS3(AsgElectronIsEMSelector, IAsgElectronIsEMSelector, IAsgEGammaIsEMSelector, IAsgSelectionTool) public ~AsgElectronIsEMSelector()
Standard constructor.
Definition: AsgElectronIsEMSelector.cxx:68
Root::TElectronIsEMSelector::m_cutDeltaEtaTight
std::vector< float > m_cutDeltaEtaTight
cut max on delta eta for Tight e-ID
Definition: TElectronIsEMSelector.h:294
Root::TElectronIsEMSelector::m_useTRTXenonHits
bool m_useTRTXenonHits
use of TRT Xenon Hits
Definition: TElectronIsEMSelector.h:249
Root::TElectronIsEMSelector::m_cutFracm
std::vector< float > m_cutFracm
cut on Fside in 1st sampling for e-ID
Definition: TElectronIsEMSelector.h:276
PathResolver.h
Root::TElectronIsEMSelector::TrackCut
unsigned int TrackCut(float eta2, double et, bool passBLayerRequirement, int nPixHitsPlusDeadSensors, int nSiHitsPlusDeadSensors, int nTRThigh, int nTRThighOutliers, int nTRT, int nTRTOutliers, int nTRTXenonHits, float TRT_PID, float trackd0, float deltaeta, float deltaphi, double ep, unsigned int iflag) const
Definition: TElectronIsEMSelector.cxx:708
Root::TElectronIsEMSelector::getAcceptInfo
const asg::AcceptInfo & getAcceptInfo() const
Definition: TElectronIsEMSelector.h:317
Root::TElectronIsEMSelector::m_cutA0Tight
std::vector< float > m_cutA0Tight
cut min on transverse impact parameter for Tight e-ID
Definition: TElectronIsEMSelector.h:290
egammaPID::ElectronLooseHLT
const unsigned int ElectronLooseHLT
Loose 2014 tunes electron selection.
Definition: egammaPIDdefs.h:503
egammaPID::ElectronLoosePP
const unsigned int ElectronLoosePP
Loose++ electron selection.
Definition: egammaPIDdefs.h:310
xAOD::EgammaParameters::deltaPhi2
@ deltaPhi2
difference between the cluster phi (second sampling) and the phi of the track extrapolated to the sec...
Definition: EgammaEnums.h:204
Root::TElectronIsEMSelector::m_cutTRTRatio90
std::vector< float > m_cutTRTRatio90
cut on Ratio of TR hits to Number of TRT hits for 10% loss due to TRT
Definition: TElectronIsEMSelector.h:313
Root::TElectronIsEMSelector
Definition: TElectronIsEMSelector.h:33
Root::TElectronIsEMSelector::m_cutHadLeakage
std::vector< float > m_cutHadLeakage
cut on hadronic energy for e-ID
Definition: TElectronIsEMSelector.h:258
xAOD::Electron_v1
Definition: Electron_v1.h:34
AsgElectronIsEMSelector::accept
virtual asg::AcceptData accept(const xAOD::IParticle *part) const override final
Accept with generic interface.
Definition: AsgElectronIsEMSelector.cxx:184
xAOD::Photon
Photon_v1 Photon
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Photon.h:17
PathResolverFindCalibFile
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.cxx:431
Root::TElectronIsEMSelector::m_isEMMask
unsigned int m_isEMMask
which subset of cuts to apply
Definition: TElectronIsEMSelector.h:244
xAOD::numberOfTRTOutliers
@ numberOfTRTOutliers
number of TRT outliers [unit8_t].
Definition: TrackingPrimitives.h:276
TrackParticle.h
AsgElectronIsEMSelector::TrackCut
unsigned int TrackCut(const xAOD::Electron *eg, float eta2, double et, double energy, unsigned int iflag) const
Definition: AsgElectronIsEMSelector.cxx:449
Root::TElectronIsEMSelector::m_cutBinET
std::vector< float > m_cutBinET
range of ET bins for e-ID
Definition: TElectronIsEMSelector.h:254
EGSelectorConfigurationMapping.h
Root::TElectronIsEMSelector::m_cutmaxEp
std::vector< float > m_cutmaxEp
cut max on E/p for e-ID
Definition: TElectronIsEMSelector.h:302
AsgElectronIsEMSelector::m_configFile
std::string m_configFile
Config File.
Definition: AsgElectronIsEMSelector.h:112
AsgElectronIsEMSelector::calocuts_electrons
unsigned int calocuts_electrons(const xAOD::Egamma *eg, float eta2, double et, double trigEtTh, unsigned int iflag) const
Definition: AsgElectronIsEMSelector.cxx:343
xAOD::Photon_v1
Definition: Photon_v1.h:37
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
egammaPID::ElectronLoose1
const unsigned int ElectronLoose1
Electron trigger PID definitions.
Definition: egammaPIDdefs.h:477
Root::TElectronIsEMSelector::m_cutDeltaEmax2
std::vector< float > m_cutDeltaEmax2
cut on Delta Emax2 in 1st sampling for e-ID
Definition: TElectronIsEMSelector.h:266
egammaPID::ElectronMediumPP
const unsigned int ElectronMediumPP
Medium++ electron selecton.
Definition: egammaPIDdefs.h:320
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
AsgElectronIsEMSelector::m_caloOnly
bool m_caloOnly
Flag for calo only cut-base.
Definition: AsgElectronIsEMSelector.h:121
CaloCellTimeCorrFiller.filename
filename
Definition: CaloCellTimeCorrFiller.py:24
xAOD::eProbabilityHT
@ eProbabilityHT
Electron probability from High Threshold (HT) information [float].
Definition: TrackingPrimitives.h:301
xAOD::EgammaParameters::e277
@ e277
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 7x7
Definition: EgammaEnums.h:80
egammaPID::ElectronMediumHLT
const unsigned int ElectronMediumHLT
Medium 2014 tunes electron selecton.
Definition: egammaPIDdefs.h:508
egammaPID::ElectronTight1
const unsigned int ElectronTight1
Tight1 tunes electron selecton.
Definition: egammaPIDdefs.h:491
Root::TElectronIsEMSelector::m_cutWtot
std::vector< float > m_cutWtot
cut on total width in 1st sampling for e-ID
Definition: TElectronIsEMSelector.h:272
Electron.h
xAOD::EgammaParameters::weta1
@ weta1
shower width using +/-3 strips around the one with the maximal energy deposit: w3 strips = sqrt{sum(E...
Definition: EgammaEnums.h:97
Root::TElectronIsEMSelector::m_cutWeta2c
std::vector< float > m_cutWeta2c
cut on shower width in 2nd sampling for e-ID
Definition: TElectronIsEMSelector.h:264
xAOD::EgammaParameters::Eratio
@ Eratio
(emaxs1-e2tsts1)/(emaxs1+e2tsts1)
Definition: EgammaEnums.h:158
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
xAOD::EgammaParameters::deltaEta1
@ deltaEta1
difference between the cluster eta (first sampling) and the eta of the track extrapolated to the firs...
Definition: EgammaEnums.h:184
AsgConfigHelper::HelperFloat
std::vector< float > HelperFloat(const std::string &input, TEnv &env)
Definition: AsgEGammaConfigHelper.cxx:110
xAOD::EgammaParameters::f3core
@ f3core
E3(3x3)/E fraction of the energy reconstructed in the third compartment of the electromagnetic calori...
Definition: EgammaEnums.h:65
xAOD::EgammaParameters::Rhad
@ Rhad
ethad/et
Definition: EgammaEnums.h:160
python.DataFormatRates.env
env
Definition: DataFormatRates.py:32
asg::AcceptData
Definition: AcceptData.h:30
xAOD::EgammaParameters::DeltaE
@ DeltaE
e2tsts1-emins1
Definition: EgammaEnums.h:164
Root::TElectronIsEMSelector::m_cutBL
std::vector< int > m_cutBL
cut min on b-layer hits for e-ID
Definition: TElectronIsEMSelector.h:282
xAOD::CaloCluster_v1::e
virtual double e() const
The total energy of the particle.
Definition: CaloCluster_v1.cxx:265
xAOD::EgammaParameters::fracs1
@ fracs1
shower shape in the shower core : [E(+/-3)-E(+/-1)]/E(+/-1), where E(+/-n) is the energy in ± n strip...
Definition: EgammaEnums.h:111
AsgElectronIsEMSelector.h
read_hist_ntuple.f1
f1
Definition: read_hist_ntuple.py:4
Root::TElectronIsEMSelector::m_cutA0
std::vector< float > m_cutA0
cut min on transverse impact parameter for e-ID
Definition: TElectronIsEMSelector.h:288
xAOD::EgammaParameters::weta2
@ weta2
the lateral width is calculated with a window of 3x5 cells using the energy weighted sum over all cel...
Definition: EgammaEnums.h:103
AsgConfigHelper::findConfigFile
std::string findConfigFile(const std::string &input, const std::map< std::string, std::string > &configmap)
Definition: AsgEGammaConfigHelper.cxx:14
ElectronSelectorHelpers::numberOfPixelHitsAndDeadSensors
std::size_t numberOfPixelHitsAndDeadSensors(const xAOD::TrackParticle &tp)
return the number of Pixel hits plus dead sensors in the track particle
Definition: ElectronSelectorHelpers.cxx:12
Root::TElectronIsEMSelector::m_cutF1
std::vector< float > m_cutF1
cut on fraction of energy deposited in 1st sampling for e-ID
Definition: TElectronIsEMSelector.h:256
Root::TElectronIsEMSelector::fillAccept
asg::AcceptData fillAccept(unsigned int isEM) const
Definition: TElectronIsEMSelector.cxx:360