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] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

  1 //
  2 // ********************************************************************
  3 // * License and Disclaimer                                           *
  4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.                             *
 10 // *                                                                  *
 11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                                                  *
 18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // ********************************************************************
 25 //
 26 //
 27 // Previous authors: G. Guerrieri, S. Guatelli and M. G. Pia, INFN Genova, Italy
 28 // Authors (since 2007): S. Guatelli, University of Wollongong, Australia
 29 //
 30 //
 31 #include "G4MIRDBodyFactory.hh"
 32 #include "G4MIRDStomach.hh"
 33 #include "G4MIRDSmallIntestine.hh"
 34 #include "G4MIRDUpperLargeIntestine.hh"
 35 #include "G4MIRDLowerLargeIntestine.hh"
 36 #include "G4MIRDLeftKidney.hh"
 37 #include "G4MIRDRightKidney.hh"
 38 #include "G4MIRDLiver.hh"
 39 #include "G4MIRDPancreas.hh"
 40 #include "G4MIRDSpleen.hh"
 41 #include "G4MIRDUrinaryBladder.hh"
 42 #include "G4MIRDLeftLung.hh"
 43 #include "G4MIRDRightLung.hh"
 44 #include "G4MIRDHeart.hh"
 45 #include "G4MIRDBrain.hh"
 46 #include "G4MIRDHead.hh"
 47 #include "G4MIRDTrunk.hh"
 48 #include "G4MIRDMaleGenitalia.hh"
 49 #include "G4MIRDLeftLeg.hh"
 50 #include "G4MIRDRightLeg.hh"
 51 #include "G4MIRDThyroid.hh"
 52 #include "G4MIRDThymus.hh"
 53 #include "G4MIRDUterus.hh"
 54 #include "G4MIRDLeftBreast.hh"
 55 #include "G4MIRDRightBreast.hh"
 56 #include "G4MIRDRightOvary.hh"
 57 #include "G4MIRDLeftOvary.hh"
 58 #include "G4MIRDUpperSpine.hh"
 59 #include "G4MIRDMiddleLowerSpine.hh"
 60 #include "G4MIRDLeftLegBone.hh"
 61 #include "G4MIRDRightLegBone.hh"
 62 #include "G4MIRDLeftClavicle.hh"
 63 #include "G4MIRDRightClavicle.hh"
 64 #include "G4MIRDLeftArmBone.hh"
 65 #include "G4MIRDRightArmBone.hh"
 66 #include "G4MIRDSkull.hh"
 67 #include "G4MIRDRibCage.hh"
 68 #include "G4MIRDPelvis.hh"
 69 #include "G4MIRDLeftTeste.hh"
 70 #include "G4MIRDRightTeste.hh"
 71 #include "G4MIRDLeftScapula.hh"
 72 #include "G4MIRDRightScapula.hh"
 73 #include "G4MIRDLeftAdrenal.hh"
 74 #include "G4MIRDRightAdrenal.hh"
 75 
 76 G4MIRDBodyFactory::G4MIRDBodyFactory()
 77 {
 78   // Map with name of the fOrgan and pointer to the MIRDOrgan class
 79   fOrgan["Head"] = new G4MIRDHead();
 80   fOrgan["Trunk"] = new G4MIRDTrunk(); 
 81   fOrgan["LeftLeg"] = new G4MIRDLeftLeg();
 82   fOrgan["RightLeg"] = new G4MIRDRightLeg();
 83   fOrgan["Skull"] = new G4MIRDSkull();
 84   fOrgan["LeftArmBone"] = new G4MIRDLeftArmBone();
 85   fOrgan["RightArmBone"] = new G4MIRDRightArmBone();
 86   fOrgan["UpperSpine"] = new G4MIRDUpperSpine();
 87   fOrgan["MiddleLowerSpine"] = new G4MIRDMiddleLowerSpine();
 88   fOrgan["Pelvis"]= new G4MIRDPelvis();
 89   fOrgan["RibCage"] = new G4MIRDRibCage(); 
 90   fOrgan["LeftClavicle"]= new G4MIRDLeftClavicle();
 91   fOrgan["RightClavicle"] = new G4MIRDRightClavicle();
 92   fOrgan["LeftLegBone"] = new G4MIRDLeftLegBone();
 93   fOrgan["RightLegBone"] = new G4MIRDRightLegBone();
 94   fOrgan["LeftScapula"]= new G4MIRDLeftScapula(); 
 95   fOrgan["RightScapula"]= new G4MIRDRightScapula(); 
 96   fOrgan["Heart"] = new G4MIRDHeart();
 97   fOrgan["Thyroid"] = new G4MIRDThyroid(); 
 98   fOrgan["Thymus"] = new G4MIRDThymus(); 
 99   fOrgan["MaleGenitalia"] = new G4MIRDMaleGenitalia(); 
100   fOrgan["Brain"] = new G4MIRDBrain(); 
101   fOrgan["Stomach"] = new G4MIRDStomach();
102   fOrgan["UpperLargeIntestine"] = new G4MIRDUpperLargeIntestine();
103   fOrgan["LowerLargeIntestine"] = new G4MIRDLowerLargeIntestine();
104   fOrgan["SmallIntestine"] = new G4MIRDSmallIntestine();
105   fOrgan["Spleen"] = new G4MIRDSpleen(); 
106   fOrgan["Pancreas"] = new G4MIRDPancreas();
107   fOrgan["LeftKidney"] = new G4MIRDLeftKidney();
108   fOrgan["RightKidney"] = new G4MIRDRightKidney();
109   fOrgan["UrinaryBladder"] = new G4MIRDUrinaryBladder();
110   fOrgan["Uterus"] = new G4MIRDUterus(); 
111   fOrgan["Liver"] = new G4MIRDLiver(); 
112   fOrgan["LeftLung"]= new G4MIRDLeftLung();
113   fOrgan["RightLung"] = new G4MIRDRightLung();
114   fOrgan["LeftOvary"] = new G4MIRDLeftOvary();
115   fOrgan["RightOvary"] = new G4MIRDRightOvary();
116   fOrgan["LeftTeste"] = new G4MIRDLeftTeste();
117   fOrgan["RightTeste"] = new G4MIRDRightTeste();
118   fOrgan["RightBreast"] = new G4MIRDRightBreast();
119   fOrgan["LeftBreast"] = new G4MIRDLeftBreast();
120   fOrgan["LeftAdrenal"]= new G4MIRDLeftAdrenal();  
121   fOrgan["RightAdrenal"]= new G4MIRDRightAdrenal(); 
122 }
123 
124 G4MIRDBodyFactory::~G4MIRDBodyFactory()
125 {
126   delete fOrgan["Head"]; fOrgan["Head"]=nullptr;
127   delete fOrgan["RightLeg"]; fOrgan["RightLeg"]=nullptr;
128   delete fOrgan["LeftLeg"]; fOrgan["LeftLeg"]=nullptr;
129   delete fOrgan["Trunk"]; fOrgan["Trunk"]=nullptr;
130   delete fOrgan["RightScapula"];fOrgan["RightScapula"]=nullptr;
131   delete fOrgan["LeftScapula"];fOrgan["LeftScapula"]=nullptr;
132   delete fOrgan["RightLegBone"]; fOrgan["RightLegBone"]=nullptr;
133   delete fOrgan["LeftLegBone"]; fOrgan["LeftLegBone"]=nullptr;
134   delete fOrgan["RibCage"]; fOrgan["RibCage"] =nullptr;  
135   delete fOrgan["MiddleLowerSpine"]; fOrgan["MidlleLowerSpine"]=nullptr;
136   delete fOrgan["UpperSpine"]; fOrgan["UpperSpine"]=nullptr;
137   delete fOrgan["Skull"]; fOrgan["Skull"]=nullptr;
138   delete fOrgan["RightArmBone"]; fOrgan["RightArmBone"]=nullptr;
139   delete fOrgan["LeftArmBone"]; fOrgan["LeftArmBone"]=nullptr;
140   delete fOrgan["RightClavicle"]; fOrgan["RightClavicle"]=nullptr;
141   delete fOrgan["LeftClavicle"]; fOrgan["LeftClavicle"]=nullptr;
142   delete fOrgan["Pelvis"]; fOrgan["Pelvis"]=nullptr;  
143   delete fOrgan["RightAdrenal"]; fOrgan["RightAdrenal"]=nullptr;
144   delete fOrgan["LeftAdrenal"]; fOrgan["LeftAdrenal"]=nullptr;
145   delete fOrgan["LeftBreast"]; fOrgan["LeftBreast"]=nullptr;
146   delete fOrgan["RightBreast"]; fOrgan["RightBreast"]=nullptr;
147   delete fOrgan["RightOvary"]; fOrgan["RightOvary"]=nullptr;
148   delete fOrgan["LeftOvary"]; fOrgan["LeftOvary"]=nullptr;
149   delete fOrgan["RightTeste"]; fOrgan["RightTeste"]=nullptr;
150   delete fOrgan["LeftTeste"]; fOrgan["LeftTeste"]=nullptr;
151   delete fOrgan["RightLung"]; fOrgan["RightLung"] =nullptr;
152   delete fOrgan["LeftLung"]; fOrgan["LeftLung"]=nullptr;
153   delete fOrgan["Uterus"]; fOrgan["Uterus"]=nullptr;
154   delete fOrgan["UrinaryBladder"]; fOrgan["UrinaryBladder"]=nullptr;
155   delete fOrgan["RightKidney"]; fOrgan["RightKidney"]=nullptr;  
156   delete fOrgan["LeftKidney"]; fOrgan["LeftKidney"]=nullptr; 
157   delete fOrgan["Pancreas"]; fOrgan["Pancreas"]=nullptr;  
158   delete fOrgan["Spleen"]; fOrgan["Spleen"]=nullptr; 
159   delete fOrgan["LowerLargeIntestine"]; fOrgan["LowerLargeIntestine"]=nullptr; 
160   delete fOrgan["SmallIntestine"]; fOrgan["SmallIntestine"]=nullptr; 
161   delete fOrgan["UpperLargeIntestine"]; fOrgan["UpperLargeIntestine"]=nullptr; 
162   delete fOrgan["Stomach"]; fOrgan["Stomach"]=nullptr;  
163   delete fOrgan["Brain"]; fOrgan["Brain"]=nullptr;
164   delete fOrgan["Heart"]; fOrgan["Heart"]=nullptr;
165   delete fOrgan["Thymus"]; fOrgan["Thymus"]=nullptr;
166   delete fOrgan["MaleGenitalia"]; fOrgan["MaleGenitalia"]=nullptr;
167   delete fOrgan["Thyroid"]; fOrgan["Thyroid"]=nullptr;
168   delete fOrgan["Liver"]; fOrgan["Liver"]=nullptr;
169 }
170 
171 G4VPhysicalVolume* G4MIRDBodyFactory::CreateOrgan(const G4String& organ_name,G4VPhysicalVolume* motherVolume,
172               const G4String& colourName, G4bool visAttribute,
173               G4bool sensitivity)
174 {
175   return fOrgan[organ_name]->Construct(organ_name,motherVolume,colourName, visAttribute, sensitivity);
176 }
177 
178 
179