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
G4FastSimulationMessenger.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4FastSimulationMessenger.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
#include "
G4FastSimulationMessenger.hh
"
30
#include "
G4UIdirectory.hh
"
31
#include "
G4UIcmdWithAString.hh
"
32
#include "
G4UIcmdWithoutParameter.hh
"
33
34
#include "
G4ios.hh
"
35
36
G4FastSimulationMessenger::
37
G4FastSimulationMessenger
(
G4GlobalFastSimulationManager
* theGFSM)
38
: fGlobalFastSimulationManager(theGFSM)
39
{
40
fFSDirectory
=
new
G4UIdirectory
(
"/param/"
);
41
fFSDirectory
->
SetGuidance
(
"Fast Simulation print/control commands."
);
42
43
fShowSetupCmd
=
44
new
G4UIcmdWithoutParameter
(
"/param/showSetup"
,
this
);
45
fShowSetupCmd
->
SetGuidance
(
"Show fast simulation setup:"
);
46
fShowSetupCmd
->
SetGuidance
(
" - for each world region:"
);
47
fShowSetupCmd
->
SetGuidance
(
" 1) fast simulation manager process attached;"
);
48
fShowSetupCmd
->
SetGuidance
(
" - and to which particles the process is attached to;"
);
49
fShowSetupCmd
->
SetGuidance
(
" 2) region hierarchy;"
);
50
fShowSetupCmd
->
SetGuidance
(
" - with for each the fast simulation models attached;"
);
51
fShowSetupCmd
->
AvailableForStates
(
G4State_Idle
,
G4State_GeomClosed
);
52
53
fListEnvelopesCmd
=
54
new
G4UIcmdWithAString
(
"/param/listEnvelopes"
,
this
);
55
fListEnvelopesCmd
->
SetParameterName
(
"ParticleName"
,
true
);
56
fListEnvelopesCmd
->
SetDefaultValue
(
"all"
);
57
fListEnvelopesCmd
->
SetGuidance
(
"List all the envelope names for a given Particle"
);
58
fListEnvelopesCmd
->
SetGuidance
(
"(or for all particles if without parameters)."
);
59
fListEnvelopesCmd
->
AvailableForStates
(
G4State_PreInit
,
G4State_Idle
);
60
61
fListModelsCmd
=
62
new
G4UIcmdWithAString
(
"/param/listModels"
,
this
);
63
fListModelsCmd
->
SetParameterName
(
"EnvelopeName"
,
true
);
64
fListModelsCmd
->
SetDefaultValue
(
"all"
);
65
fListModelsCmd
->
SetGuidance
(
"List all the Model names for a given Envelope"
);
66
fListModelsCmd
->
SetGuidance
(
"(or for all envelopes if without parameters)."
);
67
fListModelsCmd
->
AvailableForStates
(
G4State_PreInit
,
G4State_Idle
);
68
69
fListIsApplicableCmd
=
70
new
G4UIcmdWithAString
(
"/param/listIsApplicable"
,
this
);
71
fListIsApplicableCmd
->
SetParameterName
(
"ModelName"
,
true
);
72
fListIsApplicableCmd
->
SetDefaultValue
(
"all"
);
73
fListIsApplicableCmd
->
SetGuidance
(
"List all the Particle names a given Model is applicable"
);
74
fListIsApplicableCmd
->
SetGuidance
(
"(or for all Models if without parameters)."
);
75
76
fActivateModel
=
77
new
G4UIcmdWithAString
(
"/param/ActivateModel"
,
this
);
78
fActivateModel
->
SetParameterName
(
"ModelName"
,
false
);
79
fActivateModel
->
SetGuidance
(
"Activate a given Model."
);
80
81
fInActivateModel
=
82
new
G4UIcmdWithAString
(
"/param/InActivateModel"
,
this
);
83
fInActivateModel
->
SetParameterName
(
"ModelName"
,
false
);
84
fInActivateModel
->
SetGuidance
(
"InActivate a given Model."
);
85
}
86
87
G4FastSimulationMessenger::~G4FastSimulationMessenger
()
88
{
89
delete
fShowSetupCmd
;
90
fShowSetupCmd
= 0;
91
delete
fListIsApplicableCmd
;
92
fListIsApplicableCmd
= 0;
93
delete
fActivateModel
;
94
fActivateModel
= 0;
95
delete
fInActivateModel
;
96
fInActivateModel
= 0;
97
delete
fListModelsCmd
;
98
fListModelsCmd
= 0;
99
delete
fListEnvelopesCmd
;
100
fListEnvelopesCmd
= 0;
101
delete
fFSDirectory
;
102
fFSDirectory
= 0;
103
}
104
105
void
G4FastSimulationMessenger::SetNewValue
(
G4UIcommand
* command,
G4String
newValue)
106
{
107
if
(command ==
fShowSetupCmd
)
108
fGlobalFastSimulationManager
->
ShowSetup
();
109
if
( command ==
fListEnvelopesCmd
)
110
{
111
if
(newValue ==
"all"
)
112
fGlobalFastSimulationManager
->
ListEnvelopes
();
113
else
114
fGlobalFastSimulationManager
->
115
ListEnvelopes(
G4ParticleTable::GetParticleTable
()->
116
FindParticle(newValue));
117
}
118
if
( command ==
fListModelsCmd
)
119
fGlobalFastSimulationManager
->
ListEnvelopes
(newValue,
MODELS
);
120
if
( command ==
fListIsApplicableCmd
)
121
fGlobalFastSimulationManager
->
ListEnvelopes
(newValue,
ISAPPLICABLE
);
122
if
( command ==
fActivateModel
)
123
fGlobalFastSimulationManager
->
ActivateFastSimulationModel
(newValue);
124
if
( command ==
fInActivateModel
)
125
fGlobalFastSimulationManager
->
InActivateFastSimulationModel
(newValue);
126
}
geant4
tree
geant4-10.6-release
source
processes
parameterisation
src
G4FastSimulationMessenger.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:52
using
1.8.2 with
ECCE GitHub integration