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 // 26 // 27 // Previous authors: G. Guerrieri, S. Guatelli 27 // Previous authors: G. Guerrieri, S. Guatelli and M. G. Pia, INFN Genova, Italy 28 // Authors (since 2007): S. Guatelli, Universi 28 // Authors (since 2007): S. Guatelli, University of Wollongong, Australia 29 // 29 // 30 // 30 // 31 #include "G4MIRDBodyFactory.hh" 31 #include "G4MIRDBodyFactory.hh" 32 #include "G4MIRDStomach.hh" 32 #include "G4MIRDStomach.hh" 33 #include "G4MIRDSmallIntestine.hh" 33 #include "G4MIRDSmallIntestine.hh" 34 #include "G4MIRDUpperLargeIntestine.hh" 34 #include "G4MIRDUpperLargeIntestine.hh" 35 #include "G4MIRDLowerLargeIntestine.hh" 35 #include "G4MIRDLowerLargeIntestine.hh" 36 #include "G4MIRDLeftKidney.hh" 36 #include "G4MIRDLeftKidney.hh" 37 #include "G4MIRDRightKidney.hh" 37 #include "G4MIRDRightKidney.hh" 38 #include "G4MIRDLiver.hh" 38 #include "G4MIRDLiver.hh" 39 #include "G4MIRDPancreas.hh" 39 #include "G4MIRDPancreas.hh" 40 #include "G4MIRDSpleen.hh" 40 #include "G4MIRDSpleen.hh" 41 #include "G4MIRDUrinaryBladder.hh" 41 #include "G4MIRDUrinaryBladder.hh" 42 #include "G4MIRDLeftLung.hh" 42 #include "G4MIRDLeftLung.hh" 43 #include "G4MIRDRightLung.hh" 43 #include "G4MIRDRightLung.hh" 44 #include "G4MIRDHeart.hh" 44 #include "G4MIRDHeart.hh" 45 #include "G4MIRDBrain.hh" 45 #include "G4MIRDBrain.hh" 46 #include "G4MIRDHead.hh" 46 #include "G4MIRDHead.hh" 47 #include "G4MIRDTrunk.hh" 47 #include "G4MIRDTrunk.hh" 48 #include "G4MIRDMaleGenitalia.hh" 48 #include "G4MIRDMaleGenitalia.hh" 49 #include "G4MIRDLeftLeg.hh" 49 #include "G4MIRDLeftLeg.hh" 50 #include "G4MIRDRightLeg.hh" 50 #include "G4MIRDRightLeg.hh" 51 #include "G4MIRDThyroid.hh" 51 #include "G4MIRDThyroid.hh" 52 #include "G4MIRDThymus.hh" 52 #include "G4MIRDThymus.hh" 53 #include "G4MIRDUterus.hh" 53 #include "G4MIRDUterus.hh" 54 #include "G4MIRDLeftBreast.hh" 54 #include "G4MIRDLeftBreast.hh" 55 #include "G4MIRDRightBreast.hh" 55 #include "G4MIRDRightBreast.hh" 56 #include "G4MIRDRightOvary.hh" 56 #include "G4MIRDRightOvary.hh" 57 #include "G4MIRDLeftOvary.hh" 57 #include "G4MIRDLeftOvary.hh" 58 #include "G4MIRDUpperSpine.hh" 58 #include "G4MIRDUpperSpine.hh" 59 #include "G4MIRDMiddleLowerSpine.hh" 59 #include "G4MIRDMiddleLowerSpine.hh" 60 #include "G4MIRDLeftLegBone.hh" 60 #include "G4MIRDLeftLegBone.hh" 61 #include "G4MIRDRightLegBone.hh" 61 #include "G4MIRDRightLegBone.hh" 62 #include "G4MIRDLeftClavicle.hh" 62 #include "G4MIRDLeftClavicle.hh" 63 #include "G4MIRDRightClavicle.hh" 63 #include "G4MIRDRightClavicle.hh" 64 #include "G4MIRDLeftArmBone.hh" 64 #include "G4MIRDLeftArmBone.hh" 65 #include "G4MIRDRightArmBone.hh" 65 #include "G4MIRDRightArmBone.hh" 66 #include "G4MIRDSkull.hh" 66 #include "G4MIRDSkull.hh" 67 #include "G4MIRDRibCage.hh" 67 #include "G4MIRDRibCage.hh" 68 #include "G4MIRDPelvis.hh" 68 #include "G4MIRDPelvis.hh" 69 #include "G4MIRDLeftTeste.hh" 69 #include "G4MIRDLeftTeste.hh" 70 #include "G4MIRDRightTeste.hh" 70 #include "G4MIRDRightTeste.hh" 71 #include "G4MIRDLeftScapula.hh" 71 #include "G4MIRDLeftScapula.hh" 72 #include "G4MIRDRightScapula.hh" 72 #include "G4MIRDRightScapula.hh" 73 #include "G4MIRDLeftAdrenal.hh" 73 #include "G4MIRDLeftAdrenal.hh" 74 #include "G4MIRDRightAdrenal.hh" 74 #include "G4MIRDRightAdrenal.hh" 75 75 76 G4MIRDBodyFactory::G4MIRDBodyFactory() 76 G4MIRDBodyFactory::G4MIRDBodyFactory() 77 { 77 { 78 // Map with name of the fOrgan and pointer t 78 // Map with name of the fOrgan and pointer to the MIRDOrgan class 79 fOrgan["Head"] = new G4MIRDHead(); 79 fOrgan["Head"] = new G4MIRDHead(); 80 fOrgan["Trunk"] = new G4MIRDTrunk(); 80 fOrgan["Trunk"] = new G4MIRDTrunk(); 81 fOrgan["LeftLeg"] = new G4MIRDLeftLeg(); 81 fOrgan["LeftLeg"] = new G4MIRDLeftLeg(); 82 fOrgan["RightLeg"] = new G4MIRDRightLeg(); 82 fOrgan["RightLeg"] = new G4MIRDRightLeg(); 83 fOrgan["Skull"] = new G4MIRDSkull(); 83 fOrgan["Skull"] = new G4MIRDSkull(); 84 fOrgan["LeftArmBone"] = new G4MIRDLeftArmBon 84 fOrgan["LeftArmBone"] = new G4MIRDLeftArmBone(); 85 fOrgan["RightArmBone"] = new G4MIRDRightArmB 85 fOrgan["RightArmBone"] = new G4MIRDRightArmBone(); 86 fOrgan["UpperSpine"] = new G4MIRDUpperSpine( 86 fOrgan["UpperSpine"] = new G4MIRDUpperSpine(); 87 fOrgan["MiddleLowerSpine"] = new G4MIRDMiddl 87 fOrgan["MiddleLowerSpine"] = new G4MIRDMiddleLowerSpine(); 88 fOrgan["Pelvis"]= new G4MIRDPelvis(); 88 fOrgan["Pelvis"]= new G4MIRDPelvis(); 89 fOrgan["RibCage"] = new G4MIRDRibCage(); 89 fOrgan["RibCage"] = new G4MIRDRibCage(); 90 fOrgan["LeftClavicle"]= new G4MIRDLeftClavic 90 fOrgan["LeftClavicle"]= new G4MIRDLeftClavicle(); 91 fOrgan["RightClavicle"] = new G4MIRDRightCla 91 fOrgan["RightClavicle"] = new G4MIRDRightClavicle(); 92 fOrgan["LeftLegBone"] = new G4MIRDLeftLegBon 92 fOrgan["LeftLegBone"] = new G4MIRDLeftLegBone(); 93 fOrgan["RightLegBone"] = new G4MIRDRightLegB 93 fOrgan["RightLegBone"] = new G4MIRDRightLegBone(); 94 fOrgan["LeftScapula"]= new G4MIRDLeftScapula 94 fOrgan["LeftScapula"]= new G4MIRDLeftScapula(); 95 fOrgan["RightScapula"]= new G4MIRDRightScapu 95 fOrgan["RightScapula"]= new G4MIRDRightScapula(); 96 fOrgan["Heart"] = new G4MIRDHeart(); 96 fOrgan["Heart"] = new G4MIRDHeart(); 97 fOrgan["Thyroid"] = new G4MIRDThyroid(); 97 fOrgan["Thyroid"] = new G4MIRDThyroid(); 98 fOrgan["Thymus"] = new G4MIRDThymus(); 98 fOrgan["Thymus"] = new G4MIRDThymus(); 99 fOrgan["MaleGenitalia"] = new G4MIRDMaleGeni 99 fOrgan["MaleGenitalia"] = new G4MIRDMaleGenitalia(); 100 fOrgan["Brain"] = new G4MIRDBrain(); 100 fOrgan["Brain"] = new G4MIRDBrain(); 101 fOrgan["Stomach"] = new G4MIRDStomach(); 101 fOrgan["Stomach"] = new G4MIRDStomach(); 102 fOrgan["UpperLargeIntestine"] = new G4MIRDUp 102 fOrgan["UpperLargeIntestine"] = new G4MIRDUpperLargeIntestine(); 103 fOrgan["LowerLargeIntestine"] = new G4MIRDLo 103 fOrgan["LowerLargeIntestine"] = new G4MIRDLowerLargeIntestine(); 104 fOrgan["SmallIntestine"] = new G4MIRDSmallIn 104 fOrgan["SmallIntestine"] = new G4MIRDSmallIntestine(); 105 fOrgan["Spleen"] = new G4MIRDSpleen(); 105 fOrgan["Spleen"] = new G4MIRDSpleen(); 106 fOrgan["Pancreas"] = new G4MIRDPancreas(); 106 fOrgan["Pancreas"] = new G4MIRDPancreas(); 107 fOrgan["LeftKidney"] = new G4MIRDLeftKidney( 107 fOrgan["LeftKidney"] = new G4MIRDLeftKidney(); 108 fOrgan["RightKidney"] = new G4MIRDRightKidne 108 fOrgan["RightKidney"] = new G4MIRDRightKidney(); 109 fOrgan["UrinaryBladder"] = new G4MIRDUrinary 109 fOrgan["UrinaryBladder"] = new G4MIRDUrinaryBladder(); 110 fOrgan["Uterus"] = new G4MIRDUterus(); 110 fOrgan["Uterus"] = new G4MIRDUterus(); 111 fOrgan["Liver"] = new G4MIRDLiver(); 111 fOrgan["Liver"] = new G4MIRDLiver(); 112 fOrgan["LeftLung"]= new G4MIRDLeftLung(); 112 fOrgan["LeftLung"]= new G4MIRDLeftLung(); 113 fOrgan["RightLung"] = new G4MIRDRightLung(); 113 fOrgan["RightLung"] = new G4MIRDRightLung(); 114 fOrgan["LeftOvary"] = new G4MIRDLeftOvary(); 114 fOrgan["LeftOvary"] = new G4MIRDLeftOvary(); 115 fOrgan["RightOvary"] = new G4MIRDRightOvary( 115 fOrgan["RightOvary"] = new G4MIRDRightOvary(); 116 fOrgan["LeftTeste"] = new G4MIRDLeftTeste(); 116 fOrgan["LeftTeste"] = new G4MIRDLeftTeste(); 117 fOrgan["RightTeste"] = new G4MIRDRightTeste( 117 fOrgan["RightTeste"] = new G4MIRDRightTeste(); 118 fOrgan["RightBreast"] = new G4MIRDRightBreas 118 fOrgan["RightBreast"] = new G4MIRDRightBreast(); 119 fOrgan["LeftBreast"] = new G4MIRDLeftBreast( 119 fOrgan["LeftBreast"] = new G4MIRDLeftBreast(); 120 fOrgan["LeftAdrenal"]= new G4MIRDLeftAdrenal 120 fOrgan["LeftAdrenal"]= new G4MIRDLeftAdrenal(); 121 fOrgan["RightAdrenal"]= new G4MIRDRightAdren 121 fOrgan["RightAdrenal"]= new G4MIRDRightAdrenal(); 122 } 122 } 123 123 124 G4MIRDBodyFactory::~G4MIRDBodyFactory() 124 G4MIRDBodyFactory::~G4MIRDBodyFactory() 125 { 125 { 126 delete fOrgan["Head"]; fOrgan["Head"]=nullpt 126 delete fOrgan["Head"]; fOrgan["Head"]=nullptr; 127 delete fOrgan["RightLeg"]; fOrgan["RightLeg" 127 delete fOrgan["RightLeg"]; fOrgan["RightLeg"]=nullptr; 128 delete fOrgan["LeftLeg"]; fOrgan["LeftLeg"]= 128 delete fOrgan["LeftLeg"]; fOrgan["LeftLeg"]=nullptr; 129 delete fOrgan["Trunk"]; fOrgan["Trunk"]=null 129 delete fOrgan["Trunk"]; fOrgan["Trunk"]=nullptr; 130 delete fOrgan["RightScapula"];fOrgan["RightS 130 delete fOrgan["RightScapula"];fOrgan["RightScapula"]=nullptr; 131 delete fOrgan["LeftScapula"];fOrgan["LeftSca 131 delete fOrgan["LeftScapula"];fOrgan["LeftScapula"]=nullptr; 132 delete fOrgan["RightLegBone"]; fOrgan["Right 132 delete fOrgan["RightLegBone"]; fOrgan["RightLegBone"]=nullptr; 133 delete fOrgan["LeftLegBone"]; fOrgan["LeftLe 133 delete fOrgan["LeftLegBone"]; fOrgan["LeftLegBone"]=nullptr; 134 delete fOrgan["RibCage"]; fOrgan["RibCage"] 134 delete fOrgan["RibCage"]; fOrgan["RibCage"] =nullptr; 135 delete fOrgan["MiddleLowerSpine"]; fOrgan["M 135 delete fOrgan["MiddleLowerSpine"]; fOrgan["MidlleLowerSpine"]=nullptr; 136 delete fOrgan["UpperSpine"]; fOrgan["UpperSp 136 delete fOrgan["UpperSpine"]; fOrgan["UpperSpine"]=nullptr; 137 delete fOrgan["Skull"]; fOrgan["Skull"]=null 137 delete fOrgan["Skull"]; fOrgan["Skull"]=nullptr; 138 delete fOrgan["RightArmBone"]; fOrgan["Right 138 delete fOrgan["RightArmBone"]; fOrgan["RightArmBone"]=nullptr; 139 delete fOrgan["LeftArmBone"]; fOrgan["LeftAr 139 delete fOrgan["LeftArmBone"]; fOrgan["LeftArmBone"]=nullptr; 140 delete fOrgan["RightClavicle"]; fOrgan["Righ 140 delete fOrgan["RightClavicle"]; fOrgan["RightClavicle"]=nullptr; 141 delete fOrgan["LeftClavicle"]; fOrgan["LeftC 141 delete fOrgan["LeftClavicle"]; fOrgan["LeftClavicle"]=nullptr; 142 delete fOrgan["Pelvis"]; fOrgan["Pelvis"]=nu 142 delete fOrgan["Pelvis"]; fOrgan["Pelvis"]=nullptr; 143 delete fOrgan["RightAdrenal"]; fOrgan["Right 143 delete fOrgan["RightAdrenal"]; fOrgan["RightAdrenal"]=nullptr; 144 delete fOrgan["LeftAdrenal"]; fOrgan["LeftAd 144 delete fOrgan["LeftAdrenal"]; fOrgan["LeftAdrenal"]=nullptr; 145 delete fOrgan["LeftBreast"]; fOrgan["LeftBre 145 delete fOrgan["LeftBreast"]; fOrgan["LeftBreast"]=nullptr; 146 delete fOrgan["RightBreast"]; fOrgan["RightB 146 delete fOrgan["RightBreast"]; fOrgan["RightBreast"]=nullptr; 147 delete fOrgan["RightOvary"]; fOrgan["RightOv 147 delete fOrgan["RightOvary"]; fOrgan["RightOvary"]=nullptr; 148 delete fOrgan["LeftOvary"]; fOrgan["LeftOvar 148 delete fOrgan["LeftOvary"]; fOrgan["LeftOvary"]=nullptr; 149 delete fOrgan["RightTeste"]; fOrgan["RightTe 149 delete fOrgan["RightTeste"]; fOrgan["RightTeste"]=nullptr; 150 delete fOrgan["LeftTeste"]; fOrgan["LeftTest 150 delete fOrgan["LeftTeste"]; fOrgan["LeftTeste"]=nullptr; 151 delete fOrgan["RightLung"]; fOrgan["RightLun 151 delete fOrgan["RightLung"]; fOrgan["RightLung"] =nullptr; 152 delete fOrgan["LeftLung"]; fOrgan["LeftLung" 152 delete fOrgan["LeftLung"]; fOrgan["LeftLung"]=nullptr; 153 delete fOrgan["Uterus"]; fOrgan["Uterus"]=nu 153 delete fOrgan["Uterus"]; fOrgan["Uterus"]=nullptr; 154 delete fOrgan["UrinaryBladder"]; fOrgan["Uri 154 delete fOrgan["UrinaryBladder"]; fOrgan["UrinaryBladder"]=nullptr; 155 delete fOrgan["RightKidney"]; fOrgan["RightK 155 delete fOrgan["RightKidney"]; fOrgan["RightKidney"]=nullptr; 156 delete fOrgan["LeftKidney"]; fOrgan["LeftKid 156 delete fOrgan["LeftKidney"]; fOrgan["LeftKidney"]=nullptr; 157 delete fOrgan["Pancreas"]; fOrgan["Pancreas" 157 delete fOrgan["Pancreas"]; fOrgan["Pancreas"]=nullptr; 158 delete fOrgan["Spleen"]; fOrgan["Spleen"]=nu 158 delete fOrgan["Spleen"]; fOrgan["Spleen"]=nullptr; 159 delete fOrgan["LowerLargeIntestine"]; fOrgan 159 delete fOrgan["LowerLargeIntestine"]; fOrgan["LowerLargeIntestine"]=nullptr; 160 delete fOrgan["SmallIntestine"]; fOrgan["Sma 160 delete fOrgan["SmallIntestine"]; fOrgan["SmallIntestine"]=nullptr; 161 delete fOrgan["UpperLargeIntestine"]; fOrgan 161 delete fOrgan["UpperLargeIntestine"]; fOrgan["UpperLargeIntestine"]=nullptr; 162 delete fOrgan["Stomach"]; fOrgan["Stomach"]= 162 delete fOrgan["Stomach"]; fOrgan["Stomach"]=nullptr; 163 delete fOrgan["Brain"]; fOrgan["Brain"]=null 163 delete fOrgan["Brain"]; fOrgan["Brain"]=nullptr; 164 delete fOrgan["Heart"]; fOrgan["Heart"]=null 164 delete fOrgan["Heart"]; fOrgan["Heart"]=nullptr; 165 delete fOrgan["Thymus"]; fOrgan["Thymus"]=nu 165 delete fOrgan["Thymus"]; fOrgan["Thymus"]=nullptr; 166 delete fOrgan["MaleGenitalia"]; fOrgan["Male 166 delete fOrgan["MaleGenitalia"]; fOrgan["MaleGenitalia"]=nullptr; 167 delete fOrgan["Thyroid"]; fOrgan["Thyroid"]= 167 delete fOrgan["Thyroid"]; fOrgan["Thyroid"]=nullptr; 168 delete fOrgan["Liver"]; fOrgan["Liver"]=null 168 delete fOrgan["Liver"]; fOrgan["Liver"]=nullptr; 169 } 169 } 170 170 171 G4VPhysicalVolume* G4MIRDBodyFactory::CreateOr 171 G4VPhysicalVolume* G4MIRDBodyFactory::CreateOrgan(const G4String& organ_name,G4VPhysicalVolume* motherVolume, 172 const G4String& colourName, G4bo 172 const G4String& colourName, G4bool visAttribute, 173 G4bool sensitivity) 173 G4bool sensitivity) 174 { 174 { 175 return fOrgan[organ_name]->Construct(organ_n 175 return fOrgan[organ_name]->Construct(organ_name,motherVolume,colourName, visAttribute, sensitivity); 176 } 176 } 177 177 178 178 179 179