29 fBesEmcGeometry=besEMCGeometry;
31 BesdetDir =
new G4UIdirectory(
"/calor/");
32 BesdetDir->SetGuidance(
"Bes calorimeter detector control.");
34 verboseCmd =
new G4UIcmdWithAnInteger(
"/calor/verbose",
this);
35 verboseCmd->SetGuidance(
"Set Verbose level of calor management category.");
36 verboseCmd->SetGuidance(
" 0 : Important information");
37 verboseCmd->SetGuidance(
" 1 : Base information");
38 verboseCmd->SetGuidance(
" 2 : More...");
39 verboseCmd->SetParameterName(
"level",
true);
40 verboseCmd->SetRange(
"level>=0");
41 verboseCmd->SetDefaultValue(0);
43 CryMaterCmd =
new G4UIcmdWithAString(
"/calor/setCryMat",
this);
44 CryMaterCmd->SetGuidance(
"Select Material of the Crystal.");
45 CryMaterCmd->SetParameterName(
"choice",
true,
true);
48 CasingMaterCmd =
new G4UIcmdWithAString(
"/calor/setCasMat",
this);
49 CasingMaterCmd->SetGuidance(
"Select Material of the Casing.");
50 CasingMaterCmd->SetParameterName(
"choice",
true,
true);
53 CasingThickCmd =
new G4UIcmdWith3VectorAndUnit(
"/calor/setCasThick",
this);
54 CasingThickCmd->SetGuidance(
"Set Thickness of the Casing");
55 CasingThickCmd->SetParameterName(
"TyvekThk",
"AlThk",
"MylarThk",
true);
56 CasingThickCmd->SetRange(
"Size>=0.");
57 CasingThickCmd->SetUnitCategory(
"Length");
59 CasingThickCmd->SetDefaultUnit(
"mm");
62 SizeRminCmd =
new G4UIcmdWithADoubleAndUnit(
"/calor/setSizeRmin",
this);
63 SizeRminCmd->SetGuidance(
"Set Rmin size of the barrel calorimeter");
64 SizeRminCmd->SetParameterName(
"Size",
true);
65 SizeRminCmd->SetRange(
"Size>0.");
66 SizeRminCmd->SetUnitCategory(
"Length");
67 SizeRminCmd->SetDefaultValue(fBesEmcGeometry->
GetBSCRmin()/cm);
68 SizeRminCmd->SetDefaultUnit(
"cm");
71 NbPhiCmd =
new G4UIcmdWithAnInteger(
"/calor/setNbPhi",
this);
72 NbPhiCmd->SetGuidance(
"Set number of crystals at phi direction.");
73 NbPhiCmd->SetParameterName(
"NbCrystals",
false);
74 NbPhiCmd->SetRange(
"NbCrystals>0 && NbCrystals<=150");
77 NbThetaCmd =
new G4UIcmdWithAnInteger(
"/calor/setNbTheta",
this);
78 NbThetaCmd->SetGuidance(
"Set number of crystals at theta direction.");
79 NbThetaCmd->SetParameterName(
"NbCrystals",
false);
80 NbThetaCmd->SetRange(
"NbCrystals>0 && NbCrystals<=22");
83 StartIDThetaCmd =
new G4UIcmdWithAnInteger(
"/calor/setStartTheta",
this);
84 StartIDThetaCmd->SetGuidance(
"Set ID of starting crystals at theta direction.");
85 StartIDThetaCmd->SetParameterName(
"IDCrystal",
false);
86 StartIDThetaCmd->SetRange(
"IDCrystal>=0 && IDCrystal<22");
89 LengthCmd =
new G4UIcmdWithADoubleAndUnit(
"/calor/setCryLength",
this);
90 LengthCmd->SetGuidance(
"Set Length of crystals of barrel calorimeter");
91 LengthCmd->SetParameterName(
"Size",
true);
92 LengthCmd->SetRange(
"Size>0.");
93 LengthCmd->SetUnitCategory(
"Length");
95 LengthCmd->SetDefaultUnit(
"cm");
98 UpdateCmd =
new G4UIcmdWithoutParameter(
"/calor/update",
this);
99 UpdateCmd->SetGuidance(
"Update calorimeter geometry.");
100 UpdateCmd->SetGuidance(
"This command MUST be applied before \"beamOn\" ");
101 UpdateCmd->SetGuidance(
"if you changed geometrical value(s).");
104 MagFieldCmd =
new G4UIcmdWithADoubleAndUnit(
"/calor/setField",
this);
105 MagFieldCmd->SetGuidance(
"Define magnetic field.");
106 MagFieldCmd->SetGuidance(
"Magnetic field will be in Z direction.");
107 MagFieldCmd->SetParameterName(
"Bz",
true);
108 MagFieldCmd->SetRange(
"Bz>=0.");
109 MagFieldCmd->SetUnitCategory(
"Magnetic flux density");
110 MagFieldCmd->SetDefaultValue(BesEmc->
GetMagField()/tesla);
111 MagFieldCmd->SetDefaultUnit(
"tesla");
135 if( command == verboseCmd )
140 if( command == CryMaterCmd )
143 if( command == CasingMaterCmd )
146 if( command == CasingThickCmd )
149 if( command == SizeRminCmd )
150 { BesEmc->
SetBSCRmin(SizeRminCmd->GetNewDoubleValue(newValue));}
152 if( command == NbPhiCmd )
153 { BesEmc->
SetBSCNbPhi(NbPhiCmd->GetNewIntValue(newValue));}
155 if( command == NbThetaCmd )
156 { BesEmc->
SetBSCNbTheta(NbThetaCmd->GetNewIntValue(newValue));}
158 if( command == StartIDThetaCmd )
161 if( command == LengthCmd )
164 if( command == UpdateCmd )
167 if( command == MagFieldCmd )
168 { BesEmc->
SetMagField(MagFieldCmd->GetNewDoubleValue(newValue));}