ATLAS Offline Software
ActsExtrapolationAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ACTSGEOMETRY_ACTSEXTRAPOLATIONALG_H
6 #define ACTSGEOMETRY_ACTSEXTRAPOLATIONALG_H
7 
8 // ATHENA
11 #include "GaudiKernel/ServiceHandle.h"
12 #include "Gaudi/Property.h" /*no forward decl: typedef*/
13 #include "GaudiKernel/ISvcLocator.h"
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;
40 
42 public:
43  ActsExtrapolationAlg (const std::string& name, ISvcLocator* pSvcLocator);
44  StatusCode initialize() override;
45  StatusCode execute(const EventContext& ctx) const override;
46 
47 private:
50 
51  ToolHandle<IActsExtrapolationTool> m_extrapolationTool{this, "ExtrapolationTool", "ActsExtrapolationTool"};
52 
53 
54  // poor-mans Particle Gun is included here right now
55  Gaudi::Property<std::vector<double>> m_etaRange{this, "EtaRange", {-3, 3}, "The eta range for particles"};
56  Gaudi::Property<std::vector<double>> m_ptRange{this, "PtRange", {0.1, 1000}, "The pt range for particles"};
57  Gaudi::Property<size_t> m_nParticlePerEvent{this, "NParticlesPerEvent", 1, "The number of particles per event"};
58 
59  // material track writer for the material map validation
60  Gaudi::Property<bool> m_writeMaterialTracks{this, "WriteMaterialTracks", false, "Write material track"};
61  Gaudi::Property<bool> m_writePropStep{this, "WritePropStep", false, "Write propagation step"};
63 
64  // Mutex and members for optional debugging output
66  mutable size_t m_objVtxCount ATLAS_THREAD_SAFE {0};
67 
68  void writeStepsObj(const std::vector<Acts::detail::Step>& steps) const;
69 
70 };
71 
72 #endif // ActsGeometry_ActsExtrapolation_h
ActsExtrapolationAlg::initialize
StatusCode initialize() override
Definition: ActsExtrapolationAlg.cxx:54
BeamSpot::mutex
std::mutex mutex
Definition: InDetBeamSpotVertex.cxx:18
ActsExtrapolationAlg::ActsExtrapolationAlg
ActsExtrapolationAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: ActsExtrapolationAlg.cxx:46
detail
Definition: extract_histogram_tag.cxx:14
ActsExtrapolationAlg::m_writePropStep
Gaudi::Property< bool > m_writePropStep
Definition: ActsExtrapolationAlg.h:61
ActsExtrapolationAlg::m_nParticlePerEvent
Gaudi::Property< size_t > m_nParticlePerEvent
Definition: ActsExtrapolationAlg.h:57
ActsExtrapolationAlg
Definition: ActsExtrapolationAlg.h:41
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
IActsExtrapolationTool
Definition: IActsExtrapolationTool.h:31
IActsPropStepRootWriterSvc
Definition: IActsPropStepRootWriterSvc.h:18
ActsExtrapolationAlg::ATLAS_THREAD_SAFE
size_t m_objVtxCount ATLAS_THREAD_SAFE
Definition: ActsExtrapolationAlg.h:66
beamspotman.steps
int steps
Definition: beamspotman.py:505
Acts
Definition: ChamberAssembleTool.h:18
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:56
ActsExtrapolationAlg::m_propStepWriterSvc
ServiceHandle< IActsPropStepRootWriterSvc > m_propStepWriterSvc
Definition: ActsExtrapolationAlg.h:48
AthReentrantAlgorithm.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
ActsExtrapolationAlg::m_etaRange
Gaudi::Property< std::vector< double > > m_etaRange
Definition: ActsExtrapolationAlg.h:55
ActsExtrapolationAlg::execute
StatusCode execute(const EventContext &ctx) const override
Definition: ActsExtrapolationAlg.cxx:69
ActsExtrapolationAlg::m_rndmGenSvc
ServiceHandle< IAthRNGSvc > m_rndmGenSvc
Definition: ActsExtrapolationAlg.h:49
ActsExtrapolationAlg::m_writeMaterialTracks
Gaudi::Property< bool > m_writeMaterialTracks
Definition: ActsExtrapolationAlg.h:60
IAthRNGSvc
manage multiple RandomEngines in thread-safe way.
Definition: IAthRNGSvc.h:28
ActsExtrapolationAlg::m_extrapolationTool
ToolHandle< IActsExtrapolationTool > m_extrapolationTool
Definition: ActsExtrapolationAlg.h:51
ActsExtrapolationAlg::m_materialTrackWriterSvc
ServiceHandle< IActsMaterialTrackWriterSvc > m_materialTrackWriterSvc
Definition: ActsExtrapolationAlg.h:62
ActsExtrapolationAlg::m_writeMutex
std::mutex m_writeMutex
Definition: ActsExtrapolationAlg.h:65
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:146
ServiceHandle< IActsPropStepRootWriterSvc >