ATLAS Offline Software
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
12 #include "StoreGate/ReadHandle.h"
13 #include "StoreGate/WriteHandle.h"
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
33 namespace PMonUtils {
34  class CustomBenchmark;
35 }
36 
37 namespace 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 
80 
83 
84  private:
85  StatusCode initSimSvcs( SimSelectorToolArray &simSelectorTools);
86 
89  StatusCode prepareInput(SG::ReadHandle<McEventCollection>& inputTruth,
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  ToolHandleArray<ISimulationSelector> m_simSelectors[AtlasDetDescr::fNumAtlasRegions];
113 
116 
118  ToolHandleArray<IEventFilterTool> m_eventFilters;
119 
122  ToolHandle<IMonitoringTool> m_memMon;
123  unsigned int m_memUsageEvts;
124 
126  std::vector<ISimulationSvc*> m_simSvcs;
127  std::vector<std::string> m_simSvcNames;
129 
131  unsigned int m_numISFEvents;
132 
134  bool m_doCPUMon;
135  //PMonUtils::CustomBenchmark *m_benchPDGCode; //TODO: implement this if feasible
136  //PMonUtils::CustomBenchmark *m_benchGeoID; //TODO: implement this if feasible
138 
140  long int m_numParticles;
141 
144  };
145 }
146 
147 
148 #endif //> !ISF_ALGS_SIMKERNEL_H
ISF::SimKernel::m_qspatcher
ServiceHandle< Simulation::IZeroLifetimePatcher > m_qspatcher
Quasi-Stable Particle Simulation Patcher.
Definition: SimKernel.h:115
ISF::ISFParticleContainer
std::list< ISF::ISFParticle * > ISFParticleContainer
generic ISFParticle container (not necessarily a std::list!)
Definition: ISFParticleContainer.h:23
AtlasDetDescr::fNumAtlasRegions
@ fNumAtlasRegions
Definition: AtlasRegion.h:39
ISF::SimKernel::m_outputPileupTruth
SG::WriteHandle< McEventCollection > m_outputPileupTruth
output pileup truth collection
Definition: SimKernel.h:99
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:50
ISF::SimKernel::m_truthRecordSvc
ServiceHandle< ITruthSvc > m_truthRecordSvc
Central truth service.
Definition: SimKernel.h:109
ISF::SimKernel::m_numSimSvcs
ISF::SimSvcID m_numSimSvcs
total number of SimSvcs used
Definition: SimKernel.h:128
ISF::SimKernel::m_numISFEvents
unsigned int m_numISFEvents
keep track of the number of events processed
Definition: SimKernel.h:131
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition: checker_macros.h:212
AtlasRegion.h
SG::ReadHandle< McEventCollection >
initialize
void initialize()
Definition: run_EoverP.cxx:894
ISF::SimKernel::m_doCPUMon
bool m_doCPUMon
CPU Benchmarking.
Definition: SimKernel.h:134
IInputConverter.h
ISF::SimKernel::m_simSvcs
std::vector< ISimulationSvc * > m_simSvcs
Simulators to be used.
Definition: SimKernel.h:126
ISF::SimKernel::m_inputHardScatterEvgen
SG::ReadHandle< McEventCollection > m_inputHardScatterEvgen
Input/output truth collections and input conversion.
Definition: SimKernel.h:96
ISF::SimKernel::m_simSvcNames
std::vector< std::string > m_simSvcNames
SimSvc names.
Definition: SimKernel.h:127
ISF::SimSelectorToolArray
ToolHandleArray< ISimulationSelector > SimSelectorToolArray
typedef for better readable code
Definition: ISimulationSelector.h:76
LArG4FSStartPointFilterLegacy.execute
execute
Definition: LArG4FSStartPointFilterLegacy.py:20
AthAlgorithm.h
PMonUtils
Definition: SimKernel.h:33
WriteHandle.h
Handle class for recording to StoreGate.
ISF::SimKernel::m_memUsageEvts
unsigned int m_memUsageEvts
Definition: SimKernel.h:123
McEventCollection.h
ISimulationSelector.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ISF::SimKernel::m_numParticles
long int m_numParticles
Statistics.
Definition: SimKernel.h:140
AthAlgorithm
Definition: AthAlgorithm.h:47
ISF::SimKernel::m_inputPileupEvgen
SG::ReadHandle< McEventCollection > m_inputPileupEvgen
input pileup collection
Definition: SimKernel.h:97
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
IZeroLifetimePatcher.h
ISF::SimKernel
Definition: SimKernel.h:68
ISF::SimKernel::m_memMon
ToolHandle< IMonitoringTool > m_memMon
Definition: SimKernel.h:122
SG::WriteHandle< McEventCollection >
ISF::SimSvcID
uint8_t SimSvcID
Simulation service ID datatype.
Definition: SimSvcID.h:28
ISF
ISFParticleOrderedQueue.
Definition: PrimaryParticleInformation.h:13
ISF::SimKernel::m_maxParticleVectorSize
size_t m_maxParticleVectorSize
tuning
Definition: SimKernel.h:143
ISF::SimKernel::m_outputHardScatterTruth
SG::WriteHandle< McEventCollection > m_outputHardScatterTruth
output hard scatter truth collection
Definition: SimKernel.h:98
ISF::SimKernel::m_eventFilters
ToolHandleArray< IEventFilterTool > m_eventFilters
The Event Filters.
Definition: SimKernel.h:118
ISF::SimKernel::m_particleBroker
ServiceHandle< IParticleBroker > m_particleBroker
Central particle broker service.
Definition: SimKernel.h:107
ReadHandle.h
Handle class for reading from StoreGate.
ISF::SimKernel::m_inputConverter
ServiceHandle< IInputConverter > m_inputConverter
input->ISFParticle converter
Definition: SimKernel.h:100
ISF::SimKernel::m_benchSimID
PMonUtils::CustomBenchmark * m_benchSimID
Definition: SimKernel.h:137
checker_macros.h
Define macros for attributes used to control the static checker.
IGenEventFilter.h
SimSvcID.h
ISF::SimKernel::m_doMemMon
bool m_doMemMon
The Memory Info Tool.
Definition: SimKernel.h:121
PMonUtils::CustomBenchmark
Definition: CustomBenchmark.h:30
ServiceHandle
Definition: ClusterMakerTool.h:37