ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
PHG4Reco.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PHG4Reco.h
1
// Tell emacs that this is a C++ source
2
// -*- C++ -*-.
3
#ifndef G4MAIN_PHG4RECO_H
4
#define G4MAIN_PHG4RECO_H
5
6
#include <
g4decayer/EDecayType.hh
>
7
8
#include <
fun4all/SubsysReco.h
>
9
10
#include <phfield/PHFieldConfig.h>
11
12
#include <list>
13
#include <string>
// for string
14
15
// Forward declerations
16
class
G4RunManager
;
17
class
G4TBMagneticFieldSetup
;
18
class
G4UImanager
;
19
class
G4UImessenger
;
20
class
G4VisManager
;
21
class
PHCompositeNode
;
22
class
PHG4DisplayAction
;
23
class
PHG4PhenixDetector
;
24
class
PHG4PhenixEventAction
;
25
class
PHG4PhenixStackingAction
;
26
class
PHG4PhenixSteppingAction
;
27
class
PHG4PhenixTrackingAction
;
28
class
PHG4PrimaryGeneratorAction
;
29
class
PHG4Subsystem
;
30
class
PHG4UIsession
;
31
37
class
PHG4Reco
:
public
SubsysReco
38
{
39
public
:
41
PHG4Reco
(
const
std::string &
name
=
"PHG4RECO"
);
42
44
~PHG4Reco
()
override
;
45
47
int
Init
(
PHCompositeNode
*)
override
;
48
49
int
InitRun
(
PHCompositeNode
*topNode)
override
;
50
52
int
process_event
(
PHCompositeNode
*)
override
;
53
55
int
ResetEvent
(
PHCompositeNode
*)
override
;
56
58
void
Print
(
const
std::string &what = std::string())
const override
;
59
61
void
registerSubsystem
(
PHG4Subsystem
*subsystem)
62
{
63
m_SubsystemList
.push_back(subsystem);
64
}
65
67
int
ApplyCommand
(
const
std::string &cmd);
68
70
int
StartGui
();
71
72
int
InitField
(
PHCompositeNode
*topNode);
73
75
void
set_field
(
const
float
tesla
)
76
{
77
m_MagneticField
=
tesla
;
78
}
79
83
void
set_field_map
(
const
std::string &fmap,
const
PHFieldConfig::FieldConfigTypes
dim
)
84
{
85
m_FieldMapFile
= fmap;
86
m_FieldConfigType
=
dim
;
87
}
88
90
void
set_field_rescale
(
const
float
rescale) {
m_MagneticFieldRescale
= rescale; }
91
92
void
set_decayer_active
(
bool
b
) {
m_ActiveDecayerFlag
=
b
; }
93
void
set_force_decay
(
EDecayType
force_decay_type)
94
{
95
m_ActiveDecayerFlag
=
true
;
96
m_ActiveForceDecayFlag
=
true
;
97
m_ForceDecayType
= force_decay_type;
98
}
99
101
void
save_DST_geometry
(
bool
b
) {
m_SaveDstGeometryFlag
=
b
; }
102
void
SetWorldSizeX
(
const
double
sx) {
m_WorldSize
[0] = sx; }
103
void
SetWorldSizeY
(
const
double
sy) {
m_WorldSize
[1] = sy; }
104
void
SetWorldSizeZ
(
const
double
sz) {
m_WorldSize
[2] = sz; }
105
double
GetWorldSizeX
()
const
{
return
m_WorldSize
[0]; }
106
double
GetWorldSizeY
()
const
{
return
m_WorldSize
[1]; }
107
double
GetWorldSizeZ
()
const
{
return
m_WorldSize
[2]; }
108
void
SetWorldShape
(
const
std::string &
s
) {
m_WorldShape
=
s
; }
109
void
SetWorldMaterial
(
const
std::string &
s
) {
m_WorldMaterial
=
s
; }
110
void
SetPhysicsList
(
const
std::string &
s
) {
m_PhysicsList
=
s
; }
111
void
set_rapidity_coverage
(
const
double
eta
);
112
113
int
setupInputEventNodeReader
(
PHCompositeNode
*);
114
115
static
void
G4Seed
(
const
unsigned
int
i);
116
117
PHG4Subsystem
*
getSubsystem
(
const
std::string &
name
);
118
PHG4DisplayAction
*
GetDisplayAction
() {
return
m_DisplayAction
; }
119
void
Dump_GDML
(
const
std::string &
filename
);
120
void
Dump_G4_GDML
(
const
std::string &
filename
);
121
122
void
G4Verbosity
(
const
int
i);
123
125
void
setDisableUserActions
(
bool
b
=
true
) {
m_disableUserActions
=
b
; }
126
void
ApplyDisplayAction
();
127
128
private
:
129
static
void
g4guithread
(
void
*ptr);
130
int
InitUImanager
();
131
void
DefineMaterials
();
132
void
DefineRegions
();
133
134
float
m_MagneticField
= 0.;
135
float
m_MagneticFieldRescale
;
136
double
m_WorldSize
[3];
137
139
G4TBMagneticFieldSetup
*
m_Field
;
140
142
G4RunManager
*
m_RunManager
;
143
145
PHG4UIsession
*
m_UISession
;
146
148
PHG4PhenixDetector
*
m_Detector
;
149
151
PHG4PhenixEventAction
*
m_EventAction
;
152
154
PHG4PhenixStackingAction
*
m_StackingAction
=
nullptr
;
155
157
PHG4PhenixSteppingAction
*
m_SteppingAction
;
158
160
PHG4PhenixTrackingAction
*
m_TrackingAction
;
161
163
164
PHG4DisplayAction
*
m_DisplayAction
;
165
167
PHG4PrimaryGeneratorAction
*
m_GeneratorAction
;
168
170
std::list<PHG4Subsystem *>
m_SubsystemList
;
171
172
// visualization
173
G4VisManager
*
m_VisManager
;
174
175
// Message interface to Fun4All
176
G4UImessenger
*
m_Fun4AllMessenger
;
177
178
// for the G4 cmd line interface
179
G4UImanager
*
m_UImanager
;
180
double
m_EtaCoverage
;
181
PHFieldConfig::FieldConfigTypes
m_FieldConfigType
;
182
std::string
m_FieldMapFile
;
183
std::string
m_WorldShape
;
184
std::string
m_WorldMaterial
;
185
std::string
m_PhysicsList
;
186
187
// settings for the external Pythia6 decayer
188
bool
m_ActiveDecayerFlag
;
//< turn on/off decayer
189
bool
m_ActiveForceDecayFlag
;
//< turn on/off force decay channels
190
EDecayType
m_ForceDecayType
;
//< forced decay channel setting
191
192
bool
m_SaveDstGeometryFlag
;
193
bool
m_disableUserActions
;
194
};
195
196
#endif
coresoftware
blob
master
simulation
g4simulation
g4main
PHG4Reco.h
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:44
using
1.8.2 with
ECCE GitHub integration