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