Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PassiveProtonBeamLine.cc
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 #include "globals.hh"
30 #include "G4SystemOfUnits.hh"
31 #include "G4Box.hh"
32 #include "G4Tubs.hh"
33 #include "G4VisAttributes.hh"
34 #include "G4Colour.hh"
35 #include "G4RunManager.hh"
36 #include "G4LogicalVolume.hh"
37 #include "G4PVPlacement.hh"
38 #include "G4RotationMatrix.hh"
39 #include "G4NistManager.hh"
40 #include "G4NistElementBuilder.hh"
43 #include "PassiveProtonBeamLine.hh"
45 //#include "FaradayCup.hh"
46 
47 //G4bool PassiveProtonBeamLine::doCalculation = false;
50 modulator(0), physicalTreatmentRoom(0),hadrontherapyDetectorConstruction(0),
51 physiBeamLineSupport(0), physiBeamLineCover(0), physiBeamLineCover2(0),
52 firstScatteringFoil(0), physiFirstScatteringFoil(0), physiKaptonWindow(0),
53 solidStopper(0), physiStopper(0), secondScatteringFoil(0), physiSecondScatteringFoil(0),
54 physiFirstCollimator(0), solidRangeShifterBox(0), logicRangeShifterBox(0),
55 physiRangeShifterBox(0), physiSecondCollimator(0), physiFirstCollimatorModulatorBox(0),
56 physiHoleFirstCollimatorModulatorBox(0), physiSecondCollimatorModulatorBox(0),
57 physiHoleSecondCollimatorModulatorBox(0), physiMOPIMotherVolume(0),
58 physiFirstMonitorLayer1(0), physiFirstMonitorLayer2(0), physiFirstMonitorLayer3(0),
59 physiFirstMonitorLayer4(0), physiSecondMonitorLayer1(0), physiSecondMonitorLayer2(0),
60 physiSecondMonitorLayer3(0), physiSecondMonitorLayer4(0), physiNozzleSupport(0), //physiHoleNozzleSupport(0),
61 physiBrassTube(0), solidFinalCollimator(0), physiFinalCollimator(0)
62 {
63  // Messenger to change parameters of the passiveProtonBeamLine geometry
64  passiveMessenger = new PassiveProtonBeamLineMessenger(this);
65 
66  //***************************** PW ***************************************
67  static G4String ROGeometryName = "DetectorROGeometry";
68  RO = new HadrontherapyDetectorROGeometry(ROGeometryName);
69 
70  G4cout << "Going to register Parallel world...";
72  G4cout << "... done" << G4endl;
73  //***************************** PW ***************************************
74  /* // For the Faraday Cup activation
75  if (name)
76  {
77  doCalculation = true;
78  }*/
79 }
82 {
83  delete passiveMessenger;
84  delete hadrontherapyDetectorConstruction;
85  /* if (!pFaradayCup)
86  {
87  delete pFaradayCup;
88  }*/
89 }
90 
93 {
94  // Sets default geometry and materials
95  SetDefaultDimensions();
96 
97  // Construct the whole Passive Beam Line
98  ConstructPassiveProtonBeamLine();
99 
100  //***************************** PW ***************************************
101  if (!hadrontherapyDetectorConstruction)
102 
103  //***************************** PW ***************************************
104 
105  // HadrontherapyDetectorConstruction builds ONLY the phantom and the detector with its associated ROGeometry
106  hadrontherapyDetectorConstruction = new HadrontherapyDetectorConstruction(physicalTreatmentRoom);
107 
108 
109  //***************************** PW ***************************************
110 
111  hadrontherapyDetectorConstruction->InitializeDetectorROGeometry(RO,hadrontherapyDetectorConstruction->GetDetectorToWorldPosition());
112 
113  //***************************** PW ***************************************
114  /* if (doCalculation)
115  {
116  pFaradayCup = new FaradayCup(physicalTreatmentRoom);
117  G4cout << "Faraday Cup detector has been activated" << G4endl;
118  }*/
119  return physicalTreatmentRoom;
120 }
121 
122 // In the following method the DEFAULTS used in the geometry of
123 // passive beam line are provided
124 // HERE THE USER CAN CHANGE THE GEOMETRY CHARACTERISTICS OF BEAM
125 // LINE ELEMENTS, ALTERNATIVELY HE/SHE CAN USE THE MACRO FILE (IF A
126 // MESSENGER IS PROVIDED)
127 //
128 // DEFAULT MATERIAL ARE ALSO PROVIDED
129 // and COLOURS ARE ALSO DEFINED
130 // ----------------------------------------------------------
132 void PassiveProtonBeamLine::SetDefaultDimensions()
133 {
134  // Set of coulors that can be used
135  white = new G4VisAttributes( G4Colour());
136  white -> SetVisibility(true);
137  white -> SetForceSolid(true);
138 
139  blue = new G4VisAttributes(G4Colour(0. ,0. ,1.));
140  blue -> SetVisibility(true);
141  blue -> SetForceSolid(true);
142 
143  gray = new G4VisAttributes( G4Colour(0.5, 0.5, 0.5 ));
144  gray-> SetVisibility(true);
145  gray-> SetForceSolid(true);
146 
147  red = new G4VisAttributes(G4Colour(1. ,0. ,0.));
148  red-> SetVisibility(true);
149  red-> SetForceSolid(true);
150 
151  yellow = new G4VisAttributes(G4Colour(1., 1., 0. ));
152  yellow-> SetVisibility(true);
153  yellow-> SetForceSolid(true);
154 
155  green = new G4VisAttributes( G4Colour(25/255. , 255/255. , 25/255. ));
156  green -> SetVisibility(true);
157  green -> SetForceSolid(true);
158 
159  darkGreen = new G4VisAttributes( G4Colour(0/255. , 100/255. , 0/255. ));
160  darkGreen -> SetVisibility(true);
161  darkGreen -> SetForceSolid(true);
162 
163  darkOrange3 = new G4VisAttributes( G4Colour(205/255. , 102/255. , 000/255. ));
164  darkOrange3 -> SetVisibility(true);
165  darkOrange3 -> SetForceSolid(true);
166 
167  skyBlue = new G4VisAttributes( G4Colour(135/255. , 206/255. , 235/255. ));
168  skyBlue -> SetVisibility(true);
169  skyBlue -> SetForceSolid(true);
170 
171 
172  // VACUUM PIPE: first track of the beam line is inside vacuum;
173  // The PIPE contains the FIRST SCATTERING FOIL and the KAPTON WINDOW
174  G4double defaultVacuumZoneXSize = 100.0 *mm;
175  vacuumZoneXSize = defaultVacuumZoneXSize;
176 
177  G4double defaultVacuumZoneYSize = 52.5 *mm;
178  vacuumZoneYSize = defaultVacuumZoneYSize;
179 
180  G4double defaultVacuumZoneZSize = 52.5 *mm;
181  vacuumZoneZSize = defaultVacuumZoneZSize;
182 
183  G4double defaultVacuumZoneXPosition = -3010.0 *mm;
184  vacuumZoneXPosition = defaultVacuumZoneXPosition;
185 
186  // FIRST SCATTERING FOIL: a thin foil performing a first scattering
187  // of the original beam
188  G4double defaultFirstScatteringFoilXSize = 0.0075 *mm;
189  firstScatteringFoilXSize = defaultFirstScatteringFoilXSize;
190 
191  G4double defaultFirstScatteringFoilYSize = 52.5 *mm;
192  firstScatteringFoilYSize = defaultFirstScatteringFoilYSize;
193 
194  G4double defaultFirstScatteringFoilZSize = 52.5 *mm;
195  firstScatteringFoilZSize = defaultFirstScatteringFoilZSize;
196 
197  G4double defaultFirstScatteringFoilXPosition = 0.0 *mm;
198  firstScatteringFoilXPosition = defaultFirstScatteringFoilXPosition;
199 
200  // KAPTON WINDOW: it prmits the passage of the beam from vacuum to air
201  G4double defaultKaptonWindowXSize = 0.010*mm;
202  kaptonWindowXSize = defaultKaptonWindowXSize;
203 
204  G4double defaultKaptonWindowYSize = 5.25*cm;
205  kaptonWindowYSize = defaultKaptonWindowYSize;
206 
207  G4double defaultKaptonWindowZSize = 5.25*cm;
208  kaptonWindowZSize = defaultKaptonWindowZSize;
209 
210  G4double defaultKaptonWindowXPosition = 100.0*mm - defaultKaptonWindowXSize;
211  kaptonWindowXPosition = defaultKaptonWindowXPosition;
212 
213  // STOPPER: is a small cylinder able to stop the central component
214  // of the beam (having a gaussian shape). It is connected to the SECON SCATTERING FOIL
215  // and represent the second element of the scattering system
216  G4double defaultInnerRadiusStopper = 0.*cm;
217  innerRadiusStopper = defaultInnerRadiusStopper;
218 
219  G4double defaultHeightStopper = 3.5*mm;
220  heightStopper = defaultHeightStopper;
221 
222  G4double defaultStartAngleStopper = 0.*deg;
223  startAngleStopper = defaultStartAngleStopper;
224 
225  G4double defaultSpanningAngleStopper = 360.*deg;
226  spanningAngleStopper = defaultSpanningAngleStopper;
227 
228  G4double defaultStopperXPosition = -2705.0 *mm;
229  stopperXPosition = defaultStopperXPosition;
230 
231  G4double defaultStopperYPosition = 0.*m;
232  stopperYPosition = defaultStopperYPosition;
233 
234  G4double defaultStopperZPosition = 0.*m;
235  stopperZPosition = defaultStopperZPosition;
236 
237  G4double defaultOuterRadiusStopper = 2 *mm;
238  outerRadiusStopper = defaultOuterRadiusStopper;
239 
240  // SECOND SCATTERING FOIL: it is another thin foil and provides the
241  // final diffusion of the beam. It represents the third element of the scattering
242  // system;
243  G4double defaultSecondScatteringFoilXSize = 0.0125 *mm;
244  secondScatteringFoilXSize = defaultSecondScatteringFoilXSize;
245 
246  G4double defaultSecondScatteringFoilYSize = 52.5 *mm;
247  secondScatteringFoilYSize = defaultSecondScatteringFoilYSize;
248 
249  G4double defaultSecondScatteringFoilZSize = 52.5 *mm;
250  secondScatteringFoilZSize = defaultSecondScatteringFoilZSize;
251 
252  G4double defaultSecondScatteringFoilXPosition = defaultStopperXPosition + defaultHeightStopper + defaultSecondScatteringFoilXSize;
253  secondScatteringFoilXPosition = defaultSecondScatteringFoilXPosition;
254 
255  G4double defaultSecondScatteringFoilYPosition = 0 *mm;
256  secondScatteringFoilYPosition = defaultSecondScatteringFoilYPosition;
257 
258  G4double defaultSecondScatteringFoilZPosition = 0 *mm;
259  secondScatteringFoilZPosition = defaultSecondScatteringFoilZPosition;
260 
261  // RANGE SHIFTER: is a slab of PMMA acting as energy degreader of
262  // primary beam
263 
264  //Default material of the range shifter
265 
266  G4double defaultRangeShifterXSize = 5. *mm;
267  rangeShifterXSize = defaultRangeShifterXSize;
268 
269  G4double defaultRangeShifterYSize = 176. *mm;
270  rangeShifterYSize = defaultRangeShifterYSize;
271 
272  G4double defaultRangeShifterZSize = 176. *mm;
273  rangeShifterZSize = defaultRangeShifterZSize;
274 
275  G4double defaultRangeShifterXPosition = -2393.0 *mm;
276  rangeShifterXPosition = defaultRangeShifterXPosition;
277 
278  G4double defaultRangeShifterYPosition = 0. *mm;
279  rangeShifterYPosition = defaultRangeShifterYPosition;
280 
281  G4double defaultRangeShifterZPosition = 0. *mm;
282  rangeShifterZPosition = defaultRangeShifterZPosition;
283 
284  // MOPI DETECTOR: two orthogonal microstrip gas detectors developed
285  // by the INFN Section of Turin in collaboration with some
286  // of the author of this example. It permits the
287  // on-line check of the beam simmetry via the signal
288  // integration of the collected charge for each strip.
289 
290  // Mother volume of MOPI
291 
292  G4double defaultMOPIMotherVolumeXSize = 12127.0 *um;
293  MOPIMotherVolumeXSize = defaultMOPIMotherVolumeXSize;
294 
295  G4double defaultMOPIMotherVolumeYSize = 40.0 *cm;
296  MOPIMotherVolumeYSize = defaultMOPIMotherVolumeYSize;
297 
298  G4double defaultMOPIMotherVolumeZSize = 40.0 *cm;
299  MOPIMotherVolumeZSize = defaultMOPIMotherVolumeZSize;
300 
301  G4double defaultMOPIMotherVolumeXPosition = -1000.0 *mm;
302  MOPIMotherVolumeXPosition = defaultMOPIMotherVolumeXPosition;
303 
304  G4double defaultMOPIMotherVolumeYPosition = 0.0 *mm;
305  MOPIMotherVolumeYPosition = defaultMOPIMotherVolumeYPosition;
306 
307  G4double defaultMOPIMotherVolumeZPosition = 0.0 *mm;
308  MOPIMotherVolumeZPosition = defaultMOPIMotherVolumeZPosition;
309 
310  // First Kapton Layer of MOPI
311  G4double defaultMOPIFirstKaptonLayerXSize = 35 *um;
312  MOPIFirstKaptonLayerXSize = defaultMOPIFirstKaptonLayerXSize;
313 
314  G4double defaultMOPIFirstKaptonLayerYSize = 30 *cm;
315  MOPIFirstKaptonLayerYSize = defaultMOPIFirstKaptonLayerYSize;
316 
317  G4double defaultMOPIFirstKaptonLayerZSize = 30 *cm;
318  MOPIFirstKaptonLayerZSize = defaultMOPIFirstKaptonLayerZSize;
319 
320  G4double defaultMOPIFirstKaptonLayerXPosition = -(MOPIMotherVolumeXSize/2 - (MOPIFirstKaptonLayerXSize/2));
321  MOPIFirstKaptonLayerXPosition = defaultMOPIFirstKaptonLayerXPosition;
322 
323  G4double defaultMOPIFirstKaptonLayerYPosition = 0.0 *mm;
324  MOPIFirstKaptonLayerYPosition = defaultMOPIFirstKaptonLayerYPosition;
325 
326  G4double defaultMOPIFirstKaptonLayerZPosition = 0.0 *mm;
327  MOPIFirstKaptonLayerZPosition = defaultMOPIFirstKaptonLayerZPosition;
328 
329  //First Aluminum Layer of MOPI
330  G4double defaultMOPIFirstAluminumLayerXSize = 15 *um;
331  MOPIFirstAluminumLayerXSize = defaultMOPIFirstAluminumLayerXSize;
332 
333  G4double defaultMOPIFirstAluminumLayerYSize = 30 *cm;
334  MOPIFirstAluminumLayerYSize = defaultMOPIFirstAluminumLayerYSize;
335 
336  G4double defaultMOPIFirstAluminumLayerZSize = 30 *cm;
337  MOPIFirstAluminumLayerZSize = defaultMOPIFirstAluminumLayerZSize;
338 
339  G4double defaultMOPIFirstAluminumLayerXPosition =
340  MOPIFirstKaptonLayerXPosition + MOPIFirstKaptonLayerXSize/2 + MOPIFirstAluminumLayerXSize/2;
341  MOPIFirstAluminumLayerXPosition = defaultMOPIFirstAluminumLayerXPosition;
342 
343  G4double defaultMOPIFirstAluminumLayerYPosition = 0.0 *mm;
344  MOPIFirstAluminumLayerYPosition = defaultMOPIFirstAluminumLayerYPosition;
345 
346  G4double defaultMOPIFirstAluminumLayerZPosition = 0.0 *mm;
347  MOPIFirstAluminumLayerZPosition = defaultMOPIFirstAluminumLayerZPosition;
348 
349  // First Air gap of MOPI
350  G4double defaultMOPIFirstAirGapXSize = 6000 *um;
351  MOPIFirstAirGapXSize = defaultMOPIFirstAirGapXSize;
352 
353  G4double defaultMOPIFirstAirGapYSize = 30 *cm;
354  MOPIFirstAirGapYSize = defaultMOPIFirstAirGapYSize;
355 
356  G4double defaultMOPIFirstAirGapZSize = 30 *cm;
357  MOPIFirstAirGapZSize = defaultMOPIFirstAirGapZSize;
358 
359  G4double defaultMOPIFirstAirGapXPosition =
360  MOPIFirstAluminumLayerXPosition + MOPIFirstAluminumLayerXSize/2 + MOPIFirstAirGapXSize/2;
361  MOPIFirstAirGapXPosition = defaultMOPIFirstAirGapXPosition;
362 
363  G4double defaultMOPIFirstAirGapYPosition = 0.0 *mm;
364  MOPIFirstAirGapYPosition = defaultMOPIFirstAirGapYPosition;
365 
366  G4double defaultMOPIFirstAirGapZPosition = 0.0 *mm;
367  MOPIFirstAirGapZPosition = defaultMOPIFirstAirGapZPosition;
368 
369  // Cathode of MOPI
370  G4double defaultMOPICathodeXSize = 25.0 *um;
371  MOPICathodeXSize = defaultMOPICathodeXSize;
372 
373  G4double defaultMOPICathodeYSize = 30.0 *cm;
374  MOPICathodeYSize = defaultMOPICathodeYSize;
375 
376  G4double defaultMOPICathodeZSize = 30.0 *cm;
377  MOPICathodeZSize = defaultMOPICathodeZSize;
378 
379  G4double defaultMOPICathodeXPosition =
380  MOPIFirstAirGapXPosition + MOPIFirstAirGapXSize/2 + MOPICathodeXSize/2;
381  MOPICathodeXPosition = defaultMOPICathodeXPosition;
382 
383  G4double defaultMOPICathodeYPosition = 0.0 *mm;
384  MOPICathodeYPosition = defaultMOPICathodeYPosition;
385 
386  G4double defaultMOPICathodeZPosition = 0.0 *mm;
387  MOPICathodeZPosition = defaultMOPICathodeZPosition;
388 
389  // Second Air gap of MOPI
390  G4double defaultMOPISecondAirGapXSize = 6000 *um;
391  MOPISecondAirGapXSize = defaultMOPISecondAirGapXSize;
392 
393  G4double defaultMOPISecondAirGapYSize = 30 *cm;
394  MOPISecondAirGapYSize = defaultMOPISecondAirGapYSize;
395 
396  G4double defaultMOPISecondAirGapZSize = 30 *cm;
397  MOPISecondAirGapZSize = defaultMOPISecondAirGapZSize;
398 
399  G4double defaultMOPISecondAirGapXPosition =
400  MOPICathodeXPosition + MOPICathodeXSize/2 + MOPISecondAirGapXSize/2;
401  MOPISecondAirGapXPosition = defaultMOPISecondAirGapXPosition;
402 
403  G4double defaultMOPISecondAirGapYPosition = 0.0 *mm;
404  MOPISecondAirGapYPosition = defaultMOPISecondAirGapYPosition;
405 
406  G4double defaultMOPISecondAirGapZPosition = 0.0 *mm;
407  MOPISecondAirGapZPosition = defaultMOPISecondAirGapZPosition;
408 
409  //Second Aluminum Layer of MOPI
410  G4double defaultMOPISecondAluminumLayerXSize = 15 *um;
411  MOPISecondAluminumLayerXSize = defaultMOPISecondAluminumLayerXSize;
412 
413  G4double defaultMOPISecondAluminumLayerYSize = 30 *cm;
414  MOPISecondAluminumLayerYSize = defaultMOPISecondAluminumLayerYSize;
415 
416  G4double defaultMOPISecondAluminumLayerZSize = 30 *cm;
417  MOPISecondAluminumLayerZSize = defaultMOPISecondAluminumLayerZSize;
418 
419  G4double defaultMOPISecondAluminumLayerXPosition =
420  MOPISecondAirGapXPosition + MOPISecondAirGapXSize/2 + MOPISecondAluminumLayerXSize/2;
421  MOPISecondAluminumLayerXPosition = defaultMOPISecondAluminumLayerXPosition;
422 
423  G4double defaultMOPISecondAluminumLayerYPosition = 0.0 *mm;
424  MOPISecondAluminumLayerYPosition = defaultMOPISecondAluminumLayerYPosition;
425 
426  G4double defaultMOPISecondAluminumLayerZPosition = 0.0 *mm;
427  MOPISecondAluminumLayerZPosition = defaultMOPISecondAluminumLayerZPosition;
428 
429  // Second Kapton Layer of MOPI
430  G4double defaultMOPISecondKaptonLayerXSize = 35 *um;
431  MOPISecondKaptonLayerXSize = defaultMOPISecondKaptonLayerXSize;
432 
433  G4double defaultMOPISecondKaptonLayerYSize = 30 *cm;
434  MOPISecondKaptonLayerYSize = defaultMOPISecondKaptonLayerYSize;
435 
436  G4double defaultMOPISecondKaptonLayerZSize = 30 *cm;
437  MOPISecondKaptonLayerZSize = defaultMOPISecondKaptonLayerZSize;
438 
439  G4double defaultMOPISecondKaptonLayerXPosition =
440  MOPISecondAluminumLayerXPosition + MOPISecondAluminumLayerXSize/2 + MOPISecondKaptonLayerXSize/2;
441  MOPISecondKaptonLayerXPosition = defaultMOPISecondKaptonLayerXPosition;
442 
443  G4double defaultMOPISecondKaptonLayerYPosition = 0.0 *mm;
444  MOPISecondKaptonLayerYPosition = defaultMOPISecondKaptonLayerYPosition;
445 
446  G4double defaultMOPISecondKaptonLayerZPosition = 0.0 *mm;
447  MOPISecondKaptonLayerZPosition = defaultMOPISecondKaptonLayerZPosition;
448 
449 
450  // FINAL COLLIMATOR: is the collimator giving the final transversal shape
451  // of the beam
452  G4double defaultinnerRadiusFinalCollimator = 7.5 *mm;
453  innerRadiusFinalCollimator = defaultinnerRadiusFinalCollimator;
454 
455  // DEFAULT DEFINITION OF THE MATERIALS
456  // All elements and compound definition follows the NIST database
457 
458  // ELEMENTS
459  G4bool isotopes = false;
460  G4Material* aluminumNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_Al", isotopes);
461  G4Material* tantalumNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_Ta", isotopes);
462  G4Material* copperNistAsMaterial = G4NistManager::Instance()->FindOrBuildMaterial("G4_Cu", isotopes);
465 
466  // COMPOUND
467  G4Material* airNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_AIR", isotopes);
468  G4Material* kaptonNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_KAPTON", isotopes);
469  G4Material* galacticNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_Galactic", isotopes);
470  G4Material* PMMANist = G4NistManager::Instance()->FindOrBuildMaterial("G4_PLEXIGLASS", isotopes);
471  G4Material* mylarNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_MYLAR", isotopes);
472 
473  G4double d; // Density
474  G4int nComponents;// Number of components
475  G4double fractionmass; // Fraction in mass of an element in a material
476 
477  d = 8.40*g/cm3;
478  nComponents = 2;
479  G4Material* brass = new G4Material("Brass", d, nComponents);
480  brass -> AddElement(zincNist, fractionmass = 30 *perCent);
481  brass -> AddElement(copperNist, fractionmass = 70 *perCent);
482 
483 
484  //***************************** PW ***************************************
485 
486  // DetectorROGeometry Material
487  new G4Material("dummyMat", 1., 1.*g/mole, 1.*g/cm3);
488 
489  //***************************** PW ***************************************
490 
491 
492 
493  // MATERIAL ASSIGNMENT
494  // Range shifter
495  rangeShifterMaterial = airNist;
496 
497  // Support of the beam line
498  beamLineSupportMaterial = aluminumNist;
499 
500  // Vacuum pipe
501  vacuumZoneMaterial = galacticNist;
502 
503  // Material of the fisrt scattering foil
504  firstScatteringFoilMaterial = tantalumNist;
505 
506  // Material of kapton window
507  kaptonWindowMaterial = kaptonNist;
508 
509  // Material of the stopper
510  stopperMaterial = brass;
511 
512  // Material of the second scattering foil
513  secondScatteringFoilMaterial = tantalumNist;
514 
515  // Materials of the collimators
516  firstCollimatorMaterial = PMMANist;
517  holeFirstCollimatorMaterial = airNist;
518 
519  // Box containing the modulator wheel
520  modulatorBoxMaterial = aluminumNist;
521  holeModulatorBoxMaterial = airNist;
522 
523  // Materials of the monitor chamber
524  layer1MonitorChamberMaterial = kaptonNist;
525  layer2MonitorChamberMaterial = copperNistAsMaterial;
526  layer3MonitorChamberMaterial = airNist;
527  layer4MonitorChamberMaterial = copperNistAsMaterial;
528 
529  // Mother volume of the MOPI detector
530  MOPIMotherVolumeMaterial = airNist;
531  MOPIFirstKaptonLayerMaterial = kaptonNist;
532  MOPIFirstAluminumLayerMaterial = aluminumNist;
533  MOPIFirstAirGapMaterial = airNist;
534  MOPICathodeMaterial = mylarNist;
535  MOPISecondAirGapMaterial = airNist;
536  MOPISecondAluminumLayerMaterial = aluminumNist;
537  MOPISecondKaptonLayerMaterial = kaptonNist;
538 
539  // material of the final nozzle
540  nozzleSupportMaterial = PMMANist;
541  brassTubeMaterial = brassTube2Material = brassTube3Material = brass;
542  holeNozzleSupportMaterial = airNist;
543 
544  // Material of the final collimator
545  finalCollimatorMaterial = brass;
546 }
547 
549 void PassiveProtonBeamLine::ConstructPassiveProtonBeamLine()
550 {
551  // -----------------------------
552  // Treatment room - World volume
553  //------------------------------
554  // Treatment room sizes
555  const G4double worldX = 400.0 *cm;
556  const G4double worldY = 400.0 *cm;
557  const G4double worldZ = 400.0 *cm;
558  G4bool isotopes = false;
559 
560  G4Material* airNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_AIR", isotopes);
561  G4Box* treatmentRoom = new G4Box("TreatmentRoom",worldX,worldY,worldZ);
562  G4LogicalVolume* logicTreatmentRoom = new G4LogicalVolume(treatmentRoom,
563  airNist,
564  "logicTreatmentRoom",
565  0,0,0);
566  physicalTreatmentRoom = new G4PVPlacement(0,
567  G4ThreeVector(),
568  "physicalTreatmentRoom",
569  logicTreatmentRoom,
570  0,false,0);
571 
572 
573  // The treatment room is invisible in the Visualisation
574  logicTreatmentRoom -> SetVisAttributes (G4VisAttributes::Invisible);
575 
576  // Components of the Passive Proton Beam Line
585 
586  // The following lines construc a typical modulator wheel inside the Passive Beam line.
587  // Please remember to set the nodulator material (default is air, i.e. no modulator!)
588  // in the HadrontherapyModulator.cc file
589  modulator = new HadrontherapyModulator();
590  modulator -> BuildModulator(physicalTreatmentRoom);
591 }
592 
595 {
596  // ------------------//
597  // BEAM LINE SUPPORT //
598  //-------------------//
599  const G4double beamLineSupportXSize = 1.5*m;
600  const G4double beamLineSupportYSize = 20.*mm;
601  const G4double beamLineSupportZSize = 600.*mm;
602 
603  const G4double beamLineSupportXPosition = -1745.09 *mm;
604  const G4double beamLineSupportYPosition = -230. *mm;
605  const G4double beamLineSupportZPosition = 0.*mm;
606 
607  G4Box* beamLineSupport = new G4Box("BeamLineSupport",
608  beamLineSupportXSize,
609  beamLineSupportYSize,
610  beamLineSupportZSize);
611 
612  G4LogicalVolume* logicBeamLineSupport = new G4LogicalVolume(beamLineSupport,
613  beamLineSupportMaterial,
614  "BeamLineSupport");
615  physiBeamLineSupport = new G4PVPlacement(0, G4ThreeVector(beamLineSupportXPosition,
616  beamLineSupportYPosition,
617  beamLineSupportZPosition),
618  "BeamLineSupport",
619  logicBeamLineSupport,
620  physicalTreatmentRoom, false, 0);
621 
622  // Visualisation attributes of the beam line support
623 
624  logicBeamLineSupport -> SetVisAttributes(gray);
625 
626  //---------------------------------//
627  // Beam line cover 1 (left panel) //
628  //---------------------------------//
629  const G4double beamLineCoverXSize = 1.5*m;
630  const G4double beamLineCoverYSize = 750.*mm;
631  const G4double beamLineCoverZSize = 10.*mm;
632 
633  const G4double beamLineCoverXPosition = -1745.09 *mm;
634  const G4double beamLineCoverYPosition = -1000.*mm;
635  const G4double beamLineCoverZPosition = 600.*mm;
636 
637  G4Box* beamLineCover = new G4Box("BeamLineCover",
638  beamLineCoverXSize,
639  beamLineCoverYSize,
640  beamLineCoverZSize);
641 
642  G4LogicalVolume* logicBeamLineCover = new G4LogicalVolume(beamLineCover,
643  beamLineSupportMaterial,
644  "BeamLineCover");
645 
646  physiBeamLineCover = new G4PVPlacement(0, G4ThreeVector(beamLineCoverXPosition,
647  beamLineCoverYPosition,
648  beamLineCoverZPosition),
649  "BeamLineCover",
650  logicBeamLineCover,
651  physicalTreatmentRoom,
652  false,
653  0);
654 
655  // ---------------------------------//
656  // Beam line cover 2 (rigth panel) //
657  // ---------------------------------//
658  // It has the same characteristic of beam line cover 1 but set in a different position
659  physiBeamLineCover2 = new G4PVPlacement(0, G4ThreeVector(beamLineCoverXPosition,
660  beamLineCoverYPosition,
661  - beamLineCoverZPosition),
662  "BeamLineCover2",
663  logicBeamLineCover,
664  physicalTreatmentRoom,
665  false,
666  0);
667 
668  logicBeamLineCover -> SetVisAttributes(blue);
669 }
670 
673 {
674  // ------------//
675  // VACUUM PIPE //
676  //-------------//
677  //
678  // First track of the beam line is inside vacuum;
679  // The PIPE contains the FIRST SCATTERING FOIL and the KAPTON WINDOW
680  G4Box* vacuumZone = new G4Box("VacuumZone", vacuumZoneXSize, vacuumZoneYSize, vacuumZoneZSize);
681  G4LogicalVolume* logicVacuumZone = new G4LogicalVolume(vacuumZone, vacuumZoneMaterial, "VacuumZone");
682  G4VPhysicalVolume* physiVacuumZone = new G4PVPlacement(0, G4ThreeVector(vacuumZoneXPosition, 0., 0.),
683  "VacuumZone", logicVacuumZone, physicalTreatmentRoom, false, 0);
684  // --------------------------//
685  // THE FIRST SCATTERING FOIL //
686  // --------------------------//
687  // A thin foil performing a first scattering
688  // of the original beam
689  firstScatteringFoil = new G4Box("FirstScatteringFoil",
690  firstScatteringFoilXSize,
691  firstScatteringFoilYSize,
692  firstScatteringFoilZSize);
693 
694  G4LogicalVolume* logicFirstScatteringFoil = new G4LogicalVolume(firstScatteringFoil,
695  firstScatteringFoilMaterial,
696  "FirstScatteringFoil");
697 
698  physiFirstScatteringFoil = new G4PVPlacement(0, G4ThreeVector(firstScatteringFoilXPosition, 0.,0.),
699  "FirstScatteringFoil", logicFirstScatteringFoil, physiVacuumZone,
700  false, 0);
701 
702  logicFirstScatteringFoil -> SetVisAttributes(skyBlue);
703  // -------------------//
704  // THE KAPTON WINDOWS //
705  //--------------------//
706  //It prmits the passage of the beam from vacuum to air
707  G4Box* solidKaptonWindow = new G4Box("KaptonWindow",
708  kaptonWindowXSize,
709  kaptonWindowYSize,
710  kaptonWindowZSize);
711 
712  G4LogicalVolume* logicKaptonWindow = new G4LogicalVolume(solidKaptonWindow,
713  kaptonWindowMaterial,
714  "KaptonWindow");
715 
716  physiKaptonWindow = new G4PVPlacement(0, G4ThreeVector(kaptonWindowXPosition, 0., 0.),
717  "KaptonWindow", logicKaptonWindow,
718  physiVacuumZone, false, 0);
719 
720  logicKaptonWindow -> SetVisAttributes(darkOrange3);
721 
722  // ------------//
723  // THE STOPPER //
724  //-------------//
725  // Is a small cylinder able to stop the central component
726  // of the beam (having a gaussian shape). It is connected to the SECON SCATTERING FOIL
727  // and represent the second element of the scattering system
728  G4double phi = 90. *deg;
729  // Matrix definition for a 90 deg rotation with respect to Y axis
730  G4RotationMatrix rm;
731  rm.rotateY(phi);
732 
733  solidStopper = new G4Tubs("Stopper",
734  innerRadiusStopper,
735  outerRadiusStopper,
736  heightStopper,
737  startAngleStopper,
738  spanningAngleStopper);
739 
740  logicStopper = new G4LogicalVolume(solidStopper,
741  stopperMaterial,
742  "Stopper",
743  0, 0, 0);
744 
745  physiStopper = new G4PVPlacement(G4Transform3D(rm, G4ThreeVector(stopperXPosition,
746  stopperYPosition,
747  stopperZPosition)),
748  "Stopper",
749  logicStopper,
750  physicalTreatmentRoom,
751  false,
752  0);
753 
754  logicStopper -> SetVisAttributes(red);
755 
756  // ---------------------------//
757  // THE SECOND SCATTERING FOIL //
758  // ---------------------------//
759  // It is another thin foil and provides the
760  // final diffusion of the beam. It represents the third element of the scattering
761  // system;
762 
763  secondScatteringFoil = new G4Box("SecondScatteringFoil",
764  secondScatteringFoilXSize,
765  secondScatteringFoilYSize,
766  secondScatteringFoilZSize);
767 
768  G4LogicalVolume* logicSecondScatteringFoil = new G4LogicalVolume(secondScatteringFoil,
769  secondScatteringFoilMaterial,
770  "SecondScatteringFoil");
771 
772  physiSecondScatteringFoil = new G4PVPlacement(0, G4ThreeVector(secondScatteringFoilXPosition,
773  secondScatteringFoilYPosition,
774  secondScatteringFoilZPosition),
775  "SeconScatteringFoil",
776  logicSecondScatteringFoil,
777  physicalTreatmentRoom,
778  false,
779  0);
780 
781  logicSecondScatteringFoil -> SetVisAttributes(skyBlue);
782 }
785 {
786  // ---------------------------- //
787  // THE RANGE SHIFTER //
788  // -----------------------------//
789  // It is a slab of PMMA acting as energy degreader of
790  // primary beam
791  solidRangeShifterBox = new G4Box("RangeShifterBox",
792  rangeShifterXSize,
793  rangeShifterYSize,
794  rangeShifterZSize);
795 
796  logicRangeShifterBox = new G4LogicalVolume(solidRangeShifterBox,
797  rangeShifterMaterial,
798  "RangeShifterBox");
799  physiRangeShifterBox = new G4PVPlacement(0,
800  G4ThreeVector(rangeShifterXPosition, 0., 0.),
801  "RangeShifterBox",
802  logicRangeShifterBox,
803  physicalTreatmentRoom,
804  false,
805  0);
806 
807 
808  logicRangeShifterBox -> SetVisAttributes(yellow);
809 }
812 {
813  // -----------------//
814  // FIRST COLLIMATOR //
815  // -----------------//
816  // It is a slab of PMMA with an hole in its center
817  const G4double firstCollimatorXSize = 20.*mm;
818  const G4double firstCollimatorYSize = 100.*mm;
819  const G4double firstCollimatorZSize = 100.*mm;
820 
821  const G4double firstCollimatorXPosition = -2673.00*mm;
822  const G4double firstCollimatorYPosition = 0.*mm;
823  const G4double firstCollimatorZPosition = 0.*mm;
824 
825  G4Box* solidFirstCollimator = new G4Box("FirstCollimator",
826  firstCollimatorXSize,
827  firstCollimatorYSize,
828  firstCollimatorZSize);
829 
830  G4LogicalVolume* logicFirstCollimator = new G4LogicalVolume(solidFirstCollimator,
831  firstCollimatorMaterial,
832  "FirstCollimator");
833 
834  physiFirstCollimator = new G4PVPlacement(0, G4ThreeVector(firstCollimatorXPosition,
835  firstCollimatorYPosition,
836  firstCollimatorZPosition),
837  "FirstCollimator",
838  logicFirstCollimator,
839  physicalTreatmentRoom,
840  false,
841  0);
842  // ----------------------------//
843  // Hole of the first collimator//
844  //-----------------------------//
845  G4double innerRadiusHoleFirstCollimator = 0.*mm;
846  G4double outerRadiusHoleFirstCollimator = 15.*mm;
847  G4double hightHoleFirstCollimator = 20.*mm;
848  G4double startAngleHoleFirstCollimator = 0.*deg;
849  G4double spanningAngleHoleFirstCollimator = 360.*deg;
850 
851  G4Tubs* solidHoleFirstCollimator = new G4Tubs("HoleFirstCollimator",
852  innerRadiusHoleFirstCollimator,
853  outerRadiusHoleFirstCollimator,
854  hightHoleFirstCollimator,
855  startAngleHoleFirstCollimator,
856  spanningAngleHoleFirstCollimator);
857 
858  G4LogicalVolume* logicHoleFirstCollimator = new G4LogicalVolume(solidHoleFirstCollimator,
859  holeFirstCollimatorMaterial,
860  "HoleFirstCollimator",
861  0, 0, 0);
862  G4double phi = 90. *deg;
863  // Matrix definition for a 90 deg rotation. Also used for other volumes
864  G4RotationMatrix rm;
865  rm.rotateY(phi);
866 
867  physiHoleFirstCollimator = new G4PVPlacement(G4Transform3D(rm, G4ThreeVector()),
868  "HoleFirstCollimator",
869  logicHoleFirstCollimator,
870  physiFirstCollimator,
871  false,
872  0);
873  // ------------------//
874  // SECOND COLLIMATOR //
875  //-------------------//
876  // It is a slab of PMMA with an hole in its center
877  const G4double secondCollimatorXPosition = -1900.00*mm;
878  const G4double secondCollimatorYPosition = 0*mm;
879  const G4double secondCollimatorZPosition = 0*mm;
880 
881  physiSecondCollimator = new G4PVPlacement(0, G4ThreeVector(secondCollimatorXPosition,
882  secondCollimatorYPosition,
883  secondCollimatorZPosition),
884  "SecondCollimator",
885  logicFirstCollimator,
886  physicalTreatmentRoom,
887  false,
888  0);
889 
890  // ------------------------------//
891  // Hole of the second collimator //
892  // ------------------------------//
893  physiHoleSecondCollimator = new G4PVPlacement(G4Transform3D(rm, G4ThreeVector()),
894  "HoleSecondCollimator",
895  logicHoleFirstCollimator,
896  physiSecondCollimator,
897  false,
898  0);
899 
900  // --------------------------------------//
901  // FIRST SIDE OF THE MODULATOR BOX //
902  // --------------------------------------//
903  // The modulator box is an aluminum box in which
904  // the range shifter and the energy modulator are located
905  // In this example only the entrance and exit
906  // faces of the box are simulated.
907  // Each face is an aluminum slab with an hole in its center
908 
909  const G4double firstCollimatorModulatorXSize = 10.*mm;
910  const G4double firstCollimatorModulatorYSize = 200.*mm;
911  const G4double firstCollimatorModulatorZSize = 200.*mm;
912 
913  const G4double firstCollimatorModulatorXPosition = -2523.00*mm;
914  const G4double firstCollimatorModulatorYPosition = 0.*mm;
915  const G4double firstCollimatorModulatorZPosition = 0.*mm;
916 
917  G4Box* solidFirstCollimatorModulatorBox = new G4Box("FirstCollimatorModulatorBox",
918  firstCollimatorModulatorXSize,
919  firstCollimatorModulatorYSize,
920  firstCollimatorModulatorZSize);
921 
922  G4LogicalVolume* logicFirstCollimatorModulatorBox = new G4LogicalVolume(solidFirstCollimatorModulatorBox,
923  modulatorBoxMaterial,
924  "FirstCollimatorModulatorBox");
925 
926  physiFirstCollimatorModulatorBox = new G4PVPlacement(0, G4ThreeVector(firstCollimatorModulatorXPosition,
927  firstCollimatorModulatorYPosition,
928  firstCollimatorModulatorZPosition),
929  "FirstCollimatorModulatorBox",
930  logicFirstCollimatorModulatorBox,
931  physicalTreatmentRoom, false, 0);
932 
933  // ----------------------------------------------------//
934  // Hole of the first collimator of the modulator box //
935  // ----------------------------------------------------//
936  const G4double innerRadiusHoleFirstCollimatorModulatorBox = 0.*mm;
937  const G4double outerRadiusHoleFirstCollimatorModulatorBox = 31.*mm;
938  const G4double hightHoleFirstCollimatorModulatorBox = 10.*mm;
939  const G4double startAngleHoleFirstCollimatorModulatorBox = 0.*deg;
940  const G4double spanningAngleHoleFirstCollimatorModulatorBox = 360.*deg;
941 
942  G4Tubs* solidHoleFirstCollimatorModulatorBox = new G4Tubs("HoleFirstCollimatorModulatorBox",
943  innerRadiusHoleFirstCollimatorModulatorBox,
944  outerRadiusHoleFirstCollimatorModulatorBox,
945  hightHoleFirstCollimatorModulatorBox ,
946  startAngleHoleFirstCollimatorModulatorBox,
947  spanningAngleHoleFirstCollimatorModulatorBox);
948 
949  G4LogicalVolume* logicHoleFirstCollimatorModulatorBox = new G4LogicalVolume(solidHoleFirstCollimatorModulatorBox,
950  holeModulatorBoxMaterial,
951  "HoleFirstCollimatorModulatorBox",
952  0, 0, 0);
953 
954  physiHoleFirstCollimatorModulatorBox = new G4PVPlacement(G4Transform3D(rm, G4ThreeVector()),
955  "HoleFirstCollimatorModulatorBox",
956  logicHoleFirstCollimatorModulatorBox,
957  physiFirstCollimatorModulatorBox, false, 0);
958 
959  // --------------------------------------------------//
960  // SECOND SIDE OF THE MODULATOR BOX //
961  // --------------------------------------------------//
962  const G4double secondCollimatorModulatorXSize = 10.*mm;
963  const G4double secondCollimatorModulatorYSize = 200.*mm;
964  const G4double secondCollimatorModulatorZSize = 200.*mm;
965 
966  const G4double secondCollimatorModulatorXPosition = -1953.00 *mm;
967 
968  const G4double secondCollimatorModulatorYPosition = 0.*mm;
969  const G4double secondCollimatorModulatorZPosition = 0.*mm;
970 
971  G4Box* solidSecondCollimatorModulatorBox = new G4Box("SecondCollimatorModulatorBox",
972  secondCollimatorModulatorXSize,
973  secondCollimatorModulatorYSize,
974  secondCollimatorModulatorZSize);
975 
976  G4LogicalVolume* logicSecondCollimatorModulatorBox = new G4LogicalVolume(solidSecondCollimatorModulatorBox,
977  modulatorBoxMaterial,
978  "SecondCollimatorModulatorBox");
979 
980  physiSecondCollimatorModulatorBox = new G4PVPlacement(0, G4ThreeVector(secondCollimatorModulatorXPosition,
981  secondCollimatorModulatorYPosition,
982  secondCollimatorModulatorZPosition),
983  "SecondCollimatorModulatorBox",
984  logicSecondCollimatorModulatorBox,
985  physicalTreatmentRoom, false, 0);
986 
987  // ----------------------------------------------//
988  // Hole of the second collimator modulator box //
989  // ----------------------------------------------//
990  const G4double innerRadiusHoleSecondCollimatorModulatorBox = 0.*mm;
991  const G4double outerRadiusHoleSecondCollimatorModulatorBox = 31.*mm;
992  const G4double hightHoleSecondCollimatorModulatorBox = 10.*mm;
993  const G4double startAngleHoleSecondCollimatorModulatorBox = 0.*deg;
994  const G4double spanningAngleHoleSecondCollimatorModulatorBox = 360.*deg;
995 
996  G4Tubs* solidHoleSecondCollimatorModulatorBox = new G4Tubs("HoleSecondCollimatorModulatorBox",
997  innerRadiusHoleSecondCollimatorModulatorBox,
998  outerRadiusHoleSecondCollimatorModulatorBox,
999  hightHoleSecondCollimatorModulatorBox ,
1000  startAngleHoleSecondCollimatorModulatorBox,
1001  spanningAngleHoleSecondCollimatorModulatorBox);
1002 
1003  G4LogicalVolume* logicHoleSecondCollimatorModulatorBox = new G4LogicalVolume(solidHoleSecondCollimatorModulatorBox,
1004  holeModulatorBoxMaterial,
1005  "HoleSecondCollimatorModulatorBox",
1006  0, 0, 0);
1007 
1008  physiHoleSecondCollimatorModulatorBox = new G4PVPlacement(G4Transform3D(rm, G4ThreeVector()),
1009  "HoleSecondCollimatorModulatorBox",
1010  logicHoleSecondCollimatorModulatorBox,
1011  physiSecondCollimatorModulatorBox, false, 0);
1012 
1013  logicFirstCollimator -> SetVisAttributes(yellow);
1014  logicFirstCollimatorModulatorBox -> SetVisAttributes(blue);
1015  logicSecondCollimatorModulatorBox -> SetVisAttributes(blue);
1016 }
1017 
1020 {
1021  // ----------------------------
1022  // THE FIRST MONITOR CHAMBER
1023  // ----------------------------
1024  // A monitor chamber is a free-air ionisation chamber
1025  // able to measure do proton fluence during the treatment.
1026  // Here its responce is not simulated in terms of produced
1027  // charge but only the energy losses are taked into account.
1028  // Each chamber consist of 9 mm of air in a box
1029  // that has two layers one of kapton and one
1030  // of copper
1031  const G4double monitor1XSize = 4.525022*mm;
1032  const G4double monitor2XSize = 0.000011*mm;
1033  const G4double monitor3XSize = 4.5*mm;
1034  const G4double monitorYSize = 10.*cm;
1035  const G4double monitorZSize = 10.*cm;
1036  const G4double monitor1XPosition = -1262.47498 *mm;
1037  const G4double monitor2XPosition = -4.500011*mm;
1038  const G4double monitor4XPosition = 4.500011*mm;
1039 
1040  G4Box* solidFirstMonitorLayer1 = new G4Box("FirstMonitorLayer1",
1041  monitor1XSize,
1042  monitorYSize,
1043  monitorZSize);
1044 
1045  G4LogicalVolume* logicFirstMonitorLayer1 = new G4LogicalVolume(solidFirstMonitorLayer1,
1046  layer1MonitorChamberMaterial,
1047  "FirstMonitorLayer1");
1048 
1049  physiFirstMonitorLayer1 = new G4PVPlacement(0,
1050  G4ThreeVector(monitor1XPosition,0.*cm,0.*cm),
1051  "FirstMonitorLayer1",
1052  logicFirstMonitorLayer1,
1053  physicalTreatmentRoom,
1054  false,
1055  0);
1056 
1057  G4Box* solidFirstMonitorLayer2 = new G4Box("FirstMonitorLayer2",
1058  monitor2XSize,
1059  monitorYSize,
1060  monitorZSize);
1061 
1062  G4LogicalVolume* logicFirstMonitorLayer2 = new G4LogicalVolume(solidFirstMonitorLayer2,
1063  layer2MonitorChamberMaterial,
1064  "FirstMonitorLayer2");
1065 
1066  physiFirstMonitorLayer2 = new G4PVPlacement(0, G4ThreeVector(monitor2XPosition,0.*cm,0.*cm),
1067  "FirstMonitorLayer2",
1068  logicFirstMonitorLayer2,
1069  physiFirstMonitorLayer1,
1070  false,
1071  0);
1072 
1073  G4Box* solidFirstMonitorLayer3 = new G4Box("FirstMonitorLayer3",
1074  monitor3XSize,
1075  monitorYSize,
1076  monitorZSize);
1077 
1078  G4LogicalVolume* logicFirstMonitorLayer3 = new G4LogicalVolume(solidFirstMonitorLayer3,
1079  layer3MonitorChamberMaterial,
1080  "FirstMonitorLayer3");
1081 
1082  physiFirstMonitorLayer3 = new G4PVPlacement(0,
1083  G4ThreeVector(0.*mm,0.*cm,0.*cm),
1084  "MonitorLayer3",
1085  logicFirstMonitorLayer3,
1086  physiFirstMonitorLayer1,
1087  false,
1088  0);
1089 
1090  G4Box* solidFirstMonitorLayer4 = new G4Box("FirstMonitorLayer4",
1091  monitor2XSize,
1092  monitorYSize,
1093  monitorZSize);
1094 
1095  G4LogicalVolume* logicFirstMonitorLayer4 = new G4LogicalVolume(solidFirstMonitorLayer4,
1096  layer4MonitorChamberMaterial,
1097  "FirstMonitorLayer4");
1098 
1099  physiFirstMonitorLayer4 = new G4PVPlacement(0, G4ThreeVector(monitor4XPosition,0.*cm,0.*cm),
1100  "FirstMonitorLayer4",
1101  logicFirstMonitorLayer4,
1102  physiFirstMonitorLayer1, false, 0);
1103  // ----------------------------//
1104  // THE SECOND MONITOR CHAMBER //
1105  // ----------------------------//
1106  physiSecondMonitorLayer1 = new G4PVPlacement(0, G4ThreeVector(-1131.42493 *mm,0.*cm,0.*cm),
1107  "SecondMonitorLayer1", logicFirstMonitorLayer1,physicalTreatmentRoom, false, 0);
1108 
1109  physiSecondMonitorLayer2 = new G4PVPlacement(0, G4ThreeVector( monitor2XPosition,0.*cm,0.*cm), "SecondMonitorLayer2",
1110  logicFirstMonitorLayer2, physiSecondMonitorLayer1, false, 0);
1111 
1112  physiSecondMonitorLayer3 = new G4PVPlacement(0, G4ThreeVector(0.*mm,0.*cm,0.*cm), "MonitorLayer3",
1113  logicFirstMonitorLayer3, physiSecondMonitorLayer1, false, 0);
1114 
1115  physiSecondMonitorLayer4 = new G4PVPlacement(0, G4ThreeVector(monitor4XPosition,0.*cm,0.*cm), "SecondMonitorLayer4",
1116  logicFirstMonitorLayer4, physiSecondMonitorLayer1, false, 0);
1117 
1118  logicFirstMonitorLayer3 -> SetVisAttributes(white);
1119 
1120 }
1123 {
1124  // --------------------------------//
1125  // THE MOPI DETECTOR //
1126  // --------------------------------//
1127  // MOPI DETECTOR: two orthogonal microstrip gas detectors developed
1128  // by the INFN Section of Turin in collaboration with some
1129  // of the author of this example. It permits the
1130  // on-line check of the beam simmetry via the signal
1131  // integration of the collected charge for each strip.
1132  //
1133  // In this example it is simulated as:
1134  // 1. First anode: 35 mu of kapton + 15 mu of aluminum,
1135  // 2. First air gap: 6 mm of air,
1136  // 3. The cathode: 1 mu Al + 25 mu mylar + 1 mu Al
1137  // (in common with the two air gap),
1138  // 4. Second air gap: 6 mm of air,
1139  // 5 Second anode: 15 mu Al + 35 mu kapton
1140  // Color used in the graphical output
1141 
1142 
1143  // Mother volume
1144  solidMOPIMotherVolume = new G4Box("MOPIMotherVolume",
1145  MOPIMotherVolumeXSize/2,
1146  MOPIMotherVolumeYSize/2,
1147  MOPIMotherVolumeYSize/2);
1148 
1149  logicMOPIMotherVolume = new G4LogicalVolume(solidMOPIMotherVolume,
1150  MOPIMotherVolumeMaterial,
1151  "MOPIMotherVolume");
1152  physiMOPIMotherVolume = new G4PVPlacement(0,
1153  G4ThreeVector(MOPIMotherVolumeXPosition,
1154  MOPIMotherVolumeYPosition,
1155  MOPIMotherVolumeZPosition),
1156  "MOPIMotherVolume",
1157  logicMOPIMotherVolume,
1158  physicalTreatmentRoom,
1159  false,
1160  0);
1161 
1162  // First Kapton layer
1163  solidMOPIFirstKaptonLayer = new G4Box("MOPIFirstKaptonLayer",
1164  MOPIFirstKaptonLayerXSize/2,
1165  MOPIFirstKaptonLayerYSize/2 ,
1166  MOPIFirstKaptonLayerZSize/2);
1167 
1168  logicMOPIFirstKaptonLayer = new G4LogicalVolume(solidMOPIFirstKaptonLayer,
1169  MOPIFirstKaptonLayerMaterial,
1170  "MOPIFirstKaptonLayer");
1171 
1172  physiMOPIFirstKaptonLayer = new G4PVPlacement(0,
1173  G4ThreeVector(MOPIFirstKaptonLayerXPosition,
1174  MOPIFirstKaptonLayerYPosition ,
1175  MOPIFirstKaptonLayerZPosition),
1176  "MOPIFirstKaptonLayer",
1177  logicMOPIFirstKaptonLayer,
1178  physiMOPIMotherVolume,
1179  false,
1180  0);
1181 
1182  // First Aluminum layer
1183  solidMOPIFirstAluminumLayer = new G4Box("MOPIFirstAluminumLayer",
1184  MOPIFirstAluminumLayerXSize/2,
1185  MOPIFirstAluminumLayerYSize/2 ,
1186  MOPIFirstAluminumLayerZSize/2);
1187 
1188  logicMOPIFirstAluminumLayer = new G4LogicalVolume(solidMOPIFirstAluminumLayer,
1189  MOPIFirstAluminumLayerMaterial,
1190  "MOPIFirstAluminumLayer");
1191 
1192  physiMOPIFirstAluminumLayer = new G4PVPlacement(0,
1193  G4ThreeVector(MOPIFirstAluminumLayerXPosition,
1194  MOPIFirstAluminumLayerYPosition ,
1195  MOPIFirstAluminumLayerZPosition),
1196  "MOPIFirstAluminumLayer",
1197  logicMOPIFirstAluminumLayer, physiMOPIMotherVolume, false, 0);
1198 
1199  // First Air GAP
1200  solidMOPIFirstAirGap = new G4Box("MOPIFirstAirGap",
1201  MOPIFirstAirGapXSize/2,
1202  MOPIFirstAirGapYSize/2,
1203  MOPIFirstAirGapZSize/2);
1204 
1205  logicMOPIFirstAirGap = new G4LogicalVolume(solidMOPIFirstAirGap,
1206  MOPIFirstAirGapMaterial,
1207  "MOPIFirstAirgap");
1208 
1209  physiMOPIFirstAirGap = new G4PVPlacement(0,
1210  G4ThreeVector(MOPIFirstAirGapXPosition,
1211  MOPIFirstAirGapYPosition ,
1212  MOPIFirstAirGapZPosition),
1213  "MOPIFirstAirGap",
1214  logicMOPIFirstAirGap, physiMOPIMotherVolume, false, 0);
1215 
1216 
1217  // The Cathode
1218  solidMOPICathode = new G4Box("MOPICathode",
1219  MOPICathodeXSize/2,
1220  MOPICathodeYSize/2,
1221  MOPICathodeZSize/2);
1222 
1223  logicMOPICathode = new G4LogicalVolume(solidMOPICathode,
1224  MOPICathodeMaterial,
1225  "MOPICathode");
1226 
1227  physiMOPICathode = new G4PVPlacement(0,
1228  G4ThreeVector(MOPICathodeXPosition,
1229  MOPICathodeYPosition ,
1230  MOPICathodeZPosition),
1231  "MOPICathode",
1232  logicMOPICathode,
1233  physiMOPIMotherVolume, false, 0);
1234 
1235  // Second Air GAP
1236  solidMOPISecondAirGap = new G4Box("MOPISecondAirGap",
1237  MOPISecondAirGapXSize/2,
1238  MOPISecondAirGapYSize/2,
1239  MOPISecondAirGapZSize/2);
1240 
1241  logicMOPISecondAirGap = new G4LogicalVolume(solidMOPISecondAirGap,
1242  MOPISecondAirGapMaterial,
1243  "MOPISecondAirgap");
1244 
1245  physiMOPISecondAirGap = new G4PVPlacement(0,
1246  G4ThreeVector(MOPISecondAirGapXPosition,
1247  MOPISecondAirGapYPosition ,
1248  MOPISecondAirGapZPosition),
1249  "MOPISecondAirGap",
1250  logicMOPISecondAirGap, physiMOPIMotherVolume, false, 0);
1251 
1252  // Second Aluminum layer
1253  solidMOPISecondAluminumLayer = new G4Box("MOPISecondAluminumLayer",
1254  MOPISecondAluminumLayerXSize/2,
1255  MOPISecondAluminumLayerYSize/2 ,
1256  MOPISecondAluminumLayerZSize/2);
1257 
1258  logicMOPISecondAluminumLayer = new G4LogicalVolume(solidMOPISecondAluminumLayer,
1259  MOPISecondAluminumLayerMaterial,
1260  "MOPISecondAluminumLayer");
1261 
1262  physiMOPISecondAluminumLayer = new G4PVPlacement(0,
1263  G4ThreeVector(MOPISecondAluminumLayerXPosition,
1264  MOPISecondAluminumLayerYPosition ,
1265  MOPISecondAluminumLayerZPosition),
1266  "MOPISecondAluminumLayer",
1267  logicMOPISecondAluminumLayer,
1268  physiMOPIMotherVolume,
1269  false,
1270  0);
1271 
1272  // Second Kapton layer
1273  solidMOPISecondKaptonLayer = new G4Box("MOPISecondKaptonLayer",
1274  MOPISecondKaptonLayerXSize/2,
1275  MOPISecondKaptonLayerYSize/2 ,
1276  MOPISecondKaptonLayerZSize/2);
1277 
1278  logicMOPISecondKaptonLayer = new G4LogicalVolume(solidMOPISecondKaptonLayer,
1279  MOPIFirstKaptonLayerMaterial,
1280  "MOPISecondKaptonLayer");
1281 
1282  physiMOPISecondKaptonLayer = new G4PVPlacement(0,
1283  G4ThreeVector(MOPISecondKaptonLayerXPosition,
1284  MOPISecondKaptonLayerYPosition ,
1285  MOPISecondKaptonLayerZPosition),
1286  "MOPISecondKaptonLayer",
1287  logicMOPISecondKaptonLayer,
1288  physiMOPIMotherVolume,
1289  false,
1290  0);
1291 
1292  logicMOPIFirstAirGap -> SetVisAttributes(darkGreen);
1293  logicMOPISecondAirGap -> SetVisAttributes(darkGreen);
1294 
1295 }
1298 {
1299  // ------------------------------//
1300  // THE FINAL TUBE AND COLLIMATOR //
1301  //-------------------------------//
1302  // The last part of the transport beam line consists of
1303  // a 59 mm thick PMMA slab (to stop all the diffused radiation), a 370 mm brass tube
1304  // (to well collimate the proton beam) and a final collimator with 25 mm diameter
1305  // aperture (that provide the final trasversal shape of the beam)
1306 
1307  // -------------------//
1308  // PMMA SUPPORT //
1309  // -------------------//
1310  const G4double nozzleSupportXSize = 29.5 *mm;
1311  const G4double nozzleSupportYSize = 180. *mm;
1312  const G4double nozzleSupportZSize = 180. *mm;
1313 
1314  const G4double nozzleSupportXPosition = -397.50 *mm;
1315 
1316  G4double phi = 90. *deg;
1317  // Matrix definition for a 90 deg rotation. Also used for other volumes
1318  G4RotationMatrix rm;
1319  rm.rotateY(phi);
1320 
1321  G4Box* solidNozzleSupport = new G4Box("NozzleSupport",
1322  nozzleSupportXSize,
1323  nozzleSupportYSize,
1324  nozzleSupportZSize);
1325 
1326  G4LogicalVolume* logicNozzleSupport = new G4LogicalVolume(solidNozzleSupport,
1327  nozzleSupportMaterial,
1328  "NozzleSupport");
1329 
1330  physiNozzleSupport = new G4PVPlacement(0, G4ThreeVector(nozzleSupportXPosition,0., 0.),
1331  "NozzleSupport",
1332  logicNozzleSupport,
1333  physicalTreatmentRoom,
1334  false,
1335  0);
1336 
1337  logicNozzleSupport -> SetVisAttributes(yellow);
1338 
1339 
1340 
1341  //------------------------------------//
1342  // HOLE IN THE SUPPORT //
1343  //------------------------------------//
1344  const G4double innerRadiusHoleNozzleSupport = 0.*mm;
1345  const G4double outerRadiusHoleNozzleSupport = 21.5*mm;
1346  const G4double hightHoleNozzleSupport = 29.5 *mm;
1347  const G4double startAngleHoleNozzleSupport = 0.*deg;
1348  const G4double spanningAngleHoleNozzleSupport = 360.*deg;
1349 
1350  G4Tubs* solidHoleNozzleSupport = new G4Tubs("HoleNozzleSupport",
1351  innerRadiusHoleNozzleSupport,
1352  outerRadiusHoleNozzleSupport,
1353  hightHoleNozzleSupport,
1354  startAngleHoleNozzleSupport,
1355  spanningAngleHoleNozzleSupport);
1356 
1357  G4LogicalVolume* logicHoleNozzleSupport = new G4LogicalVolume(solidHoleNozzleSupport,
1358  holeNozzleSupportMaterial,
1359  "HoleNozzleSupport",
1360  0,
1361  0,
1362  0);
1363 
1364 
1365  physiHoleNozzleSupport = new G4PVPlacement(G4Transform3D(rm, G4ThreeVector()),
1366  "HoleNozzleSupport",
1367  logicHoleNozzleSupport,
1368  physiNozzleSupport,
1369  false, 0);
1370 
1371  logicHoleNozzleSupport -> SetVisAttributes(darkOrange3);
1372 
1373 
1374  // ---------------------------------//
1375  // BRASS TUBE 1 (phantom side) //
1376  // ---------------------------------//
1377  const G4double innerRadiusBrassTube= 18.*mm;
1378  const G4double outerRadiusBrassTube = 21.5 *mm;
1379  const G4double hightBrassTube = 140.5*mm;
1380  const G4double startAngleBrassTube = 0.*deg;
1381  const G4double spanningAngleBrassTube = 360.*deg;
1382 
1383  const G4double brassTubeXPosition = -227.5 *mm;
1384 
1385  G4Tubs* solidBrassTube = new G4Tubs("BrassTube",
1386  innerRadiusBrassTube,
1387  outerRadiusBrassTube,
1388  hightBrassTube,
1389  startAngleBrassTube,
1390  spanningAngleBrassTube);
1391 
1392  G4LogicalVolume* logicBrassTube = new G4LogicalVolume(solidBrassTube,
1393  brassTubeMaterial,
1394  "BrassTube",
1395  0, 0, 0);
1396 
1397  physiBrassTube = new G4PVPlacement(G4Transform3D(rm,
1398  G4ThreeVector(brassTubeXPosition,
1399  0.,
1400  0.)),
1401  "BrassTube",
1402  logicBrassTube,
1403  physicalTreatmentRoom,
1404  false,
1405  0);
1406 
1407  logicBrassTube -> SetVisAttributes(darkOrange3);
1408 
1409 
1410  // ----------------------------------------------//
1411  // BRASS TUBE 2 (inside the PMMA support) //
1412  // ----------------------------------------------//
1413  const G4double innerRadiusBrassTube2= 18.*mm;
1414  const G4double outerRadiusBrassTube2 = 21.5 *mm;
1415  const G4double hightBrassTube2 = 29.5*mm;
1416  const G4double startAngleBrassTube2 = 0.*deg;
1417  const G4double spanningAngleBrassTube2 = 360.*deg;
1418 
1419  // const G4double brassTube2XPosition = -227.5 *mm;
1420 
1421  G4Tubs* solidBrassTube2 = new G4Tubs("BrassTube2",
1422  innerRadiusBrassTube2,
1423  outerRadiusBrassTube2,
1424  hightBrassTube2,
1425  startAngleBrassTube2,
1426  spanningAngleBrassTube2);
1427 
1428  G4LogicalVolume* logicBrassTube2 = new G4LogicalVolume(solidBrassTube2,
1429  brassTube2Material,
1430  "BrassTube2",
1431  0, 0, 0);
1432  G4bool checkOverlaps = true;
1433 
1434  new G4PVPlacement(0,
1435  G4ThreeVector(),
1436  logicBrassTube2,
1437  "BrassTube2",
1438  logicHoleNozzleSupport,
1439  false,
1440  0,
1441  checkOverlaps);
1442 
1443  logicBrassTube2 -> SetVisAttributes(darkOrange3);
1444 
1445 
1446 
1447  // --------------------------------------//
1448  // BRASS TUBE 3 (beam line side) //
1449  // -------------------------------------//
1450  const G4double innerRadiusBrassTube3= 18.*mm;
1451  const G4double outerRadiusBrassTube3 = 21.5 *mm;
1452  const G4double hightBrassTube3 = 10.0 *mm;
1453  const G4double startAngleBrassTube3 = 0.*deg;
1454  const G4double spanningAngleBrassTube3 = 360.*deg;
1455 
1456  const G4double brassTube3XPosition = -437 *mm;
1457 
1458  G4Tubs* solidBrassTube3 = new G4Tubs("BrassTube3",
1459  innerRadiusBrassTube3,
1460  outerRadiusBrassTube3,
1461  hightBrassTube3,
1462  startAngleBrassTube3,
1463  spanningAngleBrassTube3);
1464 
1465  G4LogicalVolume* logicBrassTube3 = new G4LogicalVolume(solidBrassTube3,
1466  brassTube3Material,
1467  "BrassTube3",
1468  0, 0, 0);
1469 
1470  physiBrassTube3 = new G4PVPlacement(G4Transform3D(rm,
1471  G4ThreeVector(brassTube3XPosition,
1472  0.,
1473  0.)),
1474  "BrassTube3",
1475  logicBrassTube3,
1476  physicalTreatmentRoom,
1477  false,
1478  0);
1479 
1480  logicBrassTube3 -> SetVisAttributes(darkOrange3);
1481 }
1482 
1485 {
1486  // -----------------------//
1487  // FINAL COLLIMATOR //
1488  //------------------------//
1489  const G4double outerRadiusFinalCollimator = 21.5*mm;
1490  const G4double hightFinalCollimator = 3.5*mm;
1491  const G4double startAngleFinalCollimator = 0.*deg;
1492  const G4double spanningAngleFinalCollimator = 360.*deg;
1493  const G4double finalCollimatorXPosition = -83.5 *mm;
1494 
1495  G4double phi = 90. *deg;
1496 
1497  // Matrix definition for a 90 deg rotation. Also used for other volumes
1498  G4RotationMatrix rm;
1499  rm.rotateY(phi);
1500 
1501  solidFinalCollimator = new G4Tubs("FinalCollimator",
1502  innerRadiusFinalCollimator,
1503  outerRadiusFinalCollimator,
1504  hightFinalCollimator,
1505  startAngleFinalCollimator,
1506  spanningAngleFinalCollimator);
1507 
1508  G4LogicalVolume* logicFinalCollimator = new G4LogicalVolume(solidFinalCollimator,
1509  finalCollimatorMaterial,
1510  "FinalCollimator",
1511  0,
1512  0,
1513  0);
1514 
1515  physiFinalCollimator = new G4PVPlacement(G4Transform3D(rm, G4ThreeVector(finalCollimatorXPosition,0.,0.)),
1516  "FinalCollimator", logicFinalCollimator, physicalTreatmentRoom, false, 0);
1517 
1518  logicFinalCollimator -> SetVisAttributes(yellow);
1519 }
1523 {
1524  physiRangeShifterBox -> SetTranslation(G4ThreeVector(value, 0., 0.));
1526  G4cout << "The Range Shifter is translated to"<< value/mm <<"mm along the X axis" <<G4endl;
1527 }
1528 
1531 {
1532  solidRangeShifterBox -> SetXHalfLength(value) ;
1533  G4cout << "RangeShifter size X (mm): "<< ((solidRangeShifterBox -> GetXHalfLength())*2.)/mm
1534  << G4endl;
1536 }
1537 
1540 {
1541  firstScatteringFoil -> SetXHalfLength(value);
1543  G4cout <<"The X size of the first scattering foil is (mm):"<<
1544  ((firstScatteringFoil -> GetXHalfLength())*2.)/mm
1545  << G4endl;
1546 }
1547 
1550 {
1551  secondScatteringFoil -> SetXHalfLength(value);
1553  G4cout <<"The X size of the second scattering foil is (mm):"<<
1554  ((secondScatteringFoil -> GetXHalfLength())*2.)/mm
1555  << G4endl;
1556 }
1557 
1560 {
1561  solidStopper -> SetOuterRadius(value);
1563  G4cout << "OuterRadius od the Stopper is (mm):"
1564  << solidStopper -> GetOuterRadius()/mm
1565  << G4endl;
1566 }
1567 
1570 {
1571  solidFinalCollimator -> SetInnerRadius(value);
1573  G4cout<<"Inner Radius of the final collimator is (mm):"
1574  << solidFinalCollimator -> GetInnerRadius()/mm
1575  << G4endl;
1576 }
1577 
1580 {
1581  if (G4Material* pttoMaterial = G4NistManager::Instance()->FindOrBuildMaterial(materialChoice, false) )
1582  {
1583  if (pttoMaterial)
1584  {
1585  rangeShifterMaterial = pttoMaterial;
1586  logicRangeShifterBox -> SetMaterial(pttoMaterial);
1587  G4cout << "The material of the Range Shifter has been changed to " << materialChoice << G4endl;
1588  }
1589  }
1590  else
1591  {
1592  G4cout << "WARNING: material \"" << materialChoice << "\" doesn't exist in NIST elements/materials"
1593  " table [located in $G4INSTALL/source/materials/src/G4NistMaterialBuilder.cc]" << G4endl;
1594  G4cout << "Use command \"/parameter/nist\" to see full materials list!" << G4endl;
1595  }
1596 }
1597 
1600 {
1601  modulator -> SetModulatorAngle(value);
1602  //G4RunManager::GetRunManager() -> GeometryHasBeenModified();
1603 }
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
static constexpr double mm
Definition: G4SIunits.hh:115
CLHEP::Hep3Vector G4ThreeVector
Definition: G4Box.hh:64
static constexpr double perCent
Definition: G4SIunits.hh:332
void SetModulatorAngle(G4double angle)
Definition: G4Tubs.hh:85
HepRotation & rotateY(double delta)
Definition: Rotation.cc:79
void SetSecondScatteringFoilXSize(G4double)
int G4int
Definition: G4Types.hh:78
static G4NistManager * Instance()
void RegisterParallelWorld(G4VUserParallelWorld *)
function g(Y1, Y2, PT2)
Definition: hijing1.383.f:5205
void SetRangeShifterXPosition(G4double value)
G4GLOB_DLL std::ostream G4cout
static constexpr double um
Definition: G4SIunits.hh:113
static constexpr double m
Definition: G4SIunits.hh:129
const XML_Char int const XML_Char * value
Definition: expat.h:331
void SetInnerRadiusFinalCollimator(G4double)
bool G4bool
Definition: G4Types.hh:79
static constexpr double cm
Definition: G4SIunits.hh:119
void SetFirstScatteringFoilXSize(G4double)
HepGeom::Transform3D G4Transform3D
void SetRangeShifterXSize(G4double halfSize)
static constexpr double cm3
Definition: G4SIunits.hh:121
def SetMaterial
Definition: EmPlot.py:25
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79
static const G4VisAttributes Invisible
#define G4endl
Definition: G4ios.hh:61
G4VPhysicalVolume * Construct()
void InitializeDetectorROGeometry(HadrontherapyDetectorROGeometry *, G4ThreeVector detectorToWorldPosition)
double G4double
Definition: G4Types.hh:76
static constexpr double deg
Definition: G4SIunits.hh:152
G4Element * FindOrBuildElement(G4int Z, G4bool isotopes=true)
static constexpr double mole
Definition: G4SIunits.hh:286