ATLAS Offline Software
Loading...
Searching...
No Matches
G4AtlasRunManager.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef G4ATLASALG_G4AtlasRunManager_h
6#define G4ATLASALG_G4AtlasRunManager_h
7
8// Base class header
9#include "G4RunManager.hh"
10
11// Gaudi headers
12#include "GaudiKernel/ServiceHandle.h"
13#include "GaudiKernel/ToolHandle.h"
14
15// Athena headers
21
27
28class G4AtlasRunManager: public G4RunManager, public AthMessaging {
29
30public:
31
32 virtual ~G4AtlasRunManager() {}
33
35 static G4AtlasRunManager* GetG4AtlasRunManager ATLAS_NOT_THREAD_SAFE ();
36
38 bool ProcessEvent(G4Event* event);
39
41 void RunTermination() override final;
42
45 m_detConstruction = detConstruction;
46 }
47
49 void SetPhysListSvc(const std::string& typeAndName) {
50 m_physListSvc.setTypeAndName(typeAndName);
51 }
52
53 void SetRecordFlux(bool b, std::unique_ptr<IFluxRecorder> f) { m_recordFlux = b; m_fluxRecorder=std::move(f);}
54 void SetLogLevel(int) { /* Not implemented */ }
55
56 void SetVolumeSmartlessLevel(const std::map<std::string,double>& nameAndValue){
57 m_volumeSmartlessLevel = nameAndValue;
58 }
59
61 void SetQuietMode(bool quietMode) {
62 m_quietMode = quietMode;
63 }
64
65protected:
66
69 void Initialize() override final;
70 void InitializeGeometry() override final;
71 void InitializePhysics() override final;
73
75
78
79 void EndEvent();
80
82
84
86
88
89 std::unique_ptr<IFluxRecorder> m_fluxRecorder;
90
91 //Property to allow an arbitrary volume (named by string) to have its
92 //"smartless" value set
93 std::map<std::string, double> m_volumeSmartlessLevel;
94
96 bool m_quietMode{true};
97
98};
99
100#endif // G4ATLASALG_G4AtlasRunManager_h
Define macros for attributes used to control the static checker.
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
ATLAS custom singleton run manager.
void InitializeGeometry() override final
bool ProcessEvent(G4Event *event)
Does the work of simulating an ATLAS event.
ServiceHandle< IPhysicsListSvc > m_physListSvc
std::map< std::string, double > m_volumeSmartlessLevel
void SetRecordFlux(bool b, std::unique_ptr< IFluxRecorder > f)
void SetQuietMode(bool quietMode)
Configure the QuietMode option.
IDetectorConstructionTool * m_detConstruction
static G4AtlasRunManager *GetG4AtlasRunManager ATLAS_NOT_THREAD_SAFE()
Retrieve the singleton instance.
void RunTermination() override final
G4 function called at end of run.
G4AtlasRunManager()
Pure singleton private constructor.
bool m_quietMode
Quiet Mode for production.
void SetPhysListSvc(const std::string &typeAndName)
Configure the Physics List Tool handle.
std::unique_ptr< IFluxRecorder > m_fluxRecorder
Interface to flux recording.
void SetVolumeSmartlessLevel(const std::map< std::string, double > &nameAndValue)
void Initialize() override final
void SetDetConstructionTool(IDetectorConstructionTool *detConstruction)
Configure the detector construction tool.
void InitializePhysics() override final
Abstract interface to a detector construction tool.
Abstract interface to Geant4 Physics list classes.
#define private