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