ATLAS Offline Software
OfflineElectronDecoratorAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef INDETTRACKPERFMON_OFFLINEELECTRONDECORATORALG_H
6 #define INDETTRACKPERFMON_OFFLINEELECTRONDECORATORALG_H
7 
18 
22 
24 #include <string>
25 #include <vector>
26 
28 #include "SafeDecorator.h"
29 
30 
31 namespace IDTPM {
32 
34  public AthReentrantAlgorithm {
35 
36  public:
37 
39 
40  OfflineElectronDecoratorAlg( const std::string& name, ISvcLocator* pSvcLocator );
41 
42  virtual ~OfflineElectronDecoratorAlg() = default;
43 
44  virtual StatusCode initialize() override;
45 
46  virtual StatusCode execute( const EventContext& ctx ) const override;
47 
48  private:
49 
51  this, "OfflineTrkParticleContainerName", "InDetTrackParticles", "Name of container of offline tracks" };
52 
53  StringProperty m_prefix{ this, "Prefix", "LinkedElectron_", "Decoration prefix to avoid clashes" };
54 
58  ElementElectronLink_t > >& ele_decor,
59  const xAOD::ElectronContainer& electrons ) const;
60 
62  this, "ElectronContainerName", "Electrons", "Name of container of offline electrons" };
63 
64  BooleanProperty m_useGSF { this, "useGSF", false, "Match electron with original ID track after GSF" };
65 
66  enum ElectronDecorations : size_t {
67  All,
75  };
76 
77  const std::vector< std::string > m_decor_ele_names {
78  "All",
79  "Tight",
80  "Medium",
81  "Loose",
82  "LHTight",
83  "LHMedium",
84  "LHLoose"
85  };
86 
89 
90 };
91 
92 } // namespace IDTPM
93 
94 #endif // > !INDETTRACKPERFMON_OFFLINEELECTRONDECORATORALG_H
IDTPM::OfflineElectronDecoratorAlg::m_decor_ele
std::vector< IDTPM::WriteKeyAccessorPair< xAOD::TrackParticleContainer, ElementElectronLink_t > > m_decor_ele
Definition: OfflineElectronDecoratorAlg.h:88
IDTPM::OfflineElectronDecoratorAlg::Loose
@ Loose
Definition: OfflineElectronDecoratorAlg.h:70
IDTPM::OfflineElectronDecoratorAlg::NDecorations
@ NDecorations
Definition: OfflineElectronDecoratorAlg.h:74
IDTPM::OfflineElectronDecoratorAlg::m_useGSF
BooleanProperty m_useGSF
Definition: OfflineElectronDecoratorAlg.h:64
IDTPM::OfflineElectronDecoratorAlg::All
@ All
Definition: OfflineElectronDecoratorAlg.h:67
IDTPM::OfflineElectronDecoratorAlg::m_prefix
StringProperty m_prefix
Definition: OfflineElectronDecoratorAlg.h:53
xAOD::TrackParticleContainer
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
Definition: Event/xAOD/xAODTracking/xAODTracking/TrackParticleContainer.h:14
IDTPM::OfflineElectronDecoratorAlg::ElementElectronLink_t
ElementLink< xAOD::ElectronContainer > ElementElectronLink_t
Definition: OfflineElectronDecoratorAlg.h:38
IDTPM::OfflineElectronDecoratorAlg
Definition: OfflineElectronDecoratorAlg.h:34
SG::ReadHandleKey< xAOD::TrackParticleContainer >
IDTPM::OfflineElectronDecoratorAlg::~OfflineElectronDecoratorAlg
virtual ~OfflineElectronDecoratorAlg()=default
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
IDTPM::OfflineElectronDecoratorAlg::decorateElectronTrack
StatusCode decorateElectronTrack(const xAOD::TrackParticle &track, std::vector< IDTPM::OptionalDecoration< xAOD::TrackParticleContainer, ElementElectronLink_t > > &ele_decor, const xAOD::ElectronContainer &electrons) const
Definition: OfflineElectronDecoratorAlg.cxx:96
ElectronContainer.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IDTPM::OfflineElectronDecoratorAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: OfflineElectronDecoratorAlg.cxx:53
IDTPM::OfflineElectronDecoratorAlg::LHTight
@ LHTight
Definition: OfflineElectronDecoratorAlg.h:71
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
IDTPM::OfflineElectronDecoratorAlg::OfflineElectronDecoratorAlg
OfflineElectronDecoratorAlg(const std::string &name, ISvcLocator *pSvcLocator)
Local includes.
Definition: OfflineElectronDecoratorAlg.cxx:20
AthReentrantAlgorithm.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
IDTPM::OfflineElectronDecoratorAlg::initialize
virtual StatusCode initialize() override
Definition: OfflineElectronDecoratorAlg.cxx:29
IDTPM::OfflineElectronDecoratorAlg::Medium
@ Medium
Definition: OfflineElectronDecoratorAlg.h:69
IDTPM::OfflineElectronDecoratorAlg::m_offlineTrkParticlesName
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_offlineTrkParticlesName
Definition: OfflineElectronDecoratorAlg.h:50
IDTPM::OfflineElectronDecoratorAlg::Tight
@ Tight
Definition: OfflineElectronDecoratorAlg.h:68
IDTPM::OfflineElectronDecoratorAlg::ElectronDecorations
ElectronDecorations
Definition: OfflineElectronDecoratorAlg.h:66
IDTPM::OfflineElectronDecoratorAlg::LHLoose
@ LHLoose
Definition: OfflineElectronDecoratorAlg.h:73
SafeDecorator.h
Helper functions to perform safe decoration of xAOD objects in this package.
IDTPM::WriteKeyAccessorPair
std::pair< SG::WriteDecorHandleKey< ContainerType >, SG::AuxElement::ConstAccessor< VariableType > > WriteKeyAccessorPair
Useful declarations.
Definition: SafeDecorator.h:38
IDTPM::OfflineElectronDecoratorAlg::m_decor_ele_names
const std::vector< std::string > m_decor_ele_names
Definition: OfflineElectronDecoratorAlg.h:77
IDTPM::OfflineElectronDecoratorAlg::LHMedium
@ LHMedium
Definition: OfflineElectronDecoratorAlg.h:72
IDTPM::OfflineElectronDecoratorAlg::m_electronsName
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronsName
Definition: OfflineElectronDecoratorAlg.h:61
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
IDTPM::OptionalDecoration
std::pair< SG::WriteDecorHandle< ContainerType, VariableType >, bool > OptionalDecoration
Definition: SafeDecorator.h:47
IDTPM
Athena include(s).
Definition: IPlotsDefinitionSvc.h:25
TrackParticleContainer.h
InDetDD::electrons
@ electrons
Definition: InDetDD_Defs.h:17