Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 // Previous authors: G. Guerrieri, S. Guatelli 26 // Previous authors: G. Guerrieri, S. Guatelli and M. G. Pia, INFN Genova, Italy 27 // Authors (since 2007): S. Guatelli, Universi 27 // Authors (since 2007): S. Guatelli, University of Wollongong, Australia 28 // 28 // 29 // 29 // 30 #include "G4PhantomBuilder.hh" 30 #include "G4PhantomBuilder.hh" 31 #include "G4VBodyFactory.hh" 31 #include "G4VBodyFactory.hh" 32 #include "G4MIRDBodyFactory.hh" 32 #include "G4MIRDBodyFactory.hh" 33 #include "G4ORNLFemaleBodyFactory.hh" 33 #include "G4ORNLFemaleBodyFactory.hh" 34 #include "G4ORNLMaleBodyFactory.hh" 34 #include "G4ORNLMaleBodyFactory.hh" 35 #include "G4RunManager.hh" 35 #include "G4RunManager.hh" 36 #include "G4Element.hh" 36 #include "G4Element.hh" 37 #include "G4Material.hh" 37 #include "G4Material.hh" 38 #include "G4Box.hh" 38 #include "G4Box.hh" 39 #include "G4LogicalVolume.hh" 39 #include "G4LogicalVolume.hh" 40 #include "G4PVPlacement.hh" 40 #include "G4PVPlacement.hh" 41 #include "G4Colour.hh" 41 #include "G4Colour.hh" 42 #include "G4VisAttributes.hh" 42 #include "G4VisAttributes.hh" 43 43 44 G4PhantomBuilder::G4PhantomBuilder(): fModel(" << 44 G4PhantomBuilder::G4PhantomBuilder(): model("MIRD") 45 { 45 { 46 // sex can be "female" or "male" 46 // sex can be "female" or "male" 47 fBody = nullptr; << 47 body = 0; 48 fMotherVolume = nullptr; << 48 motherVolume = 0; 49 fHeadVolume = nullptr; << 49 headVolume = 0; 50 fTrunkVolume = nullptr; << 50 trunkVolume = 0; 51 fLeftLegVolume =nullptr; << 51 leftLegVolume =0; 52 fRightLegVolume = nullptr; << 52 rightLegVolume =0; 53 fMaleGenitaliaVolume = nullptr; << 53 maleGenitaliaVolume = 0; 54 } 54 } 55 55 >> 56 G4PhantomBuilder::~G4PhantomBuilder() >> 57 { >> 58 } 56 void G4PhantomBuilder::BuildTrunk(const G4Stri 59 void G4PhantomBuilder::BuildTrunk(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 57 { 60 { 58 if (fMotherVolume == nullptr) << 61 if (motherVolume == 0) 59 G4Exception("G4PhantomBuilder::BuildTrunk( 62 G4Exception("G4PhantomBuilder::BuildTrunk()", "human_phantom0014", FatalException, "The world volume is missing !!!!!"); 60 63 61 G4cout <<"MotherVolume: " << fMotherVolume << 64 G4cout <<"MotherVolume: " << motherVolume -> GetName()<< G4endl; 62 G4cout << "sensitivity : "<< sensitivity << 65 G4cout << "sensitivity : "<< sensitivity << G4endl; 63 fTrunkVolume = fBody -> CreateOrgan("Trunk", << 66 trunkVolume = body -> CreateOrgan("Trunk", motherVolume, colourName, solidVis, sensitivity); 64 } 67 } 65 68 66 void G4PhantomBuilder::BuildLeftLeg(const G4St 69 void G4PhantomBuilder::BuildLeftLeg(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 67 { 70 { 68 if (fMotherVolume == nullptr) << 71 if (motherVolume == 0) 69 G4Exception("G4PhantomBuilder::BuildLeftLe 72 G4Exception("G4PhantomBuilder::BuildLeftLeg()", "human_phantom0015", FatalException, "The world volume is missing !!!!!"); 70 73 71 G4cout <<"MotherVolume: " << fMotherVolume << 74 G4cout <<"MotherVolume: " << motherVolume -> GetName()<< G4endl; 72 G4cout << "sensitivity : "<< sensitivity << 75 G4cout << "sensitivity : "<< sensitivity << G4endl; 73 fLeftLegVolume = fBody -> CreateOrgan("LeftL << 76 leftLegVolume = body -> CreateOrgan("LeftLeg", motherVolume, colourName, solidVis, sensitivity); 74 } 77 } 75 void G4PhantomBuilder::BuildRightLeg(const G4S 78 void G4PhantomBuilder::BuildRightLeg(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 76 { 79 { 77 if (fMotherVolume == nullptr) << 80 if (motherVolume == 0) 78 G4Exception("G4PhantomBuilder::BuildRightL 81 G4Exception("G4PhantomBuilder::BuildRightLeg()", "human_phantom0016", FatalException, "The world volume is missing !!!!!"); 79 82 80 G4cout <<"MotherVolume: " << fMotherVolume << 83 G4cout <<"MotherVolume: " << motherVolume -> GetName()<< G4endl; 81 G4cout << "sensitivity : "<< sensitivity << 84 G4cout << "sensitivity : "<< sensitivity << G4endl; 82 fRightLegVolume = fBody -> CreateOrgan("Righ << 85 rightLegVolume = body -> CreateOrgan("RightLeg", motherVolume, colourName, solidVis, sensitivity); 83 } 86 } 84 87 85 void G4PhantomBuilder::BuildLeftLegBone(const 88 void G4PhantomBuilder::BuildLeftLegBone(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 86 { 89 { 87 if (fLeftLegVolume == nullptr) << 90 if (leftLegVolume == 0) 88 G4Exception("G4PhantomBuilder::BuildLeftLe 91 G4Exception("G4PhantomBuilder::BuildLeftLegBone()", "human_phantom0017", FatalException, "The left leg volume is missing !!!!!"); 89 92 90 G4cout <<"MotherVolume: " << fLeftLegVolume << 93 G4cout <<"MotherVolume: " << leftLegVolume -> GetName()<< G4endl; 91 G4cout << "sensitivity : "<< sensitivity << 94 G4cout << "sensitivity : "<< sensitivity << G4endl; 92 fBody -> CreateOrgan("LeftLegBone", fLeftLeg << 95 body -> CreateOrgan("LeftLegBone", leftLegVolume,colourName, solidVis, sensitivity); 93 } 96 } 94 97 95 void G4PhantomBuilder::BuildRightLegBone(const 98 void G4PhantomBuilder::BuildRightLegBone(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 96 { 99 { 97 if (fTrunkVolume == nullptr) << 100 if (trunkVolume == 0) 98 G4Exception("G4PhantomBuilder::BuildRightL 101 G4Exception("G4PhantomBuilder::BuildRightLegBone()", "human_phantom0018", FatalException, "The right leg volume is missing !!!!!"); 99 102 100 G4cout <<"MotherVolume: " << fRightLegVolume << 103 G4cout <<"MotherVolume: " << rightLegVolume -> GetName()<< G4endl; 101 G4cout << "sensitivity : "<< sensitivity << 104 G4cout << "sensitivity : "<< sensitivity << G4endl; 102 fBody -> CreateOrgan("RightLegBone", fRightL << 105 body -> CreateOrgan("RightLegBone", rightLegVolume, colourName, solidVis, sensitivity); 103 } 106 } 104 107 105 void G4PhantomBuilder::BuildLeftArmBone(const 108 void G4PhantomBuilder::BuildLeftArmBone(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 106 { 109 { 107 if (fTrunkVolume == nullptr) << 110 if (trunkVolume == 0) 108 G4Exception("G4PhantomBuilder::BuildLeftAr 111 G4Exception("G4PhantomBuilder::BuildLeftArmBone()", "human_phantom0019", FatalException, "The world volume is missing !!!!!"); 109 112 110 G4cout <<"MotherVolume: " << fTrunkVolume -> << 113 G4cout <<"MotherVolume: " << trunkVolume -> GetName()<< G4endl; 111 G4cout << "sensitivity : "<< sensitivity << 114 G4cout << "sensitivity : "<< sensitivity << G4endl; 112 fBody -> CreateOrgan("LeftArmBone", fTrunkVo << 115 body -> CreateOrgan("LeftArmBone" ,trunkVolume,colourName,solidVis, sensitivity); 113 } 116 } 114 void G4PhantomBuilder::BuildRightArmBone(const 117 void G4PhantomBuilder::BuildRightArmBone(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 115 { 118 { 116 if (fTrunkVolume == nullptr) << 119 if (trunkVolume == 0) 117 G4Exception("G4PhantomBuilder::BuildRightA 120 G4Exception("G4PhantomBuilder::BuildRightArmBone()", "human_phantom0020", FatalException, "The trunk volume is missing !!!!!"); 118 121 119 G4cout <<"MotherVolume: " << fTrunkVolume -> << 122 G4cout <<"MotherVolume: " << trunkVolume -> GetName()<< G4endl; 120 G4cout << "sensitivity : "<< sensitivity << 123 G4cout << "sensitivity : "<< sensitivity << G4endl; 121 fBody -> CreateOrgan("RightArmBone", fTrunkV << 124 body -> CreateOrgan("RightArmBone",trunkVolume,colourName,solidVis, sensitivity); 122 } 125 } 123 126 124 void G4PhantomBuilder::BuildLeftScapula(const 127 void G4PhantomBuilder::BuildLeftScapula(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 125 { 128 { 126 if (fTrunkVolume == nullptr) << 129 if (trunkVolume == 0) 127 G4Exception("G4PhantomBuilder::BuildLeftSc 130 G4Exception("G4PhantomBuilder::BuildLeftScapula()", "human_phantom0021", FatalException, "The trunk volume is missing !!!!!"); 128 131 129 G4cout <<"MotherVolume: " << fTrunkVolume -> << 132 G4cout <<"MotherVolume: " << trunkVolume -> GetName()<< G4endl; 130 G4cout << "sensitivity : "<< sensitivity << 133 G4cout << "sensitivity : "<< sensitivity << G4endl; 131 fBody -> CreateOrgan("LeftScapula",fTrunkVol << 134 body -> CreateOrgan("LeftScapula",trunkVolume,colourName,solidVis, sensitivity); 132 } 135 } 133 136 134 void G4PhantomBuilder::BuildRightScapula(const 137 void G4PhantomBuilder::BuildRightScapula(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 135 { 138 { 136 if (fTrunkVolume == nullptr) << 139 if (trunkVolume == 0) 137 G4Exception("G4PhantomBuilder::BuildRightS 140 G4Exception("G4PhantomBuilder::BuildRightScapula()", "human_phantom0022", FatalException, "The trunk volume is missing !!!!!"); 138 141 139 G4cout <<"MotherVolume: " << fTrunkVolume - << 142 G4cout <<"MotherVolume: " << trunkVolume -> GetName()<< G4endl; 140 G4cout << "sensitivity : "<< sensitivity << 143 G4cout << "sensitivity : "<< sensitivity << G4endl; 141 fBody -> CreateOrgan("RightScapula",fTrunkVo << 144 body -> CreateOrgan("RightScapula",trunkVolume,colourName,solidVis, sensitivity); 142 } 145 } 143 146 144 void G4PhantomBuilder::BuildLeftClavicle(const 147 void G4PhantomBuilder::BuildLeftClavicle(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 145 { 148 { 146 if (fTrunkVolume == nullptr) << 149 if (trunkVolume == 0) 147 G4Exception("G4PhantomBuilder::BuildLeftCl 150 G4Exception("G4PhantomBuilder::BuildLeftClavicle()", "human_phantom0023", FatalException, "The trunk volume is missing !!!!!"); 148 151 149 G4cout <<"MotherVolume: " << fTrunkVolume - << 152 G4cout <<"MotherVolume: " << trunkVolume -> GetName()<< G4endl; 150 G4cout << "sensitivity : "<< sensitivity << 153 G4cout << "sensitivity : "<< sensitivity << G4endl; 151 fBody -> CreateOrgan("LeftClavicle", fTrunkV << 154 body -> CreateOrgan("LeftClavicle",trunkVolume,colourName,solidVis, sensitivity); 152 } 155 } 153 156 154 void G4PhantomBuilder::BuildRightClavicle(cons 157 void G4PhantomBuilder::BuildRightClavicle(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 155 { 158 { 156 if (fTrunkVolume == nullptr) << 159 if (trunkVolume == 0) 157 G4Exception("G4PhantomBuilder::BuildRightC 160 G4Exception("G4PhantomBuilder::BuildRightClavicle()", "human_phantom0024", FatalException, "The trunk volume is missing !!!!!"); 158 161 159 G4cout <<"MotherVolume: " << fTrunkVolume -> << 162 G4cout <<"MotherVolume: " << trunkVolume -> GetName()<< G4endl; 160 G4cout << "sensitivity : "<< sensitivity << 163 G4cout << "sensitivity : "<< sensitivity << G4endl; 161 fBody -> CreateOrgan("RightClavicle",fTrunkV << 164 body -> CreateOrgan("RightClavicle",trunkVolume,colourName,solidVis, sensitivity); 162 } 165 } 163 166 >> 167 164 void G4PhantomBuilder::BuildHead(const G4Strin 168 void G4PhantomBuilder::BuildHead(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 165 { 169 { 166 if (fMotherVolume == nullptr) << 170 if (motherVolume == 0) 167 G4Exception("G4PhantomBuilder::BuildHead() 171 G4Exception("G4PhantomBuilder::BuildHead()", "human_phantom0025", FatalException, "The mother volume is missing !!!!!"); 168 172 169 G4cout <<"MotherVolume: " << fMotherVolume << 173 G4cout <<"MotherVolume: " << motherVolume -> GetName()<< G4endl; 170 G4cout << "sensitivity : "<< sensitivity << 174 G4cout << "sensitivity : "<< sensitivity << G4endl; 171 fHeadVolume = fBody -> CreateOrgan("Head", f << 175 headVolume = body -> CreateOrgan("Head",motherVolume, colourName, solidVis, sensitivity); 172 } 176 } 173 177 174 void G4PhantomBuilder::BuildSkull(const G4Stri 178 void G4PhantomBuilder::BuildSkull(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 175 { 179 { 176 if (fHeadVolume == nullptr) << 180 if (headVolume == 0) 177 G4Exception("G4PhantomBuilder::BuildSkull( 181 G4Exception("G4PhantomBuilder::BuildSkull()", "human_phantom0026", FatalException, "The head volume is missing !!!!!"); 178 182 179 G4cout <<"MotherVolume: " << fHeadVolume -> << 183 G4cout <<"MotherVolume: " << headVolume -> GetName()<< G4endl; 180 G4cout << "sensitivity : "<< sensitivity << 184 G4cout << "sensitivity : "<< sensitivity << G4endl; 181 fBody -> CreateOrgan( "Skull", fHeadVolume, << 185 body -> CreateOrgan( "Skull",headVolume, colourName, solidVis, sensitivity); 182 } 186 } 183 187 184 void G4PhantomBuilder::BuildUpperSpine(const G 188 void G4PhantomBuilder::BuildUpperSpine(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 185 { 189 { 186 if (fHeadVolume == nullptr) << 190 if (headVolume == 0) 187 G4Exception("G4PhantomBuilder::BuildUpperS 191 G4Exception("G4PhantomBuilder::BuildUpperSpine()", "human_phantom0027", FatalException, "The head volume is missing !!!!!"); 188 192 189 G4cout <<"MotherVolume: " << fHeadVolume -> << 193 G4cout <<"MotherVolume: " << headVolume -> GetName()<< G4endl; 190 G4cout << "sensitivity : "<< sensitivity << 194 G4cout << "sensitivity : "<< sensitivity << G4endl; 191 fBody -> CreateOrgan("UpperSpine", fHeadVolu << 195 body -> CreateOrgan("UpperSpine",headVolume,colourName, solidVis, sensitivity); 192 } 196 } 193 197 194 void G4PhantomBuilder::BuildMiddleLowerSpine(c 198 void G4PhantomBuilder::BuildMiddleLowerSpine(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 195 { 199 { 196 if (fTrunkVolume == nullptr) << 200 if (trunkVolume == 0) 197 G4Exception("G4PhantomBuilder::BuildMiddle 201 G4Exception("G4PhantomBuilder::BuildMiddleLowerSpine()", "human_phantom0028", FatalException, "The trunk volume is missing !!!!!"); 198 202 199 G4cout <<"MotherVolume: " << fTrunkVolume -> << 203 G4cout <<"MotherVolume: " << trunkVolume -> GetName()<< G4endl; 200 G4cout << "sensitivity : "<< sensitivity << 204 G4cout << "sensitivity : "<< sensitivity << G4endl; 201 fBody -> CreateOrgan("MiddleLowerSpine",fTru << 205 body -> CreateOrgan("MiddleLowerSpine",trunkVolume, colourName, solidVis, sensitivity); 202 } 206 } 203 207 204 void G4PhantomBuilder::BuildPelvis(const G4Str 208 void G4PhantomBuilder::BuildPelvis(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 205 { 209 { 206 if (fTrunkVolume == nullptr) << 210 if (trunkVolume == 0) 207 G4Exception("G4PhantomBuilder::BuildPelvis 211 G4Exception("G4PhantomBuilder::BuildPelvis()", "human_phantom0029", FatalException, "The trunk volume is missing !!!!!"); 208 212 209 fBody -> CreateOrgan( "Pelvis", fTrunkVolume << 213 body -> CreateOrgan( "Pelvis",trunkVolume, colourName, solidVis, sensitivity); 210 } 214 } 211 215 212 void G4PhantomBuilder::BuildBrain(const G4Stri 216 void G4PhantomBuilder::BuildBrain(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 213 { 217 { 214 if (fHeadVolume == nullptr) << 218 if (headVolume == 0) 215 G4Exception("G4PhantomBuilder::BuildBrain( 219 G4Exception("G4PhantomBuilder::BuildBrain()", "human_phantom0030", FatalException, "The head volume is missing !!!!!"); 216 220 217 fBody -> CreateOrgan("Brain", fHeadVolume, c << 221 body -> CreateOrgan("Brain",headVolume, colourName, solidVis, sensitivity); 218 } 222 } 219 223 220 void G4PhantomBuilder::BuildHeart(const G4Stri 224 void G4PhantomBuilder::BuildHeart(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 221 { 225 { 222 if (fTrunkVolume == nullptr) << 226 if (trunkVolume == 0) 223 G4Exception("G4PhantomBuilder::BuildHeart( 227 G4Exception("G4PhantomBuilder::BuildHeart()", "human_phantom0031", FatalException, "The trunk volume is missing !!!!!"); 224 fBody -> CreateOrgan("Heart", fTrunkVolume,c << 228 body -> CreateOrgan("Heart", trunkVolume,colourName, solidVis, sensitivity); 225 } 229 } 226 230 227 void G4PhantomBuilder::BuildLeftLung(const G4S 231 void G4PhantomBuilder::BuildLeftLung(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 228 { 232 { 229 if (fTrunkVolume == nullptr) << 233 if (trunkVolume == 0) 230 G4Exception("G4PhantomBuilder::BuildLeftLu 234 G4Exception("G4PhantomBuilder::BuildLeftLung()", "human_phantom0032", FatalException, "The trunk volume is missing !!!!!"); 231 235 232 fBody -> CreateOrgan("LeftLung", fTrunkVolum << 236 body -> CreateOrgan("LeftLung",trunkVolume,colourName,solidVis, sensitivity); 233 } 237 } 234 238 235 void G4PhantomBuilder::BuildRightLung(const G4 239 void G4PhantomBuilder::BuildRightLung(const G4String& colourName, G4bool solidVis, G4bool sensitivity ) 236 { 240 { 237 if (fTrunkVolume == nullptr) << 241 if (trunkVolume == 0) 238 G4Exception("G4PhantomBuilder::BuildRightL 242 G4Exception("G4PhantomBuilder::BuildRightLung()", "human_phantom0033", FatalException, "The trunk volume is missing !!!!!"); 239 243 240 fBody -> CreateOrgan("RightLung", fTrunkVolu << 244 body -> CreateOrgan("RightLung",trunkVolume,colourName, solidVis, sensitivity); 241 } 245 } 242 246 243 void G4PhantomBuilder::BuildStomach(const G4St 247 void G4PhantomBuilder::BuildStomach(const G4String& colourName, G4bool solidVis, G4bool sensitivity ) 244 { 248 { 245 if (fTrunkVolume == nullptr) << 249 if (trunkVolume == 0) 246 G4Exception("G4PhantomBuilder::BuildStomac 250 G4Exception("G4PhantomBuilder::BuildStomach()", "human_phantom0034", FatalException, "The trunk volume is missing !!!!!"); 247 251 248 fBody -> CreateOrgan("Stomach", fTrunkVolume << 252 body -> CreateOrgan("Stomach",trunkVolume,colourName, solidVis, sensitivity); 249 } 253 } 250 254 251 void G4PhantomBuilder::BuildRibCage(const G4St 255 void G4PhantomBuilder::BuildRibCage(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 252 { 256 { 253 if (fTrunkVolume == nullptr) << 257 if (trunkVolume == 0) 254 G4Exception("G4PhantomBuilder::BuildRibCag 258 G4Exception("G4PhantomBuilder::BuildRibCage()", "human_phantom0035", FatalException, "The trunk volume is missing !!!!!"); 255 259 256 fBody -> CreateOrgan("RibCage", fTrunkVolume << 260 body -> CreateOrgan("RibCage",trunkVolume,colourName, solidVis, sensitivity); 257 } 261 } 258 262 259 void G4PhantomBuilder::BuildSpleen(const G4Str 263 void G4PhantomBuilder::BuildSpleen(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 260 { 264 { 261 if (fTrunkVolume == nullptr) << 265 if (trunkVolume == 0) 262 G4Exception("G4PhantomBuilder::BuildSpleen 266 G4Exception("G4PhantomBuilder::BuildSpleen()", "human_phantom0036", FatalException, "The trunk volume is missing !!!!!"); 263 267 264 fBody -> CreateOrgan("Spleen", fTrunkVolume, << 268 body -> CreateOrgan("Spleen", trunkVolume,colourName, solidVis, sensitivity); 265 } 269 } 266 270 267 void G4PhantomBuilder::BuildUpperLargeIntestin 271 void G4PhantomBuilder::BuildUpperLargeIntestine(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 268 { 272 { 269 if (fTrunkVolume == nullptr) << 273 if (trunkVolume == 0) 270 G4Exception("G4PhantomBuilder::BuildUpperL 274 G4Exception("G4PhantomBuilder::BuildUpperLargeIntestine()", "human_phantom0037", FatalException, "The trunk volume is missing !!!!!"); 271 275 272 fBody -> CreateOrgan("UpperLargeIntestine", << 276 body -> CreateOrgan("UpperLargeIntestine",trunkVolume, colourName, solidVis, sensitivity); 273 } 277 } 274 278 275 void G4PhantomBuilder::BuildLowerLargeIntestin 279 void G4PhantomBuilder::BuildLowerLargeIntestine(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 276 { 280 { 277 if (fTrunkVolume == nullptr) << 281 if (trunkVolume == 0) 278 G4Exception("G4PhantomBuilder::BuildLowerL 282 G4Exception("G4PhantomBuilder::BuildLowerLargeIntestine()", "human_phantom0038", FatalException, "The trunk volume is missing !!!!!"); 279 283 280 fBody -> CreateOrgan("LowerLargeIntestine", << 284 body -> CreateOrgan("LowerLargeIntestine", trunkVolume, colourName,solidVis, sensitivity); 281 } 285 } 282 286 283 void G4PhantomBuilder::BuildSmallIntestine(con 287 void G4PhantomBuilder::BuildSmallIntestine(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 284 { 288 { 285 if (fTrunkVolume == nullptr) << 289 if (trunkVolume == 0) 286 G4Exception("G4PhantomBuilder::BuildSamllI 290 G4Exception("G4PhantomBuilder::BuildSamllIntestine()", "human_phantom0039", FatalException, "The trunk volume is missing !!!!!"); 287 291 288 fBody -> CreateOrgan("SmallIntestine", fTrun << 292 body -> CreateOrgan("SmallIntestine",trunkVolume, colourName, solidVis, sensitivity); 289 } 293 } 290 294 291 void G4PhantomBuilder::BuildLeftKidney(const G 295 void G4PhantomBuilder::BuildLeftKidney(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 292 { 296 { 293 if (fTrunkVolume == nullptr) << 297 if (trunkVolume == 0) 294 G4Exception("G4PhantomBuilder::BuildLeftKi 298 G4Exception("G4PhantomBuilder::BuildLeftKidney()", "human_phantom0040", FatalException, "The trunk volume is missing !!!!!"); 295 299 296 fBody -> CreateOrgan("LeftKidney", fTrunkVol << 300 body -> CreateOrgan("LeftKidney", trunkVolume,colourName, solidVis, sensitivity); 297 } 301 } 298 void G4PhantomBuilder::BuildRightKidney(const 302 void G4PhantomBuilder::BuildRightKidney(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 299 { 303 { 300 if (fTrunkVolume == nullptr) << 304 if (trunkVolume == 0) 301 G4Exception("G4PhantomBuilder::BuildRightK 305 G4Exception("G4PhantomBuilder::BuildRightKidney()", "human_phantom0041", FatalException, "The trunk volume is missing !!!!!"); 302 306 303 fBody -> CreateOrgan("RightKidney", fTrunkVo << 307 body -> CreateOrgan("RightKidney",trunkVolume,colourName, solidVis, sensitivity); 304 } 308 } 305 309 306 void G4PhantomBuilder::BuildLeftAdrenal(const 310 void G4PhantomBuilder::BuildLeftAdrenal(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 307 { 311 { 308 if (fTrunkVolume == nullptr) << 312 if (trunkVolume == 0) 309 G4Exception("G4PhantomBuilder::BuildLeftAd 313 G4Exception("G4PhantomBuilder::BuildLeftAdrenal()", "human_phantom0042", FatalException, "The trunk volume is missing !!!!!"); 310 314 311 fBody -> CreateOrgan("LeftAdrenal", fTrunkVo << 315 body -> CreateOrgan("LeftAdrenal", trunkVolume,colourName, solidVis, sensitivity); 312 } 316 } 313 317 314 void G4PhantomBuilder::BuildRightAdrenal(const 318 void G4PhantomBuilder::BuildRightAdrenal(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 315 { 319 { 316 if (fTrunkVolume == nullptr) << 320 if (trunkVolume == 0) 317 G4Exception("G4PhantomBuilder::BuildRightA 321 G4Exception("G4PhantomBuilder::BuildRightAdrenal()", "human_phantom0043", FatalException, "The trunk volume is missing !!!!!"); 318 322 319 fBody -> CreateOrgan("RightAdrenal", fTrunkV << 323 body -> CreateOrgan("RightAdrenal", trunkVolume,colourName, solidVis, sensitivity); 320 } 324 } 321 325 >> 326 322 void G4PhantomBuilder::BuildLiver(const G4Stri 327 void G4PhantomBuilder::BuildLiver(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 323 { 328 { 324 if (fTrunkVolume == nullptr) << 329 if (trunkVolume == 0) 325 G4Exception("G4PhantomBuilder::BuildLiver( 330 G4Exception("G4PhantomBuilder::BuildLiver()", "human_phantom0044", FatalException, "The trunk volume is missing !!!!!"); 326 331 327 fBody -> CreateOrgan("Liver", fTrunkVolume,c << 332 body -> CreateOrgan("Liver", trunkVolume,colourName, solidVis, sensitivity); 328 } 333 } 329 void G4PhantomBuilder::BuildPancreas(const G4S 334 void G4PhantomBuilder::BuildPancreas(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 330 { 335 { 331 if (fTrunkVolume == nullptr) << 336 if (trunkVolume == 0) 332 G4Exception("G4PhantomBuilder::BuildPancre 337 G4Exception("G4PhantomBuilder::BuildPancreas()", "human_phantom0045", FatalException, "The trunk volume is missing !!!!!"); 333 338 334 fBody -> CreateOrgan("Pancreas", fTrunkVolum << 339 body -> CreateOrgan("Pancreas",trunkVolume,colourName, solidVis, sensitivity); 335 } 340 } 336 341 337 void G4PhantomBuilder::BuildUrinaryBladder(con 342 void G4PhantomBuilder::BuildUrinaryBladder(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 338 { 343 { 339 if (fTrunkVolume == nullptr) << 344 if (trunkVolume == 0) 340 G4Exception("G4PhantomBuilder::BuildUrinar 345 G4Exception("G4PhantomBuilder::BuildUrinaryBladder()", "human_phantom0046", FatalException, "The trunk volume is missing !!!!!"); 341 346 342 fBody -> CreateOrgan("UrinaryBladder", fTrun << 347 body -> CreateOrgan("UrinaryBladder",trunkVolume, colourName, solidVis, sensitivity); 343 } 348 } 344 349 345 void G4PhantomBuilder::BuildThyroid(const G4St 350 void G4PhantomBuilder::BuildThyroid(const G4String& colourName, G4bool solidVis, G4bool sensitivity ) 346 { 351 { 347 if (fHeadVolume == nullptr) << 352 if (headVolume == 0) 348 G4Exception("G4PhantomBuilder::BuildThyroi 353 G4Exception("G4PhantomBuilder::BuildThyroid()", "human_phantom0047", FatalException, "The trunk volume is missing !!!!!"); 349 354 350 fBody -> CreateOrgan("Thyroid", fHeadVolume, << 355 body -> CreateOrgan("Thyroid",headVolume, colourName,solidVis, sensitivity); 351 } 356 } 352 357 353 void G4PhantomBuilder::BuildThymus(const G4Str 358 void G4PhantomBuilder::BuildThymus(const G4String& colourName, G4bool solidVis, G4bool sensitivity ) 354 { 359 { 355 if (fTrunkVolume == nullptr) << 360 if (trunkVolume == 0) 356 G4Exception("G4PhantomBuilder::BuildThymus 361 G4Exception("G4PhantomBuilder::BuildThymus()", "human_phantom0048", FatalException, "The trunk volume is missing !!!!!"); 357 362 358 fBody -> CreateOrgan("Thymus",fTrunkVolume, << 363 body -> CreateOrgan("Thymus",trunkVolume, colourName,solidVis, sensitivity); 359 } 364 } 360 365 >> 366 361 G4VPhysicalVolume* G4PhantomBuilder::GetPhanto 367 G4VPhysicalVolume* G4PhantomBuilder::GetPhantom() 362 { 368 { 363 return fMotherVolume; << 369 return motherVolume; 364 } 370 } 365 371 366 void G4PhantomBuilder::SetMotherVolume(G4VPhys 372 void G4PhantomBuilder::SetMotherVolume(G4VPhysicalVolume* mother) 367 { 373 { 368 fMotherVolume = mother; << 374 motherVolume = mother; 369 } 375 } 370 376 >> 377 371 void G4PhantomBuilder::SetModel(G4String model 378 void G4PhantomBuilder::SetModel(G4String modelFlag) 372 { 379 { 373 fModel = modelFlag; << 380 model = modelFlag; 374 381 375 if(fModel=="MIRD") fBody = new G4MIRDBodyFac << 382 if(model=="MIRD" || model =="MIX") body = new G4MIRDBodyFactory(); 376 else if(fModel=="ORNLFemale") << 383 if(model=="ORNLFemale") 377 { 384 { >> 385 378 #ifdef G4LIB_USE_GDML 386 #ifdef G4LIB_USE_GDML 379 fBody = new G4ORNLFemaleBodyFactory(); << 387 body = new G4ORNLFemaleBodyFactory(); 380 #else 388 #else 381 G4cout << fModel << " Working with GDML on << 389 G4cout << model << " Working with GDML only! set G4LIB_USE_GDML 1" << G4endl; 382 #endif 390 #endif 383 } 391 } 384 else if(fModel=="ORNLMale") << 392 >> 393 if(model=="ORNLMale") 385 { 394 { 386 #ifdef G4LIB_USE_GDML 395 #ifdef G4LIB_USE_GDML 387 fBody = new G4ORNLMaleBodyFactory(); << 396 body = new G4ORNLMaleBodyFactory(); 388 #else 397 #else 389 G4cout << fModel << " Working with GDML on << 398 G4cout << model << " Working with GDML only! set G4LIB_USE_GDML 1" << G4endl; 390 #endif 399 #endif 391 } 400 } 392 } 401 } 393 402