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
G4EmMessenger.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4EmMessenger.cc
1
//
2
// ********************************************************************
3
// * License and Disclaimer *
4
// * *
5
// * The Geant4 software is copyright of the Copyright Holders of *
6
// * the Geant4 Collaboration. It is provided under the terms and *
7
// * conditions of the Geant4 Software License, included in the file *
8
// * LICENSE and available at http://cern.ch/geant4/license . These *
9
// * include a list of copyright holders. *
10
// * *
11
// * Neither the authors of this software system, nor their employing *
12
// * institutes,nor the agencies providing financial support for this *
13
// * work make any representation or warranty, express or implied, *
14
// * regarding this software system or assume any liability for its *
15
// * use. Please see the license in the file LICENSE and URL above *
16
// * for the full disclaimer and the limitation of liability. *
17
// * *
18
// * This code implementation is the result of the scientific and *
19
// * technical work of the GEANT4 collaboration. *
20
// * By using, copying, modifying or distributing the software (or *
21
// * any work based on the software) you agree to acknowledge its *
22
// * use in resulting scientific publications, and indicate your *
23
// * acceptance of all terms of the Geant4 Software license. *
24
// ********************************************************************
25
//
26
//
27
//---------------------------------------------------------------------------
28
//
29
// ClassName: G4EmMessenger
30
//
31
// Author: 2002 J.P. Wellisch
32
//
33
// Modified:
34
// 09.11.2005 V.Ivanchenko edit to provide a standard
35
// 19.06.2006 V.Ivanchenko add mu-nuclear process
36
//
37
//----------------------------------------------------------------------------
38
//
39
40
#include "
G4EmMessenger.hh
"
41
#include "
G4EmExtraPhysics.hh
"
42
43
44
//A. Dotti (8Jun2013): This class does not need changes for MT
45
// Note that in general "physics" realated commands should not
46
// be executed by threads, but this is a special case. Actually the command
47
// executes a building of processes if it was not build before, thus we need
48
// all threads to process commands.
49
// The logic of thread-private objects is in G4EmExtraPhysics class
50
51
G4EmMessenger::G4EmMessenger
(
G4EmExtraPhysics
*
ab
)
52
{
53
theB
=
ab
;
54
aDir1
=
new
G4UIdirectory
(
"/physics_lists/"
);
55
aDir1
->
SetGuidance
(
"commands related to the physics simulation engine."
);
56
57
// general stuff.
58
aDir2
=
new
G4UIdirectory
(
"/physics_lists/em/"
);
59
aDir2
->
SetGuidance
(
"tailoring the processes"
);
60
61
// command for synchrotron radiation.
62
theSynch
=
new
G4UIcmdWithABool
(
"/physics_lists/em/SyncRadiation"
,
this
);
63
theSynch
->
SetGuidance
(
"Switching on/off synchrotron radiation."
);
64
theSynch
->
AvailableForStates
(
G4State_PreInit
);
65
66
// command for synchrotron radiation.
67
theSynchAll
=
new
G4UIcmdWithABool
(
"/physics_lists/em/SyncRadiationAll"
,
this
);
68
theSynchAll
->
SetGuidance
(
"Switching on/off synchrotron radiation for all charged."
);
69
theSynchAll
->
AvailableForStates
(
G4State_PreInit
);
70
71
// command for gamma nuclear physics.
72
theGN
=
new
G4UIcmdWithABool
(
"/physics_lists/em/GammaNuclear"
,
this
);
73
theGN
->
SetGuidance
(
"Switching on gamma nuclear physics."
);
74
theGN
->
AvailableForStates
(
G4State_PreInit
);
75
76
// command for lend gamma nuclear physics.
77
theGLENDN
=
new
G4UIcmdWithABool
(
"/physics_lists/em/LENDGammaNuclear"
,
this
);
78
theGLENDN
->
SetGuidance
(
"Switching on LEND gamma nuclear physics."
);
79
theGLENDN
->
AvailableForStates
(
G4State_PreInit
);
80
81
theEN
=
new
G4UIcmdWithABool
(
"/physics_lists/em/ElectroNuclear"
,
this
);
82
theEN
->
SetGuidance
(
"Switching on e+- nuclear physics."
);
83
theEN
->
AvailableForStates
(
G4State_PreInit
);
84
85
// command for muon nuclear physics.
86
theMUN
=
new
G4UIcmdWithABool
(
"/physics_lists/em/MuonNuclear"
,
this
);
87
theMUN
->
SetGuidance
(
"Switching on muon nuclear physics."
);
88
theMUN
->
AvailableForStates
(
G4State_PreInit
);
89
90
theGMM
=
new
G4UIcmdWithABool
(
"/physics_lists/em/GammaToMuons"
,
this
);
91
theGMM
->
SetGuidance
(
"Switching on gamma conversion to muon pair."
);
92
theGMM
->
AvailableForStates
(
G4State_PreInit
);
93
94
thePMM
=
new
G4UIcmdWithABool
(
"/physics_lists/em/PositronToMuons"
,
this
);
95
thePMM
->
SetGuidance
(
"Switching on positron conversion to muon pair."
);
96
thePMM
->
AvailableForStates
(
G4State_PreInit
);
97
98
thePH
=
new
G4UIcmdWithABool
(
"/physics_lists/em/PositronToHadrons"
,
this
);
99
thePH
->
SetGuidance
(
"Switching on positron conversion to hadrons."
);
100
thePH
->
AvailableForStates
(
G4State_PreInit
);
101
102
theNu
=
new
G4UIcmdWithABool
(
"/physics_lists/em/NeutrinoActivation"
,
this
);
103
theNu
->
SetGuidance
(
"Activation of neutrino processes"
);
104
theNu
->
AvailableForStates
(
G4State_PreInit
);
105
106
theNuETX
=
new
G4UIcmdWithABool
(
"/physics_lists/em/NuETotXscActivation"
,
this
);
107
theNuETX
->
SetGuidance
(
"Activation of neutrino processes"
);
108
theNuETX
->
AvailableForStates
(
G4State_PreInit
);
109
110
theGMM1
=
new
G4UIcmdWithADouble
(
"/physics_lists/em/GammaToMuonsFactor"
,
this
);
111
theGMM1
->
SetGuidance
(
"Factor for gamma conversion to muon pair."
);
112
theGMM1
->
AvailableForStates
(
G4State_PreInit
);
113
114
thePMM1
=
new
G4UIcmdWithADouble
(
"/physics_lists/em/PositronToMuonsFactor"
,
this
);
115
thePMM1
->
SetGuidance
(
"Factor for positron conversion to muon pair."
);
116
thePMM1
->
AvailableForStates
(
G4State_PreInit
);
117
118
thePH1
=
new
G4UIcmdWithADouble
(
"/physics_lists/em/PositronToHadronsFactor"
,
this
);
119
thePH1
->
SetGuidance
(
"Factor for positron conversion to hadrons."
);
120
thePH1
->
AvailableForStates
(
G4State_PreInit
);
121
122
theNuEleCcBF
=
new
G4UIcmdWithADouble
(
"/physics_lists/em/NuEleCcBias"
,
this
);
123
theNuEleCcBF
->
SetGuidance
(
"Neutrino-electron cc-current bias factor"
);
124
theNuEleCcBF
->
AvailableForStates
(
G4State_PreInit
);
125
126
theNuEleNcBF
=
new
G4UIcmdWithADouble
(
"/physics_lists/em/NuEleNcBias"
,
this
);
127
theNuEleNcBF
->
SetGuidance
(
"Neutrino-electron nc-current bias factor"
);
128
theNuEleNcBF
->
AvailableForStates
(
G4State_PreInit
);
129
130
theNuNucleusBF
=
new
G4UIcmdWithADouble
(
"/physics_lists/em/NuNucleusBias"
,
this
);
131
theNuNucleusBF
->
SetGuidance
(
"Neutrino-nucleus bias factor"
);
132
theNuNucleusBF
->
AvailableForStates
(
G4State_PreInit
);
133
134
theNuDN
=
new
G4UIcmdWithAString
(
"/physics_lists/em/NuDetectorName"
,
this
);
135
theNuDN
->
SetGuidance
(
"Set neutrino detector name"
);
136
theNuDN
->
AvailableForStates
(
G4State_PreInit
);
137
}
138
139
G4EmMessenger::~G4EmMessenger
()
140
{
141
delete
theSynch
;
142
delete
theSynchAll
;
143
delete
theGN
;
144
delete
theGLENDN
;
145
delete
theEN
;
146
delete
theMUN
;
147
delete
theGMM
;
148
delete
thePMM
;
149
delete
thePH
;
150
delete
theNu
;
151
delete
theNuETX
;
152
153
delete
theGMM1
;
154
delete
thePMM1
;
155
delete
thePH1
;
156
delete
theNuEleCcBF
;
157
delete
theNuEleNcBF
;
158
delete
theNuNucleusBF
;
159
delete
theNuDN
;
160
161
delete
aDir1
;
162
delete
aDir2
;
163
}
164
165
void
G4EmMessenger::SetNewValue
(
G4UIcommand
* aComm,
G4String
aS)
166
{
167
if
(aComm==
theSynch
)
theB
->
Synch
(
theSynch
->
GetNewBoolValue
(aS));
168
if
(aComm==
theSynchAll
)
theB
->
SynchAll
(
theSynchAll
->
GetNewBoolValue
(aS));
169
if
(aComm==
theGN
)
theB
->
GammaNuclear
(
theGN
->
GetNewBoolValue
(aS));
170
if
(aComm==
theGLENDN
)
theB
->
LENDGammaNuclear
(
theGLENDN
->
GetNewBoolValue
(aS));
171
if
(aComm==
theEN
)
theB
->
ElectroNuclear
(
theEN
->
GetNewBoolValue
(aS));
172
if
(aComm==
theMUN
)
theB
->
MuonNuclear
(
theMUN
->
GetNewBoolValue
(aS));
173
if
(aComm==
theGMM
)
theB
->
GammaToMuMu
(
theGMM
->
GetNewBoolValue
(aS));
174
if
(aComm==
thePMM
)
theB
->
PositronToMuMu
(
thePMM
->
GetNewBoolValue
(aS));
175
if
(aComm==
thePH
)
theB
->
PositronToHadrons
(
thePH
->
GetNewBoolValue
(aS));
176
if
(aComm==
theNu
)
theB
->
NeutrinoActivated
(
theNu
->
GetNewBoolValue
(aS));
177
if
(aComm==
theNuETX
)
theB
->
NuETotXscActivated
(
theNu
->
GetNewBoolValue
(aS));
178
179
if
(aComm==
theGMM1
)
theB
->
GammaToMuMuFactor
(
theGMM1
->
GetNewDoubleValue
(aS));
180
if
(aComm==
thePMM1
)
theB
->
PositronToMuMuFactor
(
thePMM1
->
GetNewDoubleValue
(aS));
181
if
(aComm==
thePH1
)
theB
->
PositronToHadronsFactor
(
thePH1
->
GetNewDoubleValue
(aS));
182
183
if
(aComm==
theNuEleCcBF
)
theB
->
SetNuEleCcBias
(
theNuEleCcBF
->
GetNewDoubleValue
(aS));
184
if
(aComm==
theNuEleNcBF
)
theB
->
SetNuEleNcBias
(
theNuEleCcBF
->
GetNewDoubleValue
(aS));
185
if
(aComm==
theNuNucleusBF
)
theB
->
SetNuNucleusBias
(
theNuNucleusBF
->
GetNewDoubleValue
(aS));
186
187
if
(aComm==
theNuDN
)
theB
->
SetNuDetectorName
(aS);
188
}
geant4
tree
geant4-10.6-release
source
physics_lists
constructors
gamma_lepto_nuclear
src
G4EmMessenger.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:27
using
1.8.2 with
ECCE GitHub integration