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[ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

  1 // ********************************************************************
  2 // * License and Disclaimer                                           *
  3 // *                                                                  *
  4 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  5 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  6 // * conditions of the Geant4 Software License,  included in the file *
  7 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  8 // * include a list of copyright holders.                             *
  9 // *                                                                  *
 10 // * Neither the authors of this software system, nor their employing *
 11 // * institutes,nor the agencies providing financial support for this *
 12 // * work  make  any representation or  warranty, express or implied, *
 13 // * regarding  this  software system or assume any liability for its *
 14 // * use.  Please see the license in the file  LICENSE  and URL above *
 15 // * for the full disclaimer and the limitation of liability.         *
 16 // *                                                                  *
 17 // * This  code  implementation is the result of  the  scientific and *
 18 // * technical work of the GEANT4 collaboration.                      *
 19 // * By using,  copying,  modifying or  distributing the software (or *
 20 // * any work based  on the software)  you  agree  to acknowledge its *
 21 // * use  in  resulting  scientific  publications,  and indicate your *
 22 // * acceptance of all terms of the Geant4 Software license.          *
 23 // ********************************************************************
 24 
 25 //GEANT4 - Depth-of-Interaction enabled Positron emission tomography (PET) advanced example 
 26 
 27 //Contributors
 28 
 29 // Abdella M. Ahmed (1, 2), Andrew Chacon (1, 2), Harley Rutherford (1, 2),
 30 // Hideaki Tashima (3), Go Akamatsu (3), Akram Mohammadi (3), Eiji Yoshida (3), Taiga Yamaya (3)
 31 // Susanna Guatelli (2), and Mitra Safavi-Naeini (1, 2)
 32 
 33 // (1) Australian Nuclear Science and Technology Organisation, Australia
 34 // (2) University of Wollongong, Australia
 35 // (3) National Institute of Radiological Sciences, Japan
 36 
 37 
 38 
 39 #ifndef doiPETDetectorConstruction_h
 40 #define doiPETDetectorConstruction_h 1
 41 
 42 #include "G4VUserDetectorConstruction.hh"
 43 #include "globals.hh"
 44 #include "G4UnitsTable.hh"
 45 #include "G4Element.hh"
 46 #include "doiPETGlobalParameters.hh"
 47 
 48 class G4Material;
 49 class G4VPhysicalVolume;
 50 class G4LogicalVolume;
 51 //
 52 class doiPETAnalysis;
 53 class doiPETDetectorConstructionMessenger;
 54 
 55 /// Detector construction class to define materials and geometry.
 56 ///
 57 /// Crystals are positioned in Ring, with an appropriate rotation matrix. 
 58 /// Several copies of Ring are placed in the full detector.
 59 
 60 class doiPETDetectorConstruction : public G4VUserDetectorConstruction
 61 {
 62 public:
 63   doiPETDetectorConstruction();
 64   virtual ~doiPETDetectorConstruction();
 65 
 66 public:
 67   virtual G4VPhysicalVolume* Construct();
 68 
 69   void ConstructPhantom(G4LogicalVolume*);
 70   void ChangePhantom(G4String choice);
 71   void SetPhantomPosition(G4ThreeVector);
 72   void SetPhantomRadius(G4double);
 73   void SetPhantomLength(G4double);
 74   void SetNumberOfSleeves(G4int);
 75 
 76 
 77 private:
 78   void DefineMaterials();
 79   doiPETDetectorConstructionMessenger* fDetectorMessenger;
 80   doiPETAnalysis* pAnalysis;
 81 
 82   G4LogicalVolume* phantom_logicalV;
 83   G4VPhysicalVolume* phantom_physicalV;
 84   //G4LogicalVolume* gelatin_logicalV;
 85   //G4VPhysicalVolume* gelatin_physicalV;
 86 
 87   //world
 88   G4LogicalVolume* world_logicalV;
 89   G4VPhysicalVolume* world_physicalV;
 90 
 91   //detector block
 92   G4LogicalVolume* blockDetector_logicalV;
 93   G4VPhysicalVolume* blockDetector_physicalV;
 94 
 95   //air volume to fill the detector block
 96   G4LogicalVolume* airBox_logicalV;
 97   G4VPhysicalVolume* airBox_physicalV;
 98 
 99   //crystals
100   G4LogicalVolume* crystal_logicalV;
101   G4VPhysicalVolume* crystal_physicalV;
102 
103 
104   //water
105   G4LogicalVolume* water_logicalV;
106   G4VPhysicalVolume* water_physicalV;
107 
108   //lung
109   G4LogicalVolume* lung_logicalV;
110   G4VPhysicalVolume* lung_physicalV;
111 
112   //test line phantom
113   G4LogicalVolume* test_logicalV;
114   G4VPhysicalVolume* test_physicalV;
115 
116   G4LogicalVolume* lung_logicalV_PMMA;
117   G4VPhysicalVolume* lung_physicalVPMMA;
118 
119   //cold regions
120   //G4LogicalVolume* coldRegion_logicalV;
121   //G4VPhysicalVolume* coldRegion_physicalV;
122 
123   //
124   //Surrounding PMMA for hot sphere
125   G4LogicalVolume* hotSpherePMMA_logicalV;
126   G4VPhysicalVolume* hotSpherePMMA_physicalV;
127 
128   //hot water phantom (activity is distributed)
129   G4LogicalVolume* hotSphereWater_logicalV;
130   G4VPhysicalVolume* hotSphereWater_physicalV;
131 
132   //surrounding PMMA cold sphere
133   G4LogicalVolume* coldSpherePMMA_logicalV;
134   G4VPhysicalVolume* coldSpherePMMA_physicalV;
135 
136   //cold Water phantom in the cold PMMA sphere 
137   G4LogicalVolume* coldSphereWater_logicalV;
138   G4VPhysicalVolume* coldSphereWater_physicalV;
139 
140   //fillable polyethylene phantom for sensitivity
141   G4LogicalVolume* phantomPE_logicalV;
142   G4VPhysicalVolume* phantomPE_physicalV;
143 
144   //Image quality phantom for small animal NEMA NU-4
145   G4LogicalVolume* waterPhantom_logicalV;
146   G4VPhysicalVolume* WaterPhantom_physicalV;
147 
148   G4LogicalVolume* rod_phantom_logicalV;
149   G4VPhysicalVolume* rod_phantom_physicalV;
150 
151   G4LogicalVolume* chamberPMMA_logicalV;
152   G4VPhysicalVolume* chamberPMMA_physicalV;
153 
154   //
155   G4LogicalVolume* chamberWater_logicalV;
156   G4VPhysicalVolume* chamberWater_physicalV;
157 
158   //
159   G4LogicalVolume* chamberAir_logicalV;
160   G4VPhysicalVolume* chamberAir_physicalV;
161 
162 
163   //Dimension of the sphere
164   G4double spherePositionX, spherePositionY; //, spherePositionZ;
165   G4double sphereDiameter;
166   G4double distanceFromCenter;
167   G4int numberOfSpheres;
168   G4double sphereWallThickness;
169   G4double zOffsetSpherePhantom;
170 
171   G4String PhantomType;
172 
173   //materials
174   G4Material* air;
175   G4Material* pmma;
176   G4Material* water;
177   G4Material* polyethylene;
178   G4Material* polyethylene_NEMA;
179   //G4Material* inflatedLung;
180   G4Material* polystyrene;
181   G4Material* Aluminum;
182 
183   //elements for GSO
184   G4Element*  O;
185   G4Element* Si;
186   G4Element* Gd;
187   G4Material* GSO;
188 
189   G4Material* crystalMaterial;
190   //G4Material* phantomMaterial;
191 
192   G4bool  fCheckOverlaps;
193   G4bool isotopes;
194 
195 
196   //size of world
197   G4double worldSizeX;
198   G4double worldSizeY;
199   G4double worldSizeZ;
200 
201 
202   //The following is moved to doiPETGlobalParameters.hh
203   //G4int numberOfCrystal_DOI;
204   //G4int numberOfCrystal_tangential;
205   //G4int numberOfCrystal_axial;
206 
207   ////
208   //G4double sizeOfCrystal_DOI; 
209   //G4double sizeOfCrystal_tangential;
210   //G4double sizeOfCrystal_axial;
211 
212   ////
213   //G4double crystalGap_DOI;
214   //G4double crystalGap_tangential;
215   //G4double crystalGap_axial;
216 
217   G4double sizeOfAirBox_DOI;
218   G4double sizeOfAirBox_axial;
219   G4double sizeOfAirBox_tangential;
220 
221 
222   G4double sizeOfBlockDetector_DOI;
223   G4double sizeOfBlockDetector_axial;
224   G4double sizeOfBlockDetector_tangential;
225 
226   //G4double AluminumCoverThickness;
227 
228 
229   //G4int numberOfPETDetector;
230   //G4int numberOfRings;
231 
232 
233   //G4double scannerRadius;
234   G4double thetaDetector; //The azimuthal angle for arranging the detector in the PET ring 
235   //G4double ringGap;
236   G4int blockIndex;
237   //G4int AlCase_Index;
238   G4int crystalIndex;
239 
240   //detector position
241   G4double detectorPositionX;
242   G4double detectorPositionY;
243   G4double detectorPositionZ;
244 
245   //crystal position
246   G4double crystalPositionX; 
247   G4double crystalPositionY;
248   G4double crystalPositionZ;
249 
250 
251 
252   G4ThreeVector phantomPosition;
253 
254   //
255   G4double phantomRadius;
256   G4double phantomLength;
257 
258   //Phantom dimension for rectangular box (placed for therapy study)
259   //G4double phantomSizeX, phantomSizeY, phantomSizeZ;
260 
261   //the following is to make the body phantom 
262   G4double yOffsetBodyPhantom;
263   G4double zOffsetBodyPhantom;
264   G4double lengthOfBodyPhantom; //Interior length ( = 180m mm) + wallthickness (= 3mm)
265   G4double radiusOfBodyPhantom;
266   G4double wallThicknessOfBodyPhantom;
267   G4double radiusOfLungPhantom;
268 
269   //Test phantom defnition. The phantom has the same as that that of NECR phantom except
270   G4double hieghtOfTestPhantom; 
271   G4double diameterOfTestPhantom;
272 
273   //To the cylindrical phantom to make the body phantom
274   G4double radiusOfSmallcyl;
275   G4double boxWidth;
276   G4double boxHeight;
277 
278 
279   //Image quality phantom for small animals
280   G4double waterPhantomRadius;
281   G4double waterPhantomLength;
282 
283   G4double rodPhantomLength;
284   G4double rodDiameter;
285   G4int numberOfRods;
286 
287   //Declare position for the rod phantoms
288   G4double rodPositionX, rodPositionY, rodPositionZ;
289 
290   //Declare position for cold region chanmbers
291   G4double chamberPositionX, chamberPositionY, chamberPositionZ;
292   G4double chamberPhantomLength;
293   G4double chamberDiameter;
294   G4double wallThicknessOfChamber;
295 
296   //Declare the number of concentric (Al) sleeves
297   G4int numOfSleeves;
298 };
299 
300 /////////////////////////////////////////////////////////////////////////////////////////
301 
302 #endif
303