Geant4
v4-10.4-release
메인 페이지
관련된 페이지
모듈
네임스페이스
클래스
파일들
파일 목록
파일 멤버
모두
클래스
네임스페이스들
파일들
함수
변수
타입정의
열거형 타입
열거형 멤버
Friends
매크로
그룹들
페이지들
source
processes
parameterisation
src
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
// $Id: G4FastSimulationMessenger.cc 68056 2013-03-13 14:44:48Z gcosmo $
28
//
29
30
#include "
G4FastSimulationMessenger.hh
"
31
#include "
G4UIdirectory.hh
"
32
#include "
G4UIcmdWithAString.hh
"
33
#include "
G4UIcmdWithoutParameter.hh
"
34
35
#include "
G4ios.hh
"
36
37
G4FastSimulationMessenger::
38
G4FastSimulationMessenger
(
G4GlobalFastSimulationManager
* theGFSM)
39
: fGlobalFastSimulationManager(theGFSM)
40
{
41
fFSDirectory
=
new
G4UIdirectory
(
"/param/"
);
42
fFSDirectory
->
SetGuidance
(
"Fast Simulation print/control commands."
);
43
44
fShowSetupCmd
=
45
new
G4UIcmdWithoutParameter
(
"/param/showSetup"
,
this
);
46
fShowSetupCmd
->
SetGuidance
(
"Show fast simulation setup:"
);
47
fShowSetupCmd
->
SetGuidance
(
" - for each world region:"
);
48
fShowSetupCmd
->
SetGuidance
(
" 1) fast simulation manager process attached;"
);
49
fShowSetupCmd
->
SetGuidance
(
" - and to which particles the process is attached to;"
);
50
fShowSetupCmd
->
SetGuidance
(
" 2) region hierarchy;"
);
51
fShowSetupCmd
->
SetGuidance
(
" - with for each the fast simulation models attached;"
);
52
fShowSetupCmd
->
AvailableForStates
(
G4State_Idle
,
G4State_GeomClosed
);
53
54
fListEnvelopesCmd
=
55
new
G4UIcmdWithAString
(
"/param/listEnvelopes"
,
this
);
56
fListEnvelopesCmd
->
SetParameterName
(
"ParticleName"
,
true
);
57
fListEnvelopesCmd
->
SetDefaultValue
(
"all"
);
58
fListEnvelopesCmd
->
SetGuidance
(
"List all the envelope names for a given Particle"
);
59
fListEnvelopesCmd
->
SetGuidance
(
"(or for all particles if without parameters)."
);
60
fListEnvelopesCmd
->
AvailableForStates
(
G4State_PreInit
,
G4State_Idle
);
61
62
fListModelsCmd
=
63
new
G4UIcmdWithAString
(
"/param/listModels"
,
this
);
64
fListModelsCmd
->
SetParameterName
(
"EnvelopeName"
,
true
);
65
fListModelsCmd
->
SetDefaultValue
(
"all"
);
66
fListModelsCmd
->
SetGuidance
(
"List all the Model names for a given Envelope"
);
67
fListModelsCmd
->
SetGuidance
(
"(or for all envelopes if without parameters)."
);
68
fListModelsCmd
->
AvailableForStates
(
G4State_PreInit
,
G4State_Idle
);
69
70
fListIsApplicableCmd
=
71
new
G4UIcmdWithAString
(
"/param/listIsApplicable"
,
this
);
72
fListIsApplicableCmd
->
SetParameterName
(
"ModelName"
,
true
);
73
fListIsApplicableCmd
->
SetDefaultValue
(
"all"
);
74
fListIsApplicableCmd
->
SetGuidance
(
"List all the Particle names a given Model is applicable"
);
75
fListIsApplicableCmd
->
SetGuidance
(
"(or for all Models if without parameters)."
);
76
77
fActivateModel
=
78
new
G4UIcmdWithAString
(
"/param/ActivateModel"
,
this
);
79
fActivateModel
->
SetParameterName
(
"ModelName"
,
false
);
80
fActivateModel
->
SetGuidance
(
"Activate a given Model."
);
81
82
fInActivateModel
=
83
new
G4UIcmdWithAString
(
"/param/InActivateModel"
,
this
);
84
fInActivateModel
->
SetParameterName
(
"ModelName"
,
false
);
85
fInActivateModel
->
SetGuidance
(
"InActivate a given Model."
);
86
}
87
88
G4FastSimulationMessenger::~G4FastSimulationMessenger
()
89
{
90
delete
fShowSetupCmd
;
91
fShowSetupCmd
= 0;
92
delete
fListIsApplicableCmd
;
93
fListIsApplicableCmd
= 0;
94
delete
fActivateModel
;
95
fActivateModel
= 0;
96
delete
fInActivateModel
;
97
fInActivateModel
= 0;
98
delete
fListModelsCmd
;
99
fListModelsCmd
= 0;
100
delete
fListEnvelopesCmd
;
101
fListEnvelopesCmd
= 0;
102
delete
fFSDirectory
;
103
fFSDirectory
= 0;
104
}
105
106
void
G4FastSimulationMessenger::SetNewValue
(
G4UIcommand
* command,
G4String
newValue)
107
{
108
if
(command ==
fShowSetupCmd
)
109
fGlobalFastSimulationManager
->
ShowSetup
();
110
if
( command ==
fListEnvelopesCmd
)
111
{
112
if
(newValue ==
"all"
)
113
fGlobalFastSimulationManager
->
ListEnvelopes
();
114
else
115
fGlobalFastSimulationManager
->
116
ListEnvelopes(
G4ParticleTable::GetParticleTable
()->
117
FindParticle(newValue));
118
}
119
if
( command ==
fListModelsCmd
)
120
fGlobalFastSimulationManager
->
ListEnvelopes
(newValue,
MODELS
);
121
if
( command ==
fListIsApplicableCmd
)
122
fGlobalFastSimulationManager
->
ListEnvelopes
(newValue,
ISAPPLICABLE
);
123
if
( command ==
fActivateModel
)
124
fGlobalFastSimulationManager
->
ActivateFastSimulationModel
(newValue);
125
if
( command ==
fInActivateModel
)
126
fGlobalFastSimulationManager
->
InActivateFastSimulationModel
(newValue);
127
}
G4UIcommand::SetGuidance
void SetGuidance(const char *aGuidance)
Definition:
G4UIcommand.hh:161
G4UIcmdWithAString.hh
G4FastSimulationMessenger::fActivateModel
G4UIcmdWithAString * fActivateModel
Definition:
G4FastSimulationMessenger.hh:71
G4FastSimulationMessenger::fListModelsCmd
G4UIcmdWithAString * fListModelsCmd
Definition:
G4FastSimulationMessenger.hh:69
G4ParticleTable::GetParticleTable
static G4ParticleTable * GetParticleTable()
Definition:
G4ParticleTable.cc:105
G4FastSimulationMessenger::fShowSetupCmd
G4UIcmdWithoutParameter * fShowSetupCmd
Definition:
G4FastSimulationMessenger.hh:67
MODELS
Definition:
G4GlobalFastSimulationManager.hh:62
G4ios.hh
G4State_Idle
Definition:
G4ApplicationState.hh:85
G4GlobalFastSimulationManager::ShowSetup
void ShowSetup()
Definition:
G4GlobalFastSimulationManager.cc:155
G4String
Definition:
examples/extended/parallel/TopC/ParN02/AnnotatedFiles/G4String.hh:45
G4FastSimulationMessenger::~G4FastSimulationMessenger
virtual ~G4FastSimulationMessenger()
Definition:
G4FastSimulationMessenger.cc:88
G4UIcmdWithAString::SetDefaultValue
void SetDefaultValue(const char *defVal)
Definition:
G4UIcmdWithAString.cc:57
G4GlobalFastSimulationManager::ActivateFastSimulationModel
void ActivateFastSimulationModel(const G4String &)
Definition:
G4GlobalFastSimulationManager.cc:127
G4UIdirectory
Definition:
G4UIdirectory.hh:41
G4FastSimulationMessenger::G4FastSimulationMessenger
G4FastSimulationMessenger(G4GlobalFastSimulationManager *theGFSM)
Definition:
G4FastSimulationMessenger.cc:38
G4GlobalFastSimulationManager
Definition:
G4GlobalFastSimulationManager.hh:85
G4State_GeomClosed
Definition:
G4ApplicationState.hh:85
G4FastSimulationMessenger::fInActivateModel
G4UIcmdWithAString * fInActivateModel
Definition:
G4FastSimulationMessenger.hh:72
G4GlobalFastSimulationManager::ListEnvelopes
void ListEnvelopes(const G4String &aName="all", listType aListType=NAMES_ONLY)
Definition:
G4GlobalFastSimulationManager.cc:256
G4FastSimulationMessenger::SetNewValue
void SetNewValue(G4UIcommand *command, G4String newValues)
Definition:
G4FastSimulationMessenger.cc:106
G4GlobalFastSimulationManager::InActivateFastSimulationModel
void InActivateFastSimulationModel(const G4String &)
Definition:
G4GlobalFastSimulationManager.cc:140
G4UIcmdWithoutParameter
Definition:
G4UIcmdWithoutParameter.hh:41
G4UIcmdWithAString
Definition:
G4UIcmdWithAString.hh:42
G4UIcommand
Definition:
G4UIcommand.hh:51
G4FastSimulationMessenger::fListEnvelopesCmd
G4UIcmdWithAString * fListEnvelopesCmd
Definition:
G4FastSimulationMessenger.hh:68
G4UIdirectory.hh
G4FastSimulationMessenger::fFSDirectory
G4UIdirectory * fFSDirectory
Definition:
G4FastSimulationMessenger.hh:66
G4UIcmdWithAString::SetParameterName
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
Definition:
G4UIcmdWithAString.cc:42
G4FastSimulationMessenger::fGlobalFastSimulationManager
G4GlobalFastSimulationManager * fGlobalFastSimulationManager
Definition:
G4FastSimulationMessenger.hh:63
ISAPPLICABLE
Definition:
G4GlobalFastSimulationManager.hh:63
G4FastSimulationMessenger::fListIsApplicableCmd
G4UIcmdWithAString * fListIsApplicableCmd
Definition:
G4FastSimulationMessenger.hh:70
G4State_PreInit
Definition:
G4ApplicationState.hh:85
G4FastSimulationMessenger.hh
G4UIcommand::AvailableForStates
void AvailableForStates(G4ApplicationState s1)
Definition:
G4UIcommand.cc:242
G4UIcmdWithoutParameter.hh
다음에 의해 생성됨 :
1.8.5