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
ECCE @ EIC Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
analysis
coresoftware
Doxygen_Assist
ecce-detectors
fun4all_eicdetectors
geant4
tree
geant4-10.6-release
config
environments
examples
advanced
basic
extended
analysis
biasing
common
electromagnetic
errorpropagation
eventgenerator
exoticphysics
field
BlineTracer
field01
field02
include
src
F02ActionInitialization.cc
F02CalorHit.cc
F02CalorimeterSD.cc
F02DetectorConstruction.cc
F02DetectorMessenger.cc
F02ElectricFieldSetup.cc
F02FieldMessenger.cc
F02PrimaryGeneratorAction.cc
F02PrimaryGeneratorMessenger.cc
F02SteppingVerbose.cc
field02.cc
field03
field04
field05
field06
g3tog4
geometry
hadronic
medical
optical
parallel
parameterisations
persistency
physicslists
polarisation
radioactivedecay
runAndEvent
visualization
source
macros
online_distribution
tutorials
doxygen_mainpage.h
File Members
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
F02FieldMessenger.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file F02FieldMessenger.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
//
28
//
29
//
30
//
31
//
32
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
34
35
#include "
F02FieldMessenger.hh
"
36
37
#include "
F02ElectricFieldSetup.hh
"
38
#include "
G4UIcmdWithAnInteger.hh
"
39
#include "
G4UIcmdWithADoubleAndUnit.hh
"
40
#include "
G4UIcmdWith3VectorAndUnit.hh
"
41
#include "
G4UIcmdWithoutParameter.hh
"
42
43
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
44
45
F02FieldMessenger::F02FieldMessenger
(
F02ElectricFieldSetup
* fieldSetup)
46
:
G4UImessenger
(),
47
fElFieldSetup(fieldSetup),
48
fFieldDir(0),
49
fStepperCmd(0),
50
fElFieldZCmd(0),
51
fElFieldCmd(0),
52
fMinStepCmd(0),
53
fUpdateCmd(0)
54
{
55
fFieldDir
=
new
G4UIdirectory
(
"/field/"
);
56
fFieldDir
->
SetGuidance
(
"F02 field tracking control."
);
57
58
fStepperCmd
=
new
G4UIcmdWithAnInteger
(
"/field/setStepperType"
,
this
);
59
fStepperCmd
->
SetGuidance
(
"Select stepper type for electric field"
);
60
fStepperCmd
->
SetParameterName
(
"choice"
,
true
);
61
fStepperCmd
->
SetDefaultValue
(4);
62
fStepperCmd
->
AvailableForStates
(
G4State_PreInit
,
G4State_Idle
);
63
64
fUpdateCmd
=
new
G4UIcmdWithoutParameter
(
"/field/update"
,
this
);
65
fUpdateCmd
->
SetGuidance
(
"Update calorimeter geometry."
);
66
fUpdateCmd
->
SetGuidance
(
"This command MUST be applied before \"beamOn\" "
);
67
fUpdateCmd
->
SetGuidance
(
"if you changed geometrical value(s)."
);
68
fUpdateCmd
->
AvailableForStates
(
G4State_Idle
);
69
70
fElFieldZCmd
=
new
G4UIcmdWithADoubleAndUnit
(
"/field/setFieldZ"
,
this
);
71
fElFieldZCmd
->
SetGuidance
(
"Define uniform Electric field."
);
72
fElFieldZCmd
->
SetGuidance
(
"Electric field will be in Z direction."
);
73
fElFieldZCmd
->
SetGuidance
(
"Value of Electric field has to be given in volt/m"
);
74
fElFieldZCmd
->
SetParameterName
(
"Ez"
,
false
,
false
);
75
fElFieldZCmd
->
SetDefaultUnit
(
"megavolt/m"
);
76
fElFieldZCmd
->
AvailableForStates
(
G4State_Idle
);
77
78
fElFieldCmd
=
new
G4UIcmdWith3VectorAndUnit
(
"/field/setField"
,
this
);
79
fElFieldCmd
->
SetGuidance
(
"Define uniform Electric field."
);
80
fElFieldCmd
->
SetGuidance
(
"Value of Electric field has to be given in volt/m"
);
81
fElFieldCmd
->
SetParameterName
(
"Ex"
,
"Ey"
,
"Ez"
,
false
,
false
);
82
fElFieldCmd
->
SetDefaultUnit
(
"megavolt/m"
);
83
fElFieldCmd
->
AvailableForStates
(
G4State_Idle
);
84
85
fMinStepCmd
=
new
G4UIcmdWithADoubleAndUnit
(
"/field/setMinStep"
,
this
);
86
fMinStepCmd
->
SetGuidance
(
"Define minimal step"
);
87
fMinStepCmd
->
SetParameterName
(
"min step"
,
false
,
false
);
88
fMinStepCmd
->
SetDefaultUnit
(
"mm"
);
89
fMinStepCmd
->
AvailableForStates
(
G4State_Idle
);
90
}
91
92
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
93
94
F02FieldMessenger::~F02FieldMessenger
()
95
{
96
delete
fStepperCmd
;
97
delete
fElFieldZCmd
;
98
delete
fElFieldCmd
;
99
delete
fMinStepCmd
;
100
delete
fFieldDir
;
101
delete
fUpdateCmd
;
102
}
103
104
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
105
106
void
F02FieldMessenger::SetNewValue
(
G4UIcommand
* command,
G4String
newValue)
107
{
108
if
( command ==
fStepperCmd
)
109
fElFieldSetup
->
SetStepperType
(
fStepperCmd
->
GetNewIntValue
(newValue));
110
if
( command ==
fUpdateCmd
)
111
fElFieldSetup
->
UpdateIntegrator
();
112
if
( command ==
fElFieldZCmd
)
113
fElFieldSetup
->
SetFieldZValue
(
fElFieldZCmd
->
GetNewDoubleValue
(newValue));
114
if
( command ==
fElFieldCmd
)
115
fElFieldSetup
->
SetFieldValue
(
fElFieldCmd
->
GetNew3VectorValue
(newValue));
116
if
( command ==
fMinStepCmd
)
117
fElFieldSetup
->
SetMinStep
(
fMinStepCmd
->
GetNewDoubleValue
(newValue));
118
}
119
120
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
geant4
tree
geant4-10.6-release
examples
extended
field
field02
src
F02FieldMessenger.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:05
using
1.8.2 with
ECCE GitHub integration