ATLAS Offline Software
Loading...
Searching...
No Matches
ExtrapolatorComparisonTest.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6// ExtrapolatorComparisonTest.h, (c) ATLAS Detector software
8
9#ifndef TRKEXALGS_TRKEXTRAPOLATORCOMPARISONTEST_H
10#define TRKEXALGS_TRKEXTRAPOLATORCOMPARISONTEST_H
11
12// Gaudi includes
14
15// ATHENA
16#include "GaudiKernel/ServiceHandle.h"
17#include "Gaudi/Property.h" /*no forward decl: typedef*/
18#include "GaudiKernel/ISvcLocator.h"
19#include "GaudiKernel/EventContext.h"
20#include "GaudiKernel/SystemOfUnits.h"
24// ACTS
29#include "Acts/EventData/TrackParameters.hpp"
30// STL
31#include <memory>
32#include <vector>
33#include <fstream>
34#include <mutex>
35
36namespace Acts {
37 class TrackingGeometry;
38
39 namespace detail {
40 struct Step;
41 }
42}
43
45 double m_d0 ;
46 double m_z0 ;
47 double m_phi ;
48 double m_eta ;
49 double m_pt ;
50 double m_charge;
51 perigeeParameters(double d0, double z0, double phi, double eta, double pt, double charge):
52 m_d0(d0), m_z0(z0), m_phi(phi), m_eta(eta), m_pt(pt), m_charge(charge) {}
53};
54
55namespace Trk
56{
70
72 {
73 public:
74
76 ExtrapolatorComparisonTest(const std::string& name, ISvcLocator* pSvcLocator);
79
81 StatusCode initialize() override;
83 StatusCode execute(const EventContext& ctx) const override;
85 StatusCode finalize() override;
86
87 private:
88
94 {
96 ActsTrackWrapper(const Acts::BoundTrackParameters* trackParams, Acts::GeometryContext& ctx)
97 : m_params(trackParams)
98 , m_geometryContext(ctx) {};
99
101 Acts::Vector3 position() const {return m_params->position(m_geometryContext);}
103 Acts::BoundVector parameters() const {return m_params->parameters();}
105 const std::optional<Acts::BoundSquareMatrix>& covariance() const {return m_params->covariance();}
106
107 private:
109 const Acts::BoundTrackParameters* m_params;
111 Acts::GeometryContext m_geometryContext;
112 };
113
114 void generatePerigee(std::vector<perigeeParameters>& parameters);
115
117 ToolHandle<ActsTrk::IExtrapolationTool> m_extrapolationTool{this, "ExtrapolationTool", "ActsExtrapolationTool"};
118
120 ToolHandle<Trk::IExtrapolator> m_atlasExtrapolator {this, "Extrapolator", "Trk::Extrapolator/AtlasExtrapolator"};
121
122 PublicToolHandle<ActsTrk::ITrackingGeometryTool> m_trackingGeometryTool{this, "TrackingGeometryTool", "ActsTrackingGeometryTool"};
123
124 DoubleProperty m_sigmaD0
125 {this, "StartPerigeeSigmaD0", 17.*Gaudi::Units::micrometer};
126 DoubleProperty m_sigmaZ0
127 {this, "StartPerigeeSigmaZ0", 50.*Gaudi::Units::micrometer};
128 DoubleProperty m_minPhi{this, "StartPerigeeMinPhi", -M_PI};
129 DoubleProperty m_maxPhi{this, "StartPerigeeMaxPhi", M_PI};
130 DoubleProperty m_minEta{this, "StartPerigeeMinEta", -3.};
131 DoubleProperty m_maxEta{this, "StartPerigeeMaxEta", 3.};
132 DoubleProperty m_minPt
133 {this, "StartPerigeeMinPt", 0.5*Gaudi::Units::GeV};
134 DoubleProperty m_maxPt
135 {this, "StartPerigeeMaxPt", 50000*Gaudi::Units::GeV};
136
137 IntegerProperty m_particleType
138 {this, "ParticleType", 2, "the particle type for the extrap."};
139
141 unsigned int m_referenceSurfaces = 0;
142
143 DoubleArrayProperty m_referenceSurfaceRadius
144 {this, "ReferenceSurfaceRadius", {}};
146 {this, "ReferenceSurfaceHalfZ", {}};
147
150
151 std::vector< std::vector<const Trk::Surface*> > m_atlasReferenceSurfaceTriples;
152 std::vector< std::vector< std::shared_ptr<const Acts::Surface> > > m_actsReferenceSurfaceTriples;
153
154 IntegerProperty m_eventsPerExecute{this, "EventsPerExecute", 1};
155
157 {this, "ATLASPropResultRootWriter", "ATLASPropResultRootWriterSvc"};
159 {this, "ACTSPropResultRootWriter", "ACTSPropResultRootWriterSvc"};
160 ServiceHandle<IAthRNGSvc> m_rndmSvc{this, "RndmSvc", "AthRNGSvc"};
162 };
163} // end of namespace
164
165#endif
#define M_PI
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
double charge(const T &p)
Definition AtlasPID.h:997
A wrapper class for event-slot-local random engines.
Definition RNGWrapper.h:56
An algorithm that can be simultaneously executed in multiple threads.
ToolHandle< ActsTrk::IExtrapolationTool > m_extrapolationTool
The ACTS ExtrapolationTool to be retrieved.
ServiceHandle< PropResultRootWriterSvc > m_actsPropResultWriterSvc
StatusCode execute(const EventContext &ctx) const override
standard Athena-Algorithm method
ServiceHandle< PropResultRootWriterSvc > m_atlasPropResultWriterSvc
StatusCode initialize() override
standard Athena-Algorithm method
StatusCode finalize() override
standard Athena-Algorithm method
std::vector< double > m_referenceSurfacePositiveBoundary
std::vector< std::vector< std::shared_ptr< const Acts::Surface > > > m_actsReferenceSurfaceTriples
PublicToolHandle< ActsTrk::ITrackingGeometryTool > m_trackingGeometryTool
std::vector< double > m_referenceSurfaceNegativeBoundary
ToolHandle< Trk::IExtrapolator > m_atlasExtrapolator
The ATLAS Extrapolator to be retrieved.
void generatePerigee(std::vector< perigeeParameters > &parameters)
unsigned int m_referenceSurfaces
member variables for algorithm properties:
ExtrapolatorComparisonTest(const std::string &name, ISvcLocator *pSvcLocator)
Standard Athena-Algorithm Constructor.
std::vector< std::vector< const Trk::Surface * > > m_atlasReferenceSurfaceTriples
Ensure that the ATLAS eigen extensions are properly loaded.
Acts::BoundVector parameters() const
Parameter getter.
const std::optional< Acts::BoundSquareMatrix > & covariance() const
Covariance getter.
const Acts::BoundTrackParameters * m_params
The Acts track parameters.
Acts::GeometryContext m_geometryContext
The Acts geometry context.
ActsTrackWrapper(const Acts::BoundTrackParameters *trackParams, Acts::GeometryContext &ctx)
Constructor.
perigeeParameters(double d0, double z0, double phi, double eta, double pt, double charge)