ATLAS Offline Software
TrackIsolationDecorAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef TRACKISOLATIONDECORALG_H_
5 #define TRACKISOLATIONDECORALG_H_
6 
13 
16 
17 namespace DerivationFramework {
19 public:
21  TrackIsolationDecorAlg(const std::string& name, ISvcLocator* pSvcLocator);
22 
25 
27  StatusCode initialize() override;
28  StatusCode execute(const EventContext& ctx) const override;
29 
30 private:
31  static bool isSame(const xAOD::IParticle* a, const xAOD::IParticle* b);
32  SG::ReadHandleKey<xAOD::TrackParticleContainer> m_idTrkKey{this, "IdTrackCollection", "InDetTrackParticles",
33  "Collection of track particles making up the isolation cones"};
34 
35  SG::ReadHandleKey<xAOD::TrackParticleContainer> m_toDeorTrkKey{this, "TrackCollection", "InDetTrackParticles",
36  "Collection of track particles to decorate the isolation onto"};
37  SG::ReadHandleKey<xAOD::VertexContainer> m_vtx_key{this, "VertexCollection", "PrimaryVertices"};
38 
39  Gaudi::Property<std::string> m_customName{this, "customName", "", "Custom appendix of the isolation variables"};
40 
41  Gaudi::Property<float> m_pt_min{this, "PtMin", 2.5 * Gaudi::Units::GeV, "Minimal track pt required to decorate the ID track"};
42 
45  Gaudi::Property<std::vector<std::string>> m_trkSel_Decors{this, "TrackSelections", {},
46  "List of decorator names of which one needs to be true to run the isolation" };
48  "Will be overwritten in initialize"};
49 
54 
58 
59  ToolHandle<xAOD::ITrackIsolationTool> m_isoTool{this, "IsolationTool", ""};
60 
63 };
64 }
65 #endif /* TRACKISOLATIONDECORALG_H_ */
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer >
DerivationFramework::TrackIsolationDecorAlg::m_ptcone40_key
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_ptcone40_key
Definition: TrackIsolationDecorAlg.h:53
DerivationFramework::TrackIsolationDecorAlg::m_trkSel_keys
SG::ReadDecorHandleKeyArray< xAOD::TrackParticleContainer > m_trkSel_keys
Definition: TrackIsolationDecorAlg.h:47
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
xAOD::TrackCorrection
Definition: IsolationCommon.h:18
DerivationFramework::TrackIsolationDecorAlg::m_toDeorTrkKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_toDeorTrkKey
Definition: TrackIsolationDecorAlg.h:35
IsolationType.h
DerivationFramework::TrackIsolationDecorAlg
Definition: TrackIsolationDecorAlg.h:18
xAOD::Iso::ptcone30
@ ptcone30
Definition: IsolationType.h:41
xAOD::Iso::ptcone20
@ ptcone20
Track isolation.
Definition: IsolationType.h:40
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
DerivationFramework::TrackIsolationDecorAlg::m_isoTool
ToolHandle< xAOD::ITrackIsolationTool > m_isoTool
Definition: TrackIsolationDecorAlg.h:59
SG::ReadHandleKey< xAOD::TrackParticleContainer >
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
DerivationFramework::TrackIsolationDecorAlg::m_idTrkKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_idTrkKey
Definition: TrackIsolationDecorAlg.h:32
DerivationFramework::TrackIsolationDecorAlg::m_trk_corr
xAOD::TrackCorrection m_trk_corr
Definition: TrackIsolationDecorAlg.h:62
DerivationFramework::TrackIsolationDecorAlg::m_ptvarcone40_key
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_ptvarcone40_key
Definition: TrackIsolationDecorAlg.h:57
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
DerivationFramework::TrackIsolationDecorAlg::execute
StatusCode execute(const EventContext &ctx) const override
Definition: TrackIsolationDecorAlg.cxx:57
WriteDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
DerivationFramework::TrackIsolationDecorAlg::m_ptcone30_key
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_ptcone30_key
Definition: TrackIsolationDecorAlg.h:52
DerivationFramework::TrackIsolationDecorAlg::m_ptcone20_key
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_ptcone20_key
Now let's come to the WriteDecorHandleKeys.
Definition: TrackIsolationDecorAlg.h:51
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
DerivationFramework::TrackIsolationDecorAlg::m_trkSel_Decors
Gaudi::Property< std::vector< std::string > > m_trkSel_Decors
Optional list of decorators to select only the good tracks for the isolation decoration.
Definition: TrackIsolationDecorAlg.h:45
DerivationFramework::TrackIsolationDecorAlg::m_trk_iso_types
std::vector< xAOD::Iso::IsolationType > m_trk_iso_types
Definition: TrackIsolationDecorAlg.h:61
DerivationFramework::TrackIsolationDecorAlg::TrackIsolationDecorAlg
TrackIsolationDecorAlg(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Definition: TrackIsolationDecorAlg.cxx:18
DerivationFramework::TrackIsolationDecorAlg::m_pt_min
Gaudi::Property< float > m_pt_min
Definition: TrackIsolationDecorAlg.h:41
IsolationCommon.h
DerivationFramework
THE reconstruction tool.
Definition: ParticleSortingAlg.h:24
DerivationFramework::TrackIsolationDecorAlg::isSame
static bool isSame(const xAOD::IParticle *a, const xAOD::IParticle *b)
Definition: TrackIsolationDecorAlg.cxx:49
DerivationFramework::TrackIsolationDecorAlg::m_customName
Gaudi::Property< std::string > m_customName
Definition: TrackIsolationDecorAlg.h:39
DerivationFramework::TrackIsolationDecorAlg::m_ptvarcone30_key
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_ptvarcone30_key
Definition: TrackIsolationDecorAlg.h:56
AthReentrantAlgorithm.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
xAOD::Iso::ptcone40
@ ptcone40
Definition: IsolationType.h:42
ITrackIsolationTool.h
VertexContainer.h
a
TList * a
Definition: liststreamerinfos.cxx:10
DerivationFramework::TrackIsolationDecorAlg::~TrackIsolationDecorAlg
~TrackIsolationDecorAlg()
Destructor:
DerivationFramework::TrackIsolationDecorAlg::m_ptvarcone20_key
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_ptvarcone20_key
Definition: TrackIsolationDecorAlg.h:55
ReadDecorHandleKeyArray.h
DerivationFramework::TrackIsolationDecorAlg::m_vtx_key
SG::ReadHandleKey< xAOD::VertexContainer > m_vtx_key
Definition: TrackIsolationDecorAlg.h:37
DerivationFramework::TrackIsolationDecorAlg::initialize
StatusCode initialize() override
Athena algorithm's Hooks.
Definition: TrackIsolationDecorAlg.cxx:23