Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PassiveProtonBeamLine.hh
Go to the documentation of this file.
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 // Hadrontherapy advanced example for Geant4
27 // See more at: https://twiki.cern.ch/twiki/bin/view/Geant4/AdvancedExamplesHadrontherapy
28 
29 #ifndef PassiveProtonBeamLine_H
30 #define PassiveProtonBeamLine_H 1
31 
32 #include "globals.hh"
34 #include "G4Box.hh"
35 #include "G4Tubs.hh"
36 #include "G4VisAttributes.hh"
37 #include "G4LogicalVolume.hh"
38 
39 class G4VPhysicalVolume;
41 //class FaradayCup;
45 
47 {
48 public:
49 
50  //PassiveProtonBeamLine(G4VPhysicalVolume*);
53  // static G4bool doCalculation;
54 
56  //***************************** PW **************NON SERVE*************************
57 
59 
60  //***************************** PW **************NON SERVE*************************
61 
63  // Definition of the beam line support
64 
66  // Definition of the first scattering foil,
67  // of the Kapton window, of the stopper
68 
70  // This defines the "range shifter". Is is a slab
71  // (usually of PMMA" acting as energy degrader
72  // of primary beam
73 
75  // Definition of the first collimator, of the range shifter,
76  // of the second collimator, of the first and second
77  // collimator modulators
78 
80  // Definition of three monitor chambers
81 
83  // Construct the MOPI on-line detector
84 
86  // Definition of the beam noozle
87 
89  // Definition of the final collimator
90 
91  // The following methods allow to change parameters
92  // of some beam line components
93 
95  // This method allows to move the Range Shifter along
96  // the X axis
97 
98  void SetRangeShifterXSize(G4double halfSize);
99  // This method allows to change the size of the range shifter along
100  // the X axis
101 
103  // This method allows to change the size of the first scattering foil
104  // along the X axis
105 
107  // This method allows to change the size of the second scattering foil
108  // along the X axis
109 
111  // This method allows to change the size of the outer radius of the stopper
112 
114  // This method allows to change the size of the inner radius of the
115  // final collimator
116 
117  void SetRSMaterial(G4String);
118  // This method allows to change the material
119  // of the range shifter
120 
122  // This method allows moving the modulator through UI commands
123 
124 
125 private:
126  static PassiveProtonBeamLine* instance;
127  //passive proton line dimensions
128  void SetDefaultDimensions();
129  void ConstructPassiveProtonBeamLine();
130 
131  HadrontherapyModulator* modulator; // Pointer to the modulator
132  // geometry component
133  PassiveProtonBeamLineMessenger* passiveMessenger;
134  G4VPhysicalVolume* physicalTreatmentRoom;
135  HadrontherapyDetectorConstruction* hadrontherapyDetectorConstruction;
136 
137  // Pointer to the Faraday Cup class file
138  // FaradayCup *pFaradayCup;
139 
140  G4Material* kapton;
141 
142  G4double vacuumZoneXSize;
143  G4double vacuumZoneYSize;
144  G4double vacuumZoneZSize;
145  G4double vacuumZoneXPosition;
146 
147  G4double firstScatteringFoilXSize;
148  G4double firstScatteringFoilYSize;
149  G4double firstScatteringFoilZSize;
150  G4double firstScatteringFoilXPosition;
151 
152  G4double kaptonWindowXSize;
153  G4double kaptonWindowYSize;
154  G4double kaptonWindowZSize;
155  G4double kaptonWindowXPosition;
156 
157  G4double innerRadiusStopper;
158  G4double heightStopper;
159  G4double startAngleStopper;
160  G4double spanningAngleStopper;
161  G4double stopperXPosition;
162  G4double stopperYPosition;
163  G4double stopperZPosition;
164  G4double outerRadiusStopper;
165 
166  G4double secondScatteringFoilXSize;
167  G4double secondScatteringFoilYSize;
168  G4double secondScatteringFoilZSize;
169  G4double secondScatteringFoilXPosition;
170  G4double secondScatteringFoilYPosition;
171  G4double secondScatteringFoilZPosition;
172 
173  G4double rangeShifterXSize;
174  G4double rangeShifterYSize;
175  G4double rangeShifterZSize;
176  G4double rangeShifterXPosition;
177  G4double rangeShifterYPosition;
178  G4double rangeShifterZPosition;
179 
180 
181  G4VPhysicalVolume* physiBeamLineSupport;
182  G4VPhysicalVolume* physiBeamLineCover;
183  G4VPhysicalVolume* physiBeamLineCover2;
184  G4Box* firstScatteringFoil;
185  G4VPhysicalVolume* physiFirstScatteringFoil;
186  G4VPhysicalVolume* physiKaptonWindow;
187 
188  G4Tubs* solidStopper;
189  G4VPhysicalVolume* physiStopper;
190  G4LogicalVolume* logicStopper;
191 
192  G4Box* secondScatteringFoil;
193  G4VPhysicalVolume* physiSecondScatteringFoil;
194  G4VPhysicalVolume* physiFirstCollimator;
195  G4VPhysicalVolume* physiHoleFirstCollimator;
196  G4Box* solidRangeShifterBox;
197  G4LogicalVolume* logicRangeShifterBox;
198  G4VPhysicalVolume* physiRangeShifterBox;
199  G4VPhysicalVolume* physiSecondCollimator;
200  G4VPhysicalVolume* physiHoleSecondCollimator;
201 
202  G4VPhysicalVolume* physiFirstCollimatorModulatorBox;
203  G4VPhysicalVolume* physiHoleFirstCollimatorModulatorBox;
204 
205  G4VPhysicalVolume* physiSecondCollimatorModulatorBox;
206  G4VPhysicalVolume* physiHoleSecondCollimatorModulatorBox;
207 
208  // MOPI Detector
209  // Mother volume
210  G4VPhysicalVolume* physiMOPIMotherVolume;
211  G4LogicalVolume* logicMOPIMotherVolume;
212  G4Box* solidMOPIMotherVolume;
213 
214  G4double MOPIMotherVolumeXSize;
215  G4double MOPIMotherVolumeYSize;
216  G4double MOPIMotherVolumeZSize;
217  G4double MOPIMotherVolumeXPosition;
218  G4double MOPIMotherVolumeYPosition;
219  G4double MOPIMotherVolumeZPosition;
220 
221  // First Kapton layer
222  G4double MOPIFirstKaptonLayerXSize;
223  G4double MOPIFirstKaptonLayerYSize;
224  G4double MOPIFirstKaptonLayerZSize;
225  G4double MOPIFirstKaptonLayerXPosition;
226  G4double MOPIFirstKaptonLayerYPosition;
227  G4double MOPIFirstKaptonLayerZPosition;
228  G4Box* solidMOPIFirstKaptonLayer;
229  G4LogicalVolume* logicMOPIFirstKaptonLayer;
230  G4VPhysicalVolume* physiMOPIFirstKaptonLayer;
231 
232  // First Aluminum layer
233  G4double MOPIFirstAluminumLayerXSize;
234  G4double MOPIFirstAluminumLayerYSize;
235  G4double MOPIFirstAluminumLayerZSize;
236  G4double MOPIFirstAluminumLayerXPosition;
237  G4double MOPIFirstAluminumLayerYPosition;
238  G4double MOPIFirstAluminumLayerZPosition;
239  G4Box* solidMOPIFirstAluminumLayer;
240  G4LogicalVolume* logicMOPIFirstAluminumLayer;
241  G4VPhysicalVolume* physiMOPIFirstAluminumLayer;
242 
243  // First Air Gap
244  G4double MOPIFirstAirGapXSize;
245  G4double MOPIFirstAirGapYSize;
246  G4double MOPIFirstAirGapZSize;
247  G4double MOPIFirstAirGapXPosition;
248  G4double MOPIFirstAirGapYPosition;
249  G4double MOPIFirstAirGapZPosition;
250  G4Box* solidMOPIFirstAirGap;
251  G4LogicalVolume* logicMOPIFirstAirGap;
252  G4VPhysicalVolume* physiMOPIFirstAirGap;
253 
254  // Cathode
255  G4double MOPICathodeXSize;
256  G4double MOPICathodeYSize;
257  G4double MOPICathodeZSize;
258  G4double MOPICathodeXPosition;
259  G4double MOPICathodeYPosition;
260  G4double MOPICathodeZPosition;
261  G4Box* solidMOPICathode;
262  G4LogicalVolume* logicMOPICathode;
263  G4VPhysicalVolume* physiMOPICathode;
264 
265  G4VisAttributes* redWire;
266 
267  // First Air Gap
268  G4double MOPISecondAirGapXSize;
269  G4double MOPISecondAirGapYSize;
270  G4double MOPISecondAirGapZSize;
271  G4double MOPISecondAirGapXPosition;
272  G4double MOPISecondAirGapYPosition;
273  G4double MOPISecondAirGapZPosition;
274  G4Box* solidMOPISecondAirGap;
275  G4LogicalVolume* logicMOPISecondAirGap;
276  G4VPhysicalVolume* physiMOPISecondAirGap;
277 
278  // First Aluminum layer
279  G4double MOPISecondAluminumLayerXSize;
280  G4double MOPISecondAluminumLayerYSize;
281  G4double MOPISecondAluminumLayerZSize;
282  G4double MOPISecondAluminumLayerXPosition;
283  G4double MOPISecondAluminumLayerYPosition;
284  G4double MOPISecondAluminumLayerZPosition;
285  G4Box* solidMOPISecondAluminumLayer;
286  G4LogicalVolume* logicMOPISecondAluminumLayer;
287  G4VPhysicalVolume* physiMOPISecondAluminumLayer;
288 
289  // Second Kapton layer
290  G4double MOPISecondKaptonLayerXSize;
291  G4double MOPISecondKaptonLayerYSize;
292  G4double MOPISecondKaptonLayerZSize;
293  G4double MOPISecondKaptonLayerXPosition;
294  G4double MOPISecondKaptonLayerYPosition;
295  G4double MOPISecondKaptonLayerZPosition;
296  G4Box* solidMOPISecondKaptonLayer;
297  G4LogicalVolume* logicMOPISecondKaptonLayer;
298  G4VPhysicalVolume* physiMOPISecondKaptonLayer;
299 
300  G4double innerRadiusFinalCollimator;
301  G4VPhysicalVolume* mother;
302 
303  G4VPhysicalVolume* physiFirstMonitorLayer1;
304  G4VPhysicalVolume* physiFirstMonitorLayer2;
305  G4VPhysicalVolume* physiFirstMonitorLayer3;
306  G4VPhysicalVolume* physiFirstMonitorLayer4;
307  G4VPhysicalVolume* physiSecondMonitorLayer1;
308  G4VPhysicalVolume* physiSecondMonitorLayer2;
309  G4VPhysicalVolume* physiSecondMonitorLayer3;
310  G4VPhysicalVolume* physiSecondMonitorLayer4;
311  G4VPhysicalVolume* physiNozzleSupport;
312  G4VPhysicalVolume* physiHoleNozzleSupport;
313  G4VPhysicalVolume* physiBrassTube;
314  G4VPhysicalVolume* physiBrassTube2;
315  G4VPhysicalVolume* physiBrassTube3;
316  G4Tubs* solidFinalCollimator;
317  G4VPhysicalVolume* physiFinalCollimator;
318 
319  G4VisAttributes* blue;
320  G4VisAttributes* gray;
321  G4VisAttributes* white;
322  G4VisAttributes* red;
323  G4VisAttributes* yellow;
324  G4VisAttributes* green;
325  G4VisAttributes* darkGreen;
326  G4VisAttributes* darkOrange3;
327  G4VisAttributes* skyBlue;
328 
329  G4Material* rangeShifterMaterial;
330  G4Material* beamLineSupportMaterial;
331  G4Material* vacuumZoneMaterial;
332  G4Material* firstScatteringFoilMaterial;
333  G4Material* kaptonWindowMaterial;
334  G4Material* stopperMaterial;
335  G4Material* secondScatteringFoilMaterial;
336  G4Material* firstCollimatorMaterial;
337  G4Material* holeFirstCollimatorMaterial;
338  G4Material* modulatorBoxMaterial;
339  G4Material* holeModulatorBoxMaterial;
340  G4Material* layer1MonitorChamberMaterial;
341  G4Material* layer2MonitorChamberMaterial;
342  G4Material* layer3MonitorChamberMaterial;
343  G4Material* layer4MonitorChamberMaterial;
344  G4Material* MOPIMotherVolumeMaterial;
345  G4Material* MOPIFirstKaptonLayerMaterial;
346  G4Material* MOPIFirstAluminumLayerMaterial;
347  G4Material* MOPIFirstAirGapMaterial;
348  G4Material* MOPICathodeMaterial;
349  G4Material* MOPISecondAirGapMaterial;
350  G4Material* MOPISecondAluminumLayerMaterial;
351  G4Material* MOPISecondKaptonLayerMaterial;
352  G4Material* nozzleSupportMaterial;
353  G4Material* holeNozzleSupportMaterial;
354 
355  G4Material* brassTubeMaterial;
356  G4Material* brassTube2Material;
357  G4Material* brassTube3Material;
358  G4Material* finalCollimatorMaterial;
359 
360 
362 
363 
364 };
365 #endif
Definition: G4Box.hh:64
void SetModulatorAngle(G4double angle)
Definition: G4Tubs.hh:85
static G4double angle[DIM]
static PassiveProtonBeamLine * GetInstance()
void SetSecondScatteringFoilXSize(G4double)
void SetRangeShifterXPosition(G4double value)
const XML_Char int const XML_Char * value
Definition: expat.h:331
void SetInnerRadiusFinalCollimator(G4double)
void SetFirstScatteringFoilXSize(G4double)
void SetRangeShifterXSize(G4double halfSize)
G4VPhysicalVolume * Construct()
double G4double
Definition: G4Types.hh:76