SimG4Core
Application
interface
RunManagerMT.h
Go to the documentation of this file.
1
#ifndef SimG4Core_RunManagerMT_H
2
#define SimG4Core_RunManagerMT_H
3
4
#include "
FWCore/Framework/interface/Event.h
"
5
#include "
DataFormats/Common/interface/Handle.h
"
6
#include "
FWCore/Framework/interface/EventSetup.h
"
7
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
8
#include "
FWCore/Utilities/interface/InputTag.h
"
9
10
#include "
SimG4Core/Geometry/interface/SensitiveDetectorCatalog.h
"
11
12
#include "
SimG4Core/Notification/interface/SimActivityRegistry.h
"
13
14
#include <memory>
15
16
class
PrimaryTransformer
;
17
class
Generator
;
18
class
PhysicsList
;
19
class
CustomUIsession
;
20
21
class
SimWatcher
;
22
class
SimProducer
;
23
class
G4SimEvent
;
24
25
class
RunAction
;
26
27
class
DDCompactView
;
28
29
namespace
cms
{
30
class
DDCompactView
;
31
}
32
33
class
DDDWorld
;
34
35
class
G4MTRunManagerKernel;
36
class
G4Run;
37
class
G4Event;
38
class
G4StateManager;
39
class
G4GeometryManager;
40
class
RunAction
;
41
42
class
SimRunInterface
;
43
44
namespace
HepPDT
{
45
class
ParticleDataTable
;
46
}
47
53
class
RunManagerMTWorker
;
54
55
class
RunManagerMT
{
56
friend
class
RunManagerMTWorker
;
57
58
public
:
59
explicit
RunManagerMT
(
edm::ParameterSet
const
&);
60
~RunManagerMT
();
61
62
// void initG4(const DDCompactView*, const cms::DDCompactView*, const MagneticField*, const HepPDT::ParticleDataTable*);
63
void
initG4
(
const
DDCompactView
*,
const
cms::DDCompactView
*,
const
HepPDT::ParticleDataTable
*);
64
65
void
initializeUserActions
();
66
67
void
stopG4
();
68
69
void
Connect
(
RunAction
*);
70
71
// Keep this to keep ExceptionHandler to compile, probably removed
72
// later (or functionality moved to RunManagerMTWorker)
73
inline
void
abortRun
(
bool
softAbort =
false
) {}
74
75
inline
const
DDDWorld
&
world
()
const
{
return
*
m_world
; }
76
77
inline
const
SensitiveDetectorCatalog
&
catalog
()
const
{
return
m_catalog
; }
78
79
inline
const
std::vector<std::string>&
G4Commands
()
const
{
return
m_G4Commands
; }
80
81
// In order to share the physics list with the worker threads, we
82
// need a non-const pointer. Thread-safety is handled inside Geant4
83
// with TLS.
84
inline
PhysicsList
*
physicsListForWorker
()
const
{
return
m_physicsList
.get(); }
85
86
private
:
87
void
terminateRun
();
88
89
G4MTRunManagerKernel*
m_kernel
;
90
91
CustomUIsession
*
m_UIsession
;
92
std::unique_ptr<PhysicsList>
m_physicsList
;
93
bool
m_managerInitialized
;
94
bool
m_runTerminated
;
95
RunAction
*
m_userRunAction
;
96
G4Run*
m_currentRun
;
97
G4StateManager*
m_stateManager
;
98
G4GeometryManager*
m_geometryManager
;
99
100
std::unique_ptr<SimRunInterface>
m_runInterface
;
101
102
const
std::string
m_PhysicsTablesDir
;
103
bool
m_StorePhysicsTables
;
104
bool
m_RestorePhysicsTables
;
105
bool
m_UseParametrisedEMPhysics
;
106
bool
m_check
;
107
edm::ParameterSet
m_pPhysics
;
108
edm::ParameterSet
m_pRunAction
;
109
edm::ParameterSet
m_g4overlap
;
110
std::vector<std::string>
m_G4Commands
;
111
edm::ParameterSet
m_p
;
112
113
std::unique_ptr<DDDWorld>
m_world
;
114
SimActivityRegistry
m_registry
;
115
SensitiveDetectorCatalog
m_catalog
;
116
};
117
118
#endif
RunManagerMT::m_runInterface
std::unique_ptr< SimRunInterface > m_runInterface
Definition:
RunManagerMT.h:100
RunManagerMT::m_g4overlap
edm::ParameterSet m_g4overlap
Definition:
RunManagerMT.h:109
Handle.h
RunManagerMT::m_G4Commands
std::vector< std::string > m_G4Commands
Definition:
RunManagerMT.h:110
RunManagerMT::m_runTerminated
bool m_runTerminated
Definition:
RunManagerMT.h:94
G4SimEvent
Definition:
G4SimEvent.h:14
RunManagerMT::initializeUserActions
void initializeUserActions()
Definition:
RunManagerMT.cc:243
DDDWorld
Definition:
DDDWorld.h:14
RunManagerMT::m_UIsession
CustomUIsession * m_UIsession
Definition:
RunManagerMT.h:91
RunManagerMT::m_registry
SimActivityRegistry m_registry
Definition:
RunManagerMT.h:114
RunManagerMT::m_UseParametrisedEMPhysics
bool m_UseParametrisedEMPhysics
Definition:
RunManagerMT.h:105
RunManagerMT::m_check
bool m_check
Definition:
RunManagerMT.h:106
SimActivityRegistry.h
RunManagerMT::terminateRun
void terminateRun()
Definition:
RunManagerMT.cc:262
RunManagerMT::catalog
const SensitiveDetectorCatalog & catalog() const
Definition:
RunManagerMT.h:77
RunManagerMT::m_p
edm::ParameterSet m_p
Definition:
RunManagerMT.h:111
PrimaryTransformer
Definition:
PrimaryTransformer.h:6
RunManagerMT::RunManagerMT
RunManagerMT(edm::ParameterSet const &)
Definition:
RunManagerMT.cc:66
DDCompactView
Compact representation of the geometrical detector hierarchy.
Definition:
DDCompactView.h:81
RunManagerMT::m_currentRun
G4Run * m_currentRun
Definition:
RunManagerMT.h:96
RunManagerMT::world
const DDDWorld & world() const
Definition:
RunManagerMT.h:75
RunManagerMT::m_stateManager
G4StateManager * m_stateManager
Definition:
RunManagerMT.h:97
SensitiveDetectorCatalog
Definition:
SensitiveDetectorCatalog.h:10
PhysicsList
Definition:
PhysicsList.h:7
RunManagerMT::m_pPhysics
edm::ParameterSet m_pPhysics
Definition:
RunManagerMT.h:107
RunManagerMT::m_physicsList
std::unique_ptr< PhysicsList > m_physicsList
Definition:
RunManagerMT.h:92
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
RunManagerMT
Definition:
RunManagerMT.h:55
RunAction
Definition:
RunAction.h:15
edm::ParameterSet
Definition:
ParameterSet.h:47
RunManagerMT::~RunManagerMT
~RunManagerMT()
Definition:
RunManagerMT.cc:95
RunManagerMT::initG4
void initG4(const DDCompactView *, const cms::DDCompactView *, const HepPDT::ParticleDataTable *)
Definition:
RunManagerMT.cc:97
Event.h
HepPDT
Definition:
ParticleManager.h:17
SimProducer
Definition:
SimProducer.h:64
SensitiveDetectorCatalog.h
RunManagerMT::G4Commands
const std::vector< std::string > & G4Commands() const
Definition:
RunManagerMT.h:79
SimWatcher
Definition:
SimWatcher.h:33
RunManagerMT::m_userRunAction
RunAction * m_userRunAction
Definition:
RunManagerMT.h:95
InputTag.h
RunManagerMTWorker
Definition:
RunManagerMTWorker.h:41
Generator
Definition:
Generator.h:19
SimActivityRegistry
Definition:
SimActivityRegistry.h:43
RunManagerMT::physicsListForWorker
PhysicsList * physicsListForWorker() const
Definition:
RunManagerMT.h:84
CustomUIsession
Definition:
CustomUIsession.h:13
cms::DDCompactView
Definition:
DDCompactView.h:31
RunManagerMT::m_managerInitialized
bool m_managerInitialized
Definition:
RunManagerMT.h:93
EventSetup.h
RunManagerMT::m_StorePhysicsTables
bool m_StorePhysicsTables
Definition:
RunManagerMT.h:103
RunManagerMT::Connect
void Connect(RunAction *)
Definition:
RunManagerMT.cc:249
RunManagerMT::m_geometryManager
G4GeometryManager * m_geometryManager
Definition:
RunManagerMT.h:98
RunManagerMT::m_PhysicsTablesDir
const std::string m_PhysicsTablesDir
Definition:
RunManagerMT.h:102
RunManagerMT::m_world
std::unique_ptr< DDDWorld > m_world
Definition:
RunManagerMT.h:113
RunManagerMT::m_RestorePhysicsTables
bool m_RestorePhysicsTables
Definition:
RunManagerMT.h:104
RunManagerMT::stopG4
void stopG4()
Definition:
RunManagerMT.cc:254
ParameterSet.h
RunManagerMT::m_pRunAction
edm::ParameterSet m_pRunAction
Definition:
RunManagerMT.h:108
RunManagerMT::m_kernel
G4MTRunManagerKernel * m_kernel
Definition:
RunManagerMT.h:89
ParticleDataTable
HepPDT::ParticleDataTable ParticleDataTable
Definition:
ParticleDataTable.h:8
RunManagerMT::m_catalog
SensitiveDetectorCatalog m_catalog
Definition:
RunManagerMT.h:115
RunManagerMT::abortRun
void abortRun(bool softAbort=false)
Definition:
RunManagerMT.h:73
cms
Namespace of DDCMS conversion namespace.
Definition:
ProducerAnalyzer.cc:21
SimRunInterface
Definition:
SimRunInterface.h:18
Generated for CMSSW Reference Manual by
1.8.16