ATLAS Offline Software
Loading...
Searching...
No Matches
ExtrapolationTestAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ACTSGEOMETRY_ACTSEXTRAPOLATIONALG_H
6#define ACTSGEOMETRY_ACTSEXTRAPOLATIONALG_H
7
8// ATHENA
11
17
18// ACTS
19#include "Acts/Geometry/GeometryIdentifier.hpp"
21
24
25// STL
26#include <memory>
27#include <vector>
28#include <fstream>
29#include <mutex>
30
31
32namespace Acts {
33 class TrackingGeometry;
34 namespace detail {
35 struct Step;
36 }
37}
38
39
40class EventContext;
41class IAthRNGSvc;
42
43
44namespace ActsTrk {
46public:
48 virtual StatusCode initialize() override;
49 virtual StatusCode execute(const EventContext& ctx) override;
50 virtual StatusCode finalize() override;
51
52private:
53 using StepVector = std::vector<Acts::detail::Step>;
54 StatusCode writePropagationSteps(const EventContext& ctx, const StepVector& steps);
55
56 ServiceHandle<IAthRNGSvc> m_rndmGenSvc{this, "AthRNGSvc", "AthRNGSvc"};
57
58 ToolHandle<ActsTrk::IExtrapolationTool> m_extrapolationTool{this, "ExtrapolationTool", "ActsExtrapolationTool"};
59
60 PublicToolHandle<ActsTrk::ITrackingGeometryTool> m_trackingGeometryTool{this, "TrackingGeometryTool", "ActsTrackingGeometryTool"};
61
62 // poor-mans Particle Gun is included here right now
63 Gaudi::Property<std::vector<double>> m_etaRange{this, "EtaRange", {-3, 3}, "The eta range for particles"};
64 Gaudi::Property<std::vector<double>> m_ptRange{this, "PtRange", {0.1, 1000}, "The pt range for particles"};
65 Gaudi::Property<size_t> m_nParticlePerEvent{this, "NParticlesPerEvent", 10, "The number of particles per event"};
66
67 // material track writer for the material map validation
68 Gaudi::Property<bool> m_writeMaterialTracks{this, "WriteMaterialTracks", false, "Write material track"};
69 Gaudi::Property<bool> m_writePropStep{this, "WritePropStep", false, "Write propagation step"};
70
72 SG::WriteHandleKey<ActsTrk::RecordedMaterialTrackCollection> m_materialTrackCollectionKey {this, "MaterialTrackCollectionKey", "MaterialTracks", "Name of the RecordedMaterialTrackCollection"};
73
74
75 MuonVal::MuonTesterTree m_tree{"propsteps", "ActsExtrapolationRecord"};
76
77
78 MuonVal::ScalarBranch<int>& m_eventNum{m_tree.newScalar<int>("event_nr")};
80 MuonVal::VectorBranch<float>& m_s_pX{m_tree.newVector<float>("step_x")};
82 MuonVal::VectorBranch<float>& m_s_pY{m_tree.newVector<float>("step_y")};
84 MuonVal::VectorBranch<float>& m_s_pZ{m_tree.newVector<float>("step_z")};
86 MuonVal::VectorBranch<float>& m_s_pR{m_tree.newVector<float>("step_r")};
87
88 MuonVal::VectorBranch<int>& m_s_volumeID{m_tree.newVector<int>("volume_id")};
89 MuonVal::VectorBranch<int>& m_s_boundaryID{m_tree.newVector<int>("boundary_id")};
90 MuonVal::VectorBranch<int>& m_s_layerID{m_tree.newVector<int>("layer_id")};
91 MuonVal::VectorBranch<int>& m_s_approachID{m_tree.newVector<int>("approach_id")};
92 MuonVal::VectorBranch<int>& m_s_sensitiveID{m_tree.newVector<int>("sensitive_id")};
93
94};
95}
96#endif // ActsGeometry_ActsExtrapolation_h
Define macros for attributes used to control the static checker.
MuonVal::VectorBranch< float > & m_s_pZ
Global z position of the step.
Gaudi::Property< std::vector< double > > m_etaRange
Gaudi::Property< bool > m_writePropStep
MuonVal::VectorBranch< int > & m_s_approachID
approach identification
Gaudi::Property< size_t > m_nParticlePerEvent
MuonVal::VectorBranch< int > & m_s_boundaryID
boundary identification
virtual StatusCode execute(const EventContext &ctx) override
Execute method.
PublicToolHandle< ActsTrk::ITrackingGeometryTool > m_trackingGeometryTool
MuonVal::VectorBranch< int > & m_s_sensitiveID
sensitive identification
Gaudi::Property< std::vector< double > > m_ptRange
MuonVal::VectorBranch< float > & m_s_pX
Global x position of the step.
virtual StatusCode finalize() override
ToolHandle< ActsTrk::IExtrapolationTool > m_extrapolationTool
MuonVal::VectorBranch< int > & m_s_layerID
layer identification
Gaudi::Property< bool > m_writeMaterialTracks
MuonVal::VectorBranch< float > & m_s_pY
Global y position of the step.
AthHistogramAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
std::vector< Acts::detail::Step > StepVector
MuonVal::ScalarBranch< int > & m_eventNum
SG::WriteHandleKey< ActsTrk::RecordedMaterialTrackCollection > m_materialTrackCollectionKey
The RecordedMaterialTrackCollection to write.
StatusCode writePropagationSteps(const EventContext &ctx, const StepVector &steps)
MuonVal::VectorBranch< float > & m_s_pR
Global radial position of the step sqrt(x^{2} + y^{2}).
virtual StatusCode initialize() override
ServiceHandle< IAthRNGSvc > m_rndmGenSvc
MuonVal::VectorBranch< int > & m_s_volumeID
volume identification
AthHistogramAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
manage multiple RandomEngines in thread-safe way.
Definition IAthRNGSvc.h:28
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...