QwGeant4
QweakSimTriggerScintillatorMessenger.cc
Go to the documentation of this file.
1 //=============================================================================
2 //
3 // ---------------------------
4 // | Doxygen File Information |
5 // ---------------------------
6 //
7 /**
8 
9  \file QweakSimTriggerScintillatorMessenger.cc
10 
11  $Revision: 1.2 $
12  $Date: 2005/12/27 19:16:32 $
13 
14  \author Klaus Hans Grimm
15 
16 */
17 //=============================================================================
18 
19 //=============================================================================
20 // -----------------------
21 // | CVS File Information |
22 // -----------------------
23 //
24 // Last Update: $Author: grimm $
25 // Update Date: $Date: 2005/12/27 19:16:32 $
26 // CVS/RCS Revision: $Revision: 1.2 $
27 // Status: $State: Exp $
28 //
29 // ===================================
30 // CVS Revision Log at end of file !!
31 // ===================================
32 //
33 //============================================================================
34 
35 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
36 
38 
39 // user includes
42 
43 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
44 
46 :myTriggerScintillator(theTriggerScintillator), fPackage(pkg)
47 {
48 
49  Dir = new G4UIdirectory("/TriggerScintillator/");
50  Dir -> SetGuidance("Trigger Scintillator Detector control.");
51 
52  ContainerThicknessCmd = new G4UIcmdWithADoubleAndUnit("/TriggerScintillator/SetThickness",this);
53  ContainerThicknessCmd->SetGuidance("Set the thickness (length in Z) of the TriggerScintillator container");
54  ContainerThicknessCmd->SetParameterName("Size",true);
55  ContainerThicknessCmd->SetUnitCategory("Length");
56  ContainerThicknessCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
57 
58  ContainerZPositionCmd = new G4UIcmdWithADoubleAndUnit("/TriggerScintillator/SetCenterPositionInZ",this);
59  ContainerZPositionCmd->SetGuidance("Set the Z position of the TriggerScintillator container center");
60  ContainerZPositionCmd->SetParameterName("Size",true);
61  ContainerZPositionCmd->SetUnitCategory("Length");
62  ContainerZPositionCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
63 
64  ContainerYPositionCmd = new G4UIcmdWithADoubleAndUnit("/TriggerScintillator/SetCenterPositionInY",this);
65  ContainerYPositionCmd->SetGuidance("Set the Y position of the TriggerScintillator container center");
66  ContainerYPositionCmd->SetParameterName("Size",true);
67  ContainerYPositionCmd->SetUnitCategory("Length");
68  ContainerYPositionCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
69 
70  ContainerXPositionCmd = new G4UIcmdWithADoubleAndUnit("/TriggerScintillator/SetCenterPositionInX",this);
71  ContainerXPositionCmd->SetGuidance("Set the X position of the TriggerScintillator container center");
72  ContainerXPositionCmd->SetParameterName("Size",true);
73  ContainerXPositionCmd->SetUnitCategory("Length");
74  ContainerXPositionCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
75 
76  TiltingAngleCmd = new G4UIcmdWithADoubleAndUnit("/TriggerScintillator/SetTiltingAngle",this);
77  TiltingAngleCmd->SetGuidance("Set the tilting angle of the TriggerScintillator Detector");
78  TiltingAngleCmd->SetParameterName("Angle",true);
79  TiltingAngleCmd->SetDefaultUnit("degree");
80  TiltingAngleCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
81 
82  ContainerMatCmd = new G4UIcmdWithAString("/TriggerScintillator/SetContainerMaterial",this);
83  ContainerMatCmd->SetGuidance("Select Material of the TriggerScintillator Container.");
84  ContainerMatCmd->SetParameterName("choice",false);
85  ContainerMatCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
86 
87  DetectorMatCmd = new G4UIcmdWithAString("/TriggerScintillator/SetScintillatorMaterial",this);
88  DetectorMatCmd->SetGuidance("Select Material of the TriggerScintillator Detector.");
89  DetectorMatCmd->SetParameterName("choice",false);
90  DetectorMatCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
91 
92  //-------------------------Individual TS Control-----------------------------------------
93  G4String DirPerPackage_name = "/TriggerScintillator/TriggerScintillator" + G4UIcommand::ConvertToString(fPackage+1);
94  DirPerPackage = new G4UIdirectory(G4String(DirPerPackage_name + "/"));
95  DirPerPackage -> SetGuidance("Individual TriggerScintillator detector control.");
96 
97 
98  ContainerZPosition_Pkg_Cmd = new G4UIcmdWithADoubleAndUnit(G4String(DirPerPackage_name + "/SetCenterPositionInZ"),this);
99  ContainerZPosition_Pkg_Cmd->SetGuidance("Set the Z position of the TriggerScintillator container center");
100  ContainerZPosition_Pkg_Cmd->SetParameterName("Size",true);
101  ContainerZPosition_Pkg_Cmd->SetUnitCategory("Length");
102  ContainerZPosition_Pkg_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
103 
104  ContainerYPosition_Pkg_Cmd = new G4UIcmdWithADoubleAndUnit(G4String(DirPerPackage_name + "/SetCenterPositionInY"),this);
105  ContainerYPosition_Pkg_Cmd->SetGuidance("Set the Y position of the TriggerScintillator container center");
106  ContainerYPosition_Pkg_Cmd->SetParameterName("Size",true);
107  ContainerYPosition_Pkg_Cmd->SetUnitCategory("Length");
108  ContainerYPosition_Pkg_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
109 
110  ContainerXPosition_Pkg_Cmd = new G4UIcmdWithADoubleAndUnit(G4String(DirPerPackage_name + "/SetCenterPositionInX"),this);
111  ContainerXPosition_Pkg_Cmd->SetGuidance("Set the X position of the TriggerScintillator container center");
112  ContainerXPosition_Pkg_Cmd->SetParameterName("Size",true);
113  ContainerXPosition_Pkg_Cmd->SetUnitCategory("Length");
114  ContainerXPosition_Pkg_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
115 }
116 
117 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
118 
120 {
124 
128 
130  if (DetectorMatCmd) delete DetectorMatCmd;
131  if (ContainerMatCmd) delete ContainerMatCmd;
132  if (TiltingAngleCmd) delete TiltingAngleCmd;
133  if (Dir) delete Dir;
134  if(DirPerPackage) delete DirPerPackage;
135 }
136 
137 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
138 
139 void QweakSimTriggerScintillatorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
140 {
141  G4cout << "#### Calling QweakSimTriggerScintillatorMessenger::SetNewValue() " << newValue << G4endl;
142 
143  if( command == ContainerThicknessCmd )
144  {
145  G4cout << "#### Messenger: Setting TriggerScintillator Container Thickness to " << newValue << G4endl;
146 
148  }
149 
150  if( command == ContainerXPositionCmd )
151  {
152  G4cout << "#### Messenger: Setting TriggerScintillator Container X position to " << newValue << G4endl;
153 
155  }
156 
157  if( command == ContainerYPositionCmd )
158  {
159  G4cout << "#### Messenger: Setting TriggerScintillator Container Y position to " << newValue << G4endl;
160 
162  }
163 
164  if( command == ContainerZPositionCmd )
165  {
166  G4cout << "#### Messenger: Setting TriggerScintillator Container Z position to " << newValue << G4endl;
167 
169  }
170  //--------------------------Individual Coordinate Control--------------------------------------------------
171  if( command == ContainerXPosition_Pkg_Cmd )
172  {
173  G4cout << "#### Messenger: Setting TriggerScintillator Container X position to " << newValue << G4endl;
174 
176  }
177 
178  if( command == ContainerYPosition_Pkg_Cmd )
179  {
180  G4cout << "#### Messenger: Setting TriggerScintillator Container Y position to " << newValue << G4endl;
181 
183  }
184 
185  if( command == ContainerZPosition_Pkg_Cmd )
186  {
187  G4cout << "#### Messenger: Setting TriggerScintillator Container Z position to " << newValue << G4endl;
188 
190  }
191  //------------------------------------End of Individual Control---------------------------------------
192 
193 
194  if( command == ContainerMatCmd )
195  {
196  G4cout << "#### Messenger: Setting TriggerScintillator Container Material to " << newValue << G4endl;
197 
198  //myTriggerScintillator->SetContainerMaterial(newValue);
199  }
200 
201  if( command == DetectorMatCmd )
202  {
203  G4cout << "#### Messenger: Setting Scintillator Detector Material to " << newValue << G4endl;
204 
206  }
207 
208  if( command == TiltingAngleCmd )
209  {
210  G4cout << "#### Messenger: Setting Scintillator Detector Tilting Angle to " << newValue << G4endl;
211 
213  }
214 
215  G4cout << "#### Leaving QweakSimTriggerScintillator Messenger::SetNewValue() " << newValue << G4endl;
216 }
217 
218 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
219 
220 //=======================================================
221 // -----------------------
222 // | CVS File Information |
223 // -----------------------
224 //
225 // $Revisions$
226 // $Log: QweakSimTriggerScintillatorMessenger.cc,v $
227 // Revision 1.2 2005/12/27 19:16:32 grimm
228 // - Redesign of Doxygen header containing CVS info like revision and date
229 // - Added CVS revision log at the end of file
230 //
231 //
void SetTriggerScintillatorCenterPositionInZ(G4double zPos, G4int pkg=0)
void SetTriggerScintillatorCenterPositionInY(G4double yPos, G4int pkg=0)
Definition of the Trigger Scintillator detector.
void SetTriggerScintillatorTiltAngle(G4double tiltangle)
void SetTriggerScintillatorCenterPositionInX(G4double xPos, G4int pkg=0)
void SetTriggerScintillatorThickness(G4double thickness)
QweakSimTriggerScintillatorMessenger(QweakSimTriggerScintillator *, G4int pkg=0)
void SetTriggerScintillatorMaterial(G4String materialName)