[807] | 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 | // Authors: S. Guatelli and M. G. Pia, INFN Genova, Italy |
---|
| 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. |
---|
| 33 | // |
---|
| 34 | #include "G4MIRDBodyFactory.hh" |
---|
| 35 | #include "G4MIRDStomach.hh" |
---|
| 36 | #include "G4MIRDUpperLargeIntestine.hh" |
---|
| 37 | #include "G4MIRDLowerLargeIntestine.hh" |
---|
| 38 | #include "G4MIRDLeftKidney.hh" |
---|
| 39 | #include "G4MIRDRightKidney.hh" |
---|
| 40 | #include "G4MIRDLiver.hh" |
---|
| 41 | #include "G4MIRDPancreas.hh" |
---|
| 42 | #include "G4MIRDSpleen.hh" |
---|
| 43 | #include "G4MIRDUrinaryBladder.hh" |
---|
| 44 | #include "G4MIRDLeftLung.hh" |
---|
| 45 | #include "G4MIRDRightLung.hh" |
---|
| 46 | #include "G4MIRDHeart.hh" |
---|
| 47 | #include "G4MIRDBrain.hh" |
---|
| 48 | #include "G4MIRDHead.hh" |
---|
| 49 | #include "G4MIRDTrunk.hh" |
---|
| 50 | #include "G4MIRDLeftLeg.hh" |
---|
| 51 | #include "G4MIRDRightLeg.hh" |
---|
| 52 | #include "G4MIRDThyroid.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 "G4MIRDLeftArmBone.hh" |
---|
| 63 | #include "G4MIRDRightArmBone.hh" |
---|
| 64 | #include "G4MIRDSkull.hh" |
---|
| 65 | #include "G4MIRDRibCage.hh" |
---|
| 66 | #include "G4MIRDPelvis.hh" |
---|
| 67 | #include "G4MIRDTestes.hh" |
---|
| 68 | #include "G4MIRDLeftScapula.hh" |
---|
| 69 | #include "G4MIRDRightScapula.hh" |
---|
| 70 | #include "G4MIRDLeftAdrenal.hh" |
---|
| 71 | #include "G4MIRDRightAdrenal.hh" |
---|
| 72 | |
---|
| 73 | G4MIRDBodyFactory::G4MIRDBodyFactory() |
---|
| 74 | { |
---|
| 75 | // Map with name of the organ and pointer to the MIRDOrgan class |
---|
| 76 | // organ["ParameterisedRightBreast"] = new G4ParameterisedRightBreast(); |
---|
| 77 | //organ["ParameterisedLeftBreast"] = new G4ParameterisedLeftBreast(); |
---|
| 78 | organ["Head"] = new G4MIRDHead(); |
---|
| 79 | organ["Trunk"] = new G4MIRDTrunk(); |
---|
| 80 | organ["LeftLeg"] = new G4MIRDLeftLeg(); |
---|
| 81 | organ["RightLeg"] = new G4MIRDRightLeg(); |
---|
| 82 | organ["Brain"] = new G4MIRDBrain(); |
---|
| 83 | organ["LeftArmBone"] = new G4MIRDLeftArmBone(); |
---|
| 84 | organ["RightArmBone"] = new G4MIRDRightArmBone(); |
---|
| 85 | organ["Skull"] = new G4MIRDSkull(); |
---|
| 86 | organ["UpperSpine"] = new G4MIRDUpperSpine(); |
---|
| 87 | organ["MiddleLowerSpine"] = new G4MIRDMiddleLowerSpine(); |
---|
| 88 | organ["Pelvis"]= new G4MIRDPelvis(); |
---|
| 89 | organ["Stomach"] = new G4MIRDStomach(); |
---|
| 90 | organ["UpperLargeIntestine"] = new G4MIRDUpperLargeIntestine(); |
---|
| 91 | organ["LowerLargeIntestine"] = new G4MIRDLowerLargeIntestine(); |
---|
| 92 | organ["RibCage"] = new G4MIRDRibCage(); |
---|
| 93 | organ["Spleen"] = new G4MIRDSpleen(); |
---|
| 94 | organ["Pancreas"] = new G4MIRDPancreas(); |
---|
| 95 | organ["LeftKidney"] = new G4MIRDLeftKidney(); |
---|
| 96 | organ["RightKidney"] = new G4MIRDRightKidney(); |
---|
| 97 | organ["UrinaryBladder"] = new G4MIRDUrinaryBladder(); |
---|
| 98 | organ["Uterus"] = new G4MIRDUterus(); |
---|
| 99 | organ["LeftLung"]= new G4MIRDLeftLung(); |
---|
| 100 | organ["RightLung"] = new G4MIRDRightLung(); |
---|
| 101 | organ["LeftOvary"] = new G4MIRDLeftOvary(); |
---|
| 102 | organ["RightOvary"] = new G4MIRDRightOvary(); |
---|
| 103 | organ["LeftLegBone"] = new G4MIRDLeftLegBone(); |
---|
| 104 | organ["RightLegBone"] = new G4MIRDRightLegBone(); |
---|
| 105 | organ["RightBreast"] = new G4MIRDRightBreast(); |
---|
| 106 | organ["LeftBreast"] = new G4MIRDLeftBreast(); |
---|
| 107 | organ["LeftScapula"]= new G4MIRDLeftScapula(); |
---|
| 108 | organ["RightScapula"]= new G4MIRDRightScapula(); |
---|
| 109 | organ["LeftAdrenal"]= new G4MIRDLeftAdrenal(); |
---|
| 110 | organ["RightAdrenal"]= new G4MIRDRightAdrenal(); |
---|
| 111 | } |
---|
| 112 | |
---|
| 113 | G4MIRDBodyFactory::~G4MIRDBodyFactory() |
---|
| 114 | { |
---|
| 115 | delete organ["RightAdrenal"]; organ["RightAdrenal"]=0; |
---|
| 116 | delete organ["LeftAdrenal"]; organ["LeftAdrenal"]=0; |
---|
| 117 | delete organ["RightScapula"];organ["RightScapula"] =0; |
---|
| 118 | delete organ["LeftScapula"];organ["LeftScapula"] =0; |
---|
| 119 | delete organ["LeftBreast"]; organ["LeftBreast"]=0; |
---|
| 120 | delete organ["RightBreast"]; organ["RightBreast"]=0; |
---|
| 121 | delete organ["RightLegBone"]; organ["RightLegBone"]=0; |
---|
| 122 | delete organ["LeftLegBone"]; organ["LeftLegBone"]=0; |
---|
| 123 | delete organ["RightOvary"]; organ["RightOvary"]=0; |
---|
| 124 | delete organ["LeftOvary"]; organ["LeftOvary"]=0; |
---|
| 125 | delete organ["RightLung"]; organ["RightLung"] =0; |
---|
| 126 | delete organ["LeftLung"]; organ["LeftLung"]=0; |
---|
| 127 | delete organ["Uterus"]; organ["Uterus"]=0; |
---|
| 128 | delete organ["UrinaryBladder"]; organ["UrinaryBladder"]=0; |
---|
| 129 | delete organ["RightKidney"]; organ["RightKidney"] =0; |
---|
| 130 | delete organ["LeftKidney"]; organ["LeftKidney"] =0; |
---|
| 131 | delete organ["Pancreas"]; organ["Pancreas"] =0; |
---|
| 132 | delete organ["Spleen"]; organ["Spleen"] =0; |
---|
| 133 | delete organ["RibCage"]; organ["RibCage"] =0; |
---|
| 134 | delete organ["LowerLargeIntestine"]; organ["LowerLargeIntestine"] =0; |
---|
| 135 | delete organ["UpperLargeIntestine"]; organ["UpperLargeIntestine"] =0; |
---|
| 136 | delete organ["Stomach"]; organ["Stomach"] =0; |
---|
| 137 | delete organ["Pelvis"]; organ["Pelvis"] =0; |
---|
| 138 | delete organ["MiddleLowerSpine"]; organ["MidlleLowerSpine"]=0; |
---|
| 139 | delete organ["UpperSpine"]; organ["UpperSpine"]=0; |
---|
| 140 | delete organ["Skull"]; organ["Skull"] =0; |
---|
| 141 | delete organ["RightArmBone"]; organ["RightArmBone"] =0; |
---|
| 142 | delete organ["LeftArmBone"]; organ["LeftArmBone"] =0; |
---|
| 143 | delete organ["Brain"]; organ["Brain"]=0; |
---|
| 144 | delete organ["Head"]; organ["Head"]=0; |
---|
| 145 | delete organ["Trunk"]; organ["Trunk"]=0; |
---|
| 146 | delete organ["RightLeg"]; organ["RightLeg"]=0; |
---|
| 147 | delete organ["LeftLeg"]; organ["LeftLeg"]=0; |
---|
| 148 | } |
---|
| 149 | |
---|
| 150 | |
---|
| 151 | |
---|
| 152 | G4VPhysicalVolume* G4MIRDBodyFactory::CreateOrgan(const G4String& organ_name,G4VPhysicalVolume* motherVolume, |
---|
| 153 | const G4String& colourName, G4bool visAttribute, |
---|
| 154 | G4bool sensitivity) |
---|
| 155 | { |
---|
| 156 | return organ[organ_name] -> Construct(organ_name,motherVolume,colourName, visAttribute, sensitivity); |
---|
| 157 | } |
---|
| 158 | |
---|
| 159 | |
---|