ATLAS Offline Software
Loading...
Searching...
No Matches
SimKernelMT.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
10
11#ifndef ISF_SIMKERNELMT_H
12#define ISF_SIMKERNELMT_H 1
13
14// Interfaces to ISF Tools and Services
24
25// DetectorDescription
27
28// McEventCollection
31
32// TrackRecordCollection (and TrackRecord)
34
35// Framework includes
39#include "GaudiKernel/ServiceHandle.h"
40
41// STL includes
42#include <array>
43#include <map>
44
45// forward declarations
46namespace ISFTesting {
47 class SimKernelMT_test;
48}
49
50
51namespace ISF {
52
61class SimKernelMT final : public AthAlgorithm {
62
65
66public:
68 SimKernelMT( const std::string& name, ISvcLocator* pSvcLocator );
69
71 virtual ~SimKernelMT();
72
74 StatusCode initialize() override;
75
80 StatusCode execute() override;
81
83 StatusCode finalize() override;
84
85 bool isClonable() const override { return true; }
86
87private:
90
92 SG::ReadHandleKey<McEventCollection> m_inputEvgenKey{this, "InputEvgenCollection", "", "Input EVGEN collection."};
94 SG::WriteHandleKey<McEventCollection> m_outputTruthKey{this, "OutputTruthCollection", "", "Output Truth collection."};
96 SG::WriteHandleKey<TrackRecordCollection> m_caloEntryLayerKey{this, "CaloEntryLayerKey", "CaloEntryLayer", ""};
97 SG::WriteHandleKey<TrackRecordCollection> m_muonEntryLayerKey{this, "MuonEntryLayerKey", "MuonEntryLayer", ""};
98 SG::WriteHandleKey<TrackRecordCollection> m_muonExitLayerKey{this, "MuonExitLayerKey", "MuonExitLayer", ""};
99
100 BooleanProperty m_useShadowEvent{this, "UseShadowEvent", false, "New approach to selecting particles for simulation" };
102 Gaudi::Property<bool> m_forceGeoIDSvc{this, "AlwaysUseGeoIDSvc", false, "Force geoID recalculation for each particle" };
103
104 ToolHandle<IGenEventFilter> m_truthPreselectionTool{this, "TruthPreselectionTool", "", "Tool for filtering out quasi-stable particle daughters"};
105
107 ServiceHandle<IInputConverter> m_inputConverter{this, "InputConverter", "", "Input McEventCollection->ISFParticleContainer conversion service."};
108
110 ServiceHandle<ITruthSvc> m_truthRecordSvc{this,"TruthRecordService", "ISF_MC15aPlusTruthService", ""};
111
113 ServiceHandle<Simulation::IZeroLifetimePatcher> m_qspatcher{this, "QuasiStablePatcher", "", "Quasi-Stable Particle Simulation Patcher"};
114
116 ToolHandleArray<ISimulatorTool> m_simulationTools{this, "SimulationTools", {}, ""};
117
120
122 PublicToolHandle<IEntryLayerTool> m_entryLayerTool{this, "EntryLayerTool", "ISF_EntryLayerToolMT", ""};
123
125 ServiceHandle<IGeoIDSvc> m_geoIDSvc{this, "GeoIDSvc", "", "Service to set particle GeoIDs"};
126
128 ToolHandle<IParticleOrderingTool> m_orderingTool{this, "ParticleOrderingTool", "", "Tool to set order of particles"};
129
131 std::array<ToolHandleArray<ISimulationSelector>, AtlasDetDescr::fNumAtlasRegions> m_simSelectors;
132
134 std::map<ISF::SimulationFlavor, ISimulatorTool*> m_simToolMap;
135
138};
139
140} // namespace ISF
141
142#endif // ISF_SIMKERNELMT_H
Handle class for reading from StoreGate.
Handle class for recording to StoreGate.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
The generic ISF particle definition,.
Definition ISFParticle.h:42
SG::WriteHandleKey< McEventCollection > m_outputTruthKey
Output Simulation Truth collection.
Definition SimKernelMT.h:94
ToolHandleArray< ISimulatorTool > m_simulationTools
Simulation Tools.
size_t m_maxParticleVectorSize
Number of particles simultaneously sent to simulator.
SG::ReadHandleKey< McEventCollection > m_inputEvgenKey
Input Generator Truth collection.
Definition SimKernelMT.h:92
BooleanProperty m_useShadowEvent
SG::WriteHandleKey< TrackRecordCollection > m_muonEntryLayerKey
Definition SimKernelMT.h:97
std::array< ToolHandleArray< ISimulationSelector >, AtlasDetDescr::fNumAtlasRegions > m_simSelectors
The simulation selectors defining the "routing chain".
virtual ~SimKernelMT()
Implements empty destructor.
std::map< ISF::SimulationFlavor, ISimulatorTool * > m_simToolMap
Map of the simulation flavours used in this job to the corresponding Simulation Services.
ToolHandle< IGenEventFilter > m_truthPreselectionTool
ToolHandle< IParticleOrderingTool > m_orderingTool
Tool to set particle ordering.
ISimulatorTool & identifySimulator(const ISF::ISFParticle &particle)
Returns the simulator to use for the given particle.
ServiceHandle< IGeoIDSvc > m_geoIDSvc
Service to set particle GeoIDs.
SG::WriteHandleKey< TrackRecordCollection > m_caloEntryLayerKey
Output TrackRecordCollections.
Definition SimKernelMT.h:96
ServiceHandle< Simulation::IZeroLifetimePatcher > m_qspatcher
Quasi-Stable Particle Simulation Patcher.
StatusCode execute() override
Check the validity of the MC truth event in the current Athena event.
ServiceHandle< IInputConverter > m_inputConverter
Input converter service (from Generator->ISF particle types)
ISimulatorTool * m_particleKillerTool
When no appropriate simulator can be found for a given particle, the particle is sent to this "partic...
SimKernelMT(const std::string &name, ISvcLocator *pSvcLocator)
Implements standard AthAlgorithm constructor.
SG::WriteHandleKey< TrackRecordCollection > m_muonExitLayerKey
Definition SimKernelMT.h:98
Gaudi::Property< bool > m_forceGeoIDSvc
Force geoID recalculation for each particle.
PublicToolHandle< IEntryLayerTool > m_entryLayerTool
AthenaTool responsible for writing Calo/Muon Entry/Exit Layer collection.
friend class ISFTesting::SimKernelMT_test
Allow the test class access to all methods.
Definition SimKernelMT.h:64
StatusCode initialize() override
Check user configuration and configure the algorithm state accordingly.
ServiceHandle< ITruthSvc > m_truthRecordSvc
Central truth service.
StatusCode finalize() override
Implements empty finalize (implementation required by AthAlgorithm)
bool isClonable() const override
Definition SimKernelMT.h:85
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
Core Athena algorithm for the Integrated Simulation Framework.
ISFParticleOrderedQueue.