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
blob
master
calibrations
generators
offline
simulation
g4simulation
EICPhysicsList
g4bbc
g4calo
g4centrality
g4decayer
g4detectors
g4epd
g4eval
g4gdml
g4histos
g4intt
g4jets
g4main
EicEventHeader.cc
EicEventHeader.h
EicEventHeaderLinkDef.h
EicEventHeaderv1.cc
EicEventHeaderv1.h
EicEventHeaderv1LinkDef.h
Fun4AllDstPileupInputManager.cc
Fun4AllDstPileupInputManager.h
Fun4AllDstPileupMerger.cc
Fun4AllDstPileupMerger.h
Fun4AllMessenger.cc
Fun4AllMessenger.h
Fun4AllSingleDstPileupInputManager.cc
Fun4AllSingleDstPileupInputManager.h
G4TBFieldMessenger.cc
G4TBFieldMessenger.hh
G4TBMagneticFieldSetup.cc
G4TBMagneticFieldSetup.hh
HepMCCompress.cc
HepMCCompress.h
HepMCNodeReader.cc
HepMCNodeReader.h
PHBBox.h
PHG4ColorDefs.h
PHG4ConsistencyCheck.cc
PHG4ConsistencyCheck.h
PHG4Detector.cc
PHG4Detector.h
PHG4DisplayAction.cc
PHG4DisplayAction.h
PHG4EtaParameterization.cc
PHG4EtaParameterization.h
PHG4EtaPhiParameterization.cc
PHG4EtaPhiParameterization.h
PHG4EventAction.h
PHG4EventHeader.h
PHG4EventHeaderLinkDef.h
PHG4EventHeaderv1.cc
PHG4EventHeaderv1.h
PHG4EventHeaderv1LinkDef.h
PHG4HeadReco.cc
PHG4HeadReco.h
PHG4Hit.cc
PHG4Hit.h
PHG4HitContainer.cc
PHG4HitContainer.h
PHG4HitContainerLinkDef.h
PHG4HitDefs.cc
PHG4HitDefs.h
PHG4HitEval.cc
PHG4HitEval.h
PHG4HitEvalLinkDef.h
PHG4HitLinkDef.h
PHG4HitReadBack.cc
PHG4HitReadBack.h
PHG4Hitv1.cc
PHG4Hitv1.h
PHG4Hitv1LinkDef.h
PHG4InEvent.cc
PHG4InEvent.h
PHG4InEventCompress.cc
PHG4InEventCompress.h
PHG4InEventLinkDef.h
PHG4InEventReadBack.cc
PHG4InEventReadBack.h
PHG4InputFilter.cc
PHG4InputFilter.h
PHG4IonGun.cc
PHG4IonGun.h
PHG4MagneticField.cc
PHG4MagneticField.h
PHG4Particle.cc
PHG4Particle.h
PHG4ParticleGenerator.cc
PHG4ParticleGenerator.h
PHG4ParticleGeneratorBase.cc
PHG4ParticleGeneratorBase.h
PHG4ParticleGeneratorD0.cc
PHG4ParticleGeneratorD0.h
PHG4ParticleGeneratorVectorMeson.cc
PHG4ParticleGeneratorVectorMeson.h
PHG4ParticleGun.cc
PHG4ParticleGun.h
PHG4ParticleLinkDef.h
PHG4Particlev1.cc
PHG4Particlev1.h
PHG4Particlev1LinkDef.h
PHG4Particlev2.cc
PHG4Particlev2.h
PHG4Particlev2LinkDef.h
PHG4Particlev3.cc
PHG4Particlev3.h
PHG4Particlev3LinkDef.h
PHG4PhenixDetector.cc
PHG4PhenixDetector.h
PHG4PhenixDisplayAction.cc
PHG4PhenixDisplayAction.h
PHG4PhenixEventAction.cc
PHG4PhenixEventAction.h
PHG4PhenixStackingAction.cc
PHG4PhenixStackingAction.h
PHG4PhenixSteppingAction.cc
PHG4PhenixSteppingAction.h
PHG4PhenixTrackingAction.cc
PHG4PhenixTrackingAction.h
PHG4PileupGenerator.cc
PHG4PileupGenerator.h
PHG4PrimaryGeneratorAction.cc
PHG4PrimaryGeneratorAction.h
PHG4Reco.cc
PHG4Reco.h
PHG4RegionInformation.cc
PHG4RegionInformation.h
PHG4ScoringManager.cc
PHG4ScoringManager.h
PHG4Shower.cc
PHG4Shower.h
PHG4ShowerLinkDef.h
PHG4Showerv1.cc
PHG4Showerv1.h
PHG4Showerv1LinkDef.h
PHG4SimpleEventGenerator.cc
PHG4SimpleEventGenerator.h
PHG4StackingAction.cc
PHG4StackingAction.h
PHG4SteppingAction.cc
PHG4SteppingAction.h
PHG4Subsystem.cc
PHG4Subsystem.h
PHG4TrackingAction.h
PHG4TrackUserInfoV1.cc
PHG4TrackUserInfoV1.h
PHG4TruthEventAction.cc
PHG4TruthEventAction.h
PHG4TruthInfoContainer.cc
PHG4TruthInfoContainer.h
PHG4TruthInfoContainerLinkDef.h
PHG4TruthSubsystem.cc
PHG4TruthSubsystem.h
PHG4TruthTrackingAction.cc
PHG4TruthTrackingAction.h
PHG4UIsession.cc
PHG4UIsession.h
PHG4Units.h
PHG4UserPrimaryParticleInformation.h
PHG4Utils.cc
PHG4Utils.h
PHG4VertexSelection.cc
PHG4VertexSelection.h
PHG4VtxPoint.cc
PHG4VtxPoint.h
PHG4VtxPointLinkDef.h
PHG4VtxPointv1.cc
PHG4VtxPointv1.h
PHG4VtxPointv1LinkDef.h
ReadEICFiles.cc
ReadEICFiles.h
g4micromegas
g4mvtx
g4tpc
g4trackfastsim
g4vertex
tpcresponse
Doxygen_Assist
ecce-detectors
fun4all_eicdetectors
geant4
macros
online_distribution
tutorials
doxygen_mainpage.h
File Members
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
G4TBFieldMessenger.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4TBFieldMessenger.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
// $Id: G4TBFieldMessenger.cc,v 1.5 2012/07/10 16:48:20 pinkenbu Exp $
28
// GEANT4 tag $Name: $
29
//
30
//
31
32
#include "
G4TBFieldMessenger.hh
"
33
34
#include "
G4TBMagneticFieldSetup.hh
"
35
36
#include <Geant4/G4ApplicationState.hh>
37
#include <Geant4/G4String.hh>
38
#include <Geant4/G4UIdirectory.hh>
39
#include <Geant4/G4UIcmdWithAString.hh>
40
#include <Geant4/G4UIcmdWithAnInteger.hh>
41
#include <Geant4/G4UIcmdWithADoubleAndUnit.hh>
42
#include <Geant4/G4UIcmdWithoutParameter.hh>
43
44
class
G4UIcommand
;
45
47
48
G4TBFieldMessenger::G4TBFieldMessenger
(
G4TBMagneticFieldSetup
* pEMfield)
49
:fEFieldSetup(pEMfield)
50
{
51
G4TBdetDir
=
new
G4UIdirectory
(
"/field/"
);
52
G4TBdetDir
->
SetGuidance
(
"G4TB field tracking control."
);
53
54
StepperCmd
=
new
G4UIcmdWithAnInteger
(
"/field/setStepperType"
,
this
);
55
StepperCmd
->
SetGuidance
(
"Select stepper type for electric field"
);
56
StepperCmd
->
SetParameterName
(
"choice"
,
true
);
57
StepperCmd
->
SetDefaultValue
(4);
58
StepperCmd
->
AvailableForStates
(
G4State_PreInit
,
G4State_Idle
);
59
60
61
UpdateCmd
=
new
G4UIcmdWithoutParameter
(
"/field/update"
,
this
);
62
UpdateCmd
->
SetGuidance
(
"Update calorimeter geometry."
);
63
UpdateCmd
->
SetGuidance
(
"This command MUST be applied before \"beamOn\" "
);
64
UpdateCmd
->
SetGuidance
(
"if you changed geometrical value(s)."
);
65
UpdateCmd
->
AvailableForStates
(
G4State_Idle
);
66
67
ElFieldCmd
=
new
G4UIcmdWithADoubleAndUnit
(
"/field/setFieldZ"
,
this
);
68
ElFieldCmd
->
SetGuidance
(
"Define uniform Electric field."
);
69
ElFieldCmd
->
SetGuidance
(
"Electric field will be in Z direction."
);
70
ElFieldCmd
->
SetGuidance
(
"Value of Electric field has to be given in volt/m"
);
71
ElFieldCmd
->
SetParameterName
(
"Ez"
,
false
,
false
);
72
ElFieldCmd
->
SetDefaultUnit
(
"volt/m"
);
73
ElFieldCmd
->
AvailableForStates
(
G4State_Idle
);
74
75
MinStepCmd
=
new
G4UIcmdWithADoubleAndUnit
(
"/field/setMinStep"
,
this
);
76
MinStepCmd
->
SetGuidance
(
"Define minimal step"
);
77
MinStepCmd
->
SetParameterName
(
"min step"
,
false
,
false
);
78
MinStepCmd
->
SetDefaultUnit
(
"mm"
);
79
MinStepCmd
->
AvailableForStates
(
G4State_Idle
);
80
81
AbsMaterCmd
=
new
G4UIcmdWithAString
(
"/field/setAbsMat"
,
this
);
82
AbsMaterCmd
->
SetGuidance
(
"Select Material of the Absorber."
);
83
AbsMaterCmd
->
SetParameterName
(
"choice"
,
true
);
84
AbsMaterCmd
->
SetDefaultValue
(
"Xe"
);
85
AbsMaterCmd
->
AvailableForStates
(
G4State_Idle
);
86
87
88
}
89
91
92
G4TBFieldMessenger::~G4TBFieldMessenger
()
93
{
94
delete
StepperCmd
;
95
delete
ElFieldCmd
;
96
delete
MinStepCmd
;
97
delete
G4TBdetDir
;
98
delete
UpdateCmd
;
99
100
delete
AbsMaterCmd
;
101
}
102
104
//
105
//
106
107
void
G4TBFieldMessenger::SetNewValue
(
G4UIcommand
* command,
G4String
newValue)
108
{
109
if
( command ==
StepperCmd
)
110
{
111
fEFieldSetup
->
SetStepperType
(
StepperCmd
->
GetNewIntValue
(newValue));
112
}
113
if
( command ==
UpdateCmd
)
114
{
115
fEFieldSetup
->
UpdateField
();
116
}
117
if
( command ==
ElFieldCmd
)
118
{
119
fEFieldSetup
->
SetFieldValue
(
ElFieldCmd
->
GetNewDoubleValue
(newValue));
120
}
121
if
( command ==
MinStepCmd
)
122
{
123
fEFieldSetup
->
SetMinStep
(
MinStepCmd
->
GetNewDoubleValue
(newValue));
124
}
125
}
126
127
//
128
//
coresoftware
blob
master
simulation
g4simulation
g4main
G4TBFieldMessenger.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:43
using
1.8.2 with
ECCE GitHub integration