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 // Authors: S. Guatelli and M. G. Pia, INFN Genova, Italy 27 // Authors (since 2007): S. Guatelli, Universi << 28 // 27 // >> 28 // Based on code developed by the undergraduate student G. Guerrieri >> 29 // Note: this is a preliminary beta-version of the code; an improved >> 30 // version will be distributed in the next Geant4 public release, compliant >> 31 // with the design in a forthcoming publication, and subject to a >> 32 // design and code review. 29 // 33 // 30 #include "G4PhantomBuilder.hh" 34 #include "G4PhantomBuilder.hh" 31 #include "G4VBodyFactory.hh" 35 #include "G4VBodyFactory.hh" 32 #include "G4MIRDBodyFactory.hh" 36 #include "G4MIRDBodyFactory.hh" 33 #include "G4ORNLFemaleBodyFactory.hh" 37 #include "G4ORNLFemaleBodyFactory.hh" 34 #include "G4ORNLMaleBodyFactory.hh" 38 #include "G4ORNLMaleBodyFactory.hh" 35 #include "G4RunManager.hh" 39 #include "G4RunManager.hh" 36 #include "G4Element.hh" 40 #include "G4Element.hh" 37 #include "G4Material.hh" 41 #include "G4Material.hh" 38 #include "G4Box.hh" 42 #include "G4Box.hh" 39 #include "G4LogicalVolume.hh" 43 #include "G4LogicalVolume.hh" 40 #include "G4PVPlacement.hh" 44 #include "G4PVPlacement.hh" 41 #include "G4Colour.hh" 45 #include "G4Colour.hh" 42 #include "G4VisAttributes.hh" 46 #include "G4VisAttributes.hh" 43 47 44 G4PhantomBuilder::G4PhantomBuilder(): fModel(" << 48 G4PhantomBuilder::G4PhantomBuilder(): model("MIRD") 45 { 49 { 46 // sex can be "female" or "male" 50 // sex can be "female" or "male" 47 fBody = nullptr; << 51 body = 0; 48 fMotherVolume = nullptr; << 52 motherVolume = 0; 49 fHeadVolume = nullptr; << 53 headVolume = 0; 50 fTrunkVolume = nullptr; << 54 trunkVolume = 0; 51 fLeftLegVolume =nullptr; << 55 leftLegVolume =0; 52 fRightLegVolume = nullptr; << 56 rightLegVolume =0; 53 fMaleGenitaliaVolume = nullptr; << 57 maleGenitaliaVolume = 0; 54 } 58 } 55 59 >> 60 G4PhantomBuilder::~G4PhantomBuilder() >> 61 { >> 62 } 56 void G4PhantomBuilder::BuildTrunk(const G4Stri 63 void G4PhantomBuilder::BuildTrunk(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 57 { 64 { 58 if (fMotherVolume == nullptr) << 65 if (motherVolume == 0) 59 G4Exception("G4PhantomBuilder::BuildTrunk( << 66 G4Exception("The world volume is missing !!!!!"); 60 67 61 G4cout <<"MotherVolume: " << fMotherVolume << 68 G4cout <<"MotherVolume: " << motherVolume -> GetName()<< G4endl; 62 G4cout << "sensitivity : "<< sensitivity << 69 G4cout << "sensitivity : "<< sensitivity << G4endl; 63 fTrunkVolume = fBody -> CreateOrgan("Trunk", << 70 trunkVolume = body -> CreateOrgan("Trunk", motherVolume, colourName, solidVis, sensitivity); 64 } 71 } 65 72 66 void G4PhantomBuilder::BuildLeftLeg(const G4St 73 void G4PhantomBuilder::BuildLeftLeg(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 67 { 74 { 68 if (fMotherVolume == nullptr) << 75 if (motherVolume == 0) 69 G4Exception("G4PhantomBuilder::BuildLeftLe << 76 G4Exception("The world volume is missing !!!!!"); 70 77 71 G4cout <<"MotherVolume: " << fMotherVolume << 78 G4cout <<"MotherVolume: " << motherVolume -> GetName()<< G4endl; 72 G4cout << "sensitivity : "<< sensitivity << 79 G4cout << "sensitivity : "<< sensitivity << G4endl; 73 fLeftLegVolume = fBody -> CreateOrgan("LeftL << 80 leftLegVolume = body -> CreateOrgan("LeftLeg", motherVolume, colourName, solidVis, sensitivity); 74 } 81 } 75 void G4PhantomBuilder::BuildRightLeg(const G4S 82 void G4PhantomBuilder::BuildRightLeg(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 76 { 83 { 77 if (fMotherVolume == nullptr) << 84 if (motherVolume == 0) 78 G4Exception("G4PhantomBuilder::BuildRightL << 85 G4Exception("The world volume is missing !!!!!"); 79 86 80 G4cout <<"MotherVolume: " << fMotherVolume << 87 G4cout <<"MotherVolume: " << motherVolume -> GetName()<< G4endl; 81 G4cout << "sensitivity : "<< sensitivity << 88 G4cout << "sensitivity : "<< sensitivity << G4endl; 82 fRightLegVolume = fBody -> CreateOrgan("Righ << 89 rightLegVolume = body -> CreateOrgan("RightLeg", motherVolume, colourName, solidVis, sensitivity); 83 } 90 } 84 91 85 void G4PhantomBuilder::BuildLeftLegBone(const 92 void G4PhantomBuilder::BuildLeftLegBone(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 86 { 93 { 87 if (fLeftLegVolume == nullptr) << 94 if (leftLegVolume == 0) 88 G4Exception("G4PhantomBuilder::BuildLeftLe << 95 G4Exception("The left leg volume is missing !!!!!"); 89 96 90 G4cout <<"MotherVolume: " << fLeftLegVolume << 97 G4cout <<"MotherVolume: " << leftLegVolume -> GetName()<< G4endl; 91 G4cout << "sensitivity : "<< sensitivity << 98 G4cout << "sensitivity : "<< sensitivity << G4endl; 92 fBody -> CreateOrgan("LeftLegBone", fLeftLeg << 99 body -> CreateOrgan("LeftLegBone", leftLegVolume,colourName, solidVis, sensitivity); 93 } 100 } 94 101 95 void G4PhantomBuilder::BuildRightLegBone(const 102 void G4PhantomBuilder::BuildRightLegBone(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 96 { 103 { 97 if (fTrunkVolume == nullptr) << 104 if (trunkVolume == 0) 98 G4Exception("G4PhantomBuilder::BuildRightL << 105 G4Exception("The right leg volume is missing !!!!!"); 99 106 100 G4cout <<"MotherVolume: " << fRightLegVolume << 107 G4cout <<"MotherVolume: " << rightLegVolume -> GetName()<< G4endl; 101 G4cout << "sensitivity : "<< sensitivity << 108 G4cout << "sensitivity : "<< sensitivity << G4endl; 102 fBody -> CreateOrgan("RightLegBone", fRightL << 109 body -> CreateOrgan("RightLegBone", rightLegVolume, colourName, solidVis, sensitivity); 103 } 110 } 104 111 105 void G4PhantomBuilder::BuildLeftArmBone(const 112 void G4PhantomBuilder::BuildLeftArmBone(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 106 { 113 { 107 if (fTrunkVolume == nullptr) << 114 if (trunkVolume == 0) 108 G4Exception("G4PhantomBuilder::BuildLeftAr << 115 G4Exception("The world volume is missing !!!!!"); 109 116 110 G4cout <<"MotherVolume: " << fTrunkVolume -> << 117 G4cout <<"MotherVolume: " << trunkVolume -> GetName()<< G4endl; 111 G4cout << "sensitivity : "<< sensitivity << 118 G4cout << "sensitivity : "<< sensitivity << G4endl; 112 fBody -> CreateOrgan("LeftArmBone", fTrunkVo << 119 body -> CreateOrgan("LeftArmBone" ,trunkVolume,colourName,solidVis, sensitivity); 113 } 120 } 114 void G4PhantomBuilder::BuildRightArmBone(const 121 void G4PhantomBuilder::BuildRightArmBone(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 115 { 122 { 116 if (fTrunkVolume == nullptr) << 123 if (trunkVolume == 0) 117 G4Exception("G4PhantomBuilder::BuildRightA << 124 G4Exception("The trunk volume is missing !!!!!"); 118 125 119 G4cout <<"MotherVolume: " << fTrunkVolume -> << 126 G4cout <<"MotherVolume: " << trunkVolume -> GetName()<< G4endl; 120 G4cout << "sensitivity : "<< sensitivity << 127 G4cout << "sensitivity : "<< sensitivity << G4endl; 121 fBody -> CreateOrgan("RightArmBone", fTrunkV << 128 body -> CreateOrgan("RightArmBone",trunkVolume,colourName,solidVis, sensitivity); 122 } 129 } 123 130 124 void G4PhantomBuilder::BuildLeftScapula(const 131 void G4PhantomBuilder::BuildLeftScapula(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 125 { 132 { 126 if (fTrunkVolume == nullptr) << 133 if (trunkVolume == 0) 127 G4Exception("G4PhantomBuilder::BuildLeftSc << 134 G4Exception("The trunk volume is missing !!!!!"); 128 135 129 G4cout <<"MotherVolume: " << fTrunkVolume -> << 136 G4cout <<"MotherVolume: " << trunkVolume -> GetName()<< G4endl; 130 G4cout << "sensitivity : "<< sensitivity << 137 G4cout << "sensitivity : "<< sensitivity << G4endl; 131 fBody -> CreateOrgan("LeftScapula",fTrunkVol << 138 body -> CreateOrgan("LeftScapula",trunkVolume,colourName,solidVis, sensitivity); 132 } 139 } 133 140 134 void G4PhantomBuilder::BuildRightScapula(const 141 void G4PhantomBuilder::BuildRightScapula(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 135 { 142 { 136 if (fTrunkVolume == nullptr) << 143 if (trunkVolume == 0) 137 G4Exception("G4PhantomBuilder::BuildRightS << 144 G4Exception("The trunk volume is missing !!!!!"); 138 145 139 G4cout <<"MotherVolume: " << fTrunkVolume - << 146 G4cout <<"MotherVolume: " << trunkVolume -> GetName()<< G4endl; 140 G4cout << "sensitivity : "<< sensitivity << 147 G4cout << "sensitivity : "<< sensitivity << G4endl; 141 fBody -> CreateOrgan("RightScapula",fTrunkVo << 148 body -> CreateOrgan("RightScapula",trunkVolume,colourName,solidVis, sensitivity); 142 } 149 } 143 150 144 void G4PhantomBuilder::BuildLeftClavicle(const << 145 { << 146 if (fTrunkVolume == nullptr) << 147 G4Exception("G4PhantomBuilder::BuildLeftCl << 148 << 149 G4cout <<"MotherVolume: " << fTrunkVolume - << 150 G4cout << "sensitivity : "<< sensitivity << << 151 fBody -> CreateOrgan("LeftClavicle", fTrunkV << 152 } << 153 151 154 void G4PhantomBuilder::BuildRightClavicle(cons << 155 { << 156 if (fTrunkVolume == nullptr) << 157 G4Exception("G4PhantomBuilder::BuildRightC << 158 << 159 G4cout <<"MotherVolume: " << fTrunkVolume -> << 160 G4cout << "sensitivity : "<< sensitivity << << 161 fBody -> CreateOrgan("RightClavicle",fTrunkV << 162 } << 163 152 164 void G4PhantomBuilder::BuildHead(const G4Strin 153 void G4PhantomBuilder::BuildHead(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 165 { 154 { 166 if (fMotherVolume == nullptr) << 155 if (motherVolume == 0) 167 G4Exception("G4PhantomBuilder::BuildHead() << 156 G4Exception("The mother volume is missing !!!!!"); 168 157 169 G4cout <<"MotherVolume: " << fMotherVolume << 158 G4cout <<"MotherVolume: " << motherVolume -> GetName()<< G4endl; 170 G4cout << "sensitivity : "<< sensitivity << 159 G4cout << "sensitivity : "<< sensitivity << G4endl; 171 fHeadVolume = fBody -> CreateOrgan("Head", f << 160 headVolume = body -> CreateOrgan("Head",motherVolume, colourName, solidVis, sensitivity); 172 } 161 } 173 162 174 void G4PhantomBuilder::BuildSkull(const G4Stri 163 void G4PhantomBuilder::BuildSkull(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 175 { 164 { 176 if (fHeadVolume == nullptr) << 165 if (headVolume == 0) 177 G4Exception("G4PhantomBuilder::BuildSkull( << 166 G4Exception("The head volume is missing !!!!!"); 178 167 179 G4cout <<"MotherVolume: " << fHeadVolume -> << 168 G4cout <<"MotherVolume: " << headVolume -> GetName()<< G4endl; 180 G4cout << "sensitivity : "<< sensitivity << 169 G4cout << "sensitivity : "<< sensitivity << G4endl; 181 fBody -> CreateOrgan( "Skull", fHeadVolume, << 170 body -> CreateOrgan( "Skull",headVolume, colourName, solidVis, sensitivity); 182 } 171 } 183 172 184 void G4PhantomBuilder::BuildUpperSpine(const G 173 void G4PhantomBuilder::BuildUpperSpine(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 185 { 174 { 186 if (fHeadVolume == nullptr) << 175 if (headVolume == 0) 187 G4Exception("G4PhantomBuilder::BuildUpperS << 176 G4Exception("The head volume is missing !!!!!"); 188 177 189 G4cout <<"MotherVolume: " << fHeadVolume -> << 178 G4cout <<"MotherVolume: " << headVolume -> GetName()<< G4endl; 190 G4cout << "sensitivity : "<< sensitivity << 179 G4cout << "sensitivity : "<< sensitivity << G4endl; 191 fBody -> CreateOrgan("UpperSpine", fHeadVolu << 180 body -> CreateOrgan("UpperSpine",headVolume,colourName, solidVis, sensitivity); 192 } 181 } 193 182 194 void G4PhantomBuilder::BuildMiddleLowerSpine(c 183 void G4PhantomBuilder::BuildMiddleLowerSpine(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 195 { 184 { 196 if (fTrunkVolume == nullptr) << 185 if (trunkVolume == 0) 197 G4Exception("G4PhantomBuilder::BuildMiddle << 186 G4Exception("The trunk volume is missing !!!!!"); 198 187 199 G4cout <<"MotherVolume: " << fTrunkVolume -> << 188 G4cout <<"MotherVolume: " << trunkVolume -> GetName()<< G4endl; 200 G4cout << "sensitivity : "<< sensitivity << 189 G4cout << "sensitivity : "<< sensitivity << G4endl; 201 fBody -> CreateOrgan("MiddleLowerSpine",fTru << 190 body -> CreateOrgan("MiddleLowerSpine",trunkVolume, colourName, solidVis, sensitivity); 202 } 191 } 203 192 204 void G4PhantomBuilder::BuildPelvis(const G4Str 193 void G4PhantomBuilder::BuildPelvis(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 205 { 194 { 206 if (fTrunkVolume == nullptr) << 195 if (trunkVolume == 0) 207 G4Exception("G4PhantomBuilder::BuildPelvis << 196 G4Exception("The trunk volume is missing !!!!!"); 208 197 209 fBody -> CreateOrgan( "Pelvis", fTrunkVolume << 198 body -> CreateOrgan( "Pelvis",trunkVolume, >> 199 colourName, solidVis, sensitivity); 210 } 200 } >> 201 /* >> 202 >> 203 void G4PhantomBuilder::BuildClavicles(G4bool sensitivity) >> 204 { >> 205 if (trunkVolume == 0) >> 206 G4Exception("The trunk volume is missing !!!!!"); >> 207 >> 208 body -> CreateClavicles(trunkVolume, sensitivity); >> 209 } >> 210 */ 211 211 212 void G4PhantomBuilder::BuildBrain(const G4Stri 212 void G4PhantomBuilder::BuildBrain(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 213 { 213 { 214 if (fHeadVolume == nullptr) << 214 if (headVolume == 0) 215 G4Exception("G4PhantomBuilder::BuildBrain( << 215 G4Exception("The head volume is missing !!!!!"); 216 216 217 fBody -> CreateOrgan("Brain", fHeadVolume, c << 217 body -> CreateOrgan("Brain",headVolume, colourName, solidVis, sensitivity); 218 } 218 } 219 219 220 void G4PhantomBuilder::BuildHeart(const G4Stri 220 void G4PhantomBuilder::BuildHeart(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 221 { 221 { 222 if (fTrunkVolume == nullptr) << 222 if (trunkVolume == 0) 223 G4Exception("G4PhantomBuilder::BuildHeart( << 223 G4Exception("The trunk volume is missing !!!!!"); 224 fBody -> CreateOrgan("Heart", fTrunkVolume,c << 224 body -> CreateOrgan("Heart", trunkVolume,colourName, solidVis, sensitivity); 225 } 225 } 226 226 227 void G4PhantomBuilder::BuildLeftLung(const G4S 227 void G4PhantomBuilder::BuildLeftLung(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 228 { 228 { 229 if (fTrunkVolume == nullptr) << 229 if (trunkVolume == 0) 230 G4Exception("G4PhantomBuilder::BuildLeftLu << 230 G4Exception("The trunk volume is missing !!!!!"); 231 231 232 fBody -> CreateOrgan("LeftLung", fTrunkVolum << 232 body -> CreateOrgan("LeftLung",trunkVolume,colourName,solidVis, sensitivity); 233 } 233 } 234 234 235 void G4PhantomBuilder::BuildRightLung(const G4 235 void G4PhantomBuilder::BuildRightLung(const G4String& colourName, G4bool solidVis, G4bool sensitivity ) 236 { 236 { 237 if (fTrunkVolume == nullptr) << 237 if (trunkVolume == 0) 238 G4Exception("G4PhantomBuilder::BuildRightL << 238 G4Exception("The trunk volume is missing !!!!!"); 239 239 240 fBody -> CreateOrgan("RightLung", fTrunkVolu << 240 body -> CreateOrgan("RightLung",trunkVolume,colourName, solidVis, sensitivity); 241 } 241 } 242 242 243 void G4PhantomBuilder::BuildStomach(const G4St 243 void G4PhantomBuilder::BuildStomach(const G4String& colourName, G4bool solidVis, G4bool sensitivity ) 244 { 244 { 245 if (fTrunkVolume == nullptr) << 245 if (trunkVolume == 0) 246 G4Exception("G4PhantomBuilder::BuildStomac << 246 G4Exception("The trunk volume is missing !!!!!"); 247 247 248 fBody -> CreateOrgan("Stomach", fTrunkVolume << 248 body -> CreateOrgan("Stomach",trunkVolume,colourName, solidVis, sensitivity); 249 } 249 } 250 250 251 void G4PhantomBuilder::BuildRibCage(const G4St 251 void G4PhantomBuilder::BuildRibCage(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 252 { 252 { 253 if (fTrunkVolume == nullptr) << 253 if (trunkVolume == 0) 254 G4Exception("G4PhantomBuilder::BuildRibCag << 254 G4Exception("The trunk volume is missing !!!!!"); 255 255 256 fBody -> CreateOrgan("RibCage", fTrunkVolume << 256 body -> CreateOrgan("RibCage",trunkVolume,colourName, solidVis, sensitivity); 257 } 257 } 258 258 259 void G4PhantomBuilder::BuildSpleen(const G4Str 259 void G4PhantomBuilder::BuildSpleen(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 260 { 260 { 261 if (fTrunkVolume == nullptr) << 261 if (trunkVolume == 0) 262 G4Exception("G4PhantomBuilder::BuildSpleen << 262 G4Exception("The trunk volume is missing !!!!!"); 263 263 264 fBody -> CreateOrgan("Spleen", fTrunkVolume, << 264 body -> CreateOrgan("Spleen", trunkVolume,colourName, solidVis, sensitivity); 265 } 265 } 266 266 267 void G4PhantomBuilder::BuildUpperLargeIntestin 267 void G4PhantomBuilder::BuildUpperLargeIntestine(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 268 { 268 { 269 if (fTrunkVolume == nullptr) << 269 if (trunkVolume == 0) 270 G4Exception("G4PhantomBuilder::BuildUpperL << 270 G4Exception("The trunk volume is missing !!!!!"); 271 271 272 fBody -> CreateOrgan("UpperLargeIntestine", << 272 body -> CreateOrgan("UpperLargeIntestine",trunkVolume, colourName, solidVis, sensitivity); 273 } 273 } 274 274 275 void G4PhantomBuilder::BuildLowerLargeIntestin 275 void G4PhantomBuilder::BuildLowerLargeIntestine(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 276 { 276 { 277 if (fTrunkVolume == nullptr) << 277 if (trunkVolume == 0) 278 G4Exception("G4PhantomBuilder::BuildLowerL << 278 G4Exception("The trunk volume is missing !!!!!"); 279 279 280 fBody -> CreateOrgan("LowerLargeIntestine", << 280 body -> CreateOrgan("LowerLargeIntestine", trunkVolume, colourName,solidVis, sensitivity); 281 } 281 } 282 << 282 /* 283 void G4PhantomBuilder::BuildSmallIntestine(con << 283 void G4PhantomBuilder::BuildEsophagus(G4bool sensitivity) 284 { 284 { 285 if (fTrunkVolume == nullptr) << 285 if (trunkVolume == 0) 286 G4Exception("G4PhantomBuilder::BuildSamllI << 286 G4Exception("The trunk volume is missing !!!!!"); 287 287 288 fBody -> CreateOrgan("SmallIntestine", fTrun << 288 body -> CreateEsophagus(trunkVolume, sensitivity); 289 } 289 } 290 << 290 */ 291 void G4PhantomBuilder::BuildLeftKidney(const G 291 void G4PhantomBuilder::BuildLeftKidney(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 292 { 292 { 293 if (fTrunkVolume == nullptr) << 293 if (trunkVolume == 0) 294 G4Exception("G4PhantomBuilder::BuildLeftKi << 294 G4Exception("The trunk volume is missing !!!!!"); 295 295 296 fBody -> CreateOrgan("LeftKidney", fTrunkVol << 296 body -> CreateOrgan("LeftKidney", trunkVolume,colourName, solidVis, sensitivity); 297 } 297 } 298 void G4PhantomBuilder::BuildRightKidney(const 298 void G4PhantomBuilder::BuildRightKidney(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 299 { 299 { 300 if (fTrunkVolume == nullptr) << 300 if (trunkVolume == 0) 301 G4Exception("G4PhantomBuilder::BuildRightK << 301 G4Exception("The trunk volume is missing !!!!!"); 302 302 303 fBody -> CreateOrgan("RightKidney", fTrunkVo << 303 body -> CreateOrgan("RightKidney",trunkVolume,colourName, solidVis, sensitivity); 304 } 304 } 305 305 306 void G4PhantomBuilder::BuildLeftAdrenal(const 306 void G4PhantomBuilder::BuildLeftAdrenal(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 307 { 307 { 308 if (fTrunkVolume == nullptr) << 308 if (trunkVolume == 0) 309 G4Exception("G4PhantomBuilder::BuildLeftAd << 309 G4Exception("The trunk volume is missing !!!!!"); 310 310 311 fBody -> CreateOrgan("LeftAdrenal", fTrunkVo << 311 body -> CreateOrgan("LeftAdrenal", trunkVolume,colourName, solidVis, sensitivity); 312 } 312 } 313 313 314 void G4PhantomBuilder::BuildRightAdrenal(const 314 void G4PhantomBuilder::BuildRightAdrenal(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 315 { 315 { 316 if (fTrunkVolume == nullptr) << 316 if (trunkVolume == 0) 317 G4Exception("G4PhantomBuilder::BuildRightA << 317 G4Exception("The trunk volume is missing !!!!!"); 318 318 319 fBody -> CreateOrgan("RightAdrenal", fTrunkV << 319 body -> CreateOrgan("RightAdrenal", trunkVolume,colourName, solidVis, sensitivity); 320 } 320 } 321 321 >> 322 322 void G4PhantomBuilder::BuildLiver(const G4Stri 323 void G4PhantomBuilder::BuildLiver(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 323 { 324 { 324 if (fTrunkVolume == nullptr) << 325 if (trunkVolume == 0) 325 G4Exception("G4PhantomBuilder::BuildLiver( << 326 G4Exception("The trunk volume is missing !!!!!"); 326 327 327 fBody -> CreateOrgan("Liver", fTrunkVolume,c << 328 body -> CreateOrgan("Liver", trunkVolume,colourName, solidVis, sensitivity); 328 } 329 } 329 void G4PhantomBuilder::BuildPancreas(const G4S 330 void G4PhantomBuilder::BuildPancreas(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 330 { 331 { 331 if (fTrunkVolume == nullptr) << 332 if (trunkVolume == 0) 332 G4Exception("G4PhantomBuilder::BuildPancre << 333 G4Exception("The trunk volume is missing !!!!!"); 333 334 334 fBody -> CreateOrgan("Pancreas", fTrunkVolum << 335 body -> CreateOrgan("Pancreas",trunkVolume,colourName, solidVis, sensitivity); 335 } 336 } 336 337 337 void G4PhantomBuilder::BuildUrinaryBladder(con 338 void G4PhantomBuilder::BuildUrinaryBladder(const G4String& colourName, G4bool solidVis, G4bool sensitivity) 338 { 339 { 339 if (fTrunkVolume == nullptr) << 340 if (trunkVolume == 0) 340 G4Exception("G4PhantomBuilder::BuildUrinar << 341 G4Exception("The trunk volume is missing !!!!!"); 341 342 342 fBody -> CreateOrgan("UrinaryBladder", fTrun << 343 body -> CreateOrgan("UrinaryBladder",trunkVolume, colourName, solidVis, sensitivity); 343 } 344 } 344 345 345 void G4PhantomBuilder::BuildThyroid(const G4St 346 void G4PhantomBuilder::BuildThyroid(const G4String& colourName, G4bool solidVis, G4bool sensitivity ) 346 { 347 { 347 if (fHeadVolume == nullptr) << 348 if (headVolume == 0) 348 G4Exception("G4PhantomBuilder::BuildThyroi << 349 G4Exception("The trunk volume is missing !!!!!"); 349 350 350 fBody -> CreateOrgan("Thyroid", fHeadVolume, << 351 body -> CreateOrgan("Thyroid",headVolume, colourName,solidVis, sensitivity); 351 } 352 } 352 353 353 void G4PhantomBuilder::BuildThymus(const G4Str << 354 { << 355 if (fTrunkVolume == nullptr) << 356 G4Exception("G4PhantomBuilder::BuildThymus << 357 << 358 fBody -> CreateOrgan("Thymus",fTrunkVolume, << 359 } << 360 354 361 G4VPhysicalVolume* G4PhantomBuilder::GetPhanto 355 G4VPhysicalVolume* G4PhantomBuilder::GetPhantom() 362 { 356 { 363 return fMotherVolume; << 357 return motherVolume; 364 } 358 } 365 359 366 void G4PhantomBuilder::SetMotherVolume(G4VPhys 360 void G4PhantomBuilder::SetMotherVolume(G4VPhysicalVolume* mother) 367 { 361 { 368 fMotherVolume = mother; << 362 motherVolume = mother; 369 } 363 } 370 364 >> 365 371 void G4PhantomBuilder::SetModel(G4String model 366 void G4PhantomBuilder::SetModel(G4String modelFlag) 372 { 367 { 373 fModel = modelFlag; << 368 model = modelFlag; 374 369 375 if(fModel=="MIRD") fBody = new G4MIRDBodyFac << 370 if(model=="MIRD" || model =="MIX") body = new G4MIRDBodyFactory(); 376 else if(fModel=="ORNLFemale") << 371 if(model=="ORNLFemale") body = new G4ORNLFemaleBodyFactory(); 377 { << 372 if(model=="ORNLMale") body = new G4ORNLMaleBodyFactory(); 378 #ifdef G4LIB_USE_GDML << 379 fBody = new G4ORNLFemaleBodyFactory(); << 380 #else << 381 G4cout << fModel << " Working with GDML on << 382 #endif << 383 } << 384 else if(fModel=="ORNLMale") << 385 { << 386 #ifdef G4LIB_USE_GDML << 387 fBody = new G4ORNLMaleBodyFactory(); << 388 #else << 389 G4cout << fModel << " Working with GDML on << 390 #endif << 391 } << 392 } 373 } >> 374 393 375