ATLAS Offline Software
Loading...
Searching...
No Matches
TrackToTrackParticleCnvAlg.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 ACTSTRKFINDING_TRACKTOTRACKPARTICLECNVALG_H
6#define ACTSTRKFINDING_TRACKTOTRACKPARTICLECNVALG_H 1
7
9
10#include "Gaudi/Property.h"
11
17
20
22
25
27
30
31#include "Acts/Surfaces/PerigeeSurface.hpp"
32#include "Acts/EventData/TrackParameters.hpp"
33#include "Acts/Definitions/PdgParticle.hpp"
35
37
38// expected layer
39#include "Acts/Surfaces/CylinderSurface.hpp"
40
41#include "Acts/Propagator/EigenStepper.hpp"
42#include "Acts/Propagator/Propagator.hpp"
43#include "Acts/Propagator/Navigator.hpp"
44
45class GeometryContext;
46
47namespace ActsTrk
48{
49
51 {
52
53 public:
54 TrackToTrackParticleCnvAlg(const std::string &name,
55 ISvcLocator *pSvcLocator);
56
57 virtual StatusCode initialize() override;
58 virtual StatusCode execute(const EventContext &ctx) const override;
59
60 private:
61 // propagator used to get path derivatives
62 using Stepper = Acts::EigenStepper<>;
63 using Navigator = Acts::Navigator;
64 using Propagator = Acts::Propagator<Stepper, Navigator>;
65
66 static std::shared_ptr<Acts::PerigeeSurface> makePerigeeSurface(const InDet::BeamSpotData *beamspotptr);
67 static std::shared_ptr<Acts::PerigeeSurface> makePerigeeSurface(const xAOD::Vertex&);
68 Acts::BoundTrackParameters parametersAtPerigee(const EventContext &ctx,
69 const typename ActsTrk::TrackContainer::ConstTrackProxy &track,
70 const Acts::PerigeeSurface &perigee_surface) const;
71
72 ToolHandle<ActsTrk::IExtrapolationTool> m_extrapolationTool
73 {this, "ExtrapolationTool", ""};
74
75 PublicToolHandle<ActsTrk::ITrackingGeometryTool> m_trackingGeometryTool{this, "TrackingGeometryTool", "ActsTrackingGeometryTool"};
76
77
79 {this, "ACTSTracksLocation", {},"Track collection (ActsTrk variant)"};
81 {this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot or empty." };
83 {this,"AtlasFieldCacheCondObj","fieldCondObj", "Name of the Magnetic Field conditions object key" };
84
86 {this, "SiDetectorElementCollections", {}, "Pixel and strip element collections to get geometry information about measurements."};
87 Gaudi::Property<std::vector<unsigned int> > m_siDetEleCollToMeasurementType
88 {this, "SiDetEleCollToMeasurementType",{}, "One value per si detector collection: Pixel = 1, Strip = 2"};
89
91 {this, "VertexContainerKey", "", "Name of the Primary Vertex Container"};
93 {this, "TrackParticlesOutKey","", "Name of the produced track particle collection" };
94
97
98 Gaudi::Property<double> m_paramExtrapolationParLimit
99 {this, "ExtrapolationPathLimit",std::numeric_limits<double>::max(), "PathLimit for extrapolating track parameters." }; // @TODO (unit?mm?)
100 Gaudi::Property<bool> m_firstAndLastParamOnly
101 {this, "FirstAndLastParameterOnly",true, "Only convert the first and the last parameter." };
102 Gaudi::Property<bool> m_computeExpectedLayerPattern
103 {this, "ComputeExpectedLayerPattern",true, "Compute the expected layer pattern. CPU expensive" };
104 Gaudi::Property<bool> m_expectIfPixelContributes
105 {this, "expectIfPixelContribution",true, "Only expect pixel hits if there are pixel hits on track." };
106
107 Gaudi::Property<double> m_pixelExpectLayerPathLimitInMM
108 {this, "PixelExpectLayerPathLimitInMM",1000,
109 "PathLimit for extrapolating to get the expected pixel layer pattern in mm." };
110
111 Gaudi::Property<std::string> m_perigeeExpression{this, "PerigeeExpression", "DontRecalculate"};
112
115
116 std::unique_ptr<Propagator> m_propagator;
117
118 static std::vector<std::pair<Acts::PdgParticle, xAOD::ParticleHypothesis> > s_actsHypothesisToxAOD ATLAS_THREAD_SAFE;
119 static xAOD::ParticleHypothesis convertParticleHypothesis(Acts::PdgParticle abs_pdg_id);
120 static void initParticleHypothesisMap();
121 };
122
123}
124
126 std::vector<std::pair<Acts::PdgParticle, xAOD::ParticleHypothesis> >::const_iterator
127 iter = std::find_if(s_actsHypothesisToxAOD.begin(),
128 s_actsHypothesisToxAOD.end(),
129 [abs_pdg_id](const std::pair<Acts::PdgParticle, xAOD::ParticleHypothesis> &elm) {
130 return abs_pdg_id == elm.first;
131 });
132 return (iter != s_actsHypothesisToxAOD.end() ? iter->second : xAOD::noHypothesis);
133}
134
135#endif
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Handle class for adding a decoration to an object.
Property holding a SG store/key/clid from which a WriteHandle is made.
static std::vector< std::pair< Acts::PdgParticle, xAOD::ParticleHypothesis > > s_actsHypothesisToxAOD ATLAS_THREAD_SAFE
static xAOD::ParticleHypothesis convertParticleHypothesis(Acts::PdgParticle abs_pdg_id)
static std::shared_ptr< Acts::PerigeeSurface > makePerigeeSurface(const InDet::BeamSpotData *beamspotptr)
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_decorator_actsTracks
SG::ReadCondHandleKeyArray< InDetDD::SiDetectorElementCollection > m_siDetEleCollKey
Acts::Propagator< Stepper, Navigator > Propagator
Gaudi::Property< double > m_pixelExpectLayerPathLimitInMM
Acts::BoundTrackParameters parametersAtPerigee(const EventContext &ctx, const typename ActsTrk::TrackContainer::ConstTrackProxy &track, const Acts::PerigeeSurface &perigee_surface) const
SG::WriteHandleKey< xAOD::TrackParticleContainer > m_trackParticlesOutKey
Gaudi::Property< std::vector< unsigned int > > m_siDetEleCollToMeasurementType
virtual StatusCode execute(const EventContext &ctx) const override
PublicToolHandle< ActsTrk::ITrackingGeometryTool > m_trackingGeometryTool
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexHandle
ToolHandle< ActsTrk::IExtrapolationTool > m_extrapolationTool
SG::ReadHandleKeyArray< ActsTrk::TrackContainer > m_tracksContainerKey
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCacheCondObjInputKey
Gaudi::Property< std::string > m_perigeeExpression
TrackToTrackParticleCnvAlg(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< double > m_paramExtrapolationParLimit
An algorithm that can be simultaneously executed in multiple threads.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
HandleKeyArray< ReadHandle< T >, ReadHandleKey< T >, Gaudi::DataHandle::Reader > ReadHandleKeyArray
HandleKeyArray< ReadCondHandle< T >, CondHandleDefault::Key< ReadCondHandleKey< T > >, Gaudi::DataHandle::Reader > ReadCondHandleKeyArray
Vertex_v1 Vertex
Define the latest version of the vertex class.
@ noHypothesis
For material collection.