ATLAS Offline Software
ITrackParticleCreatorTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // ITrackParticleCreatorTool.h, (c) ATLAS Detector software
8 #ifndef ITRKTRACKPARTICLECREATORTOOL_H
9 #define ITRKTRACKPARTICLECREATORTOOL_H
10 
11 #include "AthLinks/ElementLink.h"
12 #include "GaudiKernel/EventContext.h"
13 #include "GaudiKernel/IAlgTool.h"
14 #include "GaudiKernel/ThreadLocalContext.h"
15 #include "TrkParticleBase/TrackParticleBase.h" // to know TrackParticleOrigin enum
17 
21 #include "xAODTracking/VertexFwd.h"
22 namespace Rec {
23 class TrackParticle;
24 }
25 
26 namespace InDet {
27 class BeamSpotData;
28 }
29 
30 namespace Trk {
31 class Track;
32 class VxCandidate;
33 
38 class ITrackParticleCreatorTool : virtual public IAlgTool
39 {
40 
41 public:
45 
46 
53  const EventContext& ctx,
54  const Rec::TrackParticle& trackParticle,
55  xAOD::TrackParticleContainer* container = nullptr) const = 0;
56 
58  const Rec::TrackParticle& trackParticle,
59  xAOD::TrackParticleContainer* container = nullptr) const
60  {
61  return createParticle(
62  Gaudi::Hive::currentContext(), trackParticle, container);
63  }
64 
75  const EventContext& ctx,
76  const Trk::Track& track,
77  xAOD::TrackParticleContainer* container = nullptr,
78  const xAOD::Vertex* vxCandidate = nullptr,
79  xAOD::ParticleHypothesis prtOrigin = xAOD::noHypothesis) const = 0;
80 
82  const Trk::Track& track,
83  xAOD::TrackParticleContainer* container = nullptr,
84  const xAOD::Vertex* vxCandidate = nullptr,
86  {
87  return createParticle(Gaudi::Hive::currentContext(),
88  track,
89  container,
90  vxCandidate,
91  prtOrigin);
92  }
93 
102  const EventContext& ctx,
103  const ElementLink<TrackCollection>& trackLink,
104  xAOD::TrackParticleContainer* container = nullptr,
105  const xAOD::Vertex* vxCandidate = nullptr,
106  xAOD::ParticleHypothesis prtOrigin = xAOD::noHypothesis) const = 0;
107 
109  const ElementLink<TrackCollection>& trackLink,
110  xAOD::TrackParticleContainer* container = nullptr,
111  const xAOD::Vertex* vxCandidate = nullptr,
113  {
114  return createParticle(Gaudi::Hive::currentContext(),
115  trackLink,
116  container,
117  vxCandidate,
118  prtOrigin);
119  }
120 
124  const EventContext& ctx,
125  const Perigee* perigee,
126  const FitQuality* fq,
127  const TrackInfo* trackInfo,
128  const TrackSummary* summary,
129  const std::vector<const Trk::TrackParameters*>& parameters,
130  const std::vector<xAOD::ParameterPosition>& positions,
132  xAOD::TrackParticleContainer* container = nullptr) const = 0;
133 
135  const Perigee* perigee,
136  const FitQuality* fq,
137  const TrackInfo* trackInfo,
138  const TrackSummary* summary,
139  const std::vector<const Trk::TrackParameters*>& parameters,
140  const std::vector<xAOD::ParameterPosition>& positions,
142  xAOD::TrackParticleContainer* container = nullptr) const
143  {
144  return createParticle(Gaudi::Hive::currentContext(),
145  perigee,
146  fq,
147  trackInfo,
148  summary,
149  parameters,
150  positions,
151  prtOrigin,
152  container);
153  }
154 
157  const EventContext& ctx) const = 0;
158 };
159 
160 } // end of namespace
161 
162 #endif
Trk::TrackInfo
Contains information about the 'fitter' of this track.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:32
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
Trk::ITrackParticleCreatorTool::createParticle
virtual xAOD::TrackParticle * createParticle(const EventContext &ctx, const Rec::TrackParticle &trackParticle, xAOD::TrackParticleContainer *container=nullptr) const =0
Method to construct a xAOD::TrackParticle from a Rec::TrackParticle.
TrackParticleBase.h
Trk::ITrackParticleCreatorTool::DeclareInterfaceID
DeclareInterfaceID(ITrackParticleCreatorTool, 1, 0)
InterfaceID.
Trk::ITrackParticleCreatorTool
Interface for constructing TrackParticles from complete tracks.
Definition: ITrackParticleCreatorTool.h:39
xAOD::noHypothesis
@ noHypothesis
For material collection.
Definition: TrackingPrimitives.h:204
Trk::ITrackParticleCreatorTool::createParticle
xAOD::TrackParticle * createParticle(const Rec::TrackParticle &trackParticle, xAOD::TrackParticleContainer *container=nullptr) const
Definition: ITrackParticleCreatorTool.h:57
xAOD::TrackParticle
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Definition: Event/xAOD/xAODTracking/xAODTracking/TrackParticle.h:13
Trk::ITrackParticleCreatorTool::createParticle
virtual xAOD::TrackParticle * createParticle(const EventContext &ctx, const Trk::Track &track, xAOD::TrackParticleContainer *container=nullptr, const xAOD::Vertex *vxCandidate=nullptr, xAOD::ParticleHypothesis prtOrigin=xAOD::noHypothesis) const =0
Method to construct a TrackParticle from a passed Track.
Trk::ITrackParticleCreatorTool::createParticle
virtual xAOD::TrackParticle * createParticle(const EventContext &ctx, const ElementLink< TrackCollection > &trackLink, xAOD::TrackParticleContainer *container=nullptr, const xAOD::Vertex *vxCandidate=nullptr, xAOD::ParticleHypothesis prtOrigin=xAOD::noHypothesis) const =0
Method to construct a TrackParticle from a passed Track.
Rec
Name: MuonSpContainer.h Package : offline/Reconstruction/MuonIdentification/muonEvent.
Definition: FakeTrackBuilder.h:10
TrackCollection.h
Trk::FitQuality
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
Definition: FitQuality.h:97
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
trackInfo
Definition: TrigInDetUtils.h:13
Trk::ITrackParticleCreatorTool::createParticle
virtual xAOD::TrackParticle * createParticle(const EventContext &ctx, const Perigee *perigee, const FitQuality *fq, const TrackInfo *trackInfo, const TrackSummary *summary, const std::vector< const Trk::TrackParameters * > &parameters, const std::vector< xAOD::ParameterPosition > &positions, xAOD::ParticleHypothesis prtOrigin=xAOD::noHypothesis, xAOD::TrackParticleContainer *container=nullptr) const =0
create a xAOD::TrackParticle out of constituents (please don't use this
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::TrackSummary
A summary of the information contained by a track.
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:287
xAOD::ParticleHypothesis
ParticleHypothesis
Definition: TrackingPrimitives.h:192
VertexFwd.h
Rec::TrackParticle
Definition: Reconstruction/Particle/Particle/TrackParticle.h:47
TrackParticle.h
Trk::ITrackParticleCreatorTool::createParticle
xAOD::TrackParticle * createParticle(const Perigee *perigee, const FitQuality *fq, const TrackInfo *trackInfo, const TrackSummary *summary, const std::vector< const Trk::TrackParameters * > &parameters, const std::vector< xAOD::ParameterPosition > &positions, xAOD::ParticleHypothesis prtOrigin=xAOD::noHypothesis, xAOD::TrackParticleContainer *container=nullptr) const
Definition: ITrackParticleCreatorTool.h:134
InDet::BeamSpotData
Definition: BeamSpotData.h:21
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
physics_parameters.parameters
parameters
Definition: physics_parameters.py:144
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
TrackingPrimitives.h
Trk::ITrackParticleCreatorTool::createParticle
xAOD::TrackParticle * createParticle(const Trk::Track &track, xAOD::TrackParticleContainer *container=nullptr, const xAOD::Vertex *vxCandidate=nullptr, xAOD::ParticleHypothesis prtOrigin=xAOD::noHypothesis) const
Definition: ITrackParticleCreatorTool.h:81
TrackParticleContainer.h
Trk::ITrackParticleCreatorTool::CacheBeamSpotData
virtual const InDet::BeamSpotData * CacheBeamSpotData(const EventContext &ctx) const =0
Convenience method to retrieve Beamspot Data object.
Trk::ITrackParticleCreatorTool::createParticle
xAOD::TrackParticle * createParticle(const ElementLink< TrackCollection > &trackLink, xAOD::TrackParticleContainer *container=nullptr, const xAOD::Vertex *vxCandidate=nullptr, xAOD::ParticleHypothesis prtOrigin=xAOD::noHypothesis) const
Definition: ITrackParticleCreatorTool.h:108
SCT_Monitoring::summary
@ summary
Definition: SCT_MonitoringNumbers.h:65