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); << 75 74 76 75 77 private: 76 private: 78 void DefineMaterials(); << 77 void DefineMaterials(); 79 doiPETDetectorConstructionMessenger* fDetect << 78 doiPETDetectorConstructionMessenger* fDetectorMessenger; 80 doiPETAnalysis* pAnalysis; << 79 doiPETAnalysis* pAnalysis; 81 80 82 G4LogicalVolume* phantom_logicalV; << 81 G4LogicalVolume* phantom_logicalV; 83 G4VPhysicalVolume* phantom_physicalV; << 82 G4VPhysicalVolume* phantom_physicalV; 84 //G4LogicalVolume* gelatin_logicalV; << 83 // G4LogicalVolume* gelatin_logicalV; 85 //G4VPhysicalVolume* gelatin_physicalV; << 84 // G4VPhysicalVolume* gelatin_physicalV; 86 85 87 //world << 86 //wolrd 88 G4LogicalVolume* world_logicalV; << 87 G4LogicalVolume* world_logicalV; 89 G4VPhysicalVolume* world_physicalV; << 88 G4VPhysicalVolume* world_physicalV; 90 89 91 //detector block << 90 //detector block 92 G4LogicalVolume* blockDetector_logicalV; << 91 G4LogicalVolume* blockDetector_logicalV; 93 G4VPhysicalVolume* blockDetector_physicalV; << 92 G4VPhysicalVolume* blockDetector_physicalV; 94 93 95 //air volume to fill the detector block << 94 //air volume to fill the detector block 96 G4LogicalVolume* airBox_logicalV; << 95 G4LogicalVolume* airBox_logicalV; 97 G4VPhysicalVolume* airBox_physicalV; << 96 G4VPhysicalVolume* airBox_physicalV; 98 97 99 //crystals << 98 //crystals 100 G4LogicalVolume* crystal_logicalV; << 99 G4LogicalVolume* crystal_logicalV; 101 G4VPhysicalVolume* crystal_physicalV; << 100 G4VPhysicalVolume* crystal_physicalV; 102 101 103 102 104 //water << 103 //water 105 G4LogicalVolume* water_logicalV; << 104 G4LogicalVolume* water_logicalV; 106 G4VPhysicalVolume* water_physicalV; << 105 G4VPhysicalVolume* water_physicalV; 107 106 108 //lung << 107 //lung 109 G4LogicalVolume* lung_logicalV; << 108 G4LogicalVolume* lung_logicalV; 110 G4VPhysicalVolume* lung_physicalV; << 109 G4VPhysicalVolume* lung_physicalV; 111 110 112 //test line phantom << 111 //test line phantom 113 G4LogicalVolume* test_logicalV; << 112 G4LogicalVolume* test_logicalV; 114 G4VPhysicalVolume* test_physicalV; << 113 G4VPhysicalVolume* test_physicalV; 115 114 116 G4LogicalVolume* lung_logicalV_PMMA; << 115 G4LogicalVolume* lung_logicalV_PMMA; 117 G4VPhysicalVolume* lung_physicalVPMMA; << 116 G4VPhysicalVolume* lung_physicalVPMMA; 118 117 119 //cold regions << 118 //cold regions 120 //G4LogicalVolume* coldRegion_logicalV; << 119 // G4LogicalVolume* coldRegion_logicalV; 121 //G4VPhysicalVolume* coldRegion_physicalV; << 120 // G4VPhysicalVolume* coldRegion_physicalV; 122 121 123 // << 122 // 124 //Surrounding PMMA for hot sphere << 123 //Surrounding PMMA for hot sphere 125 G4LogicalVolume* hotSpherePMMA_logicalV; << 124 G4LogicalVolume* hotSpherePMMA_logicalV; 126 G4VPhysicalVolume* hotSpherePMMA_physicalV; << 125 G4VPhysicalVolume* hotSpherePMMA_physicalV; 127 126 128 //hot water phantom (activity is distributed << 127 //hot water phantom (activity is distributed) 129 G4LogicalVolume* hotSphereWater_logicalV; << 128 G4LogicalVolume* hotSphereWater_logicalV; 130 G4VPhysicalVolume* hotSphereWater_physicalV; << 129 G4VPhysicalVolume* hotSphereWater_physicalV; 131 130 132 //surrounding PMMA cold sphere << 131 //surrounding PMMA cold sphere 133 G4LogicalVolume* coldSpherePMMA_logicalV; << 132 G4LogicalVolume* coldSpherePMMA_logicalV; 134 G4VPhysicalVolume* coldSpherePMMA_physicalV; << 133 G4VPhysicalVolume* coldSpherePMMA_physicalV; 135 134 136 //cold Water phantom in the cold PMMA sphere << 135 //cold Water phantom in the cold PMMA sphere 137 G4LogicalVolume* coldSphereWater_logicalV; << 136 G4LogicalVolume* coldSphereWater_logicalV; 138 G4VPhysicalVolume* coldSphereWater_physicalV << 137 G4VPhysicalVolume* coldSphereWater_physicalV; 139 138 140 //fillable polyethylene phantom for sensitiv << 139 //fillable polyethylene phantom for sensitivity 141 G4LogicalVolume* phantomPE_logicalV; << 140 G4LogicalVolume* phantomPE_logicalV; 142 G4VPhysicalVolume* phantomPE_physicalV; << 141 G4VPhysicalVolume* phantomPE_physicalV; 143 142 144 //Image quality phantom for small animal NEM << 143 //Image quality phantom for small animal NEMA NU-4 145 G4LogicalVolume* waterPhantom_logicalV; << 144 G4LogicalVolume* waterPhantom_logicalV; 146 G4VPhysicalVolume* WaterPhantom_physicalV; << 145 G4VPhysicalVolume* WaterPhantom_physicalV; 147 146 148 G4LogicalVolume* rod_phantom_logicalV; << 147 G4LogicalVolume* rod_phantom_logicalV; 149 G4VPhysicalVolume* rod_phantom_physicalV; << 148 G4VPhysicalVolume* rod_phantom_physicalV; 150 149 151 G4LogicalVolume* chamberPMMA_logicalV; << 150 G4LogicalVolume* chamberPMMA_logicalV; 152 G4VPhysicalVolume* chamberPMMA_physicalV; << 151 G4VPhysicalVolume* chamberPMMA_physicalV; 153 152 154 // << 153 // 155 G4LogicalVolume* chamberWater_logicalV; << 154 G4LogicalVolume* chamberWater_logicalV; 156 G4VPhysicalVolume* chamberWater_physicalV; << 155 G4VPhysicalVolume* chamberWater_physicalV; 157 156 158 // << 157 // 159 G4LogicalVolume* chamberAir_logicalV; << 158 G4LogicalVolume* chamberAir_logicalV; 160 G4VPhysicalVolume* chamberAir_physicalV; << 159 G4VPhysicalVolume* chamberAir_physicalV; 161 160 162 161 163 //Dimension of the sphere << 162 //Dimension of the sphere 164 G4double spherePositionX, spherePositionY; / << 163 G4double spherePositionX, spherePositionY; // spherePositionZ; 165 G4double sphereDiameter; << 164 G4double sphereDiameter; 166 G4double distanceFromCenter; << 165 G4double distanceFromCenter; 167 G4int numberOfSpheres; << 166 G4int numberOfSpheres; 168 G4double sphereWallThickness; << 167 G4double sphereWallThickness; 169 G4double zOffsetSpherePhantom; << 168 G4double zOffsetSpherePhantom; 170 169 171 G4String PhantomType; << 170 G4String PhantomType; 172 171 173 //materials << 172 //materials 174 G4Material* air; << 173 G4Material* air; 175 G4Material* pmma; << 174 G4Material* pmma; 176 G4Material* water; << 175 G4Material* water; 177 G4Material* polyethylene; << 176 G4Material* polyethylene; 178 G4Material* polyethylene_NEMA; << 177 G4Material* polyethylene_NEMA; 179 //G4Material* inflatedLung; << 178 // G4Material* inflatedLung; 180 G4Material* polystyrene; << 179 G4Material* polystyrene; 181 G4Material* Aluminum; << 180 G4Material* Aluminum; 182 181 183 //elements for GSO << 182 //elements for GSO 184 G4Element* O; << 183 G4Element* O; 185 G4Element* Si; << 184 G4Element* Si; 186 G4Element* Gd; << 185 G4Element* Gd; 187 G4Material* GSO; << 186 G4Material* GSO; 188 187 189 G4Material* crystalMaterial; << 188 G4Material* crystalMaterial; 190 //G4Material* phantomMaterial; << 189 //G4Material* phantomMaterial; 191 190 192 G4bool fCheckOverlaps; << 191 G4bool fCheckOverlaps; 193 G4bool isotopes; << 192 G4bool isotopes; 194 193 195 194 196 //size of world << 195 //size of world 197 G4double worldSizeX; << 196 G4double worldSizeX; 198 G4double worldSizeY; << 197 G4double worldSizeY; 199 G4double worldSizeZ; << 198 G4double worldSizeZ; 200 199 201 200 202 //The following is moved to doiPETGlobalPara << 201 //The following is moved to doiPETGlobalParameters.hh 203 //G4int numberOfCrystal_DOI; << 202 //G4int numberOfCrystal_DOI; 204 //G4int numberOfCrystal_tangential; << 203 //G4int numberOfCrystal_tangential; 205 //G4int numberOfCrystal_axial; << 204 //G4int numberOfCrystal_axial; 206 205 207 //// << 206 //// 208 //G4double sizeOfCrystal_DOI; << 207 //G4double sizeOfCrystal_DOI; 209 //G4double sizeOfCrystal_tangential; << 208 //G4double sizeOfCrystal_tangential; 210 //G4double sizeOfCrystal_axial; << 209 //G4double sizeOfCrystal_axial; 211 210 212 //// << 211 //// 213 //G4double crystalGap_DOI; << 212 //G4double crystalGap_DOI; 214 //G4double crystalGap_tangential; << 213 //G4double crystalGap_tangential; 215 //G4double crystalGap_axial; << 214 //G4double crystalGap_axial; 216 215 217 G4double sizeOfAirBox_DOI; << 216 G4double sizeOfAirBox_DOI; 218 G4double sizeOfAirBox_axial; << 217 G4double sizeOfAirBox_axial; 219 G4double sizeOfAirBox_tangential; << 218 G4double sizeOfAirBox_tangential; 220 219 221 220 222 G4double sizeOfBlockDetector_DOI; << 221 G4double sizeOfBlockDetector_DOI; 223 G4double sizeOfBlockDetector_axial; << 222 G4double sizeOfBlockDetector_axial; 224 G4double sizeOfBlockDetector_tangential; << 223 G4double sizeOfBlockDetector_tangential; 225 224 226 //G4double AluminumCoverThickness; << 225 //G4double AluminumCoverThickness; 227 226 228 227 229 //G4int numberOfPETDetector; << 228 //G4int numberOfPETDetector; 230 //G4int numberOfRings; << 229 //G4int numberOfRings; 231 230 232 231 233 //G4double scannerRadius; << 232 //G4double scannerRadius; 234 G4double thetaDetector; //The azimuthal angl << 233 G4double thetaDetector; //The azimuthal angle for arranging the detector in the PET ring 235 //G4double ringGap; << 234 //G4double ringGap; 236 G4int blockIndex; << 235 G4int blockIndex; 237 //G4int AlCase_Index; << 236 // G4int AlCase_Index; 238 G4int crystalIndex; << 237 G4int crystalIndex; 239 238 240 //detector position << 239 //detector position 241 G4double detectorPositionX; << 240 G4double detectorPositionX; 242 G4double detectorPositionY; << 241 G4double detectorPositionY; 243 G4double detectorPositionZ; << 242 G4double detectorPositionZ; 244 243 245 //crystal position << 244 //crystal position 246 G4double crystalPositionX; << 245 G4double crystalPositionX; 247 G4double crystalPositionY; << 246 G4double crystalPositionY; 248 G4double crystalPositionZ; << 247 G4double crystalPositionZ; 249 248 250 249 251 250 252 G4ThreeVector phantomPosition; << 251 G4ThreeVector phantomPosition; 253 252 254 // << 253 // 255 G4double phantomRadius; << 254 G4double phantomRadius; 256 G4double phantomLength; << 255 G4double phantomLength; 257 256 258 //Phantom dimension for rectangular box (pla << 257 //Phantom dimension for rectangular box (placed for therapy study) 259 //G4double phantomSizeX, phantomSizeY, phant << 258 // G4double phantomSizeX, phantomSizeY, phantomSizeZ; 260 259 261 //the following is to make the body phantom << 260 //the following is to make the body phantom 262 G4double yOffsetBodyPhantom; << 261 G4double yOffsetBodyPhantom; 263 G4double zOffsetBodyPhantom; << 262 G4double zOffsetBodyPhantom; 264 G4double lengthOfBodyPhantom; //Interior len << 263 G4double lengthOfBodyPhantom; //Interior length ( = 180m mm) + wallthickness (= 3mm) 265 G4double radiusOfBodyPhantom; << 264 G4double radiusOfBodyPhantom; 266 G4double wallThicknessOfBodyPhantom; << 265 G4double wallThicknessOfBodyPhantom; 267 G4double radiusOfLungPhantom; << 266 G4double radiusOfLungPhantom; 268 267 269 //Test phantom defnition. The phantom has th << 268 //Test phantom defnition. The phantom has the same as that that of NECR phantom except 270 G4double hieghtOfTestPhantom; << 269 G4double hieghtOfTestPhantom; 271 G4double diameterOfTestPhantom; << 270 G4double diameterOfTestPhantom; 272 271 273 //To the cylindrical phantom to make the bod << 272 //To the cylindrical phantom to make the body phantom 274 G4double radiusOfSmallcyl; << 273 G4double radiusOfSmallcyl; 275 G4double boxWidth; << 274 G4double boxWidth; 276 G4double boxHeight; << 275 G4double boxHeight; 277 276 278 277 279 //Image quality phantom for small animals << 278 //Image quality phantom for small animals 280 G4double waterPhantomRadius; << 279 G4double waterPhantomRadius; 281 G4double waterPhantomLength; << 280 G4double waterPhantomLength; 282 281 283 G4double rodPhantomLength; << 282 G4double rodPhantomLength; 284 G4double rodDiameter; << 283 G4double rodDiameter; 285 G4int numberOfRods; << 284 G4int numberOfRods; 286 285 287 //Declare position for the rod phantoms << 286 //Declare position for the rod phantoms 288 G4double rodPositionX, rodPositionY, rodPosi << 287 G4double rodPositionX, rodPositionY, rodPositionZ; >> 288 >> 289 //Declare position for cold region chanmbers >> 290 G4double chamberPositionX, chamberPositionY, chamberPositionZ; >> 291 G4double chamberPhantomLength; >> 292 G4double chamberDiameter; >> 293 G4double wallThicknessOfChamber; 289 294 290 //Declare position for cold region chanmbers << 291 G4double chamberPositionX, chamberPositionY, << 292 G4double chamberPhantomLength; << 293 G4double chamberDiameter; << 294 G4double wallThicknessOfChamber; << 295 295 296 //Declare the number of concentric (Al) slee << 297 G4int numOfSleeves; << 298 }; 296 }; 299 297 300 ////////////////////////////////////////////// 298 ///////////////////////////////////////////////////////////////////////////////////////// 301 299 302 #endif 300 #endif 303 301