source: trunk/examples/advanced/hadrontherapy/include/IAEADetectorConstruction.hh@ 1313

Last change on this file since 1313 was 1230, checked in by garnier, 16 years ago

update to geant4.9.3

File size: 4.5 KB
Line 
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// IAEADetectorConstruction.hh;
27// See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy
28
29#ifndef IAEADetectorConstruction_H
30#define IAEADetectorConstruction_H 1
31
32#include "globals.hh"
33#include "G4VUserDetectorConstruction.hh"
34#include "G4VisAttributes.hh"
35class G4VPhysicalVolume;
36class G4LogicalVolume;
37class HadrontherapyDetectorROGeometry;
38class PassiveProtonBeamLine;
39class IAEADetectorMessenger;
40class HadrontherapyModulator;
41class HadrontherapyDetectorSD;
42
43/**
44 * Geometry for the IAEA benchmark
45 *
46 * This geometry includes two main components: water target and a
47 * detector that counts the particles that go through the phantom.
48 *
49 */
50class IAEADetectorConstruction : public G4VUserDetectorConstruction
51{
52public:
53
54 IAEADetectorConstruction();
55
56 ~IAEADetectorConstruction();
57
58 G4VPhysicalVolume* Construct();
59
60private:
61 void ConstructPassiveProtonBeamLine();
62 void ConstructDetector();
63
64 void ConstructSensitiveDetector();
65
66
67 // G4VisAttributes* redWire;
68
69public:
70 void setWaterThickness(G4double); //< sets thickness of water phantom, zero or negative value removes phantom and plexiedges from the simulation.
71 G4double ComputeVoxelSize() {return detectorSizeX/numberOfVoxelsAlongX;};
72 //<Returns the size of the voxel along the X axis
73
74private:
75 G4VisAttributes* skyBlue;
76 G4VisAttributes* red;
77
78 G4String emName;
79 HadrontherapyDetectorSD* detectorSD; //<Pointer to sensitive detector
80
81 HadrontherapyDetectorROGeometry* detectorROGeometry; //<Pointer to ROGeometry
82
83 PassiveProtonBeamLine* passiveProtonBeamLine; //<Pointer to the beam line
84 // geometry component
85
86 HadrontherapyModulator* modulator; // Pointer to the modulator
87 // geometry component
88
89 G4VPhysicalVolume* physicalTreatmentRoom;
90 G4VPhysicalVolume* phantomPhysicalVolume;
91 G4VPhysicalVolume* phantomEdge1PhysicalVolume;
92 G4VPhysicalVolume* phantomEdge2PhysicalVolume;
93
94 G4LogicalVolume* detectorLogicalVolume;
95 G4LogicalVolume* beamWindowLogicalVolume; //<Logical volume for beam source window
96 G4LogicalVolume* NewDetectorLogicalVolume; //<Logical volume for end-detector
97
98 G4VPhysicalVolume* detectorPhysicalVolume;
99 G4VPhysicalVolume* beamWindowPhysicalVolume; ///<Logical volume for end-detector
100 G4VPhysicalVolume* NewDetectorPhysicalVolume; ///<Physical volume for end-detector
101
102 G4double startDetectorThickness;
103 G4double phantomCenter;
104 G4double phantomDepth;
105 G4double plexiThickness;
106 G4double aluWindowThickness;
107 G4double endDetectorThickness;
108 G4double endDetectorPosition;
109 G4double moveEndDetectorForward;
110
111 IAEADetectorMessenger* detectorMessenger;
112
113 G4double detectorSizeX;
114 G4double detectorSizeY;
115 G4double detectorSizeZ;
116
117 G4int numberOfVoxelsAlongX;
118 G4int numberOfVoxelsAlongY;
119 G4int numberOfVoxelsAlongZ;
120
121 G4bool noPhantom; //<If true no water-phantom is constructed
122};
123#endif
Note: See TracBrowser for help on using the repository browser.