Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
F04DetectorMessenger.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 // $Id: F04DetectorMessenger.cc 78551 2014-01-07 09:45:08Z gcosmo $
27 //
30 //
31 
32 #include "F04DetectorMessenger.hh"
33 
34 #include "G4UIdirectory.hh"
35 #include "G4UIcmdWithAString.hh"
36 #include "G4UIcmdWithAnInteger.hh"
39 
40 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
41 
43  : fDetector(detector)
44 {
45  fDetDir = new G4UIdirectory("/field04/");
46  fDetDir->SetGuidance(" field04 Simulation ");
47 
48  fWorldMaterCmd = new G4UIcmdWithAString("/field04/SetWorldMat",this);
49  fWorldMaterCmd->SetGuidance("Select Material of the World");
50  fWorldMaterCmd->SetParameterName("wchoice",true);
54 
55  fWorldRCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetWorldR",this);
56  fWorldRCmd->SetGuidance("Set Radius of the World");
57  fWorldRCmd->SetParameterName("WSizeR",false,false);
59  fWorldRCmd->SetRange("WSizeR>0.");
62 
63  fWorldZCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetWorldZ",this);
64  fWorldZCmd->SetGuidance("Set Length of the World");
65  fWorldZCmd->SetParameterName("WSizeZ",false,false);
67  fWorldZCmd->SetRange("WSizeZ>0.");
70 
71  fCaptureRCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetCaptureR",this);
72  fCaptureRCmd->SetGuidance("Set Radius of the Capture Magnet");
73  fCaptureRCmd->SetParameterName("CSizeR",false,false);
75  fCaptureRCmd->SetRange("CSizeR>0.");
78 
79  fCaptureZCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetCaptureZ",this);
80  fCaptureZCmd->SetGuidance("Set Length of the Capture Magnet");
81  fCaptureZCmd->SetParameterName("CSizeZ",false,false);
83  fCaptureZCmd->SetRange("CSizeZ>0.");
86 
87  fTransferRCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetTransferR",this);
88  fTransferRCmd->SetGuidance("Set Radius of the Transfer Magnet");
89  fTransferRCmd->SetParameterName("TSizeR",false,false);
91  fTransferRCmd->SetRange("TSizeR>0.");
94 
95  fTransferZCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetTransferZ",this);
96  fTransferZCmd->SetGuidance("Set Length of the Transfer Magnet");
97  fTransferZCmd->SetParameterName("TSizeZ",false,false);
99  fTransferZCmd->SetRange("TSizeZ>0.");
102 
103  fTransferPCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetTransferP",this);
104  fTransferPCmd->SetGuidance("Set Z pos of the T-Mgnt from end of C-Mgnt");
105  fTransferPCmd->SetParameterName("TSizeP",false,false);
109 
110  fTgtMaterCmd = new G4UIcmdWithAString("/field04/SetTgtMat",this);
111  fTgtMaterCmd->SetGuidance("Select Material of the Target");
112  fTgtMaterCmd->SetParameterName("tchoice",true);
113  fTgtMaterCmd->SetDefaultValue("Tungsten");
116 
117  fTgtRadCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetTgtRad",this);
118  fTgtRadCmd->SetGuidance("Set Radius of the Target");
119  fTgtRadCmd->SetParameterName("TgtSizeR",false,false);
120  fTgtRadCmd->SetDefaultUnit("cm");
121  fTgtRadCmd->SetRange("TgtSizeR>0.");
124 
125  fTgtThickCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetTgtThick",this);
126  fTgtThickCmd->SetGuidance("Set Thickness of the Target");
127  fTgtThickCmd->SetParameterName("TgtSizeZ",false,false);
129  fTgtThickCmd->SetRange("TgtSizeZ>0.");
132 
133  fTgtPosCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetTgtPos",this);
134  fTgtPosCmd->SetGuidance("Set Z pos of the tgt relative to C-Mgnt centre");
135  fTgtPosCmd->SetParameterName("TgtSizeP",false,false);
136  fTgtPosCmd->SetDefaultUnit("cm");
139 
140  fTgtAngCmd = new G4UIcmdWithAnInteger("/field04/SetTgtAng",this);
141  fTgtAngCmd->
142  SetGuidance("Set the angle [in deg] of the Tgt relative to C-Mgnt centre");
145 
146  fDgrMaterCmd = new G4UIcmdWithAString("/field04/SetDgrMat",this);
147  fDgrMaterCmd->SetGuidance("Select Material of the Degrader");
148  fDgrMaterCmd->SetParameterName("dchoice",true);
149  fDgrMaterCmd->SetDefaultValue("Lead");
152 
153  fDgrRadCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetDgrRad",this);
154  fDgrRadCmd->SetGuidance("Set Radius of the Degrader");
155  fDgrRadCmd->SetParameterName("DrgSizeR",false,false);
156  fDgrRadCmd->SetDefaultUnit("cm");
157  fDgrRadCmd->SetRange("DrgSizeR>0.");
160 
161  fDgrThickCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetDgrThick",this);
162  fDgrThickCmd->SetGuidance("Set Thickness of the Degrader");
163  fDgrThickCmd->SetParameterName("DgrSizeZ",false,false);
165  fDgrThickCmd->SetRange("DgrSizeZ>0.");
168 
169  fDgrPosCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetDgrPos",this);
170  fDgrPosCmd->SetGuidance("Set Z pos of the Dgr relative to T-Mgnt centre");
171  fDgrPosCmd->SetParameterName("DgrSizeP",false,false);
172  fDgrPosCmd->SetDefaultUnit("cm");
175 }
176 
177 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
178 
180 {
181  delete fDetDir;
182 
183  delete fWorldMaterCmd;
184  delete fWorldRCmd;
185  delete fWorldZCmd;
186 
187  delete fCaptureRCmd;
188  delete fCaptureZCmd;
189 
190  delete fTransferRCmd;
191  delete fTransferZCmd;
192  delete fTransferPCmd;
193 
194  delete fTgtMaterCmd;
195  delete fTgtRadCmd;
196  delete fTgtThickCmd;
197  delete fTgtPosCmd;
198  delete fTgtAngCmd;
199 
200  delete fDgrMaterCmd;
201  delete fDgrRadCmd;
202  delete fDgrThickCmd;
203  delete fDgrPosCmd;
204 }
205 
206 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
207 
209 {
210  if( command == fWorldMaterCmd )
211  { fDetector->SetWorldMaterial(newValue);}
212 
213  if( command == fTgtMaterCmd )
214  { fDetector->SetTargetMaterial(newValue);}
215 
216  if( command == fDgrMaterCmd )
217  { fDetector->SetDegraderMaterial(newValue);}
218 
219  if( command == fWorldRCmd )
221 
222  if( command == fWorldZCmd )
224 
225  if( command == fCaptureRCmd )
227 
228  if( command == fCaptureZCmd )
230 
231  if( command == fTransferRCmd )
233 
234  if( command == fTransferZCmd )
236 
237  if( command == fTransferPCmd )
239 
240  if( command == fTgtRadCmd )
242 
243  if( command == fTgtThickCmd )
245 
246  if( command == fTgtPosCmd )
248 
249  if( command == fTgtAngCmd )
251 
252  if( command == fDgrRadCmd )
254 
255  if( command == fDgrThickCmd )
257 
258  if( command == fDgrPosCmd )
260 
261  if( command == fWorldZCmd )
263 
264  if( command == fWorldRCmd )
266 }
G4UIcmdWithAnInteger * fTgtAngCmd
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4UIcmdWithAString * fTgtMaterCmd
G4UIcmdWithAString * fDgrMaterCmd
G4UIcmdWithADoubleAndUnit * fTgtPosCmd
G4UIcmdWithADoubleAndUnit * fTransferZCmd
G4UIcmdWithADoubleAndUnit * fCaptureZCmd
void SetRange(const char *rs)
Definition: G4UIcommand.hh:125
void SetDefaultValue(const char *defVal)
static G4double GetNewDoubleValue(const char *paramString)
G4UIcmdWithADoubleAndUnit * fTransferRCmd
virtual void SetNewValue(G4UIcommand *, G4String)
F04DetectorMessenger(F04DetectorConstruction *)
Definition of the F04DetectorMessenger class.
G4UIcmdWithADoubleAndUnit * fDgrRadCmd
G4UIcmdWithADoubleAndUnit * fWorldZCmd
G4UIcmdWithADoubleAndUnit * fTgtRadCmd
G4UIcmdWithADoubleAndUnit * fCaptureRCmd
F04DetectorConstruction * fDetector
G4UIcmdWithADoubleAndUnit * fTransferPCmd
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4int GetNewIntValue(const char *paramString)
G4UIcmdWithAString * fWorldMaterCmd
G4UIcmdWithADoubleAndUnit * fDgrThickCmd
G4UIcmdWithADoubleAndUnit * fTgtThickCmd
G4UIcmdWithADoubleAndUnit * fDgrPosCmd
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:242
void SetToBeBroadcasted(G4bool val)
Definition: G4UIcommand.hh:184
G4UIcmdWithADoubleAndUnit * fWorldRCmd
void SetDefaultUnit(const char *defUnit)