ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GammaRayTelDetectorMessenger.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file GammaRayTelDetectorMessenger.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 //
28 // ------------------------------------------------------------
29 // GEANT 4 class implementation file
30 // CERN Geneva Switzerland
31 //
32 //
33 // ------------ GammaRayTelDetectorMessenger ------
34 // by F.Longo, R.Giannitrapani & G.Santin (13 nov 2000)
35 //
36 // ************************************************************
37 
39 
41 #include "G4UIdirectory.hh"
42 #include "G4UIcmdWithAString.hh"
43 #include "G4UIcmdWithAnInteger.hh"
46 
47 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
48 
50  :GammaRayTelDetector(GammaRayTelDet)
51 
52 {
53  GammaRayTeldetDir = new G4UIdirectory("/payload/");
54  GammaRayTeldetDir->SetGuidance("GammaRayTel payload control.");
55 
56  // converter material command
57 
58  ConverterMaterCmd = new G4UIcmdWithAString("/payload/setConvMat",this);
59  ConverterMaterCmd->SetGuidance("Select Material of the Converter.");
60  ConverterMaterCmd->SetParameterName("choice",false);
62 
63  // converter thickness command
64 
66  ("/payload/setConvThick",this);
67  ConverterThickCmd->SetGuidance("Set Thickness of the Converter");
68  ConverterThickCmd->SetParameterName("Size",false);
69  ConverterThickCmd->SetRange("Size>=0.");
72 
73  // tracker silicon thickness command
74 
76  ("/payload/setSiThick",this);
77  SiliconThickCmd->SetGuidance("Set Thickness of the Silicon");
78  SiliconThickCmd->SetParameterName("Size",false);
79  SiliconThickCmd->SetRange("Size>=0.");
82 
83  // tracker silicon pitch command
84 
86  ("/payload/setSiPitch",this);
87  SiliconPitchCmd->SetGuidance("Set Pitch of the Silicon Strips");
88  SiliconPitchCmd->SetParameterName("Size",false);
89  SiliconPitchCmd->SetRange("Size>=0.");
92 
93  // tracker silicon tile size command
94 
96  ("/payload/setSiTileXY",this);
97  SiliconTileXYCmd->SetGuidance("Set XY dimensions of Si Tile");
98  SiliconTileXYCmd->SetParameterName("Size",false);
99  SiliconTileXYCmd->SetRange("Size>=0.");
100  SiliconTileXYCmd->SetUnitCategory("Length");
102 
103  // tracker number of silicon tiles
104 
105  NbSiTilesCmd = new G4UIcmdWithAnInteger("/payload/setNbOfSiTiles",this);
106  NbSiTilesCmd->SetGuidance("Set number of Si Tiles.");
107  NbSiTilesCmd->SetParameterName("NbSiTiles",false);
108  NbSiTilesCmd->SetRange("NbSiTiles>0 && NbSiTiles<100");
110 
111  // tracker number of silicon layers
112 
113  NbTKRLayersCmd = new G4UIcmdWithAnInteger("/payload/setNbOfTKRLayers",this);
114  NbTKRLayersCmd->SetGuidance("Set number of TKR Layers.");
115  NbTKRLayersCmd->SetParameterName("NbTKRLayers",false);
116  NbTKRLayersCmd->SetRange("NbTKRLayers>0 && NbTKRLayers<30");
118 
119  // tracker layer distance
120 
122  ("/payload/setLayerDistance",this);
123  LayerDistanceCmd->SetGuidance("Set distance between two layers");
124  LayerDistanceCmd->SetParameterName("Size",false);
125  LayerDistanceCmd->SetRange("Size>=0.");
126  LayerDistanceCmd->SetUnitCategory("Length");
128 
129  // tracker views distance
130 
132  ("/payload/setViewsDistance",this);
133  ViewsDistanceCmd->SetGuidance("Set distance between X and Y views");
134  ViewsDistanceCmd->SetParameterName("Size",false);
135  ViewsDistanceCmd->SetRange("Size>=0.");
136  ViewsDistanceCmd->SetUnitCategory("Length");
138 
139  // calorimeter detector thickness
140 
142  ("/payload/setCALThick",this);
143  CALThickCmd->SetGuidance("Set thickness of CAL detectors");
144  CALThickCmd->SetParameterName("Size",false);
145  CALThickCmd->SetRange("Size>=0.");
146  CALThickCmd->SetUnitCategory("Length");
148 
149  // number calorimeter detectors
150 
151  NbCALBarsCmd = new G4UIcmdWithAnInteger("/payload/setNbOfCALBars",this);
152  NbCALBarsCmd->SetGuidance("Set number of CsI Bars.");
153  NbCALBarsCmd->SetParameterName("NbSiTiles",false);
154  NbCALBarsCmd->SetRange("NbSiTiles>0 && NbSiTiles<100");
156 
157  // number calorimeter layers
158 
159  NbCALLayersCmd = new G4UIcmdWithAnInteger("/payload/setNbOfCALLayers",this);
160  NbCALLayersCmd->SetGuidance("Set number of CAL Layers.");
161  NbCALLayersCmd->SetParameterName("NbCALLayers",false);
162  NbCALLayersCmd->SetRange("NbCALLayers>0 && NbCALLayers<16");
164 
165  // calorimeter detector thickness
166 
168  ("/payload/setACDThick",this);
169  ACDThickCmd->SetGuidance("Set thickness of ACD detectors");
170  ACDThickCmd->SetParameterName("Size",false);
171  ACDThickCmd->SetRange("Size>=0.");
172  ACDThickCmd->SetUnitCategory("Length");
174 
175  // update Payload
176 
177  UpdateCmd = new G4UIcmdWithoutParameter("/payload/update",this);
178  UpdateCmd->SetGuidance("Update payload geometry.");
179  UpdateCmd->SetGuidance("This command MUST be applied before \"beamOn\" ");
180  UpdateCmd->SetGuidance("if you changed geometrical value(s).");
182 
183  // magnetic field
184 
185  MagFieldCmd = new G4UIcmdWithADoubleAndUnit("/payload/setField",this);
186  MagFieldCmd->SetGuidance("Define magnetic field.");
187  MagFieldCmd->SetGuidance("Magnetic field will be in Z direction.");
188  MagFieldCmd->SetParameterName("Bz",false);
189  MagFieldCmd->SetUnitCategory("Magnetic flux density");
191 }
192 
193 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
194 
196 {
197  delete ConverterMaterCmd; delete ConverterThickCmd;
198  delete NbSiTilesCmd; delete NbTKRLayersCmd;
199  delete SiliconTileXYCmd; delete SiliconPitchCmd;
200  delete SiliconThickCmd; delete LayerDistanceCmd;
201  delete ViewsDistanceCmd; delete ACDThickCmd;
202  delete NbCALLayersCmd; delete NbCALBarsCmd;
203  delete CALThickCmd; delete UpdateCmd;
204  delete MagFieldCmd; delete GammaRayTeldetDir;
205 }
206 
207 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
208 
210 {
211 
212  // converter
213 
214  if( command == ConverterMaterCmd )
216 
217  if( command == ConverterThickCmd )
219 
220  // tracker
221 
222  if( command == SiliconTileXYCmd )
224 
225  if( command == SiliconPitchCmd )
227 
228  if( command == SiliconThickCmd )
230 
231  if( command == NbSiTilesCmd )
233 
234  if( command == NbTKRLayersCmd )
236 
237  if( command == LayerDistanceCmd )
239 
240  if( command == ViewsDistanceCmd )
242 
243  // calorimeter
244 
245  if( command == NbCALLayersCmd )
247 
248  if( command == NbCALBarsCmd )
250 
251  if( command == CALThickCmd )
253 
254  // anticoincidence
255 
256  if( command == ACDThickCmd )
258 
259  if( command == UpdateCmd )
261 
262  if( command == MagFieldCmd )
264 }
265 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
266 
267 
268 
269 
270 
271