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