ATLAS Offline Software
Loading...
Searching...
No Matches
SimKernel.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 ISF_ALGS_SIMKERNEL_H
6#define ISF_ALGS_SIMKERNEL_H 1
7
8// STL includes
9#include <string>
10
11// FrameWork includes
14#include "GaudiKernel/ToolHandle.h"
15#include "GaudiKernel/ServiceHandle.h"
18
19// ISF includes
20#include "ISF_Event/SimSvcID.h"
24
25// DetectorDescription
27
28// McEventCollection
31
32// forward declarations
33namespace PMonUtils {
34 class CustomBenchmark;
35}
36
37namespace ISF {
38
39 class IParticleMgr;
40 class ITruthSvc;
41 class ISimulationSvc;
42 class IMonitoringTool;
43 class IEventFilterTool;
44
45
68 class ATLAS_NOT_THREAD_SAFE SimKernel : public AthAlgorithm { // serial version
69
70 public:
72 SimKernel( const std::string& name, ISvcLocator* pSvcLocator );
73
75 virtual ~SimKernel();
76
78 StatusCode initialize();
79 StatusCode execute();
80
82 StatusCode finalize();
83
84 private:
85 StatusCode initSimSvcs( SimSelectorToolArray &simSelectorTools);
86
91 std::unique_ptr<McEventCollection>& shadowTruth,
92 ISFParticleContainer& simParticles) const;
93
94
101
102 ToolHandle<IGenEventFilter> m_truthPreselectionTool{this, "TruthPreselectionTool", "", "Tool for filtering out quasi-stable particle daughters"};
103
104 BooleanProperty m_useShadowEvent{this, "UseShadowEvent", false, "New approach to selecting particles for simulation" };
105
110
112 std::array<PublicToolHandleArray<ISimulationSelector>, AtlasDetDescr::fNumAtlasRegions> m_simSelectors{{ // TODO make private
113 {}, // fUndefinedAtlasRegion
114 {this, "IDSimulationSelectors", {} }, // fAtlasID
115 {this, "BeamPipeSimulationSelectors", {} }, // fAtlasFoward
116 {this, "CaloSimulationSelectors", {} }, // fAtlasCalo
117 {this, "MSSimulationSelectors", {} }, // fAtlasMS
118 {this, "CavernSimulationSelectors", {} } // fAtlasCavern
119 }};
120
123
125 ToolHandleArray<IEventFilterTool> m_eventFilters;
126
129 ToolHandle<IMonitoringTool> m_memMon;
130 unsigned int m_memUsageEvts;
131
133 std::vector<ISimulationSvc*> m_simSvcs;
134 std::vector<std::string> m_simSvcNames;
136
138 unsigned int m_numISFEvents;
139
142 //PMonUtils::CustomBenchmark *m_benchPDGCode; //TODO: implement this if feasible
143 //PMonUtils::CustomBenchmark *m_benchGeoID; //TODO: implement this if feasible
145
147 long int m_numParticles;
148
151 };
152}
153
154
155#endif //> !ISF_ALGS_SIMKERNEL_H
bool prepareInput(const std::string &name, const std::vector< int64_t > &shape, const std::vector< T > &data, std::vector< std::shared_ptr< tc::InferInput > > &inputs)
Handle class for reading from StoreGate.
Handle class for recording to StoreGate.
Define macros for attributes used to control the static checker.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
bool m_doMemMon
The Memory Info Tool.
Definition SimKernel.h:128
ServiceHandle< Simulation::IZeroLifetimePatcher > m_qspatcher
Quasi-Stable Particle Simulation Patcher.
Definition SimKernel.h:122
SG::WriteHandle< McEventCollection > m_outputPileupTruth
output pileup truth collection
Definition SimKernel.h:99
std::vector< ISimulationSvc * > m_simSvcs
Simulators to be used.
Definition SimKernel.h:133
bool m_doCPUMon
CPU Benchmarking.
Definition SimKernel.h:141
std::array< PublicToolHandleArray< ISimulationSelector >, AtlasDetDescr::fNumAtlasRegions > m_simSelectors
The Simulation Selector Chains.
Definition SimKernel.h:112
PMonUtils::CustomBenchmark * m_benchSimID
Definition SimKernel.h:144
long int m_numParticles
Statistics.
Definition SimKernel.h:147
BooleanProperty m_useShadowEvent
Definition SimKernel.h:104
ToolHandleArray< IEventFilterTool > m_eventFilters
The Event Filters.
Definition SimKernel.h:125
StatusCode finalize()
Athena algorithm's interface method finalize()
ServiceHandle< ITruthSvc > m_truthRecordSvc
Central truth service.
Definition SimKernel.h:109
std::vector< std::string > m_simSvcNames
SimSvc names.
Definition SimKernel.h:134
StatusCode execute()
Athena algorithm's interface method execute()
ToolHandle< IGenEventFilter > m_truthPreselectionTool
Definition SimKernel.h:102
SG::WriteHandle< McEventCollection > m_outputHardScatterTruth
output hard scatter truth collection
Definition SimKernel.h:98
SimKernel(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters.
Definition SimKernel.cxx:39
ISF::SimSvcID m_numSimSvcs
total number of SimSvcs used
Definition SimKernel.h:135
ServiceHandle< IInputConverter > m_inputConverter
input->ISFParticle converter
Definition SimKernel.h:100
SG::ReadHandle< McEventCollection > m_inputPileupEvgen
input pileup collection
Definition SimKernel.h:97
SG::ReadHandle< McEventCollection > m_inputHardScatterEvgen
Input/output truth collections and input conversion.
Definition SimKernel.h:96
unsigned int m_memUsageEvts
Definition SimKernel.h:130
unsigned int m_numISFEvents
keep track of the number of events processed
Definition SimKernel.h:138
StatusCode initSimSvcs(SimSelectorToolArray &simSelectorTools)
ToolHandle< IMonitoringTool > m_memMon
Definition SimKernel.h:129
size_t m_maxParticleVectorSize
tuning
Definition SimKernel.h:150
ServiceHandle< IParticleBroker > m_particleBroker
Central particle broker service.
Definition SimKernel.h:107
ISFParticleOrderedQueue.
ToolHandleArray< ISimulationSelector > SimSelectorToolArray
typedef for better readable code
uint8_t SimSvcID
Simulation service ID datatype.
Definition SimSvcID.h:28
std::list< ISF::ISFParticle * > ISFParticleContainer
generic ISFParticle container (not necessarily a std::list!)
void initialize()