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