ATLAS Offline Software
AsgPhotonIsEMSelector.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // Dear emacs, this is -*-c++-*-
6 
15 // Include this class's header
24 #include "TEnv.h"
25 #include "TPhotonIsEMSelector.h"
28 #include "xAODEgamma/Electron.h"
29 #include "xAODEgamma/Photon.h"
30 
31 //=============================================================================
32 // Standard constructor
33 //=============================================================================
34 AsgPhotonIsEMSelector::AsgPhotonIsEMSelector(const std::string& myname)
35  : AsgTool(myname)
36  , m_configFile("")
37  , m_rootTool(nullptr)
38 {
39 
40  m_rootTool = new Root::TPhotonIsEMSelector(myname.c_str());
41 
42  declareProperty("WorkingPoint", m_WorkingPoint = "", "The Working Point");
43  declareProperty("ConfigFile",
44  m_configFile = "",
45  "The config file to use (if not setting cuts one by one)");
46 
47  // Name of the PID
49  "isEMMask",
50  m_rootTool->m_isEMMask =
51  egammaPID::EgPidUndefined, // All pass by default, if not specified
52  "The mask to use");
53 
54  // boolean to force to test converted photon hypothesis
55  declareProperty("ForceConvertedPhotonPID",
56  m_rootTool->m_forceConvertedPhotonPID = false,
57  "boolean to force to test converted photon hypothesis");
58 
59  // boolean to force to test non converted photon hypothesis
60  declareProperty("ForceNonConvertedPhotonPID",
61  m_rootTool->m_forceNonConvertedPhotonPID = false,
62  "boolean to force to test non converted photon hypothesis");
63 
64  // new cuts on f3
65  // Use f3core instead of f3
66  declareProperty("useF3core", m_useF3core = false, "Cut on f3 or f3core?");
67 
68  // for the trigger needs:
69  declareProperty("caloOnly",
70  m_caloOnly = false,
71  "Flag to tell the tool if its a calo only cutbase");
72  declareProperty("trigEtTh", m_trigEtTh = -999., "Trigger threshold");
73 
74  declareProperty("skipAmbiguityCut",m_skipAmbiguityCut = false,
75  "If true, it will skip the ambiguity cut. This is useful for HLT photon emulation");
76 
77  declareProperty("removeTRTConversion", m_removeTRTConversion = true,
78  "boolean to treat barrel standalone TRT conversion as unconverted for Run3 ");
79 }
80 
81 // =================================================================
83 {
84  delete m_rootTool;
85 }
86 
87 // =================================================================
90 {
91  if (!m_WorkingPoint.empty()) {
96  }
97 
99  if (filename.empty()) {
100  ATH_MSG_ERROR("Could not locate " << m_configFile);
101  return StatusCode::FAILURE;
102  }
103  TEnv env;
104  env.ReadFile(filename.c_str(), kEnvLocal);
106  // Override the mask via the config only if it is not set
108  unsigned int mask(
109  env.GetValue("isEMMask", static_cast<int>(egammaPID::EgPidUndefined)));
111  }
114  AsgConfigHelper::HelperFloat("CutBinEta_photonsNonConverted", env);
116  AsgConfigHelper::HelperFloat("CutBinEnergy_photonsNonConverted", env);
118  AsgConfigHelper::HelperFloat("CutBinMu_photonsNonConverted", env);
120  AsgConfigHelper::HelperFloat("e277_photonsNonConverted", env);
122  AsgConfigHelper::HelperFloat("CutHadLeakage_photonsNonConverted", env);
124  AsgConfigHelper::HelperFloat("Reta37_photonsNonConverted", env);
126  AsgConfigHelper::HelperFloat("Rphi33_photonsNonConverted", env);
128  AsgConfigHelper::HelperFloat("weta2_photonsNonConverted", env);
130  AsgConfigHelper::HelperFloat("CutBinEtaStrips_photonsNonConverted", env);
132  AsgConfigHelper::HelperFloat("CutBinEnergyStrips_photonsNonConverted", env);
134  AsgConfigHelper::HelperFloat("CutBinMuStrips_photonsNonConverted", env);
136  AsgConfigHelper::HelperFloat("f1_photonsNonConverted", env);
138  AsgConfigHelper::HelperFloat("deltae_photonsNonConverted", env);
140  AsgConfigHelper::HelperFloat("DEmaxs1_photonsNonConverted", env);
142  AsgConfigHelper::HelperFloat("wtot_photonsNonConverted", env);
144  AsgConfigHelper::HelperFloat("fracm_photonsNonConverted", env);
146  AsgConfigHelper::HelperFloat("w1_photonsNonConverted", env);
148  AsgConfigHelper::HelperFloat("CutF3_photonsNonConverted", env);
150  AsgConfigHelper::HelperFloat("CutBinEta_photonsConverted", env);
152  AsgConfigHelper::HelperFloat("CutBinEnergy_photonsConverted", env);
154  AsgConfigHelper::HelperFloat("CutBinMu_photonsConverted", env);
156  AsgConfigHelper::HelperFloat("e277_photonsConverted", env);
158  AsgConfigHelper::HelperFloat("CutHadLeakage_photonsConverted", env);
160  AsgConfigHelper::HelperFloat("Reta37_photonsConverted", env);
162  AsgConfigHelper::HelperFloat("Rphi33_photonsConverted", env);
164  AsgConfigHelper::HelperFloat("weta2_photonsConverted", env);
166  AsgConfigHelper::HelperFloat("CutBinEtaStrips_photonsConverted", env);
168  AsgConfigHelper::HelperFloat("CutBinEnergyStrips_photonsConverted", env);
170  AsgConfigHelper::HelperFloat("CutBinMuStrips_photonsConverted", env);
172  AsgConfigHelper::HelperFloat("f1_photonsConverted", env);
174  AsgConfigHelper::HelperFloat("deltae_photonsConverted", env);
176  AsgConfigHelper::HelperFloat("DEmaxs1_photonsConverted", env);
178  AsgConfigHelper::HelperFloat("wtot_photonsConverted", env);
180  AsgConfigHelper::HelperFloat("fracm_photonsConverted", env);
182  AsgConfigHelper::HelperFloat("w1_photonsConverted", env);
184  AsgConfigHelper::HelperFloat("CutminEp_photonsConverted", env);
186  AsgConfigHelper::HelperFloat("CutmaxEp_photonsConverted", env);
188  AsgConfigHelper::HelperFloat("CutF3_photonsConverted", env);
189 
190  // Get the message level and set the underlying ROOT tool message level
191  // accordingly
192  m_rootTool->msg().setLevel(this->msg().level());
193 
194  // We need to initialize the underlying ROOT TSelectorTool
195  if (m_rootTool->initialize().isFailure()) {
196  ATH_MSG_ERROR("Could not initialize the TPhotonIsEMSelector!");
197  return StatusCode::FAILURE;
198  }
199 
200  // if we use mu-dependent menu
201  m_isMuDep =
207  if (m_isMuDep)
208  ATH_MSG_INFO("Running a mu-dependent photon ID menu");
209 
210  return StatusCode::SUCCESS;
211 }
212 
213 //=============================================================================
214 // return the accept info object
215 //=============================================================================
216 
217 const asg::AcceptInfo&
219 {
220  return m_rootTool->getAcceptInfo();
221 }
222 
223 //=============================================================================
224 // The main accept method: the actual cuts are applied here
225 //=============================================================================
228 {
229  return AsgPhotonIsEMSelector::accept(Gaudi::Hive::currentContext(), part);
230 }
231 
233 AsgPhotonIsEMSelector::accept(const EventContext& ctx,
234  const xAOD::IParticle* part) const
235 {
236 
237  if (part->type() == xAOD::Type::Photon ||
238  part->type() == xAOD::Type::Electron) {
239  return accept(ctx, static_cast<const xAOD::Egamma*>(part));
240  }
241 
243  "AsgElectronIsEMSelector::could not convert argument to Photon/Electron");
244  return m_rootTool->accept();
245 }
247 AsgPhotonIsEMSelector::accept(const EventContext& ctx,
248  const xAOD::Egamma* eg) const
249 {
250 
251  if (eg) {
252  unsigned int isEM = ~0;
253  StatusCode sc = execute(ctx, eg, isEM);
254  if (sc.isFailure()) {
255  ATH_MSG_ERROR("could not calculate isEM");
256  return m_rootTool->accept();
257  }
258  return m_rootTool->fillAccept(isEM);
259  }
260 
261  ATH_MSG_ERROR("AsgElectronIsEMSelector::accept was given a bad argument");
262  return m_rootTool->accept();
263 }
265 AsgPhotonIsEMSelector::accept(const EventContext& ctx,
266  const xAOD::Photon* ph) const
267 {
268  return accept(ctx, static_cast<const xAOD::Egamma*>(ph));
269 }
271 AsgPhotonIsEMSelector::accept(const EventContext& ctx,
272  const xAOD::Electron* el) const
273 {
274  return accept(ctx, static_cast<const xAOD::Egamma*>(el));
275 }
276 
277 //=============================================================================
279 //=============================================================================
280 std::string
282 {
283  //
284  // For Loose, Medium and Tight ignore if the difference is in bit 23
288  return "Loose";
289  }
293  return "Medium";
294  }
298  return "Tight";
299  }
301  return "LooseEF";
302  }
304  return "MediumEF";
305  }
306  if (m_rootTool->m_isEMMask == 0) {
307  return "No cuts applied";
308  }
309 
310  ATH_MSG_ERROR("Didn't recognize the given operating point with mask: "
311  << m_rootTool->m_isEMMask);
312  return "";
313 }
314 
315 // A simple execute command wrapper
316 // ==============================================================
318 AsgPhotonIsEMSelector::execute(const EventContext& ctx,
319  const xAOD::Egamma* eg,
320  unsigned int& isEM) const
321 {
322  //
323  // Particle identification for photons based on cuts
324  // trigEtTh : threshold in ET as applied by trigger
325  //
326  (void)ctx;
327 
328  // initialisation
329  isEM = 0;
330 
331  // protection against null pointer
332  if (eg == nullptr) {
333  ATH_MSG_ERROR("eg == 0");
334  // if object is bad then use the bit for "bad eta"
335  isEM = (0x1 << egammaPID::ClusterEtaRange_Photon);
336  return StatusCode::SUCCESS;
337  }
338 
339  // protection against bad clusters
340  const xAOD::CaloCluster* cluster = eg->caloCluster();
341  if (cluster == nullptr) {
342  ATH_MSG_ERROR("exiting because cluster is NULL " << cluster);
343  // if object is bad then use the bit for "bad eta"
344  isEM = (0x1 << egammaPID::ClusterEtaRange_Photon);
345  return StatusCode::SUCCESS;
346  }
347 
348  // Fill variables
349  // eta position in second sampling
350  const float eta2 = fabsf(cluster->etaBE(2));
351  // transverse energy in calorimeter (using eta position in second sampling)
352  const double energy = cluster->e();
353  double et = 0.;
354  if (eta2 < 999.) {
355  const double cosheta = cosh(eta2);
356  et = (cosheta != 0.) ? energy / cosheta : 0.;
357  }
358 
359  // variables based on HCAL
360  // transverse energy in 1st scintillator of hadronic calorimeter/ET
361  float Rhad1 = eg->showerShapeValue(xAOD::EgammaParameters::Rhad1);
362  // transverse energy in hadronic calorimeter/ET
363  float Rhad = eg->showerShapeValue(xAOD::EgammaParameters::Rhad);
364 
365  // variables based on S2 of EM CAL
366  // E(7*7) in 2nd sampling
367  float e277 = eg->showerShapeValue(xAOD::EgammaParameters::e277);
368  // E(3*7)/E(7*7) in 2nd sampling
369  float Reta = eg->showerShapeValue(xAOD::EgammaParameters::Reta);
370  // E(3*3)/E(3*7) in 2nd sampling
371  float Rphi = eg->showerShapeValue(xAOD::EgammaParameters::Rphi);
372  // shower width in 2nd sampling
373  float weta2c = eg->showerShapeValue(xAOD::EgammaParameters::weta2);
374 
375  // variables based on S1 of EM CAL
376  // fraction of energy reconstructed in the 1st sampling
377  float f1 = eg->showerShapeValue(xAOD::EgammaParameters::f1);
378  // shower width in 3 strips in 1st sampling
379  float weta1c = eg->showerShapeValue(xAOD::EgammaParameters::weta1);
380  // (E of 1st max in strips-E of 2nd max)/(E of 1st max+E of 2nd max)
381  float Eratio = eg->showerShapeValue(xAOD::EgammaParameters::Eratio);
382  // E(2nd max)-E(min) in strips
383  float DeltaE = eg->showerShapeValue(xAOD::EgammaParameters::DeltaE);
384  // total shower width in 1st sampling
385  float wtot = eg->showerShapeValue(xAOD::EgammaParameters::wtots1);
386  // E(+/-3)-E(+/-1)/E(+/-1)
387  float fracm = eg->showerShapeValue(xAOD::EgammaParameters::fracs1);
388 
389  float f3(0);
390  if (m_useF3core) {
391  f3 = eg->showerShapeValue(xAOD::EgammaParameters::f3core);
392  } else {
393  f3 = eg->showerShapeValue(xAOD::EgammaParameters::f3);
394  }
395 
396  // cut on E/p
397  double ep = 1.0; // default passes
398 
399  if (m_caloOnly) {
400  ATH_MSG_DEBUG("Doing CaloCutsOnly");
401  } else {
403  eg)) // returns false if not photon or no conversion
404  {
405  const xAOD::Photon* ph = static_cast<const xAOD::Photon*>(eg);
406  float p = xAOD::EgammaHelpers::momentumAtVertex(ph).mag();
407  if (p != 0.) {
408  ep = energy / p;
409  } else {
410  ep = 9999999.;
411  }
412  }
413  }
414 
415  // modifiy et when dealing with trigger
416  // to be sure that it will take the correct bin (VD)
417  if (m_trigEtTh > 0)
418  et = m_trigEtTh * 1.01;
419 
420  // pileup
421  float mu = m_isMuDep ? this->getMu(ctx) : -999;
422 
423  //runnumber
424  int runnumber = this->RunNumber(ctx);
425  bool excludeTRT = false;
426 
427  if(runnumber >= 410000 && m_removeTRTConversion) excludeTRT = true; // exclude TRT converted photons only for Run-3
428 
429 
430  // apply calorimeter selection for photons
431  isEM = m_rootTool->calcIsEm(eta2,
432  et,
433  Rhad1,
434  Rhad,
435  e277,
436  Reta,
437  Rphi,
438  weta2c,
439  f1,
440  Eratio,
441  DeltaE,
442  weta1c,
443  wtot,
444  fracm,
445  f3,
446  ep,
448  mu);
449 
450  // Add ambiguity resolution cut for photon (vs electron)
451  // to reproduce release 21.2 ambiguity tool configuration
452  if (!m_skipAmbiguityCut){
453  static const SG::AuxElement::Accessor<uint8_t> acc("ambiguityType");
454  int AmbiguityType = acc(*eg);
455  if (eg->author() == xAOD::EgammaParameters::AuthorAmbiguous &&
457  isEM |= (0x1 << egammaPID::AmbiguityResolution_Photon);
458  }
459  }
460 
461  return StatusCode::SUCCESS;
462 }
463 
464 float AsgPhotonIsEMSelector::getMu(const EventContext& ctx) const {
466  if (!evtI.isValid()) {
467  ATH_MSG_WARNING("Cannot find EventInfo, returning -999.");
468  return -999;
469  }
470  return evtI->actualInteractionsPerCrossing();
471 }
472 
473 int AsgPhotonIsEMSelector::RunNumber(const EventContext& ctx) const {
475  if (!evtI.isValid()) {
476  ATH_MSG_WARNING("Cannot find EventInfo, returning -999.");
477  return -999;
478  }
479  return evtI->runNumber();
480 }
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
TPhotonIsEMSelector.h
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
Root::TPhotonIsEMSelector::m_cutBinMuStrips_photonsNonConverted
std::vector< float > m_cutBinMuStrips_photonsNonConverted
binning in pielup in strips for photons
Definition: TPhotonIsEMSelector.h:256
AsgPhotonIsEMSelector::initialize
virtual StatusCode initialize()
AlgTool initialize method.
Definition: AsgPhotonIsEMSelector.cxx:89
et
Extra patterns decribing particle interation process.
egammaPID::PhotonTight
const unsigned int PhotonTight
Tight photon selection.
Definition: egammaPIDdefs.h:602
egammaPIDdefs.h
xAOD::Electron
Electron_v1 Electron
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Electron.h:17
Root::TPhotonIsEMSelector::m_cutBinEta_photonsNonConverted
std::vector< float > m_cutBinEta_photonsNonConverted
range of eta bins for photon-ID
Definition: TPhotonIsEMSelector.h:235
ParticleGun_SamplingFraction.eta2
eta2
Definition: ParticleGun_SamplingFraction.py:96
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
ParticleTest.eg
eg
Definition: ParticleTest.py:29
xAOD::EgammaParameters::Reta
@ Reta
e237/e277
Definition: EgammaEnums.h:154
EgammaSelectors::PhotonCutPointToMask
const std::map< std::string, unsigned int > PhotonCutPointToMask
Definition: EGSelectorConfigurationMapping.h:121
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
egammaPID::PhotonLoose
const unsigned int PhotonLoose
Loose photon selection.
Definition: egammaPIDdefs.h:586
Root::TPhotonIsEMSelector::m_f1_photonsConverted
std::vector< float > m_f1_photonsConverted
Cut on fraction of energy rec.
Definition: TPhotonIsEMSelector.h:301
Root::TPhotonIsEMSelector::m_e277_photonsNonConverted
std::vector< float > m_e277_photonsNonConverted
Cut in E277 for photons.
Definition: TPhotonIsEMSelector.h:241
CurrentContext.h
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Root::TPhotonIsEMSelector::m_deltae_photonsNonConverted
std::vector< float > m_deltae_photonsNonConverted
Cut on Demax2 for photons.
Definition: TPhotonIsEMSelector.h:262
Root::TPhotonIsEMSelector::m_cutBinMuStrips_photonsConverted
std::vector< float > m_cutBinMuStrips_photonsConverted
binning in pileup in strips for photons
Definition: TPhotonIsEMSelector.h:299
Root::TPhotonIsEMSelector::m_cutBinEnergyStrips_photonsNonConverted
std::vector< float > m_cutBinEnergyStrips_photonsNonConverted
Definition: TPhotonIsEMSelector.h:254
AsgPhotonIsEMSelector::m_rootTool
Root::TPhotonIsEMSelector * m_rootTool
Pointer to the underlying ROOT based tool.
Definition: AsgPhotonIsEMSelector.h:90
Root::TPhotonIsEMSelector::m_cutminEp_photonsConverted
std::vector< float > m_cutminEp_photonsConverted
cut min on E/p for e-ID
Definition: TPhotonIsEMSelector.h:315
Root::TPhotonIsEMSelector::m_wtot_photonsConverted
std::vector< float > m_wtot_photonsConverted
Cut on total width in strips for photons.
Definition: TPhotonIsEMSelector.h:309
EGammaAmbiguityTool.h
AsgPhotonIsEMSelector::m_caloOnly
bool m_caloOnly
Flag for calo only cut-base.
Definition: AsgPhotonIsEMSelector.h:96
AsgEGammaConfigHelper.h
xAOD::Egamma_v1
Definition: Egamma_v1.h:56
Root::TPhotonIsEMSelector::m_cutBinEnergy_photonsConverted
std::vector< float > m_cutBinEnergy_photonsConverted
range of ET bins for photon-ID
Definition: TPhotonIsEMSelector.h:280
Root::TPhotonIsEMSelector::m_Rphi33_photonsNonConverted
std::vector< float > m_Rphi33_photonsNonConverted
ratio E233/E237
Definition: TPhotonIsEMSelector.h:247
xAOD::EgammaParameters::Rphi
@ Rphi
e233/e237
Definition: EgammaEnums.h:156
Root::TPhotonIsEMSelector::m_Reta37_photonsNonConverted
std::vector< float > m_Reta37_photonsNonConverted
ratio E237/E277
Definition: TPhotonIsEMSelector.h:245
Root::TPhotonIsEMSelector::m_fracm_photonsNonConverted
std::vector< float > m_fracm_photonsNonConverted
Cut on fraction of energy outside core for photons.
Definition: TPhotonIsEMSelector.h:268
Root::TPhotonIsEMSelector::initialize
StatusCode initialize()
Initialize this class.
Definition: TPhotonIsEMSelector.cxx:126
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
AsgPhotonIsEMSelector::m_WorkingPoint
std::string m_WorkingPoint
Working Point.
Definition: AsgPhotonIsEMSelector.h:84
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
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
Root::TPhotonIsEMSelector::m_Reta37_photonsConverted
std::vector< float > m_Reta37_photonsConverted
ratio E237/E277
Definition: TPhotonIsEMSelector.h:288
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
Root::TPhotonIsEMSelector::calcIsEm
unsigned int calcIsEm(float eta2, double et, float Rhad1, float Rhad, float e277, float Reta, float Rphi, float weta2c, float f1, float Eratio, float DeltaE, float weta1c, float wtot, float fracm, float f3, double ep, bool isConversion, float mu) const
Definition: TPhotonIsEMSelector.cxx:355
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
Root::TPhotonIsEMSelector::m_cutBinEtaStrips_photonsConverted
std::vector< float > m_cutBinEtaStrips_photonsConverted
binning in eta in strips for photons
Definition: TPhotonIsEMSelector.h:295
egammaPID::EgPidUndefined
const unsigned int EgPidUndefined
Definition: egammaPIDdefs.h:90
Root::TPhotonIsEMSelector
Definition: TPhotonIsEMSelector.h:39
Root::TPhotonIsEMSelector::m_DEmaxs1_photonsNonConverted
std::vector< float > m_DEmaxs1_photonsNonConverted
cut on (Emax1-Emax2)/(Emax1-Emax2) for photons
Definition: TPhotonIsEMSelector.h:264
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
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
EgammaxAODHelpers.h
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
xAOD::EgammaHelpers::isConvertedPhoton
bool isConvertedPhoton(const xAOD::Egamma *eg, bool excludeTRT=false)
is the object a converted photon
Definition: EgammaxAODHelpers.cxx:25
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AsgPhotonIsEMSelector::m_trigEtTh
float m_trigEtTh
Definition: AsgPhotonIsEMSelector.h:97
Root::TPhotonIsEMSelector::m_cutHadLeakage_photonsNonConverted
std::vector< float > m_cutHadLeakage_photonsNonConverted
Cut on hadronic leakage for photons.
Definition: TPhotonIsEMSelector.h:243
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
AsgPhotonIsEMSelector::m_useF3core
bool m_useF3core
use f3core or f3 (default: use f3)
Definition: AsgPhotonIsEMSelector.h:93
Root::TPhotonIsEMSelector::m_cutF3_photonsConverted
std::vector< float > m_cutF3_photonsConverted
cut values for cut on f3 or f3core
Definition: TPhotonIsEMSelector.h:319
CaloCluster.h
AsgPhotonIsEMSelector::accept
virtual asg::AcceptData accept(const xAOD::IParticle *part) const
Accept with generic interface.
Definition: AsgPhotonIsEMSelector.cxx:227
Root::TPhotonIsEMSelector::m_deltae_photonsConverted
std::vector< float > m_deltae_photonsConverted
Cut on Demax2 for photons.
Definition: TPhotonIsEMSelector.h:305
Root::TPhotonIsEMSelector::m_cutBinEtaStrips_photonsNonConverted
std::vector< float > m_cutBinEtaStrips_photonsNonConverted
binning in eta in strips for photons
Definition: TPhotonIsEMSelector.h:252
xAOD::EgammaParameters::AuthorAmbiguous
const uint16_t AuthorAmbiguous
Object Reconstructed by standard cluster-based algorithm.
Definition: EgammaDefs.h:32
Photon.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AsgPhotonIsEMSelector::getOperatingPointName
virtual std::string getOperatingPointName() const
Method to get the operating point.
Definition: AsgPhotonIsEMSelector.cxx:281
egammaPID::PhotonLooseEF
const unsigned int PhotonLooseEF
TrigEgamma Pid Definitions.
Definition: egammaPIDdefs.h:611
AsgPhotonIsEMSelector::getAcceptInfo
virtual const asg::AcceptInfo & getAcceptInfo() const
Method to get the plain AcceptInfo.
Definition: AsgPhotonIsEMSelector.cxx:218
Root::TPhotonIsEMSelector::m_cutBinEnergyStrips_photonsConverted
std::vector< float > m_cutBinEnergyStrips_photonsConverted
Definition: TPhotonIsEMSelector.h:297
xAOD::EgammaHelpers::momentumAtVertex
Amg::Vector3D momentumAtVertex(const xAOD::Photon *, bool debug=false)
return the momentum at the vertex (which can be 0)
Definition: PhotonxAODHelpers.cxx:88
asg::AsgMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AsgMessaging.cxx:49
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
egammaPID::AmbiguityResolution_Photon
@ AmbiguityResolution_Photon
ambiguity resolution for photon (vs electron)
Definition: egammaPIDdefs.h:194
AthenaPoolTestRead.acc
acc
Definition: AthenaPoolTestRead.py:16
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Root::TPhotonIsEMSelector::m_cutBinMu_photonsConverted
std::vector< float > m_cutBinMu_photonsConverted
range of mu bins for photon-ID
Definition: TPhotonIsEMSelector.h:282
Root::TPhotonIsEMSelector::m_wtot_photonsNonConverted
std::vector< float > m_wtot_photonsNonConverted
Cut on total width in strips for photons.
Definition: TPhotonIsEMSelector.h:266
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
xAOD::AmbiguityTool::AmbiguityType
AmbiguityType
Definition: IEGammaAmbiguityTool.h:33
Root::TPhotonIsEMSelector::m_cutBinEta_photonsConverted
std::vector< float > m_cutBinEta_photonsConverted
range of eta bins for photon-ID
Definition: TPhotonIsEMSelector.h:278
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
xAOD::EgammaParameters::Rhad1
@ Rhad1
ethad1/et
Definition: EgammaEnums.h:162
DeMoScan.runnumber
runnumber
Definition: DeMoScan.py:266
egammaPID::ClusterEtaRange_Photon
@ ClusterEtaRange_Photon
cluster eta range
Definition: egammaPIDdefs.h:164
Root::TPhotonIsEMSelector::m_f1_photonsNonConverted
std::vector< float > m_f1_photonsNonConverted
Cut on fraction of energy rec.
Definition: TPhotonIsEMSelector.h:258
Root::TPhotonIsEMSelector::m_isEMMask
unsigned int m_isEMMask
which subset of cuts to apply
Definition: TPhotonIsEMSelector.h:222
Root::TPhotonIsEMSelector::m_weta2_photonsNonConverted
std::vector< float > m_weta2_photonsNonConverted
Cut on width in 2nd sampling for photons.
Definition: TPhotonIsEMSelector.h:249
PathResolver.h
AsgPhotonIsEMSelector::m_configFile
std::string m_configFile
Config File.
Definition: AsgPhotonIsEMSelector.h:87
xAOD::AmbiguityTool::ambiguousNoInnermost
@ ambiguousNoInnermost
Definition: IEGammaAmbiguityTool.h:39
ReadHandle.h
Handle class for reading from StoreGate.
Root::TPhotonIsEMSelector::m_cutBinEnergy_photonsNonConverted
std::vector< float > m_cutBinEnergy_photonsNonConverted
range of ET bins for photon-ID
Definition: TPhotonIsEMSelector.h:237
Root::TPhotonIsEMSelector::m_weta2_photonsConverted
std::vector< float > m_weta2_photonsConverted
Cut on width in 2nd sampling for photons.
Definition: TPhotonIsEMSelector.h:292
xAOD::Electron_v1
Definition: Electron_v1.h:34
Root::TPhotonIsEMSelector::accept
asg::AcceptData accept(float eta2, double et, float Rhad1, float Rhad, float e277, float Reta, float Rphi, float weta2c, float f1, float Eratio, float DeltaE, float weta1c, float wtot, float fracm, float f3, double ep, bool isConversion, float mu)
The main accept method: the actual cuts are applied here.
Definition: TPhotonIsEMSelector.cxx:289
xAOD::Photon
Photon_v1 Photon
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Photon.h:17
AsgPhotonIsEMSelector::RunNumber
int RunNumber(const EventContext &ctx) const
Definition: AsgPhotonIsEMSelector.cxx:473
PathResolverFindCalibFile
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.cxx:431
Root::TPhotonIsEMSelector::m_cutBinMu_photonsNonConverted
std::vector< float > m_cutBinMu_photonsNonConverted
range of mu bins for photon-ID
Definition: TPhotonIsEMSelector.h:239
AsgPhotonIsEMSelector::m_skipAmbiguityCut
bool m_skipAmbiguityCut
Definition: AsgPhotonIsEMSelector.h:100
AsgPhotonIsEMSelector.h
egammaPID::PhotonMedium
const unsigned int PhotonMedium
Medium photon selection.
Definition: egammaPIDdefs.h:594
EGSelectorConfigurationMapping.h
Root::TPhotonIsEMSelector::m_cutmaxEp_photonsConverted
std::vector< float > m_cutmaxEp_photonsConverted
cut max on E/p for e-ID
Definition: TPhotonIsEMSelector.h:317
xAOD::Photon_v1
Definition: Photon_v1.h:37
EgammaSelectors::PhotonCutPointToConfFile
const std::map< std::string, std::string > PhotonCutPointToConfFile
Definition: EGSelectorConfigurationMapping.h:75
egammaPID::PhotonMediumEF
const unsigned int PhotonMediumEF
Medium photon selection for online EF.
Definition: egammaPIDdefs.h:614
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Root::TPhotonIsEMSelector::m_w1_photonsConverted
std::vector< float > m_w1_photonsConverted
Cut on width in 3 strips for photons.
Definition: TPhotonIsEMSelector.h:313
AsgPhotonIsEMSelector::execute
virtual StatusCode execute(const EventContext &ctx, const xAOD::Egamma *eg, unsigned int &isEM) const
The basic isem.
Definition: AsgPhotonIsEMSelector.cxx:318
AsgPhotonIsEMSelector::m_EvtInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_EvtInfoKey
Definition: AsgPhotonIsEMSelector.h:109
Root::TPhotonIsEMSelector::m_w1_photonsNonConverted
std::vector< float > m_w1_photonsNonConverted
Cut on width in 3 strips for photons.
Definition: TPhotonIsEMSelector.h:270
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
Root::TPhotonIsEMSelector::getAcceptInfo
const asg::AcceptInfo & getAcceptInfo() const
accesss to the accept info object
Definition: TPhotonIsEMSelector.h:322
AsgPhotonIsEMSelector::m_isMuDep
bool m_isMuDep
Definition: AsgPhotonIsEMSelector.h:106
CaloCellTimeCorrFiller.filename
filename
Definition: CaloCellTimeCorrFiller.py:24
Root::TPhotonIsEMSelector::m_fracm_photonsConverted
std::vector< float > m_fracm_photonsConverted
Cut on fraction of energy outside core for photons.
Definition: TPhotonIsEMSelector.h:311
AsgConfigHelper::findMask
unsigned int findMask(const std::string &input, const std::map< std::string, unsigned int > &maskmap)
Definition: AsgEGammaConfigHelper.cxx:29
AsgPhotonIsEMSelector::~AsgPhotonIsEMSelector
ASG_TOOL_CLASS3(AsgPhotonIsEMSelector, IAsgPhotonIsEMSelector, IAsgEGammaIsEMSelector, IAsgSelectionTool) public ~AsgPhotonIsEMSelector()
Default constructor.
Definition: AsgPhotonIsEMSelector.cxx:82
xAOD::EgammaParameters::e277
@ e277
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 7x7
Definition: EgammaEnums.h:80
Root::TPhotonIsEMSelector::m_e277_photonsConverted
std::vector< float > m_e277_photonsConverted
Cut in E277 for photons.
Definition: TPhotonIsEMSelector.h:284
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
xAOD::EgammaParameters::Eratio
@ Eratio
(emaxs1-e2tsts1)/(emaxs1+e2tsts1)
Definition: EgammaEnums.h:158
AsgPhotonIsEMSelector::m_removeTRTConversion
bool m_removeTRTConversion
Definition: AsgPhotonIsEMSelector.h:103
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
AsgPhotonEfficiencyCorrectionTool::m_removeTRTConversion
bool m_removeTRTConversion
Definition: AsgPhotonEfficiencyCorrectionTool.h:140
python.DataFormatRates.env
env
Definition: DataFormatRates.py:32
asg::AcceptData
Definition: AcceptData.h:30
Root::TPhotonIsEMSelector::m_cutF3_photonsNonConverted
std::vector< float > m_cutF3_photonsNonConverted
cut values for cut on f3 or f3core
Definition: TPhotonIsEMSelector.h:272
xAOD::EgammaParameters::DeltaE
@ DeltaE
e2tsts1-emins1
Definition: EgammaEnums.h:164
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
Root::TPhotonIsEMSelector::m_Rphi33_photonsConverted
std::vector< float > m_Rphi33_photonsConverted
ratio E233/E237
Definition: TPhotonIsEMSelector.h:290
Root::TPhotonIsEMSelector::fillAccept
asg::AcceptData fillAccept(unsigned int isEM) const
Definition: TPhotonIsEMSelector.cxx:272
xAOD::CaloCluster_v1::e
virtual double e() const
The total energy of the particle.
Definition: CaloCluster_v1.cxx:265
Root::TPhotonIsEMSelector::m_cutHadLeakage_photonsConverted
std::vector< float > m_cutHadLeakage_photonsConverted
Cut on hadronic leakage for photons.
Definition: TPhotonIsEMSelector.h:286
AsgPhotonIsEMSelector::getMu
float getMu(const EventContext &ctx) const
Definition: AsgPhotonIsEMSelector.cxx:464
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
xAOD::EventInfo_v1::actualInteractionsPerCrossing
float actualInteractionsPerCrossing() const
Average interactions per crossing for the current BCID - for in-time pile-up.
Definition: EventInfo_v1.cxx:380
read_hist_ntuple.f1
f1
Definition: read_hist_ntuple.py:4
Root::TPhotonIsEMSelector::m_DEmaxs1_photonsConverted
std::vector< float > m_DEmaxs1_photonsConverted
cut on (Emax1-Emax2)/(Emax1-Emax2) for photons
Definition: TPhotonIsEMSelector.h:307
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