ATLAS Offline Software
PV0TrackSelectionAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // Author: Bill Balunas
6 // This algorithm creates a filtered copy of a TrackParticleContainer,
7 // retaining only tracks which are associated to the primary vertex (as
8 // defined by the provided TrackVertexAssociationTool). The output container
9 // is a view container; it simply points back to the original TrackParticles.
10 
11 #ifndef TRACKVERTEXASSOCIATIONTOOL_PV0TRACKSELECTIONALG_H
12 #define TRACKVERTEXASSOCIATIONTOOL_PV0TRACKSELECTIONALG_H 1
13 
14 #include "GaudiKernel/ToolHandle.h"
20 
22 
25 
27  : public AthReentrantAlgorithm
28 {
29 
30  public:
31 
32  PV0TrackSelectionAlg( const std::string& name, ISvcLocator* pSvcLocator );
33 
34  StatusCode initialize() override;
35  StatusCode execute(const EventContext&) const override;
36  StatusCode finalize() override;
37 
38  private:
39 
41 
42  ToolHandle<CP::ITrackVertexAssociationTool> m_TVATool{this, "TVATool", "", "Track-Vertex Association tool"};
43 
44  SG::ReadHandleKey<xAOD::TrackParticleContainer> m_inTrackKey{this, "InputTrackContainer", "InDetTrackParticles", "Input track particle container"};
45  SG::ReadHandleKey<xAOD::VertexContainer> m_vertexKey{this, "VertexContainer", "PrimaryVertices", "Input vertex container"};
46 
47  SG::WriteHandleKey<xAOD::TrackParticleContainer> m_outTrackKey{this, "OutputTrackContainer", "PV0InDetTrackParticles", "Output track particle container"};
48 
49  SG::ShallowCopyDecorDeps<xAOD::TrackParticleContainer> m_decorDeps { this, "DecorDeps", {}, "List of decorations to propagate through the view container" };
50 
51 };
52 
53 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
PV0TrackSelectionAlg::execute
StatusCode execute(const EventContext &) const override
Definition: PV0TrackSelectionAlg.cxx:26
ConstDataVector.h
DataVector adapter that acts like it holds const pointers.
PV0TrackSelectionAlg::initialize
StatusCode initialize() override
Definition: PV0TrackSelectionAlg.cxx:10
PV0TrackSelectionAlg::m_TVATool
ToolHandle< CP::ITrackVertexAssociationTool > m_TVATool
Definition: PV0TrackSelectionAlg.h:42
PV0TrackSelectionAlg::m_decorDeps
SG::ShallowCopyDecorDeps< xAOD::TrackParticleContainer > m_decorDeps
Definition: PV0TrackSelectionAlg.h:49
SG::ReadHandleKey< xAOD::TrackParticleContainer >
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
ShallowCopyDecorDeps.h
Helper to propagate decoration dependencies to a shallow copy.
PV0TrackSelectionAlg::m_vertexKey
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexKey
Definition: PV0TrackSelectionAlg.h:45
PV0TrackSelectionAlg::finalize
StatusCode finalize() override
Definition: PV0TrackSelectionAlg.cxx:22
SG::WriteHandleKey< xAOD::TrackParticleContainer >
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
PV0TrackSelectionAlg::PV0TrackSelectionAlg
PV0TrackSelectionAlg()
SG::ShallowCopyDecorDeps
Helper to propagate decoration dependencies to a shallow copy.
Definition: StoreGate/StoreGate/ShallowCopyDecorDeps.h:75
ITrackVertexAssociationTool.h
AthReentrantAlgorithm.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
VertexContainer.h
PV0TrackSelectionAlg
Definition: PV0TrackSelectionAlg.h:28
PV0TrackSelectionAlg::m_inTrackKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_inTrackKey
Definition: PV0TrackSelectionAlg.h:44
PV0TrackSelectionAlg::m_outTrackKey
SG::WriteHandleKey< xAOD::TrackParticleContainer > m_outTrackKey
Definition: PV0TrackSelectionAlg.h:47
TrackParticleContainer.h