ATLAS Offline Software
TrackCollectionCnvTool.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // $Id$
8 #ifndef XAODTRACKINGCNV_TRACKCOLLECTIONCNVTOOL_H
9 #define XAODTRACKINGCNV_TRACKCOLLECTIONCNVTOOL_H
10 
11 // Gaudi/Athena include(s):
13 #include "GaudiKernel/ToolHandle.h"
14 
15 // converting tool that will be invoked
17 
18 // Local include(s):
21 
22 // System include(s):
23 #include <memory>
24 
25 namespace xAODMaker {
26 
28  public virtual ITrackCollectionCnvTool {
29 
30  public:
32  TrackCollectionCnvTool( const std::string& type, const std::string& name,
33  const IInterface* parent );
34 
36  virtual StatusCode initialize() override;
37 
39  virtual StatusCode convert( const TrackCollection* aod,
40  xAOD::TrackParticleContainer* xaod, const xAOD::Vertex* vtx = nullptr ) const override;
41 
43  virtual StatusCode convertAndAugment( const TrackCollection* aod,
44  xAOD::TrackParticleContainer* xaod, const ObservedTrackMap* trk_map, const xAOD::Vertex* vtx = nullptr) const override;
45 
47  virtual StatusCode setParticleCreatorTool(ToolHandle<Trk::ITrackParticleCreatorTool> *tool) override;
48 
49  private:
50  ToolHandle<Trk::ITrackParticleCreatorTool> m_particleCreator;
51 
52  inline xAOD::TrackParticle* createParticle(xAOD::TrackParticleContainer& xaod, const TrackCollection& container, const Trk::Track& tp, const xAOD::Vertex* vtx) const;
53 
54 
55  }; // class TrackCollectionCnvTool definition
56 
57 } // xAODMaker namespace
58 
59 #endif // XAODTRACKINGCNV_TRACKCOLLECTIONCNVTOOL_H
ITrkObserverTool.h
xAODMaker::TrackCollectionCnvTool::initialize
virtual StatusCode initialize() override
Function initialising the tool.
Definition: TrackCollectionCnvTool.cxx:28
xAODMaker::ITrackCollectionCnvTool
Definition: ITrackCollectionCnvTool.h:33
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
ITrackParticleCreatorTool.h
xAODMaker::TrackCollectionCnvTool::convert
virtual StatusCode convert(const TrackCollection *aod, xAOD::TrackParticleContainer *xaod, const xAOD::Vertex *vtx=nullptr) const override
Function that fills an existing xAOD::TrackParticleContainer.
Definition: TrackCollectionCnvTool.cxx:36
ParticleTest.tp
tp
Definition: ParticleTest.py:25
xAODMaker::TrackCollectionCnvTool
Definition: TrackCollectionCnvTool.h:28
xAODMaker
Definition: StoreGateSvc.h:72
xAODMaker::TrackCollectionCnvTool::setParticleCreatorTool
virtual StatusCode setParticleCreatorTool(ToolHandle< Trk::ITrackParticleCreatorTool > *tool) override
allow other algorithms to pass the tool in order to preserve initialisation
Definition: TrackCollectionCnvTool.cxx:161
ObservedTrackMap
std::map< int, std::tuple< Trk::Track *, double, xAOD::RejectionStep, xAOD::RejectionReason, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, float, float, int, std::vector< xAOD::RejectionStep >, std::vector< xAOD::RejectionReason > > > ObservedTrackMap
Definition: ObservedTrackMap.h:50
xAODMaker::TrackCollectionCnvTool::convertAndAugment
virtual StatusCode convertAndAugment(const TrackCollection *aod, xAOD::TrackParticleContainer *xaod, const ObservedTrackMap *trk_map, const xAOD::Vertex *vtx=nullptr) const override
Function that fills an existing xAOD::TrackParticleContainer and augments track particles.
Definition: TrackCollectionCnvTool.cxx:63
xAODMaker::TrackCollectionCnvTool::m_particleCreator
ToolHandle< Trk::ITrackParticleCreatorTool > m_particleCreator
Definition: TrackCollectionCnvTool.h:50
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
DataVector< Trk::Track >
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
xAODMaker::TrackCollectionCnvTool::createParticle
xAOD::TrackParticle * createParticle(xAOD::TrackParticleContainer &xaod, const TrackCollection &container, const Trk::Track &tp, const xAOD::Vertex *vtx) const
Definition: TrackCollectionCnvTool.cxx:151
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
ITrackCollectionCnvTool.h
xAODMaker::TrackCollectionCnvTool::TrackCollectionCnvTool
TrackCollectionCnvTool(const std::string &type, const std::string &name, const IInterface *parent)
Regular AlgTool constructor.
Definition: TrackCollectionCnvTool.cxx:16
AthAlgTool
Definition: AthAlgTool.h:26