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:
67 // delegate Constructor
69
71 StatusCode initialize() override;
72
77 StatusCode execute() override;
78
80 StatusCode finalize() override;
81
82 bool isClonable() const override { return true; }
83
84private:
87
89 SG::ReadHandleKey<McEventCollection> m_inputEvgenKey{this, "InputEvgenCollection", "", "Input EVGEN collection."};
91 SG::WriteHandleKey<McEventCollection> m_outputTruthKey{this, "OutputTruthCollection", "", "Output Truth collection."};
93 SG::WriteHandleKey<TrackRecordCollection> m_caloEntryLayerKey{this, "CaloEntryLayerKey", "CaloEntryLayer", ""};
94 SG::WriteHandleKey<TrackRecordCollection> m_muonEntryLayerKey{this, "MuonEntryLayerKey", "MuonEntryLayer", ""};
95 SG::WriteHandleKey<TrackRecordCollection> m_muonExitLayerKey{this, "MuonExitLayerKey", "MuonExitLayer", ""};
96
97 BooleanProperty m_useShadowEvent{this, "UseShadowEvent", false, "New approach to selecting particles for simulation" };
99 Gaudi::Property<bool> m_forceGeoIDSvc{this, "AlwaysUseGeoIDSvc", false, "Force geoID recalculation for each particle" };
100
101 ToolHandle<IGenEventFilter> m_truthPreselectionTool{this, "TruthPreselectionTool", "", "Tool for filtering out quasi-stable particle daughters"};
102
104 ServiceHandle<IInputConverter> m_inputConverter{this, "InputConverter", "", "Input McEventCollection->ISFParticleContainer conversion service."};
105
107 ServiceHandle<ITruthSvc> m_truthRecordSvc{this,"TruthRecordService", "ISF_MC15aPlusTruthService", ""};
108
110 ServiceHandle<Simulation::IZeroLifetimePatcher> m_qspatcher{this, "QuasiStablePatcher", "", "Quasi-Stable Particle Simulation Patcher"};
111
113 ToolHandleArray<ISimulatorTool> m_simulationTools{this, "SimulationTools", {}, ""};
114
117
119 PublicToolHandle<IEntryLayerTool> m_entryLayerTool{this, "EntryLayerTool", "ISF_EntryLayerToolMT", ""};
120
122 ServiceHandle<IGeoIDSvc> m_geoIDSvc{this, "GeoIDSvc", "", "Service to set particle GeoIDs"};
123
125 ToolHandle<IParticleOrderingTool> m_orderingTool{this, "ParticleOrderingTool", "", "Tool to set order of particles"};
126
128 std::array<PublicToolHandleArray<ISimulationSelector>, AtlasDetDescr::fNumAtlasRegions> m_simSelectors{{
129 {}, // fUndefinedAtlasRegion
130 {this, "IDSimulationSelectors", {} }, // fAtlasID
131 {this, "BeamPipeSimulationSelectors", {} }, // fAtlasFoward
132 {this, "CaloSimulationSelectors", {} }, // fAtlasCalo
133 {this, "MSSimulationSelectors", {} }, // fAtlasMS
134 {this, "CavernSimulationSelectors", {} } // fAtlasCavern
135 }};
136
138 std::map<ISF::SimulationFlavor, ISimulatorTool*> m_simToolMap;
139
141 Gaudi::Property<size_t> m_maxParticleVectorSize{this, "MaximumParticleVectorSize", 10240};
142};
143
144} // namespace ISF
145
146#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
Core Athena algorithm for the Integrated Simulation Framework.
Definition SimKernelMT.h:61
SG::WriteHandleKey< McEventCollection > m_outputTruthKey
Output Simulation Truth collection.
Definition SimKernelMT.h:91
ToolHandleArray< ISimulatorTool > m_simulationTools
Simulation Tools.
SG::ReadHandleKey< McEventCollection > m_inputEvgenKey
Input Generator Truth collection.
Definition SimKernelMT.h:89
BooleanProperty m_useShadowEvent
Definition SimKernelMT.h:97
SG::WriteHandleKey< TrackRecordCollection > m_muonEntryLayerKey
Definition SimKernelMT.h:94
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.
Gaudi::Property< size_t > m_maxParticleVectorSize
Number of particles simultaneously sent to simulator.
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:93
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...
std::array< PublicToolHandleArray< ISimulationSelector >, AtlasDetDescr::fNumAtlasRegions > m_simSelectors
The simulation selectors defining the "routing chain".
SG::WriteHandleKey< TrackRecordCollection > m_muonExitLayerKey
Definition SimKernelMT.h:95
Gaudi::Property< bool > m_forceGeoIDSvc
Force geoID recalculation for each particle.
Definition SimKernelMT.h:99
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
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:82
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.