Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-23 09:20:10

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 //
0027 // Previous authors: G. Guerrieri, S. Guatelli and M. G. Pia, INFN Genova, Italy
0028 // Authors (since 2007): S. Guatelli, University of Wollongong, Australia
0029 //
0030 //
0031 #include "G4MIRDBodyFactory.hh"
0032 #include "G4MIRDStomach.hh"
0033 #include "G4MIRDSmallIntestine.hh"
0034 #include "G4MIRDUpperLargeIntestine.hh"
0035 #include "G4MIRDLowerLargeIntestine.hh"
0036 #include "G4MIRDLeftKidney.hh"
0037 #include "G4MIRDRightKidney.hh"
0038 #include "G4MIRDLiver.hh"
0039 #include "G4MIRDPancreas.hh"
0040 #include "G4MIRDSpleen.hh"
0041 #include "G4MIRDUrinaryBladder.hh"
0042 #include "G4MIRDLeftLung.hh"
0043 #include "G4MIRDRightLung.hh"
0044 #include "G4MIRDHeart.hh"
0045 #include "G4MIRDBrain.hh"
0046 #include "G4MIRDHead.hh"
0047 #include "G4MIRDTrunk.hh"
0048 #include "G4MIRDMaleGenitalia.hh"
0049 #include "G4MIRDLeftLeg.hh"
0050 #include "G4MIRDRightLeg.hh"
0051 #include "G4MIRDThyroid.hh"
0052 #include "G4MIRDThymus.hh"
0053 #include "G4MIRDUterus.hh"
0054 #include "G4MIRDLeftBreast.hh"
0055 #include "G4MIRDRightBreast.hh"
0056 #include "G4MIRDRightOvary.hh"
0057 #include "G4MIRDLeftOvary.hh"
0058 #include "G4MIRDUpperSpine.hh"
0059 #include "G4MIRDMiddleLowerSpine.hh"
0060 #include "G4MIRDLeftLegBone.hh"
0061 #include "G4MIRDRightLegBone.hh"
0062 #include "G4MIRDLeftClavicle.hh"
0063 #include "G4MIRDRightClavicle.hh"
0064 #include "G4MIRDLeftArmBone.hh"
0065 #include "G4MIRDRightArmBone.hh"
0066 #include "G4MIRDSkull.hh"
0067 #include "G4MIRDRibCage.hh"
0068 #include "G4MIRDPelvis.hh"
0069 #include "G4MIRDLeftTeste.hh"
0070 #include "G4MIRDRightTeste.hh"
0071 #include "G4MIRDLeftScapula.hh"
0072 #include "G4MIRDRightScapula.hh"
0073 #include "G4MIRDLeftAdrenal.hh"
0074 #include "G4MIRDRightAdrenal.hh"
0075 
0076 G4MIRDBodyFactory::G4MIRDBodyFactory()
0077 {
0078   // Map with name of the fOrgan and pointer to the MIRDOrgan class
0079   fOrgan["Head"] = new G4MIRDHead();
0080   fOrgan["Trunk"] = new G4MIRDTrunk(); 
0081   fOrgan["LeftLeg"] = new G4MIRDLeftLeg();
0082   fOrgan["RightLeg"] = new G4MIRDRightLeg();
0083   fOrgan["Skull"] = new G4MIRDSkull();
0084   fOrgan["LeftArmBone"] = new G4MIRDLeftArmBone();
0085   fOrgan["RightArmBone"] = new G4MIRDRightArmBone();
0086   fOrgan["UpperSpine"] = new G4MIRDUpperSpine();
0087   fOrgan["MiddleLowerSpine"] = new G4MIRDMiddleLowerSpine();
0088   fOrgan["Pelvis"]= new G4MIRDPelvis();
0089   fOrgan["RibCage"] = new G4MIRDRibCage(); 
0090   fOrgan["LeftClavicle"]= new G4MIRDLeftClavicle();
0091   fOrgan["RightClavicle"] = new G4MIRDRightClavicle();
0092   fOrgan["LeftLegBone"] = new G4MIRDLeftLegBone();
0093   fOrgan["RightLegBone"] = new G4MIRDRightLegBone();
0094   fOrgan["LeftScapula"]= new G4MIRDLeftScapula(); 
0095   fOrgan["RightScapula"]= new G4MIRDRightScapula(); 
0096   fOrgan["Heart"] = new G4MIRDHeart();
0097   fOrgan["Thyroid"] = new G4MIRDThyroid(); 
0098   fOrgan["Thymus"] = new G4MIRDThymus(); 
0099   fOrgan["MaleGenitalia"] = new G4MIRDMaleGenitalia(); 
0100   fOrgan["Brain"] = new G4MIRDBrain(); 
0101   fOrgan["Stomach"] = new G4MIRDStomach();
0102   fOrgan["UpperLargeIntestine"] = new G4MIRDUpperLargeIntestine();
0103   fOrgan["LowerLargeIntestine"] = new G4MIRDLowerLargeIntestine();
0104   fOrgan["SmallIntestine"] = new G4MIRDSmallIntestine();
0105   fOrgan["Spleen"] = new G4MIRDSpleen(); 
0106   fOrgan["Pancreas"] = new G4MIRDPancreas();
0107   fOrgan["LeftKidney"] = new G4MIRDLeftKidney();
0108   fOrgan["RightKidney"] = new G4MIRDRightKidney();
0109   fOrgan["UrinaryBladder"] = new G4MIRDUrinaryBladder();
0110   fOrgan["Uterus"] = new G4MIRDUterus(); 
0111   fOrgan["Liver"] = new G4MIRDLiver(); 
0112   fOrgan["LeftLung"]= new G4MIRDLeftLung();
0113   fOrgan["RightLung"] = new G4MIRDRightLung();
0114   fOrgan["LeftOvary"] = new G4MIRDLeftOvary();
0115   fOrgan["RightOvary"] = new G4MIRDRightOvary();
0116   fOrgan["LeftTeste"] = new G4MIRDLeftTeste();
0117   fOrgan["RightTeste"] = new G4MIRDRightTeste();
0118   fOrgan["RightBreast"] = new G4MIRDRightBreast();
0119   fOrgan["LeftBreast"] = new G4MIRDLeftBreast();
0120   fOrgan["LeftAdrenal"]= new G4MIRDLeftAdrenal();  
0121   fOrgan["RightAdrenal"]= new G4MIRDRightAdrenal(); 
0122 }
0123 
0124 G4MIRDBodyFactory::~G4MIRDBodyFactory()
0125 {
0126   delete fOrgan["Head"]; fOrgan["Head"]=nullptr;
0127   delete fOrgan["RightLeg"]; fOrgan["RightLeg"]=nullptr;
0128   delete fOrgan["LeftLeg"]; fOrgan["LeftLeg"]=nullptr;
0129   delete fOrgan["Trunk"]; fOrgan["Trunk"]=nullptr;
0130   delete fOrgan["RightScapula"];fOrgan["RightScapula"]=nullptr;
0131   delete fOrgan["LeftScapula"];fOrgan["LeftScapula"]=nullptr;
0132   delete fOrgan["RightLegBone"]; fOrgan["RightLegBone"]=nullptr;
0133   delete fOrgan["LeftLegBone"]; fOrgan["LeftLegBone"]=nullptr;
0134   delete fOrgan["RibCage"]; fOrgan["RibCage"] =nullptr;  
0135   delete fOrgan["MiddleLowerSpine"]; fOrgan["MidlleLowerSpine"]=nullptr;
0136   delete fOrgan["UpperSpine"]; fOrgan["UpperSpine"]=nullptr;
0137   delete fOrgan["Skull"]; fOrgan["Skull"]=nullptr;
0138   delete fOrgan["RightArmBone"]; fOrgan["RightArmBone"]=nullptr;
0139   delete fOrgan["LeftArmBone"]; fOrgan["LeftArmBone"]=nullptr;
0140   delete fOrgan["RightClavicle"]; fOrgan["RightClavicle"]=nullptr;
0141   delete fOrgan["LeftClavicle"]; fOrgan["LeftClavicle"]=nullptr;
0142   delete fOrgan["Pelvis"]; fOrgan["Pelvis"]=nullptr;  
0143   delete fOrgan["RightAdrenal"]; fOrgan["RightAdrenal"]=nullptr;
0144   delete fOrgan["LeftAdrenal"]; fOrgan["LeftAdrenal"]=nullptr;
0145   delete fOrgan["LeftBreast"]; fOrgan["LeftBreast"]=nullptr;
0146   delete fOrgan["RightBreast"]; fOrgan["RightBreast"]=nullptr;
0147   delete fOrgan["RightOvary"]; fOrgan["RightOvary"]=nullptr;
0148   delete fOrgan["LeftOvary"]; fOrgan["LeftOvary"]=nullptr;
0149   delete fOrgan["RightTeste"]; fOrgan["RightTeste"]=nullptr;
0150   delete fOrgan["LeftTeste"]; fOrgan["LeftTeste"]=nullptr;
0151   delete fOrgan["RightLung"]; fOrgan["RightLung"] =nullptr;
0152   delete fOrgan["LeftLung"]; fOrgan["LeftLung"]=nullptr;
0153   delete fOrgan["Uterus"]; fOrgan["Uterus"]=nullptr;
0154   delete fOrgan["UrinaryBladder"]; fOrgan["UrinaryBladder"]=nullptr;
0155   delete fOrgan["RightKidney"]; fOrgan["RightKidney"]=nullptr;  
0156   delete fOrgan["LeftKidney"]; fOrgan["LeftKidney"]=nullptr; 
0157   delete fOrgan["Pancreas"]; fOrgan["Pancreas"]=nullptr;  
0158   delete fOrgan["Spleen"]; fOrgan["Spleen"]=nullptr; 
0159   delete fOrgan["LowerLargeIntestine"]; fOrgan["LowerLargeIntestine"]=nullptr; 
0160   delete fOrgan["SmallIntestine"]; fOrgan["SmallIntestine"]=nullptr; 
0161   delete fOrgan["UpperLargeIntestine"]; fOrgan["UpperLargeIntestine"]=nullptr; 
0162   delete fOrgan["Stomach"]; fOrgan["Stomach"]=nullptr;  
0163   delete fOrgan["Brain"]; fOrgan["Brain"]=nullptr;
0164   delete fOrgan["Heart"]; fOrgan["Heart"]=nullptr;
0165   delete fOrgan["Thymus"]; fOrgan["Thymus"]=nullptr;
0166   delete fOrgan["MaleGenitalia"]; fOrgan["MaleGenitalia"]=nullptr;
0167   delete fOrgan["Thyroid"]; fOrgan["Thyroid"]=nullptr;
0168   delete fOrgan["Liver"]; fOrgan["Liver"]=nullptr;
0169 }
0170 
0171 G4VPhysicalVolume* G4MIRDBodyFactory::CreateOrgan(const G4String& organ_name,G4VPhysicalVolume* motherVolume,
0172                           const G4String& colourName, G4bool visAttribute,
0173                           G4bool sensitivity)
0174 {
0175   return fOrgan[organ_name]->Construct(organ_name,motherVolume,colourName, visAttribute, sensitivity);
0176 }
0177 
0178