ATLAS Offline Software
ActsExtrapolationAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ACTSGEOMETRY_ACTSEXTRAPOLATIONALG_H
6 #define ACTSGEOMETRY_ACTSEXTRAPOLATIONALG_H
7 
8 // ATHENA
11 
14 
15 // ACTS
16 #include "Acts/EventData/TrackParameters.hpp"
17 #include "Acts/Geometry/GeometryIdentifier.hpp"
18 
19 // STL
20 #include <memory>
21 #include <vector>
22 #include <fstream>
23 #include <mutex>
24 
25 
26 namespace Acts {
27  class TrackingGeometry;
28  namespace detail {
29  struct Step;
30  }
31 }
32 
33 
35 
36 class EventContext;
37 class IAthRNGSvc;
39 
41 public:
42  using AthReentrantAlgorithm::AthReentrantAlgorithm;
43  StatusCode initialize() override;
44  StatusCode execute(const EventContext& ctx) const override;
45 
46 private:
47 
48  ServiceHandle<IActsPropStepRootWriterSvc> m_propStepWriterSvc{this, "PropStepRootWriterSvc", "ActsPropStepRootWriterSvc"};
49  ServiceHandle<IAthRNGSvc> m_rndmGenSvc{this, "AthRNGSvc", "AthRNGSvc"};
50 
51  ToolHandle<ActsTrk::IExtrapolationTool> m_extrapolationTool{this, "ExtrapolationTool", "ActsExtrapolationTool"};
52 
53  PublicToolHandle<ActsTrk::ITrackingGeometryTool> m_trackingGeometryTool{this, "TrackingGeometryTool", "ActsTrackingGeometryTool"};
54 
55 
56  // poor-mans Particle Gun is included here right now
57  Gaudi::Property<std::vector<double>> m_etaRange{this, "EtaRange", {-3, 3}, "The eta range for particles"};
58  Gaudi::Property<std::vector<double>> m_ptRange{this, "PtRange", {0.1, 1000}, "The pt range for particles"};
59  Gaudi::Property<size_t> m_nParticlePerEvent{this, "NParticlesPerEvent", 1, "The number of particles per event"};
60 
61  // material track writer for the material map validation
62  Gaudi::Property<bool> m_writeMaterialTracks{this, "WriteMaterialTracks", false, "Write material track"};
63  Gaudi::Property<bool> m_writePropStep{this, "WritePropStep", false, "Write propagation step"};
64  ServiceHandle<IActsMaterialTrackWriterSvc> m_materialTrackWriterSvc{this, "MaterialTrackWriterSvc", "ActsMaterialTrackWriterSvc"};
65 
66  // Mutex and members for optional debugging output
68  mutable size_t m_objVtxCount ATLAS_THREAD_SAFE {0};
69 
70  void writeStepsObj(const std::vector<Acts::detail::Step>& steps) const;
71 
72 };
73 
74 #endif // ActsGeometry_ActsExtrapolation_h
ActsExtrapolationAlg::m_extrapolationTool
ToolHandle< ActsTrk::IExtrapolationTool > m_extrapolationTool
Definition: ActsExtrapolationAlg.h:51
ActsExtrapolationAlg::initialize
StatusCode initialize() override
Definition: ActsExtrapolationAlg.cxx:46
BeamSpot::mutex
std::mutex mutex
Definition: InDetBeamSpotVertex.cxx:18
IExtrapolationTool.h
detail
Definition: extract_histogram_tag.cxx:14
ActsExtrapolationAlg::m_trackingGeometryTool
PublicToolHandle< ActsTrk::ITrackingGeometryTool > m_trackingGeometryTool
Definition: ActsExtrapolationAlg.h:53
ActsExtrapolationAlg::m_writePropStep
Gaudi::Property< bool > m_writePropStep
Definition: ActsExtrapolationAlg.h:63
ActsExtrapolationAlg::m_nParticlePerEvent
Gaudi::Property< size_t > m_nParticlePerEvent
Definition: ActsExtrapolationAlg.h:59
ActsExtrapolationAlg
Definition: ActsExtrapolationAlg.h:40
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
IActsPropStepRootWriterSvc
Definition: IActsPropStepRootWriterSvc.h:18
ActsExtrapolationAlg::ATLAS_THREAD_SAFE
size_t m_objVtxCount ATLAS_THREAD_SAFE
Definition: ActsExtrapolationAlg.h:68
beamspotman.steps
int steps
Definition: beamspotman.py:501
Acts
Definition: MuonSpectrometer/MuonPhaseII/Event/xAOD/xAODMuonPrepData/xAODMuonPrepData/UtilFunctions.h:20
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ActsExtrapolationAlg::m_ptRange
Gaudi::Property< std::vector< double > > m_ptRange
Definition: ActsExtrapolationAlg.h:58
ActsExtrapolationAlg::m_propStepWriterSvc
ServiceHandle< IActsPropStepRootWriterSvc > m_propStepWriterSvc
Definition: ActsExtrapolationAlg.h:48
AthReentrantAlgorithm.h
ActsExtrapolationAlg::m_etaRange
Gaudi::Property< std::vector< double > > m_etaRange
Definition: ActsExtrapolationAlg.h:57
ActsExtrapolationAlg::execute
StatusCode execute(const EventContext &ctx) const override
Definition: ActsExtrapolationAlg.cxx:61
ActsExtrapolationAlg::m_rndmGenSvc
ServiceHandle< IAthRNGSvc > m_rndmGenSvc
Definition: ActsExtrapolationAlg.h:49
ActsExtrapolationAlg::m_writeMaterialTracks
Gaudi::Property< bool > m_writeMaterialTracks
Definition: ActsExtrapolationAlg.h:62
ITrackingGeometryTool.h
IAthRNGSvc
manage multiple RandomEngines in thread-safe way.
Definition: IAthRNGSvc.h:28
ActsExtrapolationAlg::m_materialTrackWriterSvc
ServiceHandle< IActsMaterialTrackWriterSvc > m_materialTrackWriterSvc
Definition: ActsExtrapolationAlg.h:64
ActsExtrapolationAlg::m_writeMutex
std::mutex m_writeMutex
Definition: ActsExtrapolationAlg.h:67
IActsMaterialTrackWriterSvc
Definition: IActsMaterialTrackWriterSvc.h:13
checker_macros.h
Define macros for attributes used to control the static checker.
ActsExtrapolationAlg::writeStepsObj
void writeStepsObj(const std::vector< Acts::detail::Step > &steps) const
Definition: ActsExtrapolationAlg.cxx:137
ServiceHandle< IActsPropStepRootWriterSvc >