ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
AsgElectronIsEMSelector Class Reference

Tool to select objects. More...

#include <AsgElectronIsEMSelector.h>

Inheritance diagram for AsgElectronIsEMSelector:
Collaboration diagram for AsgElectronIsEMSelector:

Public Member Functions

virtual void print () const
 Print the state of the tool. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

virtual ASG_TOOL_CLASS3(AsgElectronIsEMSelector, IAsgElectronIsEMSelector, IAsgEGammaIsEMSelector, IAsgSelectionTool) public ~AsgElectronIsEMSelector ()
 Standard constructor. More...
 
virtual StatusCode initialize () override
 Gaudi Service Interface method implementations. More...
 
virtual asg::AcceptData accept (const EventContext &ctx, const xAOD::Egamma *part) const override final
 Accept with Egamma objects. More...
 
virtual std::string getOperatingPointName () const override final
 Method to get the operating point. More...
 
unsigned int calocuts_electrons (const xAOD::Egamma *eg, float eta2, double et, double trigEtTh, unsigned int iflag) const
 
unsigned int TrackCut (const xAOD::Electron *eg, float eta2, double et, double energy, unsigned int iflag) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 
Methods from the IAsgSelectionTool interface
virtual const asg::AcceptInfogetAcceptInfo () const override final
 Method to get the plain AcceptInfo. More...
 
virtual asg::AcceptData accept (const xAOD::IParticle *part) const override final
 Accept with generic interface. More...
 
virtual asg::AcceptData accept (const EventContext &ctx, const xAOD::IParticle *part) const override final
 
Methods from the IAsgElectronIsEMSelectorinterface
virtual asg::AcceptData accept (const EventContext &ctx, const xAOD::Photon *part) const override final
 Accept with Photon objects. More...
 
virtual asg::AcceptData accept (const EventContext &ctx, const xAOD::Electron *part) const override final
 Accept with Electron objects. More...
 
virtual StatusCode execute (const EventContext &ctx, const xAOD::Egamma *eg, unsigned int &isEM) const override final
 Add a legacy execute method - return isEM value. More...
 

Private Attributes

std::string m_WorkingPoint
 Working Point. More...
 
std::string m_configFile
 Config File. More...
 
Root::TElectronIsEMSelectorm_rootTool
 Pointer to the underlying ROOT based tool. More...
 
bool m_useF3core
 use f3core or f3 (default: use f3) More...
 
bool m_caloOnly
 Flag for calo only cut-base. More...
 
float m_trigEtTh
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Tool to select objects.

Electron isEM selector.

Tool to select photons.

Author
Jovan Mitrevski (UCSC) Karsten Koeneke (CERN)
Date
Dec 2011 - Fab 2012

Based on egammaElectronCutIDTool, by F. Derue.

11-MAR-2014, convert to ASGTool (Jovan Mitrevski)

Author
Jovan Mitrevski (UCSC) Karsten Koeneke (CERN)
Date
Dec 2011 - Fab 2012

Based on egammaPhotonCutIDTool, by F. Derue.

11-MAR-2014, convert to ASGTool

Author
Jovan Mitrevski (UCSC) Karsten Koeneke (CERN)
Date
Dec 2011 - Fab 2012

11-MAR-2014 convert to ASG tool (Jovan Mitrevski)

Definition at line 36 of file AsgElectronIsEMSelector.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ ~AsgElectronIsEMSelector()

AsgElectronIsEMSelector::~AsgElectronIsEMSelector ( )
privatevirtual

Standard constructor.

Standard destructor

Definition at line 68 of file AsgElectronIsEMSelector.cxx.

69 {
70  delete m_rootTool;
71 }

Member Function Documentation

◆ accept() [1/5]

asg::AcceptData AsgElectronIsEMSelector::accept ( const EventContext &  ctx,
const xAOD::Egamma part 
) const
finaloverrideprivatevirtual

Accept with Egamma objects.

Implements IAsgEGammaIsEMSelector.

Definition at line 205 of file AsgElectronIsEMSelector.cxx.

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 }

◆ accept() [2/5]

asg::AcceptData AsgElectronIsEMSelector::accept ( const EventContext &  ctx,
const xAOD::Electron part 
) const
finaloverrideprivatevirtual

Accept with Electron objects.

Implements IAsgEGammaIsEMSelector.

Definition at line 224 of file AsgElectronIsEMSelector.cxx.

226 {
227  return accept(ctx, static_cast<const xAOD::Egamma*>(el));
228 }

◆ accept() [3/5]

asg::AcceptData AsgElectronIsEMSelector::accept ( const EventContext &  ctx,
const xAOD::IParticle part 
) const
finaloverrideprivatevirtual

Implements IAsgEGammaIsEMSelector.

Definition at line 190 of file AsgElectronIsEMSelector.cxx.

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 }

◆ accept() [4/5]

asg::AcceptData AsgElectronIsEMSelector::accept ( const EventContext &  ctx,
const xAOD::Photon part 
) const
finaloverrideprivatevirtual

Accept with Photon objects.

Implements IAsgEGammaIsEMSelector.

Definition at line 231 of file AsgElectronIsEMSelector.cxx.

233 {
234  return accept(ctx, static_cast<const xAOD::Egamma*>(ph));
235 }

◆ accept() [5/5]

asg::AcceptData AsgElectronIsEMSelector::accept ( const xAOD::IParticle part) const
finaloverrideprivatevirtual

Accept with generic interface.

Implements IAsgEGammaIsEMSelector.

Definition at line 184 of file AsgElectronIsEMSelector.cxx.

185 {
186  return accept(Gaudi::Hive::currentContext(), part);
187 }

◆ calocuts_electrons()

unsigned int AsgElectronIsEMSelector::calocuts_electrons ( const xAOD::Egamma eg,
float  eta2,
double  et,
double  trigEtTh,
unsigned int  iflag 
) const
private

Definition at line 343 of file AsgElectronIsEMSelector.cxx.

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 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode AsgElectronIsEMSelector::execute ( const EventContext &  ctx,
const xAOD::Egamma eg,
unsigned int &  isEM 
) const
finaloverrideprivatevirtual

Add a legacy execute method - return isEM value.

Implements IAsgEGammaIsEMSelector.

Definition at line 285 of file AsgElectronIsEMSelector.cxx.

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 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ getAcceptInfo()

const asg::AcceptInfo & AsgElectronIsEMSelector::getAcceptInfo ( ) const
finaloverrideprivatevirtual

Method to get the plain AcceptInfo.

This is needed so that one can already get the AcceptInfo and query what cuts are defined before the first object is passed to the tool.

Implements IAsgSelectionTool.

Definition at line 175 of file AsgElectronIsEMSelector.cxx.

176 {
177  return m_rootTool->getAcceptInfo();
178 }

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void *  ptr) const
inherited

Get the (hashed) key of an object that is in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getName
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The hashed key of the object in the store. If not found, an invalid (zero) key.

Definition at line 119 of file AsgTool.cxx.

119  {
120 
121 #ifdef XAOD_STANDALONE
122  // In case we use @c xAOD::TEvent, we have a direct function call
123  // for this.
124  return evtStore()->event()->getKey( ptr );
125 #else
126  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127  return ( proxy == nullptr ? 0 : proxy->sgkey() );
128 #endif // XAOD_STANDALONE
129  }

◆ getName()

const std::string & asg::AsgTool::getName ( const void *  ptr) const
inherited

Get the name of an object that is / should be in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getKey
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The string name of the object in the store. If not found, an empty string.

Definition at line 106 of file AsgTool.cxx.

106  {
107 
108 #ifdef XAOD_STANDALONE
109  // In case we use @c xAOD::TEvent, we have a direct function call
110  // for this.
111  return evtStore()->event()->getName( ptr );
112 #else
113  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114  static const std::string dummy = "";
115  return ( proxy == nullptr ? dummy : proxy->name() );
116 #endif // XAOD_STANDALONE
117  }

◆ getOperatingPointName()

std::string AsgElectronIsEMSelector::getOperatingPointName ( ) const
finaloverrideprivatevirtual

Method to get the operating point.

Get the name of the current operating point.

Implements IAsgEGammaIsEMSelector.

Definition at line 241 of file AsgElectronIsEMSelector.cxx.

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 }

◆ getProperty()

template<class T >
const T* asg::AsgTool::getProperty ( const std::string &  name) const
inherited

Get one of the tool's properties.

◆ initialize()

StatusCode AsgElectronIsEMSelector::initialize ( )
overrideprivatevirtual

Gaudi Service Interface method implementations.

----— Read in the TEnv config ---—///

----— Use helpers to read in the cut arrays ---—///

Reimplemented from asg::AsgTool.

Definition at line 74 of file AsgElectronIsEMSelector.cxx.

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 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msg_level_name()

const std::string & asg::AsgTool::msg_level_name ( ) const
inherited

A deprecated function for getting the message level's name.

Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:

MSG::name( msg().level() )

This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.

Returns
The string name of the current minimum message level that's printed

Definition at line 101 of file AsgTool.cxx.

101  {
102 
103  return MSG::name( msg().level() );
104  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ print()

void asg::AsgTool::print ( ) const
virtualinherited

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ TrackCut()

unsigned int AsgElectronIsEMSelector::TrackCut ( const xAOD::Electron eg,
float  eta2,
double  et,
double  energy,
unsigned int  iflag 
) const
private

Definition at line 449 of file AsgElectronIsEMSelector.cxx.

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

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_caloOnly

bool AsgElectronIsEMSelector::m_caloOnly
private

Flag for calo only cut-base.

Definition at line 121 of file AsgElectronIsEMSelector.h.

◆ m_configFile

std::string AsgElectronIsEMSelector::m_configFile
private

Config File.

Definition at line 112 of file AsgElectronIsEMSelector.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_rootTool

Root::TElectronIsEMSelector* AsgElectronIsEMSelector::m_rootTool
private

Pointer to the underlying ROOT based tool.

Definition at line 115 of file AsgElectronIsEMSelector.h.

◆ m_trigEtTh

float AsgElectronIsEMSelector::m_trigEtTh
private

Definition at line 122 of file AsgElectronIsEMSelector.h.

◆ m_useF3core

bool AsgElectronIsEMSelector::m_useF3core
private

use f3core or f3 (default: use f3)

Definition at line 118 of file AsgElectronIsEMSelector.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_WorkingPoint

std::string AsgElectronIsEMSelector::m_WorkingPoint
private

Working Point.

Definition at line 109 of file AsgElectronIsEMSelector.h.


The documentation for this class was generated from the following files:
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
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
ParticleGun_SamplingFraction.eta2
eta2
Definition: ParticleGun_SamplingFraction.py:96
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:557
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
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
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
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
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
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
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
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
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
egammaPID::EgPidUndefined
const unsigned int EgPidUndefined
Definition: egammaPIDdefs.h:90
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
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
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
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
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
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
AthCommonDataStore
Definition: AthCommonDataStore.h:52
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
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
AsgElectronIsEMSelector::m_rootTool
Root::TElectronIsEMSelector * m_rootTool
Pointer to the underlying ROOT based tool.
Definition: AsgElectronIsEMSelector.h:115
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
python.xAODType.dummy
dummy
Definition: xAODType.py:4
MSG::name
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition: MsgLevel.cxx:19
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Root::TElectronIsEMSelector::m_cutminEp
std::vector< float > m_cutminEp
cut min on E/p for e-ID
Definition: TElectronIsEMSelector.h:300
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
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
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
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
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
Root::TElectronIsEMSelector::getAcceptInfo
const asg::AcceptInfo & getAcceptInfo() const
Definition: TElectronIsEMSelector.h:317
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
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::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
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
Root::TElectronIsEMSelector::m_cutmaxEp
std::vector< float > m_cutmaxEp
cut max on E/p for e-ID
Definition: TElectronIsEMSelector.h:302
a
TList * a
Definition: liststreamerinfos.cxx:10
h
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
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
AllowedVariables::nPixHitsPlusDeadSensors
@ nPixHitsPlusDeadSensors
Definition: AsgElectronSelectorTool.cxx:57
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
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
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
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
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
xAOD::EgammaParameters::DeltaE
@ DeltaE
e2tsts1-emins1
Definition: EgammaEnums.h:164
SG::DataProxy
Definition: DataProxy.h:44
Root::TElectronIsEMSelector::m_cutBL
std::vector< int > m_cutBL
cut min on b-layer hits for e-ID
Definition: TElectronIsEMSelector.h:282
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
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
fitman.k
k
Definition: fitman.py:528
Root::TElectronIsEMSelector::m_cutA0
std::vector< float > m_cutA0
cut min on transverse impact parameter for e-ID
Definition: TElectronIsEMSelector.h:288
read_hist_ntuple.f1
f1
Definition: read_hist_ntuple.py:4
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