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 | // $Id: HadrontherapyDetectorConstruction.hh; Version 4.0 May 2005 |
---|
27 | // ---------------------------------------------------------------------------- |
---|
28 | // GEANT 4 - Hadrontherapy example |
---|
29 | // ---------------------------------------------------------------------------- |
---|
30 | // Code developed by: |
---|
31 | // |
---|
32 | // G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a) |
---|
33 | // |
---|
34 | // (a) Laboratori Nazionali del Sud |
---|
35 | // of the INFN, Catania, Italy |
---|
36 | // (b) INFN Section of Genova, Genova, Italy |
---|
37 | // |
---|
38 | // * cirrone@lns.infn.it |
---|
39 | // ---------------------------------------------------------------------------- |
---|
40 | |
---|
41 | #ifndef HadrontherapyDetectorConstruction_H |
---|
42 | #define HadrontherapyDetectorConstruction_H 1 |
---|
43 | |
---|
44 | #include "globals.hh" |
---|
45 | #include "G4VUserDetectorConstruction.hh" |
---|
46 | |
---|
47 | class G4VPhysicalVolume; |
---|
48 | class G4LogicalVolume; |
---|
49 | class HadrontherapyPhantomROGeometry; |
---|
50 | class HadrontherapyBeamLine; |
---|
51 | class HadrontherapyDetectorMessenger; |
---|
52 | class HadrontherapyModulator; |
---|
53 | class HadrontherapyPhantomSD; |
---|
54 | class HadrontherapyMaterial; |
---|
55 | |
---|
56 | class HadrontherapyDetectorConstruction : public G4VUserDetectorConstruction |
---|
57 | { |
---|
58 | public: |
---|
59 | |
---|
60 | HadrontherapyDetectorConstruction(); |
---|
61 | |
---|
62 | ~HadrontherapyDetectorConstruction(); |
---|
63 | |
---|
64 | G4VPhysicalVolume* Construct(); |
---|
65 | |
---|
66 | private: |
---|
67 | |
---|
68 | void ConstructBeamLine(); |
---|
69 | // This method allows to define the beam line geometry in the |
---|
70 | // experimental set-up |
---|
71 | |
---|
72 | void ConstructPhantom(); |
---|
73 | // This method allows to define the phantom geometry in the |
---|
74 | // experimental set-up |
---|
75 | |
---|
76 | void ConstructSensitiveDetector(); |
---|
77 | // The sensitive detector is associated to the phantom volume |
---|
78 | |
---|
79 | public: |
---|
80 | |
---|
81 | void SetModulatorAngle(G4double angle); |
---|
82 | // This method allows moving the modulator through UI commands |
---|
83 | |
---|
84 | void SetRangeShifterXPosition(G4double translation); |
---|
85 | // This method allows to move the Range Shifter along |
---|
86 | // the X axis through UI commands |
---|
87 | |
---|
88 | void SetRangeShifterXSize(G4double halfSize); |
---|
89 | // This method allows to change the size of the range shifter along |
---|
90 | // the X axis through UI command. |
---|
91 | |
---|
92 | void SetFirstScatteringFoilSize(G4double halfSize); |
---|
93 | // This method allows to change the size of the first scattering foil |
---|
94 | // along the X axis through UI command. |
---|
95 | |
---|
96 | void SetSecondScatteringFoilSize (G4double halfSize); |
---|
97 | // This method allows to change the size of the second scattering foil |
---|
98 | // along the X axis through UI command. |
---|
99 | |
---|
100 | void SetOuterRadiusStopper (G4double value); |
---|
101 | // This method allows to change the size of the outer radius of the stopper |
---|
102 | // through UI command. |
---|
103 | |
---|
104 | void SetInnerRadiusFinalCollimator (G4double value); |
---|
105 | // This method allows to change the size of the inner radius of the |
---|
106 | // final collimator through UI command. |
---|
107 | |
---|
108 | void SetRSMaterial(G4String material); |
---|
109 | // This method allows to change the material |
---|
110 | // of the range shifter through UI command. |
---|
111 | |
---|
112 | G4double ComputeVoxelSize() {return phantomSizeX/numberOfVoxelsAlongX;}; |
---|
113 | // Returns the size of the voxel along the X axis |
---|
114 | |
---|
115 | private: |
---|
116 | |
---|
117 | HadrontherapyPhantomSD* phantomSD; // Pointer to sensitive detector |
---|
118 | |
---|
119 | HadrontherapyPhantomROGeometry* phantomROGeometry; // Pointer to ROGeometry |
---|
120 | |
---|
121 | HadrontherapyBeamLine* beamLine; // Pointer to the beam line |
---|
122 | // geometry component |
---|
123 | |
---|
124 | HadrontherapyModulator* modulator; // Pointer to the modulator |
---|
125 | // geometry component |
---|
126 | |
---|
127 | G4VPhysicalVolume* physicalTreatmentRoom; |
---|
128 | G4VPhysicalVolume* patientPhysicalVolume; |
---|
129 | G4LogicalVolume* phantomLogicalVolume; |
---|
130 | G4VPhysicalVolume* phantomPhysicalVolume; |
---|
131 | |
---|
132 | HadrontherapyDetectorMessenger* detectorMessenger; |
---|
133 | HadrontherapyMaterial* material; |
---|
134 | |
---|
135 | G4double phantomSizeX; |
---|
136 | G4double phantomSizeY; |
---|
137 | G4double phantomSizeZ; |
---|
138 | |
---|
139 | G4int numberOfVoxelsAlongX; |
---|
140 | G4int numberOfVoxelsAlongY; |
---|
141 | G4int numberOfVoxelsAlongZ; |
---|
142 | }; |
---|
143 | #endif |
---|