4 #include "G4UIdirectory.hh"
5 #include "G4UIcommand.hh"
6 #include "G4UIparameter.hh"
7 #include "G4UIcmdWithAString.hh"
8 #include "G4UIcmdWithADoubleAndUnit.hh"
11 :WCSimDetector(WCSimDet)
13 WCSimDir =
new G4UIdirectory(
"/WCSim/");
14 WCSimDir->SetGuidance(
"Commands to change the geometry of the simulation");
17 PMTConfig =
new G4UIcmdWithAString(
"/WCSim/WCgeom",
this);
18 PMTConfig->SetGuidance(
"Set the geometry configuration for the WC.");
19 PMTConfig->SetGuidance(
"Available options are:\n"
21 "SuperK_20inchPMT_20perCent\n"
22 "SuperK_20inchBandL_20perCent\n"
23 "SuperK_12inchBandL_15perCent\n"
24 "SuperK_20inchBandL_14perCent\n"
25 "Cylinder_60x74_20inchBandL_14perCent\n"
26 "Cylinder_60x74_20inchBandL_40perCent\n"
27 "Cylinder_12inchHPD_15perCent\n"
32 "EggShapedHyperK_withHPD\n"
34 PMTConfig->SetParameterName(
"PMTConfig",
false);
36 "SuperK_20inchPMT_20perCent "
37 "SuperK_20inchBandL_20perCent "
38 "SuperK_12inchBandL_15perCent "
39 "SuperK_20inchBandL_14perCent "
40 "Cylinder_60x74_20inchBandL_14perCent "
41 "Cylinder_60x74_20inchBandL_40perCent "
42 "Cylinder_12inchHPD_15perCent "
47 "EggShapedHyperK_withHPD "
49 PMTConfig->AvailableForStates(G4State_PreInit, G4State_Idle);
51 WCVisChoice =
new G4UIcmdWithAString(
"/WCSim/WCVisChoice",
this);
52 WCVisChoice->SetGuidance(
"Set the visualization style for the WC.");
57 WCVisChoice->SetParameterName(
"WCVisChoice",
false);
61 WCVisChoice->AvailableForStates(G4State_PreInit, G4State_Idle);
64 PMTSize =
new G4UIcmdWithAString(
"/WCSim/WCPMTsize",
this);
65 PMTSize->SetGuidance(
"Set alternate PMT size for the WC (Must be entered after geometry details are set).");
66 PMTSize->SetGuidance(
"Available options 20inch 10inch");
67 PMTSize->SetParameterName(
"PMTSize",
false);
68 PMTSize->SetCandidates(
"20inch 10inch");
69 PMTSize->AvailableForStates(G4State_PreInit, G4State_Idle);
71 SavePi0 =
new G4UIcmdWithAString(
"/WCSim/SavePi0",
this);
72 SavePi0->SetGuidance(
"true or false");
73 SavePi0->SetParameterName(
"SavePi0",
false);
74 SavePi0->SetCandidates(
"true false");
75 SavePi0->AvailableForStates(G4State_PreInit, G4State_Idle);
78 PMTQEMethod =
new G4UIcmdWithAString(
"/WCSim/PMTQEMethod",
this);
79 PMTQEMethod->SetGuidance(
"Set the PMT configuration.");
82 "Stacking_And_SensitiveDetector\n"
83 "SensitiveDetector_Only\n"
85 PMTQEMethod->SetParameterName(
"PMTQEMethod",
false);
87 "Stacking_And_SensitiveDetector "
88 "SensitiveDetector_Only "
90 PMTQEMethod->AvailableForStates(G4State_PreInit, G4State_Idle);
92 PMTCollEff =
new G4UIcmdWithAString(
"/WCSim/PMTCollEff",
this);
93 PMTCollEff->SetGuidance(
"Set the PMT configuration.");
94 PMTCollEff->SetGuidance(
"Available options are:\n"
97 PMTCollEff->SetParameterName(
"PMTCollEff",
false);
100 PMTCollEff->AvailableForStates(G4State_PreInit, G4State_Idle);
102 waterTank_Length =
new G4UIcmdWithADoubleAndUnit(
"/WCSim/EggShapedHyperK/waterTank_Length",
this);
103 waterTank_Length->SetGuidance(
"Set the Length of the egg-shaped HyperK detector (unit: mm cm m).");
110 LCConfig =
new G4UIcmdWithAString(
"/WCSim/LCConfig",
this);
111 LCConfig->SetGuidance(
"Set the geometry configuration for the light collecting mirror.");
112 LCConfig->SetGuidance(
"**For 20 inch PMT Only**");
113 LCConfig->SetGuidance(
"Available options are:\n"
118 LCConfig->SetParameterName(
"LCConfig",
true);
119 LCConfig->SetCandidates(
"No_Mirror "
123 LCConfig->SetDefaultValue(
"No_Mirror");
124 LCConfig->AvailableForStates(G4State_PreInit, G4State_Idle);
126 WCConstruct =
new G4UIcmdWithoutParameter(
"/WCSim/Construct",
this);
127 WCConstruct->SetGuidance(
"Update detector construction with new settings.");
150 if ( newValue ==
"SuperK") {
152 }
else if ( newValue ==
"SuperK_20inchPMT_20perCent" ){
154 }
else if ( newValue ==
"SuperK_20inchBandL_20perCent" ){
156 }
else if ( newValue ==
"SuperK_12inchBandL_15perCent" ) {
158 }
else if ( newValue ==
"SuperK_20inchBandL_14perCent" ) {
160 }
else if ( newValue ==
"Cylinder_60x74_20inchBandL_14perCent" ) {
162 }
else if ( newValue ==
"Cylinder_60x74_20inchBandL_40perCent" ) {
164 }
else if ( newValue ==
"Cylinder_12inchHPD_15perCent" ){
166 }
else if ( newValue ==
"HyperK" ){
168 }
else if ( newValue ==
"HyperK_20perCent" ){
170 }
else if ( newValue ==
"HyperKWithOD" ){
172 }
else if ( newValue ==
"EggShapedHyperK") {
175 }
else if ( newValue ==
"EggShapedHyperK_withHPD") {
179 G4cout <<
"That geometry choice is not defined!" << G4endl;
183 G4cout <<
"Set the flag for saving pi0 info " << newValue << G4endl;
184 if (newValue==
"true"){
186 }
else if (newValue ==
"false"){
194 G4cout <<
"Set PMT QE Method " << newValue <<
" ";
195 if (newValue ==
"Stacking_Only"){
198 }
else if (newValue ==
"Stacking_And_SensitiveDetector"){
201 }
else if (newValue ==
"SensitiveDetector_Only"){
204 }
else if (newValue ==
"DoNotApplyQE"){
214 G4cout <<
"Set PMT Collection Efficiency " << newValue <<
" ";
215 if (newValue ==
"on"){
218 }
else if (newValue ==
"off"){
226 G4cout <<
"Set Vis Choice " << newValue <<
" ";
227 if (newValue ==
"OGLSX"){
229 }
else if (newValue ==
"RayTracer"){
237 if(isEggShapedHyperK ==
true){
238 G4cout <<
"Set Partition Length in a cylinder " << newValue <<
" " << G4endl;
244 G4cout <<
"Not egg-shaped HyperK Geometry. Detector length unchanged." << G4endl;
250 G4cout <<
"SET PMT SIZE" << G4endl;
251 if ( newValue ==
"20inch"){
253 }
else if (newValue ==
"10inch"){
256 G4cout <<
"That PMT size is not defined!" << G4endl;
261 if ( newValue ==
"No_Mirror") {
263 }
else if ( newValue ==
"Mirror_OldLC" ){
265 }
else if ( newValue ==
"Mirror_2018Oct" ){
void SuperK_20inchBandL_14perCent()
G4UIcmdWithAString * PMTCollEff
void Cylinder_60x74_20inchBandL_14perCent()
G4UIcmdWithAString * WCVisChoice
void SetHyperKGeometry_20perCent()
void SetHyperKWithODGeometry()
G4bool GetIsEggShapedHyperK()
void SetIsEggShapedHyperK(G4bool choice)
void SetPMT_Coll_Eff(G4int choice)
G4UIcmdWithAString * PMTConfig
G4UIcmdWithAString * PMTSize
~WCSimDetectorMessenger()
void SetwaterTank_Length(G4double length)
void SetLCType(G4int LightCollectorType)
G4UIcmdWithAString * LCConfig
G4UIcmdWithAString * SavePi0
G4UIcmdWithAString * tubeCmd
WCSimDetectorMessenger(WCSimDetectorConstruction *mpga)
void SetPMT_QE_Method(G4int choice)
void SetWaterTubeLength(G4double length)
void SetEggShapedHyperKGeometry()
void SuperK_20inchBandL_20perCent()
void Cylinder_12inchHPD_15perCent()
void SetVis_Choice(G4String choice)
void SetEggShapedHyperKGeometry_withHPD()
void SetIsUpright(G4bool choice)
WCSimDetectorConstruction * WCSimDetector
void SetNewValue(G4UIcommand *command, G4String newValues)
void SuperK_12inchBandL_15perCent()
void Cylinder_60x74_20inchBandL_40perCent()
G4UIcmdWithAString * distortionCmd
G4UIcmdWithAString * PMTQEMethod
G4UIcmdWithoutParameter * WCConstruct
G4UIcmdWithADoubleAndUnit * waterTank_Length
void SuperK_20inchPMT_20perCent()