add: human phantom

This commit is contained in:
liuyihui 2022-05-17 19:36:50 +08:00
parent 93bcbabded
commit e1e512fa18
116 changed files with 6043 additions and 121 deletions

View File

@ -1,5 +1,3 @@
{
"cmake.configureSettings": {
"CMAKE_TOOLCHAIN_FILE": "D:/Microsoft/vcpkg/scripts/buildsystems/vcpkg.cmake"
}
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools"
}

View File

@ -6,112 +6,7 @@
],
"settings": {
"files.associations": {
"*.icc": "cpp",
"algorithm": "cpp",
"array": "cpp",
"atomic": "cpp",
"bit": "cpp",
"cctype": "cpp",
"cfenv": "cpp",
"charconv": "cpp",
"chrono": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"compare": "cpp",
"complex": "cpp",
"concepts": "cpp",
"condition_variable": "cpp",
"csetjmp": "cpp",
"csignal": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"deque": "cpp",
"exception": "cpp",
"format": "cpp",
"forward_list": "cpp",
"fstream": "cpp",
"functional": "cpp",
"future": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"ios": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"iterator": "cpp",
"limits": "cpp",
"list": "cpp",
"locale": "cpp",
"map": "cpp",
"memory": "cpp",
"mutex": "cpp",
"new": "cpp",
"numeric": "cpp",
"optional": "cpp",
"ostream": "cpp",
"queue": "cpp",
"ratio": "cpp",
"regex": "cpp",
"set": "cpp",
"sstream": "cpp",
"stack": "cpp",
"stdexcept": "cpp",
"stop_token": "cpp",
"streambuf": "cpp",
"string": "cpp",
"system_error": "cpp",
"thread": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"typeinfo": "cpp",
"unordered_map": "cpp",
"utility": "cpp",
"vector": "cpp",
"xfacet": "cpp",
"xhash": "cpp",
"xiosbase": "cpp",
"xlocale": "cpp",
"xlocbuf": "cpp",
"xlocinfo": "cpp",
"xlocmes": "cpp",
"xlocmon": "cpp",
"xlocnum": "cpp",
"xloctime": "cpp",
"xmemory": "cpp",
"xstddef": "cpp",
"xstring": "cpp",
"xtr1common": "cpp",
"xtree": "cpp",
"xutility": "cpp",
"bbox_action": "cpp",
"aida_ntuple": "cpp",
"ntuple_binding": "cpp",
"ntuple_booking": "cpp",
"raxml_out": "cpp",
"rcsv_ntuple": "cpp",
"base_leaf": "cpp",
"branch": "cpp",
"info": "cpp",
"iros": "cpp",
"ntuple": "cpp",
"tree": "cpp",
"field_desc": "cpp",
"wcsv_ntuple": "cpp",
"bufobj": "cpp",
"aidas": "cpp",
"element": "cpp",
"colorf": "cpp",
"cid": "cpp",
"mem": "cpp",
"sout": "cpp",
"typedefs": "cpp",
"senum": "cpp"
"*.icc": "cpp"
}
}
}

View File

@ -4,9 +4,9 @@
#include "G4VUserDetectorConstruction.hh"
#include "globals.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4HumanPhantomMaterial;
class DetectorConstruction : public G4VUserDetectorConstruction {
public:
@ -14,6 +14,20 @@ public:
~DetectorConstruction() override;
G4VPhysicalVolume* Construct() override;
private:
void ConstructSectionSphere(G4LogicalVolume* fMotherLogical, G4double zBias);
void ConstructSectionCons(G4String name, G4LogicalVolume* fMotherLogical, G4double zBias, G4double pRmax1,
G4double pRmin1, G4double pRmax2, G4double pRmin2, G4double hz);
void ConstructSectionSmall(G4LogicalVolume* fMotherLogical, G4double zBias);
void ConstructSectionBig(G4LogicalVolume* fMotherLogical, G4double zBias);
void ConstructHumanPhantom(G4VPhysicalVolume* fMotherPhysics);
private:
G4HumanPhantomMaterial* material;
G4String model;
G4String sex;
std::map<std::string, G4bool> sensitivities;
};
#endif

View File

@ -0,0 +1,66 @@
#ifndef G4BasePhantomBuilder_h
#define G4BasePhantomBuilder_h 1
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4BasePhantomBuilder {
public:
G4BasePhantomBuilder();
virtual ~G4BasePhantomBuilder();
virtual void BuildHead(const G4String&, G4bool, G4bool) { return; };
virtual void BuildTrunk(const G4String&, G4bool, G4bool) { return; };
virtual void BuildLeftLeg(const G4String&, G4bool, G4bool) { return; };
virtual void BuildRightLeg(const G4String&, G4bool, G4bool) { return; };
virtual void BuildUpperSpine(const G4String&, G4bool, G4bool) { return; }
virtual void BuildMiddleLowerSpine(const G4String&, G4bool, G4bool) { return; };
virtual void BuildLeftLegBone(const G4String&, G4bool, G4bool) { return; };
virtual void BuildRightLegBone(const G4String&, G4bool, G4bool) { return; };
virtual void BuildLeftArmBone(const G4String&, G4bool, G4bool) { return; }
virtual void BuildRightArmBone(const G4String&, G4bool, G4bool) { return; }
virtual void BuildSkull(const G4String&, G4bool, G4bool) { return; };
virtual void BuildRibCage(const G4String&, G4bool, G4bool) { return; };
virtual void BuildPelvis(const G4String&, G4bool, G4bool) { return; };
virtual void BuildLeftScapula(const G4String&, G4bool, G4bool) { return; };
virtual void BuildRightScapula(const G4String&, G4bool, G4bool) { return; };
virtual void BuildLeftClavicle(const G4String&, G4bool, G4bool) { return; };
virtual void BuildRightClavicle(const G4String&, G4bool, G4bool) { return; };
virtual void BuildBrain(const G4String&, G4bool, G4bool) { return; };
virtual void BuildHeart(const G4String&, G4bool, G4bool) { return; };
virtual void BuildLeftLung(const G4String&, G4bool, G4bool) { return; };
virtual void BuildRightLung(const G4String&, G4bool, G4bool) { return; };
virtual void BuildStomach(const G4String&, G4bool, G4bool) { return; };
virtual void BuildSmallIntestine(const G4String&, G4bool, G4bool) { return; };
virtual void BuildUpperLargeIntestine(const G4String&, G4bool, G4bool) { return; };
virtual void BuildLowerLargeIntestine(const G4String&, G4bool, G4bool) { return; };
virtual void BuildLeftKidney(const G4String&, G4bool, G4bool) { return; };
virtual void BuildRightKidney(const G4String&, G4bool, G4bool) { return; };
virtual void BuildLeftAdrenal(const G4String&, G4bool, G4bool) { return; };
virtual void BuildRightAdrenal(const G4String&, G4bool, G4bool) { return; };
virtual void BuildLiver(const G4String&, G4bool, G4bool) { return; };
virtual void BuildPancreas(const G4String&, G4bool, G4bool) { return; };
virtual void BuildSpleen(const G4String&, G4bool, G4bool) { return; };
virtual void BuildUrinaryBladder(const G4String&, G4bool, G4bool) { return; };
virtual void BuildThyroid(const G4String&, G4bool, G4bool) { return; };
virtual void BuildThymus(const G4String&, G4bool, G4bool) { return; };
virtual void BuildLeftOvary(const G4String&, G4bool, G4bool) { return; };
virtual void BuildRightOvary(const G4String&, G4bool, G4bool) { return; };
virtual void BuildUterus(const G4String&, G4bool, G4bool) { return; };
virtual void BuildLeftBreast(const G4String&, G4bool, G4bool) { return; };
virtual void BuildRightBreast(const G4String&, G4bool, G4bool) { return; };
virtual void BuildVoxelLeftBreast(const G4String&, G4bool, G4bool) { return; };
virtual void BuildVoxelRightBreast(const G4String&, G4bool, G4bool) { return; };
virtual void BuildMaleGenitalia(const G4String&, G4bool, G4bool) { return; };
virtual void BuildLeftTeste(const G4String&, G4bool, G4bool) { return; };
virtual void BuildRightTeste(const G4String&, G4bool, G4bool) { return; };
virtual void SetModel(G4String) { return; };
virtual void SetMotherVolume(G4VPhysicalVolume*) { return; };
virtual G4VPhysicalVolume* GetPhantom() { return 0; };
};
#endif

View File

@ -0,0 +1,17 @@
#ifndef G4CustomFemaleBuilder_h
#define G4CustomFemaleBuilder_h 1
#include "G4PhantomBuilder.h"
class G4CustomFemaleBuilder : public G4PhantomBuilder {
public:
G4CustomFemaleBuilder();
~G4CustomFemaleBuilder();
void BuildVoxelLeftBreast(const G4String&, G4bool, G4bool);
void BuildVoxelRightBreast(const G4String&, G4bool, G4bool);
void BuildLeftOvary(const G4String&, G4bool, G4bool);
void BuildRightOvary(const G4String&, G4bool, G4bool);
void BuildUterus(const G4String&, G4bool, G4bool);
};
#endif

17
include/G4FemaleBuilder.h Normal file
View File

@ -0,0 +1,17 @@
#ifndef G4FemaleBuilder_h
#define G4FemaleBuilder_h 1
#include "G4PhantomBuilder.h"
class G4FemaleBuilder : public G4PhantomBuilder {
public:
G4FemaleBuilder();
~G4FemaleBuilder();
void BuildLeftBreast(const G4String&, G4bool, G4bool);
void BuildRightBreast(const G4String&, G4bool, G4bool);
void BuildLeftOvary(const G4String&, G4bool, G4bool);
void BuildRightOvary(const G4String&, G4bool, G4bool);
void BuildUterus(const G4String&, G4bool, G4bool);
};
#endif

View File

@ -0,0 +1,31 @@
#ifndef G4HumanPhantomColour_H
#define G4HumanPhantomColour_H 1
#include "G4Colour.hh"
#include "globals.hh"
class G4Colour;
class G4HumanPhantomColour {
public:
G4HumanPhantomColour();
~G4HumanPhantomColour();
public:
// void DefineColour();
G4Colour GetColour(const G4String&); // returns the colour
private:
G4Colour white;
G4Colour pink;
G4Colour grey;
G4Colour yellow;
G4Colour blue;
G4Colour lightBlue;
G4Colour green;
G4Colour brown;
G4Colour purple;
G4Colour red;
G4Colour orange;
G4Colour black;
};
#endif

View File

@ -0,0 +1,34 @@
#ifndef G4HumanPhantomMaterial_H
#define G4HumanPhantomMaterial_H 1
#include "globals.hh"
class G4Material;
class G4HumanPhantomMaterial {
public:
G4HumanPhantomMaterial();
~G4HumanPhantomMaterial();
public:
void DefineMaterials();
G4Material* GetMaterial(G4String); // returns the material
private:
// G4Material* matW;
// G4Material* matplexiglass;
// G4Material* matPb;
// G4Material* matir192;
// G4Material* Titanium;
// G4Material* matAir;
G4Material* matH2O;
G4Material* soft;
G4Material* skeleton;
G4Material* lung;
G4Material* adipose;
G4Material* glandular;
G4Material* adipose_glandular;
// G4Material*Vacuum;
// G4Material* muscle;
};
#endif

View File

@ -0,0 +1,22 @@
#ifndef G4MIRDBodyFactory_h
#define G4MIRDBodyFactory_h 1
#include "G4VBodyFactory.h"
#include "G4VOrgan.h"
#include <map>
class G4VBodyFactory;
class G4VPhysicalVolume;
class G4VOrgan;
class G4MIRDBodyFactory : public G4VBodyFactory {
public:
G4MIRDBodyFactory();
~G4MIRDBodyFactory();
G4VPhysicalVolume* CreateOrgan(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
std::map<std::string, G4VOrgan*> organ;
};
#endif

19
include/G4MIRDBrain.h Normal file
View File

@ -0,0 +1,19 @@
#ifndef G4MIRDBrain_h
#define G4MIRDBrain_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDBrain : public G4VOrgan {
public:
G4MIRDBrain();
~G4MIRDBrain();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

18
include/G4MIRDHead.h Normal file
View File

@ -0,0 +1,18 @@
#ifndef G4MIRDHead_h
#define G4MIRDHead_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class MarsMaterial;
class G4MIRDHead : public G4VOrgan {
public:
G4MIRDHead();
~G4MIRDHead();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
};
#endif

18
include/G4MIRDHeart.h Normal file
View File

@ -0,0 +1,18 @@
#ifndef G4MIRDHeart_h
#define G4MIRDHeart_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class MarsMaterial;
class G4MIRDHeart : public G4VOrgan {
public:
G4MIRDHeart();
~G4MIRDHeart();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
};
#endif

View File

@ -0,0 +1,19 @@
#ifndef G4MIRDLeftAdrenal_h
#define G4MIRDLeftAdrenal_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDLeftAdrenal : public G4VOrgan {
public:
G4MIRDLeftAdrenal();
~G4MIRDLeftAdrenal();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

View File

@ -0,0 +1,22 @@
#ifndef G4MIRDLeftArmBone_h
#define G4MIRDLeftArmBone_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDLeftArmBone : public G4VOrgan {
public:
G4MIRDLeftArmBone();
~G4MIRDLeftArmBone();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
// SAXProcessor sxp;
// ProcessingConfigurator config;
};
#endif

View File

@ -0,0 +1,19 @@
#ifndef G4MIRDLeftBreast_h
#define G4MIRDLeftBreast_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDLeftBreast : public G4VOrgan {
public:
G4MIRDLeftBreast();
~G4MIRDLeftBreast();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

View File

@ -0,0 +1,18 @@
#ifndef G4MIRDLeftClavicle_h
#define G4MIRDLeftClavicle_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDLeftClavicle : public G4VOrgan {
public:
G4MIRDLeftClavicle();
~G4MIRDLeftClavicle();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

View File

@ -0,0 +1,17 @@
#ifndef G4MIRDLeftKidney_h
#define G4MIRDLeftKidney_h 1
#include "G4VOrgan.h"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDLeftKidney : public G4VOrgan {
public:
G4MIRDLeftKidney();
~G4MIRDLeftKidney();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

18
include/G4MIRDLeftLeg.h Normal file
View File

@ -0,0 +1,18 @@
#ifndef G4MIRDLeftLeg_h
#define G4MIRDLeftLeg_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDLeftLeg : public G4VOrgan {
public:
G4MIRDLeftLeg();
~G4MIRDLeftLeg();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

View File

@ -0,0 +1,18 @@
#ifndef G4MIRDLeftLegBone_h
#define G4MIRDLeftLegBone_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDLeftLegBone : public G4VOrgan {
public:
G4MIRDLeftLegBone();
~G4MIRDLeftLegBone();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

19
include/G4MIRDLeftLung.h Normal file
View File

@ -0,0 +1,19 @@
#ifndef G4MIRDLeftLung_h
#define G4MIRDLeftLung_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDLeftLung : public G4VOrgan {
public:
G4MIRDLeftLung();
~G4MIRDLeftLung();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

18
include/G4MIRDLeftOvary.h Normal file
View File

@ -0,0 +1,18 @@
#ifndef G4MIRDLeftOvary_h
#define G4MIRDLeftOvary_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4MIRDLeftOvary : public G4VOrgan {
public:
G4MIRDLeftOvary();
~G4MIRDLeftOvary();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

View File

@ -0,0 +1,18 @@
#ifndef G4MIRDLeftScapula_h
#define G4MIRDLeftScapula_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDLeftScapula : public G4VOrgan {
public:
G4MIRDLeftScapula();
~G4MIRDLeftScapula();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

18
include/G4MIRDLeftTeste.h Normal file
View File

@ -0,0 +1,18 @@
#ifndef G4MIRDLeftTeste_h
#define G4MIRDLeftTeste_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4MIRDLeftTeste : public G4VOrgan {
public:
G4MIRDLeftTeste();
~G4MIRDLeftTeste();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

17
include/G4MIRDLiver.h Normal file
View File

@ -0,0 +1,17 @@
#ifndef G4MIRDLiver_h
#define G4MIRDLiver_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4MIRDLiver : public G4VOrgan {
public:
G4MIRDLiver();
~G4MIRDLiver();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

View File

@ -0,0 +1,18 @@
#ifndef G4MIRDLowerLargeIntestine_h
#define G4MIRDLowerLargeIntestine_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDLowerLargeIntestine : public G4VOrgan {
public:
G4MIRDLowerLargeIntestine();
~G4MIRDLowerLargeIntestine();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

View File

@ -0,0 +1,18 @@
#ifndef G4MIRDMaleGenitalia_h
#define G4MIRDMaleGenitalia_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4MIRDMaleGenitalia : public G4VOrgan {
public:
G4MIRDMaleGenitalia();
~G4MIRDMaleGenitalia();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

View File

@ -0,0 +1,19 @@
#ifndef G4MIRDMiddleLowerSpine_h
#define G4MIRDMiddleLowerSpine_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDMiddleLowerSpine : public G4VOrgan {
public:
G4MIRDMiddleLowerSpine();
~G4MIRDMiddleLowerSpine();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

19
include/G4MIRDPancreas.h Normal file
View File

@ -0,0 +1,19 @@
#ifndef G4MIRDPancreas_h
#define G4MIRDPancreas_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDPancreas : public G4VOrgan {
public:
G4MIRDPancreas();
~G4MIRDPancreas();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

18
include/G4MIRDPelvis.h Normal file
View File

@ -0,0 +1,18 @@
#ifndef G4MIRDPelvis_h
#define G4MIRDPelvis_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDPelvis : public G4VOrgan {
public:
G4MIRDPelvis();
~G4MIRDPelvis();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

31
include/G4MIRDRibCage.h Normal file
View File

@ -0,0 +1,31 @@
#ifndef G4MIRDRibCage_h
#define G4MIRDRibCage_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDRibCage : public G4VOrgan {
public:
G4MIRDRibCage();
~G4MIRDRibCage();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
G4VPhysicalVolume* physRib1;
G4VPhysicalVolume* physRib2;
G4VPhysicalVolume* physRib3;
G4VPhysicalVolume* physRib4;
G4VPhysicalVolume* physRib5;
G4VPhysicalVolume* physRib6;
G4VPhysicalVolume* physRib7;
G4VPhysicalVolume* physRib8;
G4VPhysicalVolume* physRib9;
G4VPhysicalVolume* physRib10;
G4VPhysicalVolume* physRib11;
G4VPhysicalVolume* physRib12;
};
#endif

View File

@ -0,0 +1,18 @@
#ifndef G4MIRDRightAdrenal_h
#define G4MIRDRightAdrenal_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDRightAdrenal : public G4VOrgan {
public:
G4MIRDRightAdrenal();
~G4MIRDRightAdrenal();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

View File

@ -0,0 +1,21 @@
#ifndef G4MIRDRightArmBone_h
#define G4MIRDRightArmBone_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDRightArmBone : public G4VOrgan {
public:
G4MIRDRightArmBone();
~G4MIRDRightArmBone();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
// SAXProcessor sxp;
// ProcessingConfigurator config;
};
#endif

View File

@ -0,0 +1,19 @@
#ifndef G4MIRDRightBreast_h
#define G4MIRDRightBreast_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDRightBreast : public G4VOrgan {
public:
G4MIRDRightBreast();
~G4MIRDRightBreast();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

View File

@ -0,0 +1,18 @@
#ifndef G4MIRDRightClavicle_h
#define G4MIRDRightClavicle_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDRightClavicle : public G4VOrgan {
public:
G4MIRDRightClavicle();
~G4MIRDRightClavicle();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

View File

@ -0,0 +1,18 @@
#ifndef G4MIRDRightKidney_h
#define G4MIRDRightKidney_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDRightKidney : public G4VOrgan {
public:
G4MIRDRightKidney();
~G4MIRDRightKidney();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

18
include/G4MIRDRightLeg.h Normal file
View File

@ -0,0 +1,18 @@
#ifndef G4MIRDRightLeg_h
#define G4MIRDRightLeg_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDRightLeg : public G4VOrgan {
public:
G4MIRDRightLeg();
~G4MIRDRightLeg();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

View File

@ -0,0 +1,18 @@
#ifndef G4MIRDRightLegBone_h
#define G4MIRDRightLegBone_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDRightLegBone : public G4VOrgan {
public:
G4MIRDRightLegBone();
~G4MIRDRightLegBone();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

19
include/G4MIRDRightLung.h Normal file
View File

@ -0,0 +1,19 @@
#ifndef G4MIRDRightLung_h
#define G4MIRDRightLung_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDRightLung : public G4VOrgan {
public:
G4MIRDRightLung();
~G4MIRDRightLung();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

View File

@ -0,0 +1,19 @@
#ifndef G4MIRDRightOvary_h
#define G4MIRDRightOvary_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDRightOvary : public G4VOrgan {
public:
G4MIRDRightOvary();
~G4MIRDRightOvary();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

View File

@ -0,0 +1,18 @@
#ifndef G4MIRDRightScapula_h
#define G4MIRDRightScapula_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDRightScapula : public G4VOrgan {
public:
G4MIRDRightScapula();
~G4MIRDRightScapula();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

View File

@ -0,0 +1,19 @@
#ifndef G4MIRDRightTeste_h
#define G4MIRDRightTeste_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDRightTeste : public G4VOrgan {
public:
G4MIRDRightTeste();
~G4MIRDRightTeste();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

19
include/G4MIRDSkull.h Normal file
View File

@ -0,0 +1,19 @@
#ifndef G4MIRDSkull_h
#define G4MIRDSkull_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDSkull : public G4VOrgan {
public:
G4MIRDSkull();
~G4MIRDSkull();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

View File

@ -0,0 +1,18 @@
#ifndef G4MIRDSmallIntestine_h
#define G4MIRDSmallIntestine_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDSmallIntestine : public G4VOrgan {
public:
G4MIRDSmallIntestine();
~G4MIRDSmallIntestine();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

19
include/G4MIRDSpleen.h Normal file
View File

@ -0,0 +1,19 @@
#ifndef G4MIRDSpleen_h
#define G4MIRDSpleen_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDSpleen : public G4VOrgan {
public:
G4MIRDSpleen();
~G4MIRDSpleen();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

19
include/G4MIRDStomach.h Normal file
View File

@ -0,0 +1,19 @@
#ifndef G4MIRDStomach_h
#define G4MIRDStomach_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDStomach : public G4VOrgan {
public:
G4MIRDStomach();
~G4MIRDStomach();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

19
include/G4MIRDThymus.h Normal file
View File

@ -0,0 +1,19 @@
#ifndef G4MIRDThymus_h
#define G4MIRDThymus_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDThymus : public G4VOrgan {
public:
G4MIRDThymus();
~G4MIRDThymus();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

18
include/G4MIRDThyroid.h Normal file
View File

@ -0,0 +1,18 @@
#ifndef G4MIRDThyroid_h
#define G4MIRDThyroid_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDThyroid : public G4VOrgan {
public:
G4MIRDThyroid();
~G4MIRDThyroid();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

19
include/G4MIRDTrunk.h Normal file
View File

@ -0,0 +1,19 @@
#ifndef G4MIRDTrunk_h
#define G4MIRDTrunk_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDTrunk : public G4VOrgan {
public:
G4MIRDTrunk();
~G4MIRDTrunk();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

View File

@ -0,0 +1,18 @@
#ifndef G4MIRDUpperLargeIntestine_h
#define G4MIRDUpperLargeIntestine_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDUpperLargeIntestine : public G4VOrgan {
public:
G4MIRDUpperLargeIntestine();
~G4MIRDUpperLargeIntestine();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

View File

@ -0,0 +1,19 @@
#ifndef G4MIRDUpperSpine_h
#define G4MIRDUpperSpine_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDUpperSpine : public G4VOrgan {
public:
G4MIRDUpperSpine();
~G4MIRDUpperSpine();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

View File

@ -0,0 +1,19 @@
#ifndef G4MIRDUrinaryBladder_h
#define G4MIRDUrinaryBladder_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDUrinaryBladder : public G4VOrgan {
public:
G4MIRDUrinaryBladder();
~G4MIRDUrinaryBladder();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

19
include/G4MIRDUterus.h Normal file
View File

@ -0,0 +1,19 @@
#ifndef G4MIRDUterus_h
#define G4MIRDUterus_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4MIRDUterus : public G4VOrgan {
public:
G4MIRDUterus();
~G4MIRDUterus();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
};
#endif

17
include/G4MaleBuilder.h Normal file
View File

@ -0,0 +1,17 @@
#ifndef G4MaleBuilder_h
#define G4MaleBuilder_h 1
#include "G4PhantomBuilder.h"
class G4PhantomBuilder;
class G4MaleBuilder : public G4PhantomBuilder {
public:
G4MaleBuilder();
~G4MaleBuilder();
void BuildMaleGenitalia(const G4String& colourName, G4bool solidVis, G4bool sensitivity);
void BuildLeftTeste(const G4String& colourName, G4bool solidVis, G4bool sensitivity);
void BuildRightTeste(const G4String& colourName, G4bool solidVis, G4bool sensitivity);
// void SetModel(G4String);
};
#endif

View File

@ -0,0 +1,77 @@
#ifndef G4PhantomBuilder_h
#define G4PhantomBuilder_h 1
#include "G4BasePhantomBuilder.h"
#include "G4VPhysicalVolume.hh"
#include "globals.hh"
class G4BasePhantomBuilder;
class G4VPhysicalVolume;
class G4VBodyFactory;
class G4PhantomBuilder : public G4BasePhantomBuilder {
public:
G4PhantomBuilder();
~G4PhantomBuilder();
void BuildHead(const G4String&, G4bool, G4bool);
void BuildTrunk(const G4String&, G4bool, G4bool);
void BuildLeftLeg(const G4String&, G4bool, G4bool);
void BuildRightLeg(const G4String&, G4bool, G4bool);
void BuildUpperSpine(const G4String&, G4bool, G4bool);
void BuildMiddleLowerSpine(const G4String&, G4bool, G4bool);
void BuildLeftLegBone(const G4String&, G4bool, G4bool);
void BuildRightLegBone(const G4String&, G4bool, G4bool);
void BuildLeftArmBone(const G4String&, G4bool, G4bool);
void BuildRightArmBone(const G4String&, G4bool, G4bool);
void BuildSkull(const G4String&, G4bool, G4bool);
void BuildRibCage(const G4String&, G4bool, G4bool);
void BuildPelvis(const G4String&, G4bool, G4bool);
void BuildLeftScapula(const G4String&, G4bool, G4bool);
void BuildRightScapula(const G4String&, G4bool, G4bool);
void BuildLeftAdrenal(const G4String&, G4bool, G4bool);
void BuildRightAdrenal(const G4String&, G4bool, G4bool);
void BuildLeftClavicle(const G4String&, G4bool, G4bool);
void BuildRightClavicle(const G4String&, G4bool, G4bool);
void BuildBrain(const G4String&, G4bool, G4bool);
void BuildHeart(const G4String&, G4bool, G4bool);
void BuildLeftLung(const G4String&, G4bool, G4bool);
void BuildRightLung(const G4String&, G4bool, G4bool);
void BuildStomach(const G4String&, G4bool, G4bool);
void BuildSmallIntestine(const G4String&, G4bool, G4bool);
void BuildUpperLargeIntestine(const G4String&, G4bool, G4bool);
void BuildLowerLargeIntestine(const G4String&, G4bool, G4bool);
void BuildLeftKidney(const G4String&, G4bool, G4bool);
void BuildRightKidney(const G4String&, G4bool, G4bool);
void BuildLiver(const G4String&, G4bool, G4bool);
void BuildPancreas(const G4String&, G4bool, G4bool);
void BuildSpleen(const G4String&, G4bool, G4bool);
void BuildUrinaryBladder(const G4String&, G4bool, G4bool);
void BuildThyroid(const G4String&, G4bool, G4bool);
void BuildThymus(const G4String&, G4bool, G4bool);
void SetModel(G4String);
void SetMotherVolume(G4VPhysicalVolume*);
G4VPhysicalVolume* GetPhantom();
protected:
G4VBodyFactory* body;
G4String model;
G4VPhysicalVolume* motherVolume;
G4VPhysicalVolume* headVolume;
G4VPhysicalVolume* trunkVolume;
G4VPhysicalVolume* leftLegVolume;
G4VPhysicalVolume* rightLegVolume;
G4VPhysicalVolume* maleGenitaliaVolume;
};
#endif

13
include/G4VBodyFactory.h Normal file
View File

@ -0,0 +1,13 @@
#ifndef G4VBodyFactory_h
#define G4VBodyFactory_h 1
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4VBodyFactory {
public:
G4VBodyFactory();
virtual ~G4VBodyFactory();
virtual G4VPhysicalVolume* CreateOrgan(const G4String& idFile, G4VPhysicalVolume* motherVolume,
const G4String& colour, G4bool solidFrame, G4bool sensitivity) = 0;
};
#endif

16
include/G4VOrgan.h Normal file
View File

@ -0,0 +1,16 @@
#ifndef G4VOrgan_h
#define G4VOrgan_h 1
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4VOrgan {
public:
G4VOrgan();
virtual ~G4VOrgan();
virtual G4VPhysicalVolume* Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool sensitivity) = 0;
};
#endif

View File

@ -0,0 +1,21 @@
#ifndef G4VoxelBreastFactory_h
#define G4VoxelBreastFactory_h 1
#include "G4VBodyFactory.h"
#include "G4VOrgan.h"
#include <map>
class G4VBodyFactory;
class G4VPhysicalVolume;
class G4VOrgan;
class G4VoxelBreastFactory : public G4VBodyFactory {
public:
G4VoxelBreastFactory();
~G4VoxelBreastFactory();
G4VPhysicalVolume* CreateOrgan(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
private:
std::map<std::string, G4VOrgan*> organ;
};
#endif

View File

@ -0,0 +1,16 @@
#ifndef G4VoxelLeftBreast_h
#define G4VoxelLeftBreast_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4VoxelLeftBreast : public G4VOrgan {
public:
G4VoxelLeftBreast();
~G4VoxelLeftBreast();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
};
#endif

View File

@ -0,0 +1,16 @@
#ifndef G4VoxelRightBreast_h
#define G4VoxelRightBreast_h 1
#include "G4VOrgan.h"
#include "G4VPhysicalVolume.hh"
class G4VPhysicalVolume;
class G4VoxelRightBreast : public G4VOrgan {
public:
G4VoxelRightBreast();
~G4VoxelRightBreast();
G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&, G4bool, G4bool);
};
#endif

View File

@ -1,4 +1,9 @@
#include "DetectorConstruction.h"
#include "G4BasePhantomBuilder.h"
#include "G4CustomFemaleBuilder.h"
#include "G4FemaleBuilder.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MaleBuilder.h"
#include "Material.h"
#include "G4Box.hh"
@ -13,11 +18,11 @@
#include "G4Tubs.hh"
#include "G4UnionSolid.hh"
DetectorConstruction::DetectorConstruction() {}
DetectorConstruction::DetectorConstruction() { material = new G4HumanPhantomMaterial(); }
DetectorConstruction::~DetectorConstruction() {}
DetectorConstruction::~DetectorConstruction() { delete material; }
static void ConstructSectionSphere(G4LogicalVolume* fMotherLogical, G4double zBias) {
void DetectorConstruction::ConstructSectionSphere(G4LogicalVolume* fMotherLogical, G4double zBias) {
G4double pRadius = 2.8 * m / 2;
G4double pRadius2 = 1.2 * m;
G4double pRadiusMid = pRadius - 10 * cm;
@ -60,8 +65,9 @@ static void ConstructSectionSphere(G4LogicalVolume* fMotherLogical, G4double zBi
new G4PVPlacement(0, pos0, logicAir, "NodeAir", logicWorld, false, 0, true);
}
static void ConstructSectionCons(G4String name, G4LogicalVolume* fMotherLogical, G4double zBias, G4double pRmax1,
G4double pRmin1, G4double pRmax2, G4double pRmin2, G4double hz) {
void DetectorConstruction::ConstructSectionCons(G4String name, G4LogicalVolume* fMotherLogical, G4double zBias,
G4double pRmax1, G4double pRmin1, G4double pRmax2, G4double pRmin2,
G4double hz) {
G4double pRminMid = pRmin1 - 10 * cm;
G4double pRmaxMid = pRmax1 - 10 * cm;
G4ThreeVector pos0 = G4ThreeVector();
@ -106,7 +112,7 @@ static void ConstructSectionCons(G4String name, G4LogicalVolume* fMotherLogical,
new G4PVPlacement(0, pos0, logicAir, name + "Air", logicWorld, false, 0, true);
}
static void ConstructSectionSmall(G4LogicalVolume* fMotherLogical, G4double zBias) {
void DetectorConstruction::ConstructSectionSmall(G4LogicalVolume* fMotherLogical, G4double zBias) {
G4double pRmax = 2.8 / 2 * m;
G4double hz = 5.18 / 2 * m;
G4double hxBox = 1.5 / 2 * m;
@ -152,7 +158,7 @@ static void ConstructSectionSmall(G4LogicalVolume* fMotherLogical, G4double zBia
new G4PVPlacement(0, pos1, logicAir, "SmallAir", logicWorld, false, 0, true);
}
static void ConstructSectionBig(G4LogicalVolume* fMotherLogical, G4double zBias) {
void DetectorConstruction::ConstructSectionBig(G4LogicalVolume* fMotherLogical, G4double zBias) {
G4double pRmax = 4.2 / 2 * m;
G4double hz = 6.72 / 2 * m;
G4double hxBox = 2.4 / 2 * m;
@ -218,6 +224,109 @@ static void ConstructSectionBig(G4LogicalVolume* fMotherLogical, G4double zBias)
new G4PVPlacement(0, G4ThreeVector(0, 0, -7.5), logicTailAl2, "BigTailAl2", logicTail, false, 0, true);
}
void DetectorConstruction::ConstructHumanPhantom(G4VPhysicalVolume* fMotherPhysics) {
material->DefineMaterials();
G4BasePhantomBuilder* builder = 0;
if (sex == "Female") {
if (model == "MIX")
builder = new G4CustomFemaleBuilder;
else {
builder = new G4FemaleBuilder;
}
builder->SetModel(model);
G4cout << model << " " << sex << G4endl;
} else if (sex == "Male") {
builder = new G4MaleBuilder;
builder->SetModel(model);
if (model == "MIX") {
G4cout << "Custom Male is not available!!! MIRD model is selected !" << G4endl;
model = "MIRD";
builder->SetModel(model);
}
}
builder->SetMotherVolume(fMotherPhysics);
// the argument indicates the sensitivity of the volume
builder->BuildHead("black", false, sensitivities["Head"]);
builder->BuildSkull("orange", false, sensitivities["Skull"]);
builder->BuildBrain("yellow", true, sensitivities["Brain"]);
if (model != "MIRDHead") {
// builder->SetModel(model);
builder->BuildTrunk("yellow", false, sensitivities["Trunk"]);
builder->BuildLeftLeg("yellow", false, sensitivities["LeftLeg"]);
builder->BuildRightLeg("yellow", false, sensitivities["RightLeg"]);
builder->BuildLeftArmBone("grey", true, sensitivities["LeftArmBone"]);
builder->BuildRightArmBone("grey", true, sensitivities["RightArmBone"]);
builder->BuildLeftLegBone("grey", true, sensitivities["LeftLegBone"]);
builder->BuildRightLegBone("grey", true, sensitivities["RightLegBone"]);
builder->BuildUpperSpine("yellow", true, sensitivities["UpperSpine"]);
if (model == "MIRD" || model == "MIX") {
builder->BuildLeftScapula("grey", true, sensitivities["LeftScapula"]);
builder->BuildRightScapula("grey", true, sensitivities["RightScapula"]);
builder->BuildLeftAdrenal("yellow", true, sensitivities["LeftAdrenal"]);
builder->BuildRightAdrenal("yellow", true, sensitivities["RightAdrenal"]);
builder->BuildThymus("orange", true, sensitivities["Thymus"]);
builder->BuildLeftClavicle("grey", true, sensitivities["LeftClavicle"]);
builder->BuildRightClavicle("grey", true, sensitivities["RightClavicle"]);
builder->BuildSmallIntestine("orange", true, sensitivities["SmallIntestine"]);
builder->BuildRibCage("grey", true, sensitivities["RibCage"]);
}
builder->BuildMiddleLowerSpine("yellow", true, sensitivities["MiddleLowerSpine"]);
builder->BuildPelvis("grey", true, sensitivities["Pelvis"]);
builder->BuildStomach("orange", true, sensitivities["Stomach"]);
builder->BuildUpperLargeIntestine("lightBlue", true, sensitivities["UpperLargeIntestine"]);
builder->BuildLowerLargeIntestine("lightBlue", true, sensitivities["LowerLargeIntestine"]);
builder->BuildSpleen("green", true, sensitivities["Spleen"]);
builder->BuildPancreas("purple", true, sensitivities["Pancreas"]);
builder->BuildLiver("orange", true, sensitivities["Liver"]);
builder->BuildLeftKidney("green", true, sensitivities["LeftKidney"]);
builder->BuildRightKidney("green", true, sensitivities["RightKidney"]);
builder->BuildUrinaryBladder("green", true, sensitivities["UrinaryBladder"]);
builder->BuildHeart("red", true, sensitivities["Hearth"]); // to do MIRD
builder->BuildLeftLung("blue", true, sensitivities["LeftLung"]);
builder->BuildRightLung("blue", true, sensitivities["RightLung"]);
builder->BuildThyroid("orange", true, sensitivities["Thyroid"]);
if (sex == "Female") {
builder->BuildLeftOvary("purple", true, sensitivities["LeftOvary"]);
builder->BuildRightOvary("purple", true, sensitivities["RightOvary"]);
builder->BuildUterus("purple", true, sensitivities["Uterus"]);
if (model == "MIRD") {
builder->BuildLeftBreast("purple", true, sensitivities["LeftBreast"]);
builder->BuildRightBreast("purple", true, sensitivities["RightBreast"]);
} else if (model == "MIX") {
builder->BuildVoxelLeftBreast("purple", false, sensitivities["LeftBreast"]);
builder->BuildVoxelRightBreast("purple", false, sensitivities["RightBreast"]);
}
}
if (sex == "Male") {
builder->BuildMaleGenitalia("yellow", false, sensitivities["MaleGenitalia"]);
builder->BuildLeftTeste("purple", true, sensitivities["LeftTeste"]);
builder->BuildRightTeste("purple", true, sensitivities["RightTeste"]);
}
}
G4VPhysicalVolume* result = builder->GetPhantom();
delete builder;
}
G4VPhysicalVolume* DetectorConstruction::Construct() {
// Define materials
DefineMaterials();
@ -229,16 +338,16 @@ G4VPhysicalVolume* DetectorConstruction::Construct() {
// Debug for particle range
// G4Box* solidPlane1 = new G4Box("Plane1", 10 * m, 10 * m, 2 * mm);
// G4LogicalVolume* logicPlane1 = new G4LogicalVolume(solidPlane1, G4Material::GetMaterial("AluminumAlloySeries5"), "Plane1");
// new G4PVPlacement(0, G4ThreeVector(), logicPlane1, "Plane1", logicWorld, false, 0, true);
// G4LogicalVolume* logicPlane1 = new G4LogicalVolume(solidPlane1, G4Material::GetMaterial("AluminumAlloySeries5"),
// "Plane1"); new G4PVPlacement(0, G4ThreeVector(), logicPlane1, "Plane1", logicWorld, false, 0, true);
// G4Box* solidPlane2 = new G4Box("Plane2", 10 * m, 10 * m, 10 * mm);
// G4LogicalVolume* logicPlane2 = new G4LogicalVolume(solidPlane2, G4Material::GetMaterial("Taparan"), "Plane2");
// new G4PVPlacement(0, G4ThreeVector(0, 0, -6), logicPlane2, "Plane2", logicWorld, false, 0, true);
// G4Box* solidPlane3 = new G4Box("Plane3", 10 * m, 10 * m, 5 * mm);
// G4LogicalVolume* logicPlane3 = new G4LogicalVolume(solidPlane3, G4Material::GetMaterial("AluminumAlloySeries5"), "Plane3");
// new G4PVPlacement(0, G4ThreeVector(0, 0, -14.5), logicPlane3, "Plane3", logicWorld, false, 0, true);
// G4LogicalVolume* logicPlane3 = new G4LogicalVolume(solidPlane3, G4Material::GetMaterial("AluminumAlloySeries5"),
// "Plane3"); new G4PVPlacement(0, G4ThreeVector(0, 0, -14.5), logicPlane3, "Plane3", logicWorld, false, 0, true);
// 节点舱
ConstructSectionSphere(logicWorld, (5.18 + 0.33) * m);

View File

@ -0,0 +1,5 @@
#include "G4BasePhantomBuilder.h"
G4BasePhantomBuilder::G4BasePhantomBuilder() { ; }
G4BasePhantomBuilder::~G4BasePhantomBuilder() { ; }

View File

@ -0,0 +1,62 @@
#include "G4CustomFemaleBuilder.h"
#include "G4VBodyFactory.h"
#include "G4VoxelBreastFactory.h"
G4CustomFemaleBuilder::G4CustomFemaleBuilder() {}
G4CustomFemaleBuilder::~G4CustomFemaleBuilder()
{
delete body;
}
void G4CustomFemaleBuilder::BuildUterus(const G4String& colourName, G4bool solidVis, G4bool sensitivity)
{
if (trunkVolume == 0)
G4Exception("G4CustomFemaleBuilder::BuildUterus()", "human_phantom0001", FatalException,
"The trunk volume is missing !!!!!");
body->CreateOrgan("Uterus", trunkVolume, colourName, solidVis, sensitivity);
}
void G4CustomFemaleBuilder::BuildLeftOvary(const G4String& colourName, G4bool solidVis, G4bool sensitivity)
{
if (trunkVolume == 0)
G4Exception("G4CustomFemaleBuilder::BuildLeftOvary()", "human_phantom0002", FatalException,
"The trunk volume is missing !!!!!");
body->CreateOrgan("LeftOvary", trunkVolume, colourName, solidVis, sensitivity);
}
void G4CustomFemaleBuilder::BuildRightOvary(const G4String& colourName, G4bool solidVis, G4bool sensitivity)
{
if (trunkVolume == 0)
G4Exception("G4CustomFemaleBuilder::BuildRightOvary()", "human_phantom0003", FatalException,
"The trunk volume is missing !!!!!");
body->CreateOrgan("RightOvary", trunkVolume, colourName, solidVis, sensitivity);
}
void G4CustomFemaleBuilder::BuildVoxelLeftBreast(const G4String& colourName, G4bool solidVis, G4bool sensitivity) {
G4cout << "BuildVoxelLeftBreast" << G4endl;
if (motherVolume == 0)
G4Exception("G4CustomFemaleBuilder::BuildVoxelLeftBreast()", "human_phantom0004", FatalException,
"The world volume is missing !!!!!");
G4VBodyFactory* customBody = new G4VoxelBreastFactory();
customBody->CreateOrgan("LeftBreast", motherVolume, colourName, solidVis, sensitivity);
delete customBody;
}
void G4CustomFemaleBuilder::BuildVoxelRightBreast(const G4String& colourName, G4bool solidVis, G4bool sensitivity) {
if (motherVolume == 0)
G4Exception("G4CustomFemaleBuilder::BuildVoxelRightBreast()", "human_phantom0005", FatalException,
"The world volume is missing !!!!!");
G4VBodyFactory* customBody = new G4VoxelBreastFactory();
customBody->CreateOrgan("RightBreast", motherVolume, colourName, solidVis, sensitivity);
delete customBody;
}

56
src/G4FemaleBuilder.cpp Normal file
View File

@ -0,0 +1,56 @@
#include "G4FemaleBuilder.h"
#include "G4VBodyFactory.h"
G4FemaleBuilder::G4FemaleBuilder() {}
G4FemaleBuilder::~G4FemaleBuilder()
{
delete body;
}
void G4FemaleBuilder::BuildUterus(const G4String& colourName, G4bool solidVis, G4bool sensitivity)
{
if (trunkVolume == 0)
G4Exception("G4FemaleBuilder::BuildUterus()", "human_phantom0006", FatalException,
"The trunk volume is missing !!!!!");
body->CreateOrgan("Uterus", trunkVolume, colourName, solidVis, sensitivity);
}
void G4FemaleBuilder::BuildLeftOvary(const G4String& colourName, G4bool solidVis, G4bool sensitivity)
{
if (trunkVolume == 0)
G4Exception("G4FemaleBuilder::BuildLeftOvary()", "human_phantom0007", FatalException,
"The trunk volume is missing !!!!!");
body->CreateOrgan("LeftOvary", trunkVolume, colourName, solidVis, sensitivity);
}
void G4FemaleBuilder::BuildRightOvary(const G4String& colourName, G4bool solidVis, G4bool sensitivity)
{
if (trunkVolume == 0)
G4Exception("G4FemaleBuilder::BuildRightOvary()", "human_phantom0008", FatalException,
"The trunk volume is missing !!!!!");
body->CreateOrgan("RightOvary", trunkVolume, colourName, solidVis, sensitivity);
}
void G4FemaleBuilder::BuildLeftBreast(const G4String& colourName, G4bool solidVis, G4bool sensitivity) {
if (motherVolume == 0)
G4Exception("G4FemaleBuilder::BuildLeftBreast()", "human_phantom0009", FatalException,
"The world volume is missing !!!!!");
body->CreateOrgan("LeftBreast", motherVolume, colourName, solidVis, sensitivity);
}
void G4FemaleBuilder::BuildRightBreast(const G4String& colourName, G4bool solidVis, G4bool sensitivity) {
if (motherVolume == 0)
G4Exception("G4FemaleBuilder::BuildRightBreast()", "human_phantom0010", FatalException,
"The world volume is missing !!!!!");
body->CreateOrgan("RightBreast", motherVolume, colourName, solidVis, sensitivity);
}

View File

@ -0,0 +1,52 @@
#include "G4HumanPhantomColour.h"
#include "G4Colour.hh"
#include "G4VisAttributes.hh"
G4HumanPhantomColour::G4HumanPhantomColour() {
white = G4Colour(1.0, 1.0, 1.0);
pink = G4Colour(0.94, 0.5, 0.5);
grey = G4Colour(0.46, 0.53, 0.6);
yellow = G4Colour(1.0, 1.0, 0.);
blue = G4Colour(0.25, 0.41, 0.88);
lightBlue = G4Colour(0.28, 0.82, 0.8);
green = G4Colour(0., 1., 0.);
brown = G4Colour(0.5, 0.5, 0.);
purple = G4Colour(0.85, 0.44, 0.84);
red = G4Colour(1.0, 0.0, 0.0);
orange = G4Colour(1., 0.5, 0.);
black = G4Colour(0., 0., 0.);
}
G4HumanPhantomColour::~G4HumanPhantomColour() {}
G4Colour G4HumanPhantomColour::GetColour(const G4String& colourName) {
// Returns the colour
if (colourName == "pink")
return pink;
else if (colourName == "white")
return white;
else if (colourName == "grey")
return grey;
else if (colourName == "yellow")
return yellow;
else if (colourName == "blue")
return blue;
else if (colourName == "lightBlue")
return lightBlue;
else if (colourName == "green")
return green;
else if (colourName == "brown")
return brown;
else if (colourName == "purple")
return purple;
else if (colourName == "red")
return red;
else if (colourName == "orange")
return orange;
else if (colourName == "black")
return black;
else {
G4cout << colourName << "does not exist !!!" << G4endl;
return white;
}
}

View File

@ -0,0 +1,185 @@
#include "G4HumanPhantomMaterial.h"
#include "G4Element.hh"
#include "G4ElementTable.hh"
#include "G4MaterialPropertiesTable.hh"
#include "G4MaterialPropertyVector.hh"
#include "G4MaterialTable.hh"
#include "G4RunManager.hh"
#include "G4SystemOfUnits.hh"
#include "Randomize.hh"
#include "globals.hh"
G4HumanPhantomMaterial::G4HumanPhantomMaterial()
: soft(0), skeleton(0), lung(0), adipose(0), glandular(0), adipose_glandular(0) {
;
}
G4HumanPhantomMaterial::~G4HumanPhantomMaterial() { ; }
void G4HumanPhantomMaterial::DefineMaterials() {
// Define required materials
G4double A; // atomic mass
G4double Z; // atomic number
G4double d; // density
// General elements
A = 1.01 * g / mole;
G4Element* elH = new G4Element("Hydrogen", "H", Z = 1., A);
A = 12.011 * g / mole;
G4Element* elC = new G4Element("Carbon", "C", Z = 6., A);
A = 14.01 * g / mole;
G4Element* elN = new G4Element("Nitrogen", "N", Z = 7., A);
A = 16.00 * g / mole;
G4Element* elO = new G4Element("Oxygen", "O", Z = 8., A);
A = 22.99 * g / mole;
G4Element* elNa = new G4Element("Sodium", "Na", Z = 11., A);
A = 24.305 * g / mole;
G4Element* elMg = new G4Element("Magnesium", "Mg", Z = 12., A);
A = 30.974 * g / mole;
G4Element* elP = new G4Element("Phosphorus", "P", Z = 15., A);
A = 32.064 * g / mole;
G4Element* elS = new G4Element("Sulfur", "S", Z = 16., A);
A = 35.453 * g / mole;
G4Element* elCl = new G4Element("Chlorine", "Cl", Z = 17., A);
A = 39.098 * g / mole;
G4Element* elK = new G4Element("Potassium", "K", Z = 19., A);
A = 40.08 * g / mole;
G4Element* elCa = new G4Element("Calcium", "Ca", Z = 20., A);
A = 55.85 * g / mole;
G4Element* elFe = new G4Element("Iron", "Fe", Z = 26., A);
A = 65.38 * g / mole;
G4Element* elZn = new G4Element("Zinc", "Zn", Z = 30., A);
A = 85.47 * g / mole;
G4Element* elRb = new G4Element("Rb", "Rb", Z = 37., A);
A = 87.62 * g / mole;
G4Element* elSr = new G4Element("Sr", "Sr", Z = 38., A);
A = 91.22 * g / mole;
G4Element* elZr = new G4Element("Zr", "Zr", Z = 40., A);
A = 207.19 * g / mole;
G4Element* elPb = new G4Element("Lead", "Pb", Z = 82., A);
// Water
d = 1.000 * g / cm3;
matH2O = new G4Material("Water", d, 2);
matH2O->AddElement(elH, 2);
matH2O->AddElement(elO, 1);
matH2O->GetIonisation()->SetMeanExcitationEnergy(75.0 * eV);
// MIRD soft tissue
d = 0.9869 * g / cm3;
soft = new G4Material("soft_tissue", d, 16);
soft->AddElement(elH, 0.1047);
soft->AddElement(elC, 0.2302);
soft->AddElement(elN, 0.0234);
soft->AddElement(elO, 0.6321);
soft->AddElement(elNa, 0.0013);
soft->AddElement(elMg, 0.00015);
soft->AddElement(elP, 0.0024);
soft->AddElement(elS, 0.0022);
soft->AddElement(elCl, 0.0014);
soft->AddElement(elK, 0.0021);
soft->AddElement(elFe, 0.000063);
soft->AddElement(elZn, 0.000032);
soft->AddElement(elRb, 0.0000057);
soft->AddElement(elSr, 0.00000034);
soft->AddElement(elZr, 0.000008);
soft->AddElement(elPb, 0.00000016);
// MIRD Skeleton
d = 1.4862 * g / cm3;
skeleton = new G4Material("skeleton", d, 15);
skeleton->AddElement(elH, 0.0704);
skeleton->AddElement(elC, 0.2279);
skeleton->AddElement(elN, 0.0387);
skeleton->AddElement(elO, 0.4856);
skeleton->AddElement(elNa, 0.0032);
skeleton->AddElement(elMg, 0.0011);
skeleton->AddElement(elP, 0.0694);
skeleton->AddElement(elS, 0.0017);
skeleton->AddElement(elCl, 0.0014);
skeleton->AddElement(elK, 0.0015);
skeleton->AddElement(elCa, 0.0991);
skeleton->AddElement(elFe, 0.00008);
skeleton->AddElement(elZn, 0.000048);
skeleton->AddElement(elSr, 0.000032);
skeleton->AddElement(elPb, 0.000011);
// MIRD lung material
d = 0.2958 * g / cm3;
lung = new G4Material("lung_material", d, 16);
lung->AddElement(elH, 0.1021);
lung->AddElement(elC, 0.1001);
lung->AddElement(elN, 0.028);
lung->AddElement(elO, 0.7596);
lung->AddElement(elNa, 0.0019);
lung->AddElement(elMg, 0.000074);
lung->AddElement(elP, 0.00081);
lung->AddElement(elS, 0.0023);
lung->AddElement(elCl, 0.0027);
lung->AddElement(elK, 0.0020);
lung->AddElement(elCa, 0.00007);
lung->AddElement(elFe, 0.00037);
lung->AddElement(elZn, 0.000011);
lung->AddElement(elRb, 0.0000037);
lung->AddElement(elSr, 0.000000059);
lung->AddElement(elPb, 0.00000041);
G4double density_adipose = 0.93 * g / cm3;
adipose = new G4Material("adipose", density_adipose, 8);
adipose->AddElement(elH, 0.112);
adipose->AddElement(elC, 0.619);
adipose->AddElement(elN, 0.017);
adipose->AddElement(elO, 0.251);
adipose->AddElement(elS, 0.00025);
adipose->AddElement(elP, 0.00025);
adipose->AddElement(elK, 0.00025);
adipose->AddElement(elCa, 0.00025);
G4double density_glandular = 1.04 * g / cm3;
glandular = new G4Material("glandular", density_glandular, 8);
glandular->AddElement(elH, 0.1);
glandular->AddElement(elC, 0.184);
glandular->AddElement(elN, 0.032);
glandular->AddElement(elO, 0.679);
glandular->AddElement(elS, 0.00125);
glandular->AddElement(elP, 0.00125);
glandular->AddElement(elK, 0.00125);
glandular->AddElement(elCa, 0.00125);
d = (density_adipose * 0.5) + (density_glandular * 0.5);
adipose_glandular = new G4Material("adipose_glandular", d, 2);
adipose_glandular->AddMaterial(adipose, 0.5);
adipose_glandular->AddMaterial(glandular, 0.5);
// Air
d = 1.290 * mg / cm3;
G4Material* matAir = new G4Material("Air", d, 2);
matAir->AddElement(elN, 0.7);
matAir->AddElement(elO, 0.3);
}
G4Material* G4HumanPhantomMaterial::GetMaterial(G4String material) {
// Returns a material
G4Material* pttoMaterial = G4Material::GetMaterial(material);
return pttoMaterial;
}

192
src/G4MIRDBodyFactory.cpp Normal file
View File

@ -0,0 +1,192 @@
#include "G4MIRDBodyFactory.h"
#include "G4MIRDBrain.h"
#include "G4MIRDHead.h"
#include "G4MIRDHeart.h"
#include "G4MIRDLeftAdrenal.h"
#include "G4MIRDLeftArmBone.h"
#include "G4MIRDLeftBreast.h"
#include "G4MIRDLeftClavicle.h"
#include "G4MIRDLeftKidney.h"
#include "G4MIRDLeftLeg.h"
#include "G4MIRDLeftLegBone.h"
#include "G4MIRDLeftLung.h"
#include "G4MIRDLeftOvary.h"
#include "G4MIRDLeftScapula.h"
#include "G4MIRDLeftTeste.h"
#include "G4MIRDLiver.h"
#include "G4MIRDLowerLargeIntestine.h"
#include "G4MIRDMaleGenitalia.h"
#include "G4MIRDMiddleLowerSpine.h"
#include "G4MIRDPancreas.h"
#include "G4MIRDPelvis.h"
#include "G4MIRDRibCage.h"
#include "G4MIRDRightAdrenal.h"
#include "G4MIRDRightArmBone.h"
#include "G4MIRDRightBreast.h"
#include "G4MIRDRightClavicle.h"
#include "G4MIRDRightKidney.h"
#include "G4MIRDRightLeg.h"
#include "G4MIRDRightLegBone.h"
#include "G4MIRDRightLung.h"
#include "G4MIRDRightOvary.h"
#include "G4MIRDRightScapula.h"
#include "G4MIRDRightTeste.h"
#include "G4MIRDSkull.h"
#include "G4MIRDSmallIntestine.h"
#include "G4MIRDSpleen.h"
#include "G4MIRDStomach.h"
#include "G4MIRDThymus.h"
#include "G4MIRDThyroid.h"
#include "G4MIRDTrunk.h"
#include "G4MIRDUpperLargeIntestine.h"
#include "G4MIRDUpperSpine.h"
#include "G4MIRDUrinaryBladder.h"
#include "G4MIRDUterus.h"
G4MIRDBodyFactory::G4MIRDBodyFactory() {
// Map with name of the organ and pointer to the MIRDOrgan class
// organ["ParameterisedRightBreast"] = new G4ParameterisedRightBreast();
// organ["ParameterisedLeftBreast"] = new G4ParameterisedLeftBreast();
organ["Head"] = new G4MIRDHead();
organ["Trunk"] = new G4MIRDTrunk();
organ["LeftLeg"] = new G4MIRDLeftLeg();
organ["RightLeg"] = new G4MIRDRightLeg();
organ["Skull"] = new G4MIRDSkull();
organ["LeftArmBone"] = new G4MIRDLeftArmBone();
organ["RightArmBone"] = new G4MIRDRightArmBone();
organ["UpperSpine"] = new G4MIRDUpperSpine();
organ["MiddleLowerSpine"] = new G4MIRDMiddleLowerSpine();
organ["Pelvis"] = new G4MIRDPelvis();
organ["RibCage"] = new G4MIRDRibCage();
organ["LeftClavicle"] = new G4MIRDLeftClavicle();
organ["RightClavicle"] = new G4MIRDRightClavicle();
organ["LeftLegBone"] = new G4MIRDLeftLegBone();
organ["RightLegBone"] = new G4MIRDRightLegBone();
organ["LeftScapula"] = new G4MIRDLeftScapula();
organ["RightScapula"] = new G4MIRDRightScapula();
organ["Heart"] = new G4MIRDHeart();
organ["Thyroid"] = new G4MIRDThyroid();
organ["Thymus"] = new G4MIRDThymus();
organ["MaleGenitalia"] = new G4MIRDMaleGenitalia();
organ["Brain"] = new G4MIRDBrain();
organ["Stomach"] = new G4MIRDStomach();
organ["UpperLargeIntestine"] = new G4MIRDUpperLargeIntestine();
organ["LowerLargeIntestine"] = new G4MIRDLowerLargeIntestine();
organ["SmallIntestine"] = new G4MIRDSmallIntestine();
organ["Spleen"] = new G4MIRDSpleen();
organ["Pancreas"] = new G4MIRDPancreas();
organ["LeftKidney"] = new G4MIRDLeftKidney();
organ["RightKidney"] = new G4MIRDRightKidney();
organ["UrinaryBladder"] = new G4MIRDUrinaryBladder();
organ["Uterus"] = new G4MIRDUterus();
organ["Liver"] = new G4MIRDLiver();
organ["LeftLung"] = new G4MIRDLeftLung();
organ["RightLung"] = new G4MIRDRightLung();
organ["LeftOvary"] = new G4MIRDLeftOvary();
organ["RightOvary"] = new G4MIRDRightOvary();
organ["LeftTeste"] = new G4MIRDLeftTeste();
organ["RightTeste"] = new G4MIRDRightTeste();
organ["RightBreast"] = new G4MIRDRightBreast();
organ["LeftBreast"] = new G4MIRDLeftBreast();
organ["LeftAdrenal"] = new G4MIRDLeftAdrenal();
organ["RightAdrenal"] = new G4MIRDRightAdrenal();
}
G4MIRDBodyFactory::~G4MIRDBodyFactory() {
delete organ["Head"];
organ["Head"] = 0;
delete organ["RightLeg"];
organ["RightLeg"] = 0;
delete organ["LeftLeg"];
organ["LeftLeg"] = 0;
delete organ["Trunk"];
organ["Trunk"] = 0;
delete organ["RightScapula"];
organ["RightScapula"] = 0;
delete organ["LeftScapula"];
organ["LeftScapula"] = 0;
delete organ["RightLegBone"];
organ["RightLegBone"] = 0;
delete organ["LeftLegBone"];
organ["LeftLegBone"] = 0;
delete organ["RibCage"];
organ["RibCage"] = 0;
delete organ["MiddleLowerSpine"];
organ["MidlleLowerSpine"] = 0;
delete organ["UpperSpine"];
organ["UpperSpine"] = 0;
delete organ["Skull"];
organ["Skull"] = 0;
delete organ["RightArmBone"];
organ["RightArmBone"] = 0;
delete organ["LeftArmBone"];
organ["LeftArmBone"] = 0;
delete organ["RightClavicle"];
organ["RightClavicle"] = 0;
delete organ["LeftClavicle"];
organ["LeftClavicle"] = 0;
delete organ["Pelvis"];
organ["Pelvis"] = 0;
delete organ["RightAdrenal"];
organ["RightAdrenal"] = 0;
delete organ["LeftAdrenal"];
organ["LeftAdrenal"] = 0;
delete organ["LeftBreast"];
organ["LeftBreast"] = 0;
delete organ["RightBreast"];
organ["RightBreast"] = 0;
delete organ["RightOvary"];
organ["RightOvary"] = 0;
delete organ["LeftOvary"];
organ["LeftOvary"] = 0;
delete organ["RightTeste"];
organ["RightTeste"] = 0;
delete organ["LeftTeste"];
organ["LeftTeste"] = 0;
delete organ["RightLung"];
organ["RightLung"] = 0;
delete organ["LeftLung"];
organ["LeftLung"] = 0;
delete organ["Uterus"];
organ["Uterus"] = 0;
delete organ["UrinaryBladder"];
organ["UrinaryBladder"] = 0;
delete organ["RightKidney"];
organ["RightKidney"] = 0;
delete organ["LeftKidney"];
organ["LeftKidney"] = 0;
delete organ["Pancreas"];
organ["Pancreas"] = 0;
delete organ["Spleen"];
organ["Spleen"] = 0;
delete organ["LowerLargeIntestine"];
organ["LowerLargeIntestine"] = 0;
delete organ["SmallIntestine"];
organ["SmallIntestine"] = 0;
delete organ["UpperLargeIntestine"];
organ["UpperLargeIntestine"] = 0;
delete organ["Stomach"];
organ["Stomach"] = 0;
delete organ["Brain"];
organ["Brain"] = 0;
delete organ["Heart"];
organ["Heart"] = 0;
delete organ["Thymus"];
organ["Thymus"] = 0;
delete organ["MaleGenitalia"];
organ["MaleGenitalia"] = 0;
delete organ["Thyroid"];
organ["Thyroid"] = 0;
delete organ["Liver"];
organ["Liver"] = 0;
}
G4VPhysicalVolume* G4MIRDBodyFactory::CreateOrgan(const G4String& organ_name, G4VPhysicalVolume* motherVolume,
const G4String& colourName, G4bool visAttribute, G4bool sensitivity) {
return organ[organ_name]->Construct(organ_name, motherVolume, colourName, visAttribute, sensitivity);
}

67
src/G4MIRDBrain.cpp Normal file
View File

@ -0,0 +1,67 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDBrain.h"
#include "G4Ellipsoid.hh"
#include "G4LogicalVolume.hh"
#include "G4Material.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDBrain::G4MIRDBrain() {}
G4MIRDBrain::~G4MIRDBrain() {}
G4VPhysicalVolume* G4MIRDBrain::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4cout << "Construct " << volumeName << " with mother " << mother->GetName() << G4endl;
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4Material* soft = material->GetMaterial("soft_tissue");
delete material;
G4double ax = 6. * cm;
G4double by = 9. * cm;
G4double cz = 6.5 * cm;
G4Ellipsoid* brain = new G4Ellipsoid("Brain", ax, by, cz);
G4LogicalVolume* logicBrain = new G4LogicalVolume(brain, soft, "logical" + volumeName, 0, 0, 0);
// Define rotation and position here!
G4VPhysicalVolume* physBrain = new G4PVPlacement(0, G4ThreeVector(0. * cm, 0. * cm, 8.75 * cm), "physicalBrain",
logicBrain, mother, false, 0, true);
// Visualization Attributes
// G4VisAttributes* BrainVisAtt = new G4VisAttributes(G4Colour(0.41,0.41,0.41));
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* BrainVisAtt = new G4VisAttributes(colour);
BrainVisAtt->SetForceSolid(wireFrame);
BrainVisAtt->SetLineWidth(0.7 * mm);
logicBrain->SetVisAttributes(BrainVisAtt);
// Testing Brain Volume
G4double BrainVol = logicBrain->GetSolid()->GetCubicVolume();
G4cout << "Volume of Brain = " << BrainVol / cm3 << " cm^3" << G4endl;
// Testing Brain Material
G4String BrainMat = logicBrain->GetMaterial()->GetName();
G4cout << "Material of Brain = " << BrainMat << G4endl;
// Testing Density
G4double BrainDensity = logicBrain->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << BrainDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double BrainMass = (BrainVol)*BrainDensity;
G4cout << "Mass of Brain = " << BrainMass / gram << " g" << G4endl;
return physBrain;
}

89
src/G4MIRDHead.cpp Normal file
View File

@ -0,0 +1,89 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDHead.h"
#include "G4Ellipsoid.hh"
#include "G4EllipticalTube.hh"
#include "G4Material.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4UnionSolid.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDHead::G4MIRDHead() {}
G4MIRDHead::~G4MIRDHead() {}
G4VPhysicalVolume* G4MIRDHead::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4cout << "Construct " << volumeName << " with mother " << mother->GetName() << G4endl;
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4Material* soft = material->GetMaterial("soft_tissue");
// MIRD male model
// Ellipsoid
G4double ax = 7.0 * cm;
G4double by = 10.0 * cm;
G4double cz = 8.50 * cm;
G4double zcut1 = 0.0 * cm;
G4double zcut2 = 8.5 * cm;
G4Ellipsoid* head1 = new G4Ellipsoid("Head1", ax, by, cz, zcut1, zcut2);
G4double dx = 7.0 * cm;
G4double dy = 10.0 * cm;
G4double dz = 7.75 * cm;
G4EllipticalTube* head2 = new G4EllipticalTube("Head2", dx, dy, dz);
G4UnionSolid* head = new G4UnionSolid("Head", head2, head1,
0, // Rotation
G4ThreeVector(0. * cm, 0. * cm, 7.7500 * cm));
G4LogicalVolume* logicHead = new G4LogicalVolume(head, soft, "logical" + volumeName, 0, 0, 0);
// Define rotation and position here!
G4RotationMatrix* rm = new G4RotationMatrix();
rm->rotateX(180. * degree);
rm->rotateY(180. * degree);
G4VPhysicalVolume* physHead = new G4PVPlacement(rm,
// G4ThreeVector(0.* cm,0.*cm, 70.75*cm), //FA
G4ThreeVector(0. * cm, 0. * cm, 77.75 * cm), "physicalHead",
logicHead, mother, false, 0, true);
// Visualization Attributes
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* HeadVisAtt = new G4VisAttributes(colour);
HeadVisAtt->SetForceSolid(wireFrame);
// HeadVisAtt->SetLineWidth(0.7* mm);
// HeadVisAtt-> SetForceAuxEdgeVisible(true);
logicHead->SetVisAttributes(HeadVisAtt);
// Testing Head Volume
G4double HeadVol = logicHead->GetSolid()->GetCubicVolume();
G4cout << "Volume of Head = " << HeadVol / cm3 << " cm^3" << G4endl;
// Testing Head Material
G4String HeadMat = logicHead->GetMaterial()->GetName();
G4cout << "Material of Head = " << HeadMat << G4endl;
// Testing Density
G4double HeadDensity = logicHead->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << HeadDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double HeadMass = (HeadVol)*HeadDensity;
G4cout << "Mass of Head = " << HeadMass / gram << " g" << G4endl;
return physHead;
}

84
src/G4MIRDHeart.cpp Normal file
View File

@ -0,0 +1,84 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDHeart.h"
#include "G4Ellipsoid.hh"
#include "G4LogicalVolume.hh"
#include "G4Material.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4Sphere.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4UnionSolid.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDHeart::G4MIRDHeart() {}
G4MIRDHeart::~G4MIRDHeart() {}
G4VPhysicalVolume* G4MIRDHeart::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4cout << "Construct " << volumeName << " with mother " << mother->GetName() << G4endl;
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4Material* soft = material->GetMaterial("soft_tissue");
G4double ax = 4.00 * cm;
G4double by = 4.00 * cm;
G4double cz = 7.00 * cm;
G4double zcut1 = -7.00 * cm;
G4double zcut2 = 0.0 * cm;
G4Ellipsoid* heart1 = new G4Ellipsoid("Heart1", ax, by, cz, zcut1, zcut2);
G4double rmin = 0. * cm;
G4double rmax = 3.99 * cm;
G4double startphi = 0. * degree;
G4double deltaphi = 360. * degree;
G4double starttheta = 0. * degree;
G4double deltatheta = 90. * degree;
G4Sphere* heart2 = new G4Sphere("Heart2", rmin, rmax, startphi, deltaphi, starttheta, deltatheta);
G4UnionSolid* heart = new G4UnionSolid("Heart", heart1, heart2);
G4LogicalVolume* logicHeart = new G4LogicalVolume(heart, soft, "HeartVolume", 0, 0, 0);
// Define rotation and position here!
G4RotationMatrix* rm = new G4RotationMatrix();
rm->rotateY(25. * degree);
G4VPhysicalVolume* physHeart = new G4PVPlacement(rm, G4ThreeVector(0.0, -3.0 * cm, 15.32 * cm), "physicalHeart",
logicHeart, mother, false, 0, true);
// Visualization Attributes
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* HeartVisAtt = new G4VisAttributes(colour);
HeartVisAtt->SetForceSolid(wireFrame);
logicHeart->SetVisAttributes(HeartVisAtt);
G4cout << "Heart created !!!!!!" << G4endl;
// Testing Heart Volume
G4double HeartVol = logicHeart->GetSolid()->GetCubicVolume();
G4cout << "Volume of Heart = " << HeartVol / cm3 << " cm^3" << G4endl;
// Testing Heart Material
G4String HeartMat = logicHeart->GetMaterial()->GetName();
G4cout << "Material of Heart = " << HeartMat << G4endl;
// Testing Density
G4double HeartDensity = logicHeart->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << HeartDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double HeartMass = (HeartVol)*HeartDensity;
G4cout << "Mass of Heart = " << HeartMass / gram << " g" << G4endl;
return physHeart;
}

74
src/G4MIRDLeftAdrenal.cpp Normal file
View File

@ -0,0 +1,74 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDLeftAdrenal.h"
#include "G4Box.hh"
#include "G4Ellipsoid.hh"
#include "G4EllipticalTube.hh"
#include "G4Material.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SubtractionSolid.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4UnionSolid.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDLeftAdrenal::G4MIRDLeftAdrenal() {}
G4MIRDLeftAdrenal::~G4MIRDLeftAdrenal() {}
G4VPhysicalVolume* G4MIRDLeftAdrenal::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4cout << "Construct " << volumeName << " with mother " << mother->GetName() << G4endl;
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4Material* soft = material->GetMaterial("soft_tissue");
delete material;
G4double ax = 1.5 * cm; // a
G4double by = 0.5 * cm; // b
G4double cz = 5.0 * cm; // c
G4VSolid* leftAdrenal = new G4Ellipsoid("OneLeftAdrenal", ax, by, cz, 0. * cm, cz);
G4LogicalVolume* logicLeftAdrenal = new G4LogicalVolume(leftAdrenal, soft, "logical" + volumeName, 0, 0, 0);
G4VPhysicalVolume* physLeftAdrenal =
new G4PVPlacement(0,
G4ThreeVector(4.5 * cm, // xo
6.5 * cm, // yo
3. * cm), // zo
"physicalLeftAdrenal", logicLeftAdrenal, mother, false, 0, true);
// Visualization Attributes
// G4VisAttributes* LeftAdrenalVisAtt = new G4VisAttributes(G4Colour(0.72,0.52,0.04));
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* LeftAdrenalVisAtt = new G4VisAttributes(colour);
LeftAdrenalVisAtt->SetForceSolid(wireFrame);
logicLeftAdrenal->SetVisAttributes(LeftAdrenalVisAtt);
G4cout << "Left LeftAdrenal created !!!!!!" << G4endl;
// Testing LeftAdrenal Volume
G4double LeftAdrenalVol = logicLeftAdrenal->GetSolid()->GetCubicVolume();
G4cout << "Volume of LeftAdrenal = " << LeftAdrenalVol / cm3 << " cm^3" << G4endl;
// Testing LeftAdrenal Material
G4String LeftAdrenalMat = logicLeftAdrenal->GetMaterial()->GetName();
G4cout << "Material of LeftAdrenal = " << LeftAdrenalMat << G4endl;
// Testing Density
G4double LeftAdrenalDensity = logicLeftAdrenal->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << LeftAdrenalDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double LeftAdrenalMass = (LeftAdrenalVol)*LeftAdrenalDensity;
G4cout << "Mass of LeftAdrenal = " << LeftAdrenalMass / gram << " g" << G4endl;
return physLeftAdrenal;
}

77
src/G4MIRDLeftArmBone.cpp Normal file
View File

@ -0,0 +1,77 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDLeftArmBone.h"
#include "G4EllipticalCone.hh"
#include "G4EllipticalTube.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4UnionSolid.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDLeftArmBone::G4MIRDLeftArmBone() {}
G4MIRDLeftArmBone::~G4MIRDLeftArmBone() {}
G4VPhysicalVolume* G4MIRDLeftArmBone::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
// Remind! the elliptical cone gives problems! Intersections of volumes,
// wrong calculation of the volume!
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4cout << "Construct " << volumeName << " with mother " << mother->GetName() << G4endl;
G4Material* skeleton = material->GetMaterial("skeleton");
delete material;
G4double dx = 1.4 * cm; // a
G4double dy = 2.7 * cm; // b
// G4double dz= 46. * cm;//z0
// G4EllipticalCone* arm = new G4EllipticalCone("OneLeftArmBone",dx/2.,dy/2.,dz, 34.5 *cm);
G4EllipticalTube* leftArm = new G4EllipticalTube("OneLeftArmBone", dx, dy, 34.5 * cm);
G4LogicalVolume* logicLeftArmBone = new G4LogicalVolume(leftArm, skeleton, "logical" + volumeName, 0, 0, 0);
G4RotationMatrix* rm = new G4RotationMatrix();
rm->rotateX(180. * degree);
G4VPhysicalVolume* physLeftArmBone =
new G4PVPlacement(rm, G4ThreeVector(18.4 * cm, 0.0, -0.5 * cm),
//-x0
"physicalLeftArmBone", logicLeftArmBone, mother, false, 0, true);
// Visualization Attributes
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* LeftArmBoneVisAtt = new G4VisAttributes(colour);
LeftArmBoneVisAtt->SetForceSolid(wireFrame);
logicLeftArmBone->SetVisAttributes(LeftArmBoneVisAtt);
G4cout << "LeftArmBone created !!!!!!" << G4endl;
// Testing LeftArmBone Volume
G4double LeftArmBoneVol = logicLeftArmBone->GetSolid()->GetCubicVolume();
G4cout << "Volume of LeftArmBone = " << LeftArmBoneVol / cm3 << " cm^3" << G4endl;
// Testing LeftArmBone Material
G4String LeftArmBoneMat = logicLeftArmBone->GetMaterial()->GetName();
G4cout << "Material of LeftArmBone = " << LeftArmBoneMat << G4endl;
// Testing Density
G4double LeftArmBoneDensity = logicLeftArmBone->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << LeftArmBoneDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double LeftArmBoneMass = (LeftArmBoneVol)*LeftArmBoneDensity;
G4cout << "Mass of LeftArmBone = " << LeftArmBoneMass / gram << " g" << G4endl;
return physLeftArmBone;
}

88
src/G4MIRDLeftBreast.cpp Normal file
View File

@ -0,0 +1,88 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDLeftBreast.h"
#include "G4Ellipsoid.hh"
#include "G4EllipticalTube.hh"
#include "G4LogicalVolume.hh"
#include "G4Material.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SubtractionSolid.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4UnionSolid.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDLeftBreast::G4MIRDLeftBreast() {}
G4MIRDLeftBreast::~G4MIRDLeftBreast() {}
G4VPhysicalVolume* G4MIRDLeftBreast::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4cout << "Construct " << volumeName << " with mother volume " << mother->GetName() << G4endl;
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4Material* soft = material->GetMaterial("soft_tissue");
delete material;
G4double ax = 4.95 * cm;
G4double by = 4.35 * cm;
G4double cz = 4.15 * cm;
G4Ellipsoid* oneLeftBreast = new G4Ellipsoid("OneLeftBreast", ax, by, cz);
G4double dx = 20. * cm;
G4double dy = 10. * cm;
G4double dz = 35. * cm;
G4EllipticalTube* Trunk = new G4EllipticalTube("Trunk", dx, dy, dz);
G4RotationMatrix* rm_relative = new G4RotationMatrix();
rm_relative->rotateX(90. * degree);
G4SubtractionSolid* breast = new G4SubtractionSolid("LeftBreast", oneLeftBreast, Trunk, rm_relative,
G4ThreeVector(-10. * cm, 0.0 * cm, -8.66 * cm));
G4LogicalVolume* logicLeftBreast = new G4LogicalVolume(breast, soft, "logical" + volumeName, 0, 0, 0);
// Define rotation and position here!
G4RotationMatrix* rm = new G4RotationMatrix();
rm->rotateX(90. * degree);
rm->rotateY(0. * degree);
rm->rotateZ(16. * degree);
G4VPhysicalVolume* physLeftBreast = new G4PVPlacement(
rm, G4ThreeVector(10 * cm, 9.1 * cm, 52. * cm), "physicalLeftBreast", logicLeftBreast, mother, false, 0, true);
// Visualization Attributes
// G4VisAttributes* LeftBreastVisAtt = new G4VisAttributes(G4Colour(1.0,0.41,0.71));
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* LeftBreastVisAtt = new G4VisAttributes(colour);
LeftBreastVisAtt->SetForceSolid(wireFrame);
logicLeftBreast->SetVisAttributes(LeftBreastVisAtt);
G4cout << "LeftBreast created !!!!!!" << G4endl;
// Testing LeftBreast Volume
G4double LeftBreastVol = logicLeftBreast->GetSolid()->GetCubicVolume();
G4cout << "Volume of LeftBreast = " << LeftBreastVol / cm3 << " cm^3" << G4endl;
// Testing LeftBreast Material
G4String LeftBreastMat = logicLeftBreast->GetMaterial()->GetName();
G4cout << "Material of LeftBreast = " << LeftBreastMat << G4endl;
// Testing Density
G4double LeftBreastDensity = logicLeftBreast->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << LeftBreastDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double LeftBreastMass = (LeftBreastVol)*LeftBreastDensity;
G4cout << "Mass of LeftBreast = " << LeftBreastMass / gram << " g" << G4endl;
return physLeftBreast;
}

View File

@ -0,0 +1,72 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDLeftClavicle.h"
#include "G4Box.hh"
#include "G4Cons.hh"
#include "G4EllipticalTube.hh"
#include "G4LogicalVolume.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SubtractionSolid.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4Torus.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDLeftClavicle::G4MIRDLeftClavicle() {}
G4MIRDLeftClavicle::~G4MIRDLeftClavicle() {}
G4VPhysicalVolume* G4MIRDLeftClavicle::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4cout << "Construct " << volumeName << " with mother volume " << mother->GetName() << G4endl;
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4Material* skeleton = material->GetMaterial("skeleton");
G4double rMin = 0 * cm;
G4double rMax = 0.7883 * cm;
G4double rTor = 10 * cm;
G4double pSPhi = 298.15 * degree;
G4double pDPhi = 0.7 * rad;
G4Torus* clavicle = new G4Torus("Clavicle", rMin, rMax, rTor, pSPhi, pDPhi);
G4LogicalVolume* logicLeftClavicle = new G4LogicalVolume(clavicle, skeleton, "logical" + volumeName, 0, 0, 0);
G4VPhysicalVolume* physLeftClavicle =
new G4PVPlacement(0, G4ThreeVector(0. * cm, 2. * cm, 33.25 * cm), "physicalLeftClavicle", logicLeftClavicle,
mother, false, 0, true);
// Visualization Attributes
// G4VisAttributes* LeftClavicleVisAtt = new G4VisAttributes(G4Colour(0.94,0.5,0.5));
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* LeftClavicleVisAtt = new G4VisAttributes(colour);
LeftClavicleVisAtt->SetForceSolid(wireFrame);
logicLeftClavicle->SetVisAttributes(LeftClavicleVisAtt);
G4cout << "LeftClavicle created !!!!!!" << G4endl;
// Testing LeftClavicle Volume
G4double LeftClavicleVol = logicLeftClavicle->GetSolid()->GetCubicVolume();
G4cout << "Volume of LeftClavicle = " << LeftClavicleVol / cm3 << " cm^3" << G4endl;
// Testing LeftClavicle Material
G4String LeftClavicleMat = logicLeftClavicle->GetMaterial()->GetName();
G4cout << "Material of LeftClavicle = " << LeftClavicleMat << G4endl;
// Testing Density
G4double LeftClavicleDensity = logicLeftClavicle->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << LeftClavicleDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double LeftClavicleMass = (LeftClavicleVol)*LeftClavicleDensity;
G4cout << "Mass of LeftClavicle = " << LeftClavicleMass / gram << " g" << G4endl;
return physLeftClavicle;
}

83
src/G4MIRDLeftKidney.cpp Normal file
View File

@ -0,0 +1,83 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDLeftKidney.h"
#include "G4Box.hh"
#include "G4Ellipsoid.hh"
#include "G4EllipticalTube.hh"
#include "G4Material.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SubtractionSolid.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4UnionSolid.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDLeftKidney::G4MIRDLeftKidney() {}
G4MIRDLeftKidney::~G4MIRDLeftKidney() {}
G4VPhysicalVolume* G4MIRDLeftKidney::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4cout << "Construct " << volumeName << " with mother volume " << mother->GetName() << G4endl;
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4Material* soft = material->GetMaterial("soft_tissue");
delete material;
G4double ax = 4.5 * cm; // a
G4double by = 1.5 * cm; // b
G4double cz = 5.5 * cm; // c
G4VSolid* oneLeftKidney = new G4Ellipsoid("OneLeftKidney", ax, by, cz);
G4double xx = 6. * cm;
G4double yy = 12.00 * cm;
G4double zz = 12.00 * cm;
G4VSolid* subtrLeftKidney = new G4Box("SubtrLeftKidney", xx / 2., yy / 2., zz / 2.);
G4SubtractionSolid* leftKidney = new G4SubtractionSolid("LeftKidney", oneLeftKidney, subtrLeftKidney, 0,
G4ThreeVector(-6. * cm, // x0
0.0 * cm, 0.0 * cm));
G4LogicalVolume* logicLeftKidney = new G4LogicalVolume(leftKidney, soft, "logical" + volumeName, 0, 0, 0);
G4VPhysicalVolume* physLeftKidney =
new G4PVPlacement(0,
G4ThreeVector(6. * cm, // xo
6. * cm, // yo
-2.50 * cm), // zo
"physicalLeftKidney", logicLeftKidney, mother, false, 0, true);
// Visualization Attributes
// G4VisAttributes* LeftKidneyVisAtt = new G4VisAttributes(G4Colour(0.72,0.52,0.04));
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* LeftKidneyVisAtt = new G4VisAttributes(colour);
LeftKidneyVisAtt->SetForceSolid(wireFrame);
logicLeftKidney->SetVisAttributes(LeftKidneyVisAtt);
G4cout << "Left LeftKidney created !!!!!!" << G4endl;
// Testing LeftKidney Volume
G4double LeftKidneyVol = logicLeftKidney->GetSolid()->GetCubicVolume();
G4cout << "Volume of LeftKidney = " << LeftKidneyVol / cm3 << " cm^3" << G4endl;
// Testing LeftKidney Material
G4String LeftKidneyMat = logicLeftKidney->GetMaterial()->GetName();
G4cout << "Material of LeftKidney = " << LeftKidneyMat << G4endl;
// Testing Density
G4double LeftKidneyDensity = logicLeftKidney->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << LeftKidneyDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double LeftKidneyMass = (LeftKidneyVol)*LeftKidneyDensity;
G4cout << "Mass of LeftKidney = " << LeftKidneyMass / gram << " g" << G4endl;
return physLeftKidney;
}

76
src/G4MIRDLeftLeg.cpp Normal file
View File

@ -0,0 +1,76 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDLeftLeg.h"
#include "G4Cons.hh"
#include "G4EllipticalTube.hh"
#include "G4LogicalVolume.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4UnionSolid.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDLeftLeg::G4MIRDLeftLeg() {}
G4MIRDLeftLeg::~G4MIRDLeftLeg() {}
G4VPhysicalVolume* G4MIRDLeftLeg::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4cout << "Construct " << volumeName << " with mother volume " << mother->GetName() << G4endl;
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4Material* soft = material->GetMaterial("soft_tissue");
G4double rmin1 = 0. * cm;
G4double rmin2 = 0. * cm;
G4double dz = 80.0 * cm;
G4double rmax1 = 2.0 * cm;
G4double rmax2 = 10. * cm;
G4double startphi = 0. * degree;
G4double deltaphi = 360. * degree;
G4Cons* leg1 = new G4Cons("Leg1", rmin1, rmax1, rmin2, rmax2, dz / 2., startphi, deltaphi);
G4LogicalVolume* logicLeftLeg = new G4LogicalVolume(leg1, soft, "logical" + volumeName, 0, 0, 0);
G4RotationMatrix* rm = new G4RotationMatrix();
rm->rotateX(180. * degree);
rm->rotateY(180. * degree);
G4VPhysicalVolume* physLeftLeg = new G4PVPlacement(rm,
// G4ThreeVector(10. * cm, 0. * cm, -47. *cm), //FA
G4ThreeVector(10. * cm, 0. * cm, -40. * cm), "physicalLeftLeg",
logicLeftLeg, mother, false, 0, true);
// Visualization Attributes
// G4VisAttributes* LeftLegVisAtt = new G4VisAttributes(G4Colour(0.94,0.5,0.5));
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* LeftLegVisAtt = new G4VisAttributes(colour);
LeftLegVisAtt->SetForceSolid(wireFrame);
logicLeftLeg->SetVisAttributes(LeftLegVisAtt);
G4cout << "LeftLeg created !!!!!!" << G4endl;
// Testing LeftLeg Volume
G4double LeftLegVol = logicLeftLeg->GetSolid()->GetCubicVolume();
G4cout << "Volume of LeftLeg = " << LeftLegVol / cm3 << " cm^3" << G4endl;
// Testing LeftLeg Material
G4String LeftLegMat = logicLeftLeg->GetMaterial()->GetName();
G4cout << "Material of LeftLeg = " << LeftLegMat << G4endl;
// Testing Density
G4double LeftLegDensity = logicLeftLeg->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << LeftLegDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double LeftLegMass = (LeftLegVol)*LeftLegDensity;
G4cout << "Mass of LeftLeg = " << LeftLegMass / gram << " g" << G4endl;
return physLeftLeg;
}

75
src/G4MIRDLeftLegBone.cpp Normal file
View File

@ -0,0 +1,75 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDLeftLegBone.h"
#include "G4Cons.hh"
#include "G4EllipticalTube.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4UnionSolid.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDLeftLegBone::G4MIRDLeftLegBone() {}
G4MIRDLeftLegBone::~G4MIRDLeftLegBone() {}
G4VPhysicalVolume* G4MIRDLeftLegBone::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4cout << "Construct " << volumeName << " with mother volume " << mother->GetName() << G4endl;
G4Material* skeleton = material->GetMaterial("skeleton");
delete material;
G4double dz = 79.8 * cm;
G4double rmin1 = 0.0 * cm;
G4double rmin2 = 0.0 * cm;
G4double rmax1 = 1. * cm;
G4double rmax2 = 3.5 * cm;
G4double startphi = 0. * degree;
G4double deltaphi = 360. * degree;
G4Cons* leg_bone = new G4Cons("OneLeftLegBone", rmin1, rmax1, rmin2, rmax2, dz / 2., startphi, deltaphi);
G4LogicalVolume* logicLeftLegBone = new G4LogicalVolume(leg_bone, skeleton, "logical" + volumeName, 0, 0, 0);
// Define rotation and position here!
G4VPhysicalVolume* physLeftLegBone = new G4PVPlacement(
0, G4ThreeVector(0.0 * cm, 0.0, 0.1 * cm), "physicalLeftLegBone", logicLeftLegBone, mother, false, 0, true);
// Visualization Attributes
// G4VisAttributes* LeftLegBoneVisAtt = new G4VisAttributes(G4Colour(0.46,0.53,0.6));
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* LeftLegBoneVisAtt = new G4VisAttributes(colour);
LeftLegBoneVisAtt->SetForceSolid(wireFrame);
logicLeftLegBone->SetVisAttributes(LeftLegBoneVisAtt);
G4cout << "LeftLegBone created !!!!!!" << G4endl;
// Testing LeftLegBone Volume
G4double LeftLegBoneVol = logicLeftLegBone->GetSolid()->GetCubicVolume();
G4cout << "Volume of LeftLegBone = " << LeftLegBoneVol / cm3 << " cm^3" << G4endl;
// Testing LeftLegBone Material
G4String LeftLegBoneMat = logicLeftLegBone->GetMaterial()->GetName();
G4cout << "Material of LeftLegBone = " << LeftLegBoneMat << G4endl;
// Testing Density
G4double LeftLegBoneDensity = logicLeftLegBone->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << LeftLegBoneDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double LeftLegBoneMass = (LeftLegBoneVol)*LeftLegBoneDensity;
G4cout << "Mass of LeftLegBone = " << LeftLegBoneMass / gram << " g" << G4endl;
return physLeftLegBone;
}

106
src/G4MIRDLeftLung.cpp Normal file
View File

@ -0,0 +1,106 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDLeftLung.h"
#include "G4Box.hh"
#include "G4Ellipsoid.hh"
#include "G4LogicalVolume.hh"
#include "G4Material.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SubtractionSolid.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4UnionSolid.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDLeftLung::G4MIRDLeftLung() {}
G4MIRDLeftLung::~G4MIRDLeftLung() {}
G4VPhysicalVolume* G4MIRDLeftLung::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4cout << "Construct " << volumeName << " with mother volume " << mother->GetName() << G4endl;
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4Material* lung_material = material->GetMaterial("lung_material");
delete material;
G4double ax = 5. * cm; // a
G4double by = 7.5 * cm; // b
G4double cz = 24. * cm; // c
G4double zcut1 = 0.0 * cm;
G4double zcut2 = 24. * cm;
G4Ellipsoid* oneLung = new G4Ellipsoid("OneLung", ax, by, cz, zcut1, zcut2);
ax = 5. * cm;
by = 7.5 * cm;
cz = 24. * cm;
G4Ellipsoid* subtrLung = new G4Ellipsoid("subtrLung", ax, by, cz);
// y<0
G4double dx = 5.5 * cm;
G4double dy = 8.5 * cm;
G4double dz = 24. * cm;
G4Box* box = new G4Box("Box", dx, dy, dz);
// G4SubtractionSolid* section = new G4SubtractionSolid("BoxSub", subtrLung, box, 0, G4ThreeVector(0.*cm, 8.5* cm,
// 0.*cm));
G4SubtractionSolid* section2 =
new G4SubtractionSolid("BoxSub2", subtrLung, box, 0, G4ThreeVector(0. * cm, 8.5 * cm, 0. * cm));
// G4SubtractionSolid* lung1 = new G4SubtractionSolid("Lung1", oneLung,
// section,
// 0, G4ThreeVector(6.*cm,0*cm,0.0*cm));
G4SubtractionSolid* lung2 =
new G4SubtractionSolid("Lung2", oneLung, section2, 0, G4ThreeVector(-6. * cm, 0 * cm, 0.0 * cm));
// G4RotationMatrix* matrix = new G4RotationMatrix();
// matrix->rotateX(180. * degree);
// matrix ->rotateZ(180.*degree);
// matrix -> rotateY(180.* degree);
// G4UnionSolid* lungs = new G4UnionSolid("Lungs", lung1, lung2, matrix, G4ThreeVector(17*cm, 0., 0.));
G4LogicalVolume* logicLeftLung = new G4LogicalVolume(lung2, lung_material, "logical" + volumeName, 0, 0, 0);
G4VPhysicalVolume* physLeftLung = new G4PVPlacement(0, G4ThreeVector(8.50 * cm, 0.0 * cm, 8.5 * cm),
"physicalLeftLung", logicLeftLung, mother, false, 0, true);
// Visualization Attributes
// G4VisAttributes* LeftLungVisAtt = new G4VisAttributes(G4Colour(0.25,0.41,0.88));
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* LeftLungVisAtt = new G4VisAttributes(colour);
LeftLungVisAtt->SetForceSolid(wireFrame);
logicLeftLung->SetVisAttributes(LeftLungVisAtt);
G4cout << "LeftLung created !!!!!!" << G4endl;
// Testing LeftLung Volume
G4double LeftLungVol = logicLeftLung->GetSolid()->GetCubicVolume();
G4cout << "Volume of LeftLung = " << (LeftLungVol) / cm3 << " cm^3" << G4endl;
// Testing LeftLung Material
G4String LeftLungMat = logicLeftLung->GetMaterial()->GetName();
G4cout << "Material of LeftLung = " << LeftLungMat << G4endl;
// Testing Density
G4double LeftLungDensity = logicLeftLung->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << LeftLungDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double LeftLungMass = (LeftLungVol)*LeftLungDensity;
G4cout << "Mass of LeftLung = " << LeftLungMass / gram << " g" << G4endl;
return physLeftLung;
}

71
src/G4MIRDLeftOvary.cpp Normal file
View File

@ -0,0 +1,71 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDLeftOvary.h"
#include "G4Ellipsoid.hh"
#include "G4LogicalVolume.hh"
#include "G4Material.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4UnionSolid.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDLeftOvary::G4MIRDLeftOvary() {}
G4MIRDLeftOvary::~G4MIRDLeftOvary() {}
G4VPhysicalVolume* G4MIRDLeftOvary::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4cout << "Construct " << volumeName << " with mother volume " << mother->GetName() << G4endl;
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4Material* soft = material->GetMaterial("soft_tissue");
delete material;
G4double ax = 1. * cm;
G4double by = 0.5 * cm;
G4double cz = 2. * cm;
G4Ellipsoid* OneOvary = new G4Ellipsoid("OneOvary", ax, by, cz);
G4LogicalVolume* logicLeftOvary = new G4LogicalVolume(OneOvary, soft, "logical" + volumeName, 0, 0, 0);
// Define rotation and position here!
G4VPhysicalVolume* physLeftOvary = new G4PVPlacement(0, G4ThreeVector(-6. * cm, 0.5 * cm, -20 * cm),
"physicalLeftOvary", logicLeftOvary, mother, false, 0, true);
// Visualization Attributes
// G4VisAttributes* LeftOvaryVisAtt = new G4VisAttributes(G4Colour(0.85,0.44,0.84));
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
delete colourPointer;
G4VisAttributes* LeftOvaryVisAtt = new G4VisAttributes(colour);
LeftOvaryVisAtt->SetForceSolid(wireFrame);
logicLeftOvary->SetVisAttributes(LeftOvaryVisAtt);
G4cout << "LeftOvary created !!!!!!" << G4endl;
// Testing LeftOvary Volume
G4double LeftOvaryVol = logicLeftOvary->GetSolid()->GetCubicVolume();
G4cout << "Volume of LeftOvary = " << LeftOvaryVol / cm3 << " cm^3" << G4endl;
// Testing LeftOvary Material
G4String LeftOvaryMat = logicLeftOvary->GetMaterial()->GetName();
G4cout << "Material of LeftOvary = " << LeftOvaryMat << G4endl;
// Testing Density
G4double LeftOvaryDensity = logicLeftOvary->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << LeftOvaryDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double LeftOvaryMass = (LeftOvaryVol)*LeftOvaryDensity;
G4cout << "Mass of LeftOvary = " << LeftOvaryMass / gram << " g" << G4endl;
return physLeftOvary;
}

93
src/G4MIRDLeftScapula.cpp Normal file
View File

@ -0,0 +1,93 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDLeftScapula.h"
#include "G4Box.hh"
#include "G4Cons.hh"
#include "G4EllipticalTube.hh"
#include "G4LogicalVolume.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SubtractionSolid.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDLeftScapula::G4MIRDLeftScapula() {}
G4MIRDLeftScapula::~G4MIRDLeftScapula() {}
G4VPhysicalVolume* G4MIRDLeftScapula::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4cout << "Construct " << volumeName << " with mother volume " << mother->GetName() << G4endl;
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4Material* skeleton = material->GetMaterial("skeleton");
G4double ax_in = 17. * cm;
G4double by_in = 9.8 * cm;
G4double ax_out = 19. * cm;
G4double by_out = 9.8 * cm;
G4double dz = 16.4 * cm;
G4EllipticalTube* inner_scapula = new G4EllipticalTube("ScapulaIn", ax_in, by_in, (dz + 1. * cm) / 2);
G4EllipticalTube* outer_scapula = new G4EllipticalTube("ScapulaOut", ax_out, by_out, dz / 2);
G4Box* subtraction = new G4Box("subtraction", ax_out, ax_out, ax_out);
G4double xx = ax_out * 0.242; //(sin 14deg)
G4double yy = -ax_out * 0.97; // (cos 14 deg)
G4RotationMatrix* rm = new G4RotationMatrix();
rm->rotateZ(-14. * degree);
G4SubtractionSolid* scapula_first =
new G4SubtractionSolid("Scapula_first", outer_scapula, subtraction, rm, G4ThreeVector(xx, yy, 0. * cm));
G4double xx2 = -ax_out * 0.62470; //(cos 51.34deg)
G4double yy2 = ax_out * 0.78087; // (sin 51.34 deg)
G4RotationMatrix* rm2 = new G4RotationMatrix();
rm2->rotateZ(-38.6598 * degree);
G4SubtractionSolid* scapula_bone =
new G4SubtractionSolid("Scapula", scapula_first, subtraction, rm2, G4ThreeVector(xx2, yy2, 0. * cm));
G4SubtractionSolid* scapula = new G4SubtractionSolid("Scapula", scapula_bone, inner_scapula);
G4LogicalVolume* logicLeftScapula = new G4LogicalVolume(scapula, skeleton, "logical" + volumeName, 0, 0, 0);
G4VPhysicalVolume* physLeftScapula = new G4PVPlacement(
0, G4ThreeVector(0. * cm, 0. * cm, 24.1 * cm), "physicalLeftScapula", logicLeftScapula, mother, false, 0, true);
// Visualization Attributes
// G4VisAttributes* LeftScapulaVisAtt = new G4VisAttributes(G4Colour(0.94,0.5,0.5));
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* LeftScapulaVisAtt = new G4VisAttributes(colour);
LeftScapulaVisAtt->SetForceSolid(wireFrame);
logicLeftScapula->SetVisAttributes(LeftScapulaVisAtt);
G4cout << "LeftScapula created !!!!!!" << G4endl;
// Testing LeftScapula Volume
G4double LeftScapulaVol = logicLeftScapula->GetSolid()->GetCubicVolume();
G4cout << "Volume of LeftScapula = " << LeftScapulaVol / cm3 << " cm^3" << G4endl;
// Testing LeftScapula Material
G4String LeftScapulaMat = logicLeftScapula->GetMaterial()->GetName();
G4cout << "Material of LeftScapula = " << LeftScapulaMat << G4endl;
// Testing Density
G4double LeftScapulaDensity = logicLeftScapula->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << LeftScapulaDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double LeftScapulaMass = (LeftScapulaVol)*LeftScapulaDensity;
G4cout << "Mass of LeftScapula = " << LeftScapulaMass / gram << " g" << G4endl;
return physLeftScapula;
}

71
src/G4MIRDLeftTeste.cpp Normal file
View File

@ -0,0 +1,71 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDLeftTeste.h"
#include "G4Ellipsoid.hh"
#include "G4LogicalVolume.hh"
#include "G4Material.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4UnionSolid.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDLeftTeste::G4MIRDLeftTeste() {}
G4MIRDLeftTeste::~G4MIRDLeftTeste() {}
G4VPhysicalVolume* G4MIRDLeftTeste::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4cout << "Construct " << volumeName << " with mother volume " << mother->GetName() << G4endl;
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4Material* soft = material->GetMaterial("soft_tissue");
delete material;
G4double ax = 1.3 * cm;
G4double by = 1.5 * cm;
G4double cz = 2.3 * cm;
G4Ellipsoid* OneTeste = new G4Ellipsoid("OneTeste", ax, by, cz);
G4LogicalVolume* logicLeftTeste = new G4LogicalVolume(OneTeste, soft, "logical" + volumeName, 0, 0, 0);
// Define rotation and position here!
G4VPhysicalVolume* physLeftTeste = new G4PVPlacement(0, G4ThreeVector(1.4 * cm, 3. * cm, 0 * cm),
"physicalLeftTeste", logicLeftTeste, mother, false, 0, true);
// Visualization Attributes
// G4VisAttributes* LeftTesteVisAtt = new G4VisAttributes(G4Colour(0.85,0.44,0.84));
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
delete colourPointer;
G4VisAttributes* LeftTesteVisAtt = new G4VisAttributes(colour);
LeftTesteVisAtt->SetForceSolid(wireFrame);
logicLeftTeste->SetVisAttributes(LeftTesteVisAtt);
G4cout << "LeftTeste created !!!!!!" << G4endl;
// Testing LeftTeste Volume
G4double LeftTesteVol = logicLeftTeste->GetSolid()->GetCubicVolume();
G4cout << "Volume of LeftTeste = " << LeftTesteVol / cm3 << " cm^3" << G4endl;
// Testing LeftTeste Material
G4String LeftTesteMat = logicLeftTeste->GetMaterial()->GetName();
G4cout << "Material of LeftTeste = " << LeftTesteMat << G4endl;
// Testing Density
G4double LeftTesteDensity = logicLeftTeste->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << LeftTesteDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double LeftTesteMass = (LeftTesteVol)*LeftTesteDensity;
G4cout << "Mass of LeftTeste = " << LeftTesteMass / gram << " g" << G4endl;
return physLeftTeste;
}

95
src/G4MIRDLiver.cpp Normal file
View File

@ -0,0 +1,95 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDLiver.h"
#include "G4Box.hh"
#include "G4Ellipsoid.hh"
#include "G4EllipticalTube.hh"
#include "G4Material.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SubtractionSolid.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
#include <cmath>
G4MIRDLiver::G4MIRDLiver() {}
G4MIRDLiver::~G4MIRDLiver() {}
G4VPhysicalVolume* G4MIRDLiver::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4cout << "Construct " << volumeName << " with mother " << mother->GetName() << G4endl;
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4Material* soft = material->GetMaterial("soft_tissue");
delete material;
G4double dx = 14.19 * cm; // a
G4double dy = 7.84 * cm; // b
G4double dz = 7.21 * cm; //(z2-z1)/2
G4EllipticalTube* firstLiver = new G4EllipticalTube("FirstLiver", dx, dy, dz);
G4double xx = 20.00 * cm;
G4double yy = 50.00 * cm;
G4double zz = 50.00 * cm;
G4Box* subtrLiver = new G4Box("SubtrLiver", xx / 2., yy / 2., zz / 2.);
G4RotationMatrix* rm_relative = new G4RotationMatrix();
rm_relative->rotateY(32. * degree);
rm_relative->rotateZ(40.9 * degree);
// G4double aa = (1.00/31.51);
// G4double bb = (1.00/44.75);
// G4double cc = (-1.00/38.76);
// G4cout<< aa << " "<< bb << " "<<cc<< G4endl;
// G4double dd = sqrt(aa*aa + bb*bb + cc*cc);
// G4cout<< "dd" << dd << G4endl;
// G4cout << aa/dd << "" << bb/dd << " "<< cc/dd <<G4endl;
// G4cout << (std::atan(1.42))/deg << G4endl;
G4SubtractionSolid* liver = new G4SubtractionSolid("Liver", firstLiver, subtrLiver, rm_relative,
G4ThreeVector(10.0 * cm, 0.0 * cm, 0.0 * cm));
G4LogicalVolume* logicLiver = new G4LogicalVolume(liver, soft, "LiverVolume", 0, 0, 0);
// Define rotation and position here!
G4RotationMatrix* rm = new G4RotationMatrix();
rm->rotateX(180. * degree);
G4VPhysicalVolume* physLiver = new G4PVPlacement(rm, G4ThreeVector(0. * cm, 0. * cm, 0. * cm), "physicalLiver",
logicLiver, mother, false, 0, true);
// Visualization Attributes
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* LiverVisAtt = new G4VisAttributes(colour);
LiverVisAtt->SetForceSolid(wireFrame);
logicLiver->SetVisAttributes(LiverVisAtt);
G4cout << "Liver created !!!!!!" << G4endl;
// Testing Liver Volume
G4double LiverVol = logicLiver->GetSolid()->GetCubicVolume();
G4cout << "Volume of Liver = " << LiverVol / cm3 << " cm^3" << G4endl;
// Testing Liver Material
G4String LiverMat = logicLiver->GetMaterial()->GetName();
G4cout << "Material of Liver = " << LiverMat << G4endl;
// Testing Density
G4double LiverDensity = logicLiver->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << LiverDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double LiverMass = (LiverVol)*LiverDensity;
G4cout << "Mass of Liver = " << LiverMass / gram << " g" << G4endl;
return physLiver;
}

View File

@ -0,0 +1,100 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDLowerLargeIntestine.h"
#include "G4EllipticalTube.hh"
#include "G4LogicalVolume.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4Torus.hh"
#include "G4UnionSolid.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDLowerLargeIntestine::G4MIRDLowerLargeIntestine() {}
G4MIRDLowerLargeIntestine::~G4MIRDLowerLargeIntestine() {}
G4VPhysicalVolume* G4MIRDLowerLargeIntestine::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4cout << "Construct " << volumeName << " with mother volume " << mother->GetName() << G4endl;
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4Material* soft = material->GetMaterial("soft_tissue");
delete material;
G4double dx = 1.88 * cm; // a
G4double dy = 2.13 * cm; // b
G4double dz = 7.64 * cm; //(z1-z2)/2
G4EllipticalTube* DescendingColonLowerLargeIntestine = new G4EllipticalTube("DiscendingColon", dx, dy, dz);
G4double rmin = 0.0 * cm;
G4double rmax = 1.88 * cm; // a
G4double rtor = 5.72 * cm; // R1
G4double startphi = 0. * degree;
G4double deltaphi = 90. * degree;
G4Torus* SigmoidColonUpLowerLargeIntestine =
new G4Torus("SigmoidColonUpLowerLargeIntestine", rmin, rmax, rtor, startphi, deltaphi);
rtor = 3. * cm; // R2
G4VSolid* SigmoidColonDownLowerLargeIntestine =
new G4Torus("SigmoidColonDownLowerLargeIntestine", rmin, rmax, rtor, startphi, deltaphi);
G4RotationMatrix* relative_rm = new G4RotationMatrix();
relative_rm->rotateY(180. * degree);
relative_rm->rotateZ(90. * degree);
G4UnionSolid* SigmoidColonLowerLargeIntestine =
new G4UnionSolid("SigmoidColonLowerLargeIntestine", SigmoidColonUpLowerLargeIntestine,
SigmoidColonDownLowerLargeIntestine, relative_rm, G4ThreeVector(0.0, 8.72 * cm, 0.0));
// R1 + R2
G4RotationMatrix* relative_rm_2 = new G4RotationMatrix();
relative_rm_2->rotateX(90. * degree);
G4UnionSolid* LowerLargeIntestine =
new G4UnionSolid("LowerLargeIntestine", DescendingColonLowerLargeIntestine, SigmoidColonLowerLargeIntestine,
relative_rm_2, G4ThreeVector(-5.72 * cm, 0.0 * cm, -7.64 * cm)); // -rtor,0, -dz
G4LogicalVolume* logicLowerLargeIntestine =
new G4LogicalVolume(LowerLargeIntestine, soft, "logical" + volumeName, 0, 0, 0);
G4VPhysicalVolume* physLowerLargeIntestine =
new G4PVPlacement(0, // R1+ R2, -2.36 (y0), z0
G4ThreeVector(8.72 * cm, -2.36 * cm, -18.64 * cm), "physicalLowerLargeIntestine",
logicLowerLargeIntestine, mother, false, 0, true);
// Visualization Attributes
// G4VisAttributes* LowerLargeIntestineVisAtt = new G4VisAttributes(G4Colour(1.0,1.0,0.0));
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* LowerLargeIntestineVisAtt = new G4VisAttributes(colour);
LowerLargeIntestineVisAtt->SetForceSolid(wireFrame);
logicLowerLargeIntestine->SetVisAttributes(LowerLargeIntestineVisAtt);
G4cout << "LowerLargeIntestine created !!!!!!" << G4endl;
// Testing LowerLargeIntestine Volume
G4double LowerLargeIntestineVol = logicLowerLargeIntestine->GetSolid()->GetCubicVolume();
G4cout << "Volume of LowerLargeIntestine = " << LowerLargeIntestineVol / cm3 << " cm^3" << G4endl;
// Testing LowerLargeIntestine Material
G4String LowerLargeIntestineMat = logicLowerLargeIntestine->GetMaterial()->GetName();
G4cout << "Material of LowerLargeIntestine = " << LowerLargeIntestineMat << G4endl;
// Testing Density
G4double LowerLargeIntestineDensity = logicLowerLargeIntestine->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << LowerLargeIntestineDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double LowerLargeIntestineMass = (LowerLargeIntestineVol)*LowerLargeIntestineDensity;
G4cout << "Mass of LowerLargeIntestine = " << LowerLargeIntestineMass / gram << " g" << G4endl;
return physLowerLargeIntestine;
}

103
src/G4MIRDMaleGenitalia.cpp Normal file
View File

@ -0,0 +1,103 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDMaleGenitalia.h"
#include "G4Cons.hh"
#include "G4Ellipsoid.hh"
#include "G4LogicalVolume.hh"
#include "G4Material.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SubtractionSolid.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4Trap.hh"
#include "G4UnionSolid.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDMaleGenitalia::G4MIRDMaleGenitalia() {}
G4MIRDMaleGenitalia::~G4MIRDMaleGenitalia() {}
G4VPhysicalVolume* G4MIRDMaleGenitalia::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4cout << "Construct " << volumeName << " with mother volume " << mother->GetName() << G4endl;
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4Material* soft = material->GetMaterial("soft_tissue");
delete material;
G4double pDz = 2.4 * cm;
G4double pTheta = 0 * degree;
G4double pPhi = 0 * degree;
G4double pDy1 = 4.76 * cm;
G4double pDx1 = 9.52 * cm;
G4double pDx2 = 9.52 * cm;
G4double pAlp1 = 0 * degree;
G4double pDy2 = 5 * cm;
G4double pDx3 = 10 * cm;
G4double pDx4 = 10 * cm;
G4double pAlp2 = 0 * degree;
G4Trap* genitaliaTrap =
new G4Trap("GenitaliaTrap", pDz, pTheta, pPhi, pDy1, pDx1, pDx2, pAlp1, pDy2, pDx3, pDx4, pAlp2);
G4double rmin1 = 0. * cm;
G4double rmin2 = 0. * cm;
G4double dz = 5 * cm;
G4double rmax1 = 9.51 * cm;
G4double rmax2 = 10.01 * cm;
G4double startphi = 0. * degree;
G4double deltaphi = 360. * degree;
G4Cons* genitaliaLegL = new G4Cons("GenitaliaLegL", rmin1, rmax1, rmin2, rmax2, dz / 2., startphi, deltaphi);
G4Cons* genitaliaLegR = new G4Cons("GenitaliaLegR", rmin1, rmax1, rmin2, rmax2, dz / 2., startphi, deltaphi);
G4UnionSolid* genitaliaLegs =
new G4UnionSolid("GenitaliaLegs", genitaliaLegL, genitaliaLegR, 0, G4ThreeVector(20. * cm, 0. * cm, 0 * cm));
G4SubtractionSolid* MaleGenitalia = new G4SubtractionSolid("MaleGenitalia", genitaliaTrap, genitaliaLegs,
0, //
G4ThreeVector(-10. * cm, -5. * cm, 0 * cm));
G4LogicalVolume* logicMaleGenitalia = new G4LogicalVolume(MaleGenitalia, soft, "logical" + volumeName, 0, 0, 0);
// Define rotation and position here!
G4VPhysicalVolume* physMaleGenitalia =
new G4PVPlacement(0, G4ThreeVector(0 * cm, 5. * cm, -2.4 * cm), "physicalMaleGenitalia", logicMaleGenitalia,
mother, false, 0, true);
// Visualization Attributes
// G4VisAttributes* MaleGenitaliaVisAtt = new G4VisAttributes(G4Colour(0.85,0.44,0.84));
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
delete colourPointer;
G4VisAttributes* MaleGenitaliaVisAtt = new G4VisAttributes(colour);
MaleGenitaliaVisAtt->SetForceSolid(wireFrame);
logicMaleGenitalia->SetVisAttributes(MaleGenitaliaVisAtt);
G4cout << "MaleGenitalia created !!!!!!" << G4endl;
// Testing MaleGenitalia Volume
G4double MaleGenitaliaVol = logicMaleGenitalia->GetSolid()->GetCubicVolume();
G4cout << "Volume of MaleGenitalia = " << MaleGenitaliaVol / cm3 << " cm^3" << G4endl;
// Testing MaleGenitalia Material
G4String MaleGenitaliaMat = logicMaleGenitalia->GetMaterial()->GetName();
G4cout << "Material of MaleGenitalia = " << MaleGenitaliaMat << G4endl;
// Testing Density
G4double MaleGenitaliaDensity = logicMaleGenitalia->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << MaleGenitaliaDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double MaleGenitaliaMass = (MaleGenitaliaVol)*MaleGenitaliaDensity;
G4cout << "Mass of MaleGenitalia = " << MaleGenitaliaMass / gram << " g" << G4endl;
return physMaleGenitalia;
}

View File

@ -0,0 +1,71 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDMiddleLowerSpine.h"
#include "G4EllipticalTube.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4UnionSolid.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDMiddleLowerSpine::G4MIRDMiddleLowerSpine() {}
G4MIRDMiddleLowerSpine::~G4MIRDMiddleLowerSpine() {}
G4VPhysicalVolume* G4MIRDMiddleLowerSpine::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4cout << "Construct " << volumeName << " with mother volume " << mother->GetName() << G4endl;
G4Material* skeleton = material->GetMaterial("skeleton");
delete material;
G4double dx = 2. * cm;
G4double dy = 2.5 * cm;
G4double dz = 24. * cm;
G4VSolid* middleLowerSpine = new G4EllipticalTube("MiddleLowerSpine", dx, dy, dz);
G4LogicalVolume* logicMiddleLowerSpine =
new G4LogicalVolume(middleLowerSpine, skeleton, "logical" + volumeName, 0, 0, 0);
// Define rotation and position here!
G4VPhysicalVolume* physMiddleLowerSpine =
new G4PVPlacement(0, G4ThreeVector(0.0 * cm, 5.5 * cm, 11. * cm), "physicalMiddleLowerSpine",
logicMiddleLowerSpine, mother, false, 0, true);
// Visualization Attributes
// G4VisAttributes* MiddleLowerSpineVisAtt = new G4VisAttributes(G4Colour(0.46,0.53,0.6));
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* MiddleLowerSpineVisAtt = new G4VisAttributes(colour);
MiddleLowerSpineVisAtt->SetForceSolid(wireFrame);
logicMiddleLowerSpine->SetVisAttributes(MiddleLowerSpineVisAtt);
G4cout << "MiddleLowerSpine created !!!!!!" << G4endl;
// Testing MiddleLowerSpine Volume
G4double MiddleLowerSpineVol = logicMiddleLowerSpine->GetSolid()->GetCubicVolume();
G4cout << "Volume of MiddleLowerSpine = " << MiddleLowerSpineVol / cm3 << " cm^3" << G4endl;
// Testing MiddleLowerSpine Material
G4String MiddleLowerSpineMat = logicMiddleLowerSpine->GetMaterial()->GetName();
G4cout << "Material of MiddleLowerSpine = " << MiddleLowerSpineMat << G4endl;
// Testing Density
G4double MiddleLowerSpineDensity = logicMiddleLowerSpine->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << MiddleLowerSpineDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double MiddleLowerSpineMass = (MiddleLowerSpineVol)*MiddleLowerSpineDensity;
G4cout << "Mass of MiddleLowerSpine = " << MiddleLowerSpineMass / gram << " g" << G4endl;
return physMiddleLowerSpine;
}

81
src/G4MIRDPancreas.cpp Normal file
View File

@ -0,0 +1,81 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDPancreas.h"
#include "G4Box.hh"
#include "G4Ellipsoid.hh"
#include "G4LogicalVolume.hh"
#include "G4Material.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SubtractionSolid.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDPancreas::G4MIRDPancreas() {}
G4MIRDPancreas::~G4MIRDPancreas() {}
G4VPhysicalVolume* G4MIRDPancreas::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4cout << "Construct " << volumeName << " with mother volume " << mother->GetName() << G4endl;
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4Material* soft = material->GetMaterial("soft_tissue");
delete material;
G4double ax = 3. * cm; // c
G4double by = 1. * cm; // b
G4double cz = 15. * cm; // a
G4double zcut1 = -15. * cm; // -a
G4double zcut2 = 0.0 * cm;
G4Ellipsoid* pancreasFirst = new G4Ellipsoid("PancreasFirst", ax, by, cz, zcut1, zcut2);
G4double xx = 6. * cm; // 2*c
G4double yy = 2. * cm; // 2*b
G4double zz = 12. * cm; // cz - x1 = 3 cm
G4Box* subtrPancreas = new G4Box("SubtrPancreas", xx / 2., yy / 2., zz / 2.);
G4SubtractionSolid* pancreas =
new G4SubtractionSolid("pancreas", pancreasFirst, subtrPancreas, 0, G4ThreeVector(-3 * cm, 0.0, -9. * cm));
//
G4LogicalVolume* logicPancreas = new G4LogicalVolume(pancreas, soft, "logical" + volumeName, 0, 0, 0);
G4RotationMatrix* rm = new G4RotationMatrix();
rm->rotateY(90. * degree);
G4VPhysicalVolume* physPancreas = new G4PVPlacement(rm, G4ThreeVector(-0. * cm, 0.0, 2 * cm), // x0, 0, 2 cm
"physicalPancreas", logicPancreas, mother, false, 0, true);
// Visualization Attributes
// G4VisAttributes* PancreasVisAtt = new G4VisAttributes(G4Colour(0.28,0.82,0.8));
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* PancreasVisAtt = new G4VisAttributes(colour);
PancreasVisAtt->SetForceSolid(wireFrame);
logicPancreas->SetVisAttributes(PancreasVisAtt);
G4cout << "Pancreas created !!!!!!" << G4endl;
// Testing Pancreas Volume
G4double PancreasVol = logicPancreas->GetSolid()->GetCubicVolume();
G4cout << "Volume of Pancreas = " << PancreasVol / cm3 << " cm^3" << G4endl;
// Testing Pancreas Material
G4String PancreasMat = logicPancreas->GetMaterial()->GetName();
G4cout << "Material of Pancreas = " << PancreasMat << G4endl;
// Testing Density
G4double PancreasDensity = logicPancreas->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << PancreasDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double PancreasMass = (PancreasVol)*PancreasDensity;
G4cout << "Mass of Pancreas = " << PancreasMass / gram << " g" << G4endl;
return physPancreas;
}

107
src/G4MIRDPelvis.cpp Normal file
View File

@ -0,0 +1,107 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDPelvis.h"
#include "G4Box.hh"
#include "G4EllipticalTube.hh"
#include "G4LogicalVolume.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SubtractionSolid.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VSolid.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDPelvis::G4MIRDPelvis() {}
G4MIRDPelvis::~G4MIRDPelvis() {}
G4VPhysicalVolume* G4MIRDPelvis::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4cout << "Construct " << volumeName << " with mother volume " << mother->GetName() << G4endl;
G4Material* skeleton = material->GetMaterial("skeleton");
delete material;
/*
G4double dx= 10.35 * cm;//12. *cm; // a2
G4double dy= 11.76 * cm;//12. * cm; // b2
G4double dz= 9.915 * cm; // z2/2
G4VSolid* outPelvis = new G4EllipticalTube("OutPelvis",dx, dy, dz);
G4double dx_in = 9.75 * cm;//11.3 * cm; // a1
G4double dy_in = 11.07 *cm; //11.3* cm; //b1
G4double dz_in = 10. * cm;//11.0 *cm; // z2/2
*/
G4double dx = 12. * cm; // a2
G4double dy = 12. * cm; // b2
G4double dz = 11. * cm; // z2/2
G4VSolid* outPelvis = new G4EllipticalTube("OutPelvis", dx, dy, dz);
dx = 11.3 * cm; // a1
dy = 11.3 * cm; // b1
dz = 12.0 * cm; // z2/2
G4VSolid* inPelvis = new G4EllipticalTube("InPelvis", dx, dy, dz);
G4double x = 28. * cm; // a2 * 2
G4double y = 28. * cm; // b2*2
G4double z = 24. * cm; // z2
G4VSolid* subPelvis = new G4Box("SubtrPelvis", x / 2., y / 2., z / 2.);
G4SubtractionSolid* firstPelvis =
new G4SubtractionSolid("FirstPelvis", outPelvis, inPelvis, 0, G4ThreeVector(0. * cm, -0.8 * cm, 0. * cm));
G4SubtractionSolid* secondPelvis =
new G4SubtractionSolid("SecondPelvis", firstPelvis, subPelvis, 0, G4ThreeVector(0.0, -14. * cm, 0. * cm));
// half of the y size of the box
G4SubtractionSolid* pelvis =
new G4SubtractionSolid("Pelvis", secondPelvis, subPelvis, 0, G4ThreeVector(0.0, 22. * cm, -9. * cm));
G4LogicalVolume* logicPelvis = new G4LogicalVolume(pelvis, skeleton, "logical" + volumeName, 0, 0, 0);
G4VPhysicalVolume* physPelvis =
new G4PVPlacement(0, G4ThreeVector(0.0, -3. * cm, -24. * cm), // 0, y02, z position
// with respect to the trunk
"physicalPelvis", logicPelvis, mother, false, 0, true);
// Visualization Attributes
// G4VisAttributes* PelvisVisAtt = new G4VisAttributes(G4Colour(0.46,0.53,0.6));
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* PelvisVisAtt = new G4VisAttributes(colour);
PelvisVisAtt->SetForceSolid(wireFrame);
logicPelvis->SetVisAttributes(PelvisVisAtt);
G4cout << "Pelvis created !!!!!!" << G4endl;
// Testing Pelvis Volume
G4double PelvisVol = logicPelvis->GetSolid()->GetCubicVolume();
G4cout << "Volume of Pelvis = " << PelvisVol / cm3 << " cm^3" << G4endl;
// Testing Pelvis Material
G4String PelvisMat = logicPelvis->GetMaterial()->GetName();
G4cout << "Material of Pelvis = " << PelvisMat << G4endl;
// Testing Density
G4double PelvisDensity = logicPelvis->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << PelvisDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double PelvisMass = (PelvisVol)*PelvisDensity;
G4cout << "Mass of Pelvis = " << PelvisMass / gram << " g" << G4endl;
return physPelvis;
}

141
src/G4MIRDRibCage.cpp Normal file
View File

@ -0,0 +1,141 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDRibCage.h"
#include "G4Box.hh"
#include "G4EllipticalTube.hh"
#include "G4PVPlacement.hh"
#include "G4PVReplica.hh"
#include "G4SDManager.hh"
#include "G4SubtractionSolid.hh"
#include "G4SystemOfUnits.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDRibCage::G4MIRDRibCage() {}
G4MIRDRibCage::~G4MIRDRibCage() {}
G4VPhysicalVolume* G4MIRDRibCage::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4cout << "Construct " << volumeName << " with mother volume " << mother->GetName() << G4endl;
G4Material* skeleton = material->GetMaterial("skeleton");
G4Material* soft = material->GetMaterial("soft_tissue");
delete material;
G4double dx = 17. * cm; // a2
G4double dy = 9.8 * cm; // b2
G4double thickness = 32.4 * cm; // z2/2 of cage
G4EllipticalTube* outCage = new G4EllipticalTube("outCage", dx, dy, thickness / 2.);
dx = 16.4 * cm; // a1
dy = 9.2 * cm; // b1
G4double dz = 34. * cm; // z2/2
G4EllipticalTube* inCage = new G4EllipticalTube("inCage", dx, dy, dz / 2.);
G4SubtractionSolid* cage =
new G4SubtractionSolid("Cage", outCage, inCage, 0, G4ThreeVector(0. * cm, 0. * cm, 0. * cm));
G4LogicalVolume* logicRibCage = new G4LogicalVolume(cage, soft, "logicalCage", 0, 0, 0);
G4VPhysicalVolume* physRibCage = new G4PVPlacement(0, G4ThreeVector(0.0, 0.0, thickness / 2. + 0.1 * cm),
// with respect to the trunk
"physicalRibCage", logicRibCage, mother, false, 0, true);
G4double xx = 17. * cm;
G4double yy = 9.8 * cm;
G4double ribThickness = 1.4 * cm;
G4EllipticalTube* rib_out = new G4EllipticalTube("rib_out", xx, yy, ribThickness / 2.);
xx = 16.5 * cm;
yy = 9.3 * cm;
G4double zz = 1.5 * cm;
G4EllipticalTube* rib_in = new G4EllipticalTube("rib_in", xx, yy, zz / 2.);
G4SubtractionSolid* rib = new G4SubtractionSolid("rib", rib_out, rib_in);
G4LogicalVolume* logicRib = new G4LogicalVolume(rib, skeleton, "logical" + volumeName, 0, 0, 0);
physRib1 = new G4PVPlacement(0, G4ThreeVector(0.0, 0.0, (-32.2 * cm / 2. + 0.8 * cm)),
// with respect to the trunk
"physicalRib", logicRib, physRibCage, false, 0, true);
physRib2 = new G4PVPlacement(0, G4ThreeVector(0.0, 0.0, (-32.2 * cm / 2. + 0.8 * cm + 2.8 * cm)),
// with respect to the trunk
"physicalRib", logicRib, physRibCage, false, 0, true);
physRib3 = new G4PVPlacement(0, G4ThreeVector(0.0, 0.0, (-thickness / 2. + 0.8 * cm + 5.6 * cm)),
// with respect to the trunk
"physicalRib", logicRib, physRibCage, false, 0, true);
physRib4 = new G4PVPlacement(0, G4ThreeVector(0.0, 0.0, (-thickness / 2. + 0.8 * cm + 8.4 * cm)),
// with respect to the trunk
"physicalRib", logicRib, physRibCage, false, 0, true);
physRib5 = new G4PVPlacement(0, G4ThreeVector(0.0, 0.0, (-thickness / 2. + 0.8 * cm + 11.2 * cm)),
// with respect to the trunk
"physicalRib", logicRib, physRibCage, false, 0, true);
physRib6 = new G4PVPlacement(0, G4ThreeVector(0.0, 0.0, (-thickness / 2. + 0.8 * cm + 14. * cm)),
// with respect to the trunk
"physicalRib", logicRib, physRibCage, false, 0, true);
physRib7 = new G4PVPlacement(0, G4ThreeVector(0.0, 0.0, (-thickness / 2. + 0.8 * cm + 16.8 * cm)),
// with respect to the trunk
"physicalRib", logicRib, physRibCage, false, 0, true);
physRib8 = new G4PVPlacement(0, G4ThreeVector(0.0, 0.0, (-thickness / 2. + 0.8 * cm + 19.6 * cm)),
// with respect to the trunk
"physicalRib", logicRib, physRibCage, false, 0, true);
physRib9 = new G4PVPlacement(0, G4ThreeVector(0.0, 0.0, (-thickness / 2. + 0.8 * cm + 22.4 * cm)),
// with respect to the trunk
"physicalRib", logicRib, physRibCage, false, 0, true);
physRib10 = new G4PVPlacement(0, G4ThreeVector(0.0, 0.0, (-thickness / 2. + 0.8 * cm + 25.2 * cm)),
// with respect to the trunk
"physicalRib", logicRib, physRibCage, false, 0, true);
physRib11 = new G4PVPlacement(0, G4ThreeVector(0.0, 0.0, (-thickness / 2. + 0.8 * cm + 28. * cm)),
// with respect to the trunk
"physicalRib", logicRib, physRibCage, false, 0, true);
physRib12 = new G4PVPlacement(0, G4ThreeVector(0.0, 0.0, (-thickness / 2. + 0.8 * cm + 30.8 * cm)),
// with respect to the trunk
"physicalRib", logicRib, physRibCage, false, 0, true);
// Visualization Attributes
logicRibCage->SetVisAttributes(G4VisAttributes::GetInvisible());
// G4VisAttributes* RibCageVisAtt = new G4VisAttributes(G4Colour(0.46,0.53,0.6));
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* RibCageVisAtt = new G4VisAttributes(colour);
RibCageVisAtt->SetForceSolid(wireFrame);
logicRib->SetVisAttributes(RibCageVisAtt);
G4cout << "RibCage created !!!!!!" << G4endl;
// Testing Pelvis Volume
G4double RibCageVol = logicRib->GetSolid()->GetCubicVolume();
G4cout << "Volume of RibCage = " << ((RibCageVol)*12.) / cm3 << " cm^3" << G4endl;
// Testing RibCage Material
G4String RibCageMat = logicRib->GetMaterial()->GetName();
G4cout << "Material of RibCage = " << RibCageMat << G4endl;
// Testing Density
G4double RibCageDensity = logicRib->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << RibCageDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double RibCageMass = (RibCageVol)*RibCageDensity * 12; // 12 is the total number of ribs;
G4cout << "Mass of RibCage = " << (RibCageMass) / gram << " g" << G4endl;
return physRibCage;
}

View File

@ -0,0 +1,74 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDRightAdrenal.h"
#include "G4Box.hh"
#include "G4Ellipsoid.hh"
#include "G4EllipticalTube.hh"
#include "G4Material.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SubtractionSolid.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4UnionSolid.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDRightAdrenal::G4MIRDRightAdrenal() {}
G4MIRDRightAdrenal::~G4MIRDRightAdrenal() {}
G4VPhysicalVolume* G4MIRDRightAdrenal::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4cout << "Construct " << volumeName << " with mother volume " << mother->GetName() << G4endl;
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4Material* soft = material->GetMaterial("soft_tissue");
delete material;
G4double ax = 1.5 * cm; // a
G4double by = 0.5 * cm; // b
G4double cz = 5.0 * cm; // c
G4VSolid* rightAdrenal = new G4Ellipsoid("OneRightAdrenal", ax, by, cz, 0. * cm, cz);
G4LogicalVolume* logicRightAdrenal = new G4LogicalVolume(rightAdrenal, soft, "logical" + volumeName, 0, 0, 0);
G4VPhysicalVolume* physRightAdrenal =
new G4PVPlacement(0,
G4ThreeVector(-4.5 * cm, // xo
6.5 * cm, // yo
3. * cm), // zo
"physicalRightAdrenal", logicRightAdrenal, mother, false, 0, true);
// Visualization Attributes
// G4VisAttributes* RightAdrenalVisAtt = new G4VisAttributes(G4Colour(0.72,0.52,0.04));
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* RightAdrenalVisAtt = new G4VisAttributes(colour);
RightAdrenalVisAtt->SetForceSolid(wireFrame);
logicRightAdrenal->SetVisAttributes(RightAdrenalVisAtt);
G4cout << "Right RightAdrenal created !!!!!!" << G4endl;
// Testing RightAdrenal Volume
G4double RightAdrenalVol = logicRightAdrenal->GetSolid()->GetCubicVolume();
G4cout << "Volume of RightAdrenal = " << RightAdrenalVol / cm3 << " cm^3" << G4endl;
// Testing RightAdrenal Material
G4String RightAdrenalMat = logicRightAdrenal->GetMaterial()->GetName();
G4cout << "Material of RightAdrenal = " << RightAdrenalMat << G4endl;
// Testing Density
G4double RightAdrenalDensity = logicRightAdrenal->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << RightAdrenalDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double RightAdrenalMass = (RightAdrenalVol)*RightAdrenalDensity;
G4cout << "Mass of RightAdrenal = " << RightAdrenalMass / gram << " g" << G4endl;
return physRightAdrenal;
}

View File

@ -0,0 +1,78 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDRightArmBone.h"
#include "G4EllipticalCone.hh"
#include "G4EllipticalTube.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4UnionSolid.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDRightArmBone::G4MIRDRightArmBone() {}
G4MIRDRightArmBone::~G4MIRDRightArmBone() {}
G4VPhysicalVolume* G4MIRDRightArmBone::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
// Remind! the elliptical cone gives problems! Intersections of volumes,
// wrong calculation of the volume!
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4cout << "Construct " << volumeName << " with mother volume " << mother->GetName() << G4endl;
G4Material* skeleton = material->GetMaterial("skeleton");
delete material;
G4double dx = 1.4 * cm; // a
G4double dy = 2.7 * cm; // b
// G4double dz= 46. * cm;//z0
// G4EllipticalCone* arm = new G4EllipticalCone("OneRightArmBone",dx/2.,dy/2.,dz, 34.5 *cm);
G4EllipticalTube* rightArm = new G4EllipticalTube("OneRightArmBone", dx, dy, 34.5 * cm);
G4LogicalVolume* logicRightArmBone = new G4LogicalVolume(rightArm, skeleton, "logical" + volumeName, 0, 0, 0);
G4RotationMatrix* rm = new G4RotationMatrix();
rm->rotateX(180. * degree);
G4VPhysicalVolume* physRightArmBone =
new G4PVPlacement(rm, G4ThreeVector(-18.4 * cm, 0.0, -0.5 * cm),
//-x0
"physicalRightArmBone", logicRightArmBone, mother, false, 0, true);
// Visualization Attributes
// G4VisAttributes* RightArmBoneVisAtt = new G4VisAttributes(G4Colour(0.46,0.53,0.6));
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* RightArmBoneVisAtt = new G4VisAttributes(colour);
RightArmBoneVisAtt->SetForceSolid(wireFrame);
logicRightArmBone->SetVisAttributes(RightArmBoneVisAtt);
G4cout << "RightArmBone created !!!!!!" << G4endl;
// Testing RightArmBone Volume
G4double RightArmBoneVol = logicRightArmBone->GetSolid()->GetCubicVolume();
G4cout << "Volume of RightArmBone = " << RightArmBoneVol / cm3 << " cm^3" << G4endl;
// Testing RightArmBone Material
G4String RightArmBoneMat = logicRightArmBone->GetMaterial()->GetName();
G4cout << "Material of RightArmBone = " << RightArmBoneMat << G4endl;
// Testing Density
G4double RightArmBoneDensity = logicRightArmBone->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << RightArmBoneDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double RightArmBoneMass = (RightArmBoneVol)*RightArmBoneDensity;
G4cout << "Mass of RightArmBone = " << RightArmBoneMass / gram << " g" << G4endl;
return physRightArmBone;
}

88
src/G4MIRDRightBreast.cpp Normal file
View File

@ -0,0 +1,88 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDRightBreast.h"
#include "G4Ellipsoid.hh"
#include "G4EllipticalTube.hh"
#include "G4LogicalVolume.hh"
#include "G4Material.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SubtractionSolid.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4UnionSolid.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDRightBreast::G4MIRDRightBreast() {}
G4MIRDRightBreast::~G4MIRDRightBreast() {}
G4VPhysicalVolume* G4MIRDRightBreast::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4cout << "Construct " << volumeName << " with mother volume " << mother->GetName() << G4endl;
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4Material* soft = material->GetMaterial("soft_tissue");
delete material;
G4double ax = 4.95 * cm;
G4double by = 4.35 * cm;
G4double cz = 4.15 * cm;
G4Ellipsoid* oneRightBreast = new G4Ellipsoid("OneRightBreast", ax, by, cz);
G4double dx = 20. * cm;
G4double dy = 10. * cm;
G4double dz = 35. * cm;
G4EllipticalTube* Trunk = new G4EllipticalTube("Trunk", dx, dy, dz);
G4RotationMatrix* rm_relative = new G4RotationMatrix();
rm_relative->rotateX(90. * degree);
G4SubtractionSolid* breast = new G4SubtractionSolid("RightBreast", oneRightBreast, Trunk, rm_relative,
G4ThreeVector(10. * cm, 0.0 * cm, -8.66 * cm));
G4LogicalVolume* logicRightBreast = new G4LogicalVolume(breast, soft, "logical" + volumeName, 0, 0, 0);
// Define rotation and position here!
G4RotationMatrix* rm = new G4RotationMatrix();
rm->rotateX(90. * degree);
rm->rotateY(0. * degree);
rm->rotateZ(-16. * degree);
G4VPhysicalVolume* physRightBreast =
new G4PVPlacement(rm, G4ThreeVector(-10. * cm, 9.1 * cm, 52. * cm), "physicalRightBreast", logicRightBreast,
mother, false, 0, true);
// Visualization Attributes
// G4VisAttributes* RightBreastVisAtt = new G4VisAttributes(G4Colour(1.0,0.41,0.71));
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* RightBreastVisAtt = new G4VisAttributes(colour);
RightBreastVisAtt->SetForceSolid(wireFrame);
logicRightBreast->SetVisAttributes(RightBreastVisAtt);
G4cout << "RightBreast created !!!!!!" << G4endl;
// Testing RightBreast Volume
G4double RightBreastVol = logicRightBreast->GetSolid()->GetCubicVolume();
G4cout << "Volume of RightBreast = " << RightBreastVol / cm3 << " cm^3" << G4endl;
// Testing RightBreast Material
G4String RightBreastMat = logicRightBreast->GetMaterial()->GetName();
G4cout << "Material of RightBreast = " << RightBreastMat << G4endl;
// Testing Density
G4double RightBreastDensity = logicRightBreast->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << RightBreastDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double RightBreastMass = (RightBreastVol)*RightBreastDensity;
G4cout << "Mass of RightBreast = " << RightBreastMass / gram << " g" << G4endl;
return physRightBreast;
}

View File

@ -0,0 +1,69 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDRightClavicle.h"
#include "G4Box.hh"
#include "G4Cons.hh"
#include "G4EllipticalTube.hh"
#include "G4LogicalVolume.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SubtractionSolid.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4Torus.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDRightClavicle::G4MIRDRightClavicle() {}
G4MIRDRightClavicle::~G4MIRDRightClavicle() {}
G4VPhysicalVolume* G4MIRDRightClavicle::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4cout << "Construct " << volumeName << " with mother volume " << mother->GetName() << G4endl;
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4Material* skeleton = material->GetMaterial("skeleton");
G4double rMin = 0 * cm;
G4double rMax = 0.7883 * cm;
G4double rTor = 10 * cm;
G4double pSPhi = 201.75 * degree;
G4double pDPhi = 0.7 * rad;
G4Torus* clavicle = new G4Torus("Clavicle", rMin, rMax, rTor, pSPhi, pDPhi);
G4LogicalVolume* logicRightClavicle = new G4LogicalVolume(clavicle, skeleton, "logical" + volumeName, 0, 0, 0);
G4VPhysicalVolume* physRightClavicle =
new G4PVPlacement(0, G4ThreeVector(0. * cm, 2. * cm, 33.25 * cm), "physicalRightClavicle", logicRightClavicle,
mother, false, 0, true);
// Visualization Attributes
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* RightClavicleVisAtt = new G4VisAttributes(colour);
RightClavicleVisAtt->SetForceSolid(wireFrame);
logicRightClavicle->SetVisAttributes(RightClavicleVisAtt);
G4cout << "RightClavicle created !!!!!!" << G4endl;
// Testing RightClavicle Volume
G4double RightClavicleVol = logicRightClavicle->GetSolid()->GetCubicVolume();
G4cout << "Volume of RightClavicle = " << RightClavicleVol / cm3 << " cm^3" << G4endl;
// Testing RightClavicle Material
G4String RightClavicleMat = logicRightClavicle->GetMaterial()->GetName();
G4cout << "Material of RightClavicle = " << RightClavicleMat << G4endl;
// Testing Density
G4double RightClavicleDensity = logicRightClavicle->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << RightClavicleDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double RightClavicleMass = (RightClavicleVol)*RightClavicleDensity;
G4cout << "Mass of RightClavicle = " << RightClavicleMass / gram << " g" << G4endl;
return physRightClavicle;
}

83
src/G4MIRDRightKidney.cpp Normal file
View File

@ -0,0 +1,83 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDRightKidney.h"
#include "G4Box.hh"
#include "G4Ellipsoid.hh"
#include "G4EllipticalTube.hh"
#include "G4Material.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SubtractionSolid.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4UnionSolid.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDRightKidney::G4MIRDRightKidney() {}
G4MIRDRightKidney::~G4MIRDRightKidney() {}
G4VPhysicalVolume* G4MIRDRightKidney::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4cout << "Construct " << volumeName << " with mother volume " << mother->GetName() << G4endl;
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4Material* soft = material->GetMaterial("soft_tissue");
delete material;
G4double ax = 4.5 * cm; // a
G4double by = 1.5 * cm; // b
G4double cz = 5.5 * cm; // c
G4VSolid* oneRightKidney = new G4Ellipsoid("OneRightKidney", ax, by, cz);
G4double xx = 6. * cm;
G4double yy = 12.00 * cm;
G4double zz = 12.00 * cm;
G4VSolid* subtrRightKidney = new G4Box("SubtrRightKidney", xx / 2., yy / 2., zz / 2.);
G4SubtractionSolid* kidney = new G4SubtractionSolid("RightKidney", oneRightKidney, subtrRightKidney, 0,
G4ThreeVector(6. * cm, // x0
0.0 * cm, 0.0 * cm));
G4LogicalVolume* logicRightKidney = new G4LogicalVolume(kidney, soft, "logical" + volumeName, 0, 0, 0);
G4VPhysicalVolume* physRightKidney =
new G4PVPlacement(0,
G4ThreeVector(-6. * cm, // xo
6. * cm, // yo
-2.50 * cm), // zo
"physicalRightKidney", logicRightKidney, mother, false, 0, true);
// Visualization Attributes
// G4VisAttributes* RightKidneyVisAtt = new G4VisAttributes(G4Colour(0.72,0.52,0.04));
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* RightKidneyVisAtt = new G4VisAttributes(colour);
RightKidneyVisAtt->SetForceSolid(wireFrame);
logicRightKidney->SetVisAttributes(RightKidneyVisAtt);
G4cout << "RightKidney created !!!!!!" << G4endl;
// Testing RightKidney Volume
G4double RightKidneyVol = logicRightKidney->GetSolid()->GetCubicVolume();
G4cout << "Volume of RightKidney = " << RightKidneyVol / cm3 << " cm^3" << G4endl;
// Testing RightKidney Material
G4String RightKidneyMat = logicRightKidney->GetMaterial()->GetName();
G4cout << "Material of RightKidney = " << RightKidneyMat << G4endl;
// Testing Density
G4double RightKidneyDensity = logicRightKidney->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << RightKidneyDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double RightKidneyMass = (RightKidneyVol)*RightKidneyDensity;
G4cout << "Mass of RightKidney = " << RightKidneyMass / gram << " g" << G4endl;
return physRightKidney;
}

75
src/G4MIRDRightLeg.cpp Normal file
View File

@ -0,0 +1,75 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDRightLeg.h"
#include "G4Cons.hh"
#include "G4EllipticalTube.hh"
#include "G4LogicalVolume.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4UnionSolid.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDRightLeg::G4MIRDRightLeg() {}
G4MIRDRightLeg::~G4MIRDRightLeg() {}
G4VPhysicalVolume* G4MIRDRightLeg::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4cout << "Construct " << volumeName << " with mother volume " << mother->GetName() << G4endl;
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4Material* soft = material->GetMaterial("soft_tissue");
G4double rmin1 = 0. * cm;
G4double rmin2 = 0. * cm;
G4double dz = 80.0 * cm;
G4double rmax1 = 2.0 * cm;
G4double rmax2 = 10. * cm;
G4double startphi = 0. * degree;
G4double deltaphi = 360. * degree;
G4Cons* leg1 = new G4Cons("Leg1", rmin1, rmax1, rmin2, rmax2, dz / 2., startphi, deltaphi);
G4LogicalVolume* logicRightLeg = new G4LogicalVolume(leg1, soft, "logical" + volumeName, 0, 0, 0);
G4RotationMatrix* rm = new G4RotationMatrix();
rm->rotateX(180. * degree);
rm->rotateY(180. * degree);
G4VPhysicalVolume* physRightLeg = new G4PVPlacement(rm,
// G4ThreeVector(-10. * cm, 0. * cm, -47. *cm), //FA
G4ThreeVector(-10. * cm, 0. * cm, -40. * cm),
"physicalRightLeg", logicRightLeg, mother, false, 0, true);
// Visualization Attributes
// G4VisAttributes* RightLegVisAtt = new G4VisAttributes(G4Colour(0.94,0.5,0.5));
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* RightLegVisAtt = new G4VisAttributes(colour);
RightLegVisAtt->SetForceSolid(wireFrame);
logicRightLeg->SetVisAttributes(RightLegVisAtt);
G4cout << "RightLeg created !!!!!!" << G4endl;
// Testing RightLeg Volume
G4double RightLegVol = logicRightLeg->GetSolid()->GetCubicVolume();
G4cout << "Volume of RightLeg = " << RightLegVol / cm3 << " cm^3" << G4endl;
// Testing RightLeg Material
G4String RightLegMat = logicRightLeg->GetMaterial()->GetName();
G4cout << "Material of RightLeg = " << RightLegMat << G4endl;
// Testing Density
G4double RightLegDensity = logicRightLeg->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << RightLegDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double RightLegMass = (RightLegVol)*RightLegDensity;
G4cout << "Mass of RightLeg = " << RightLegMass / gram << " g" << G4endl;
return physRightLeg;
}

View File

@ -0,0 +1,82 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDRightLegBone.h"
#include "G4Cons.hh"
#include "G4EllipticalTube.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4UnionSolid.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDRightLegBone::G4MIRDRightLegBone() {}
G4MIRDRightLegBone::~G4MIRDRightLegBone() {}
G4VPhysicalVolume* G4MIRDRightLegBone::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4cout << "Construct " << volumeName << " with mother volume " << mother->GetName() << G4endl;
G4Material* skeleton = material->GetMaterial("skeleton");
delete material;
G4double dz = 79.8 * cm;
G4double rmin1 = 0.0 * cm;
G4double rmin2 = 0.0 * cm;
G4double rmax1 = 1. * cm;
G4double rmax2 = 3.5 * cm;
G4double startphi = 0. * degree;
G4double deltaphi = 360. * degree;
G4Cons* leg_bone = new G4Cons("OneRightLegBone", rmin1, rmax1, rmin2, rmax2, dz / 2., startphi, deltaphi);
// G4RotationMatrix* rm_relative = new G4RotationMatrix();
// rm_relative -> rotateY(-12.5 * degree);
// G4UnionSolid* legs_bones = new G4UnionSolid("RightLegBone",
// leg_bone, leg_bone,
// 0,
// G4ThreeVector(20.* cm, 0.0,0. * cm));
G4LogicalVolume* logicRightLegBone = new G4LogicalVolume(leg_bone, skeleton, "logical" + volumeName, 0, 0, 0);
// Define rotation and position here!
G4VPhysicalVolume* physRightLegBone = new G4PVPlacement(
0, G4ThreeVector(0.0 * cm, 0.0, 0.1 * cm), "physicalRightLegBone", logicRightLegBone, mother, false, 0, true);
// Visualization Attributes
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* RightLegBoneVisAtt = new G4VisAttributes(colour);
RightLegBoneVisAtt->SetForceSolid(wireFrame);
logicRightLegBone->SetVisAttributes(RightLegBoneVisAtt);
G4cout << "RightLegBone created !!!!!!" << G4endl;
// Testing RightLegBone Volume
G4double RightLegBoneVol = logicRightLegBone->GetSolid()->GetCubicVolume();
G4cout << "Volume of RightLegBone = " << RightLegBoneVol / cm3 << " cm^3" << G4endl;
// Testing RightLegBone Material
G4String RightLegBoneMat = logicRightLegBone->GetMaterial()->GetName();
G4cout << "Material of RightLegBone = " << RightLegBoneMat << G4endl;
// Testing Density
G4double RightLegBoneDensity = logicRightLegBone->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << RightLegBoneDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double RightLegBoneMass = (RightLegBoneVol)*RightLegBoneDensity;
G4cout << "Mass of RightLegBone = " << RightLegBoneMass / gram << " g" << G4endl;
return physRightLegBone;
}

97
src/G4MIRDRightLung.cpp Normal file
View File

@ -0,0 +1,97 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDRightLung.h"
#include "G4Box.hh"
#include "G4Ellipsoid.hh"
#include "G4LogicalVolume.hh"
#include "G4Material.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SubtractionSolid.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4UnionSolid.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDRightLung::G4MIRDRightLung() {}
G4MIRDRightLung::~G4MIRDRightLung() {}
G4VPhysicalVolume* G4MIRDRightLung::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4cout << "Construct " << volumeName << " with mother volume " << mother->GetName() << G4endl;
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4Material* lung_material = material->GetMaterial("lung_material");
delete material;
G4double ax = 5. * cm; // a
G4double by = 7.5 * cm; // b
G4double cz = 24. * cm; // c
G4double zcut1 = 0.0 * cm;
G4double zcut2 = 24. * cm;
G4Ellipsoid* oneLung = new G4Ellipsoid("OneLung", ax, by, cz, zcut1, zcut2);
ax = 5. * cm;
by = 7.5 * cm;
cz = 24. * cm;
G4Ellipsoid* subtrLung = new G4Ellipsoid("subtrLung", ax, by, cz);
// y<0
G4double dx = 5.5 * cm;
G4double dy = 8.5 * cm;
G4double dz = 24. * cm;
G4Box* box = new G4Box("Box", dx, dy, dz);
G4SubtractionSolid* section =
new G4SubtractionSolid("BoxSub", subtrLung, box, 0, G4ThreeVector(0. * cm, 8.5 * cm, 0. * cm));
// G4SubtractionSolid* section2 = new G4SubtractionSolid("BoxSub2", subtrLung, box, 0, G4ThreeVector(0.*cm, -8.5*
// cm, 0.*cm));
G4SubtractionSolid* lung1 =
new G4SubtractionSolid("Lung1", oneLung, section, 0, G4ThreeVector(6. * cm, 0 * cm, 0.0 * cm));
G4LogicalVolume* logicRightLung = new G4LogicalVolume(lung1, lung_material, "logical" + volumeName, 0, 0, 0);
G4RotationMatrix* rm = new G4RotationMatrix();
rm->rotateZ(-360. * degree);
G4VPhysicalVolume* physRightLung = new G4PVPlacement(rm, G4ThreeVector(-8.50 * cm, 0.0 * cm, 8.5 * cm),
"physicalRightLung", logicRightLung, mother, false, 0, true);
// Visualization Attributes
// G4VisAttributes* RightLungVisAtt = new G4VisAttributes(G4Colour(0.25,0.41,0.88));
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* RightLungVisAtt = new G4VisAttributes(colour);
RightLungVisAtt->SetForceSolid(wireFrame);
logicRightLung->SetVisAttributes(RightLungVisAtt);
G4cout << "RightLung created !!!!!!" << G4endl;
// Testing RightLung Volume
G4double RightLungVol = logicRightLung->GetSolid()->GetCubicVolume();
G4cout << "Volume of RightLung = " << (RightLungVol) / cm3 << " cm^3" << G4endl;
// Testing RightLung Material
G4String RightLungMat = logicRightLung->GetMaterial()->GetName();
G4cout << "Material of RightLung = " << RightLungMat << G4endl;
// Testing Density
G4double RightLungDensity = logicRightLung->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << RightLungDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double RightLungMass = (RightLungVol)*RightLungDensity;
G4cout << "Mass of RightLung = " << RightLungMass / gram << " g" << G4endl;
return physRightLung;
}

69
src/G4MIRDRightOvary.cpp Normal file
View File

@ -0,0 +1,69 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDRightOvary.h"
#include "G4Ellipsoid.hh"
#include "G4LogicalVolume.hh"
#include "G4Material.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4UnionSolid.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDRightOvary::G4MIRDRightOvary() {}
G4MIRDRightOvary::~G4MIRDRightOvary() {}
G4VPhysicalVolume* G4MIRDRightOvary::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4cout << "Construct " << volumeName << " with mother volume " << mother->GetName() << G4endl;
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4Material* soft = material->GetMaterial("soft_tissue");
delete material;
G4double ax = 1. * cm;
G4double by = 0.5 * cm;
G4double cz = 2. * cm;
G4Ellipsoid* OneOvary = new G4Ellipsoid("OneOvary", ax, by, cz);
G4LogicalVolume* logicRightOvary = new G4LogicalVolume(OneOvary, soft, "logical" + volumeName, 0, 0, 0);
// Define rotation and position here!
G4VPhysicalVolume* physRightOvary = new G4PVPlacement(
0, G4ThreeVector(6. * cm, 0.5 * cm, -20 * cm), "physicalRightOvary", logicRightOvary, mother, false, 0, true);
// Visualization Attributes
// G4VisAttributes* RightOvaryVisAtt = new G4VisAttributes(G4Colour(0.85,0.44,0.84));
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* RightOvaryVisAtt = new G4VisAttributes(colour);
RightOvaryVisAtt->SetForceSolid(wireFrame);
logicRightOvary->SetVisAttributes(RightOvaryVisAtt);
G4cout << "RightOvary created !!!!!!" << G4endl;
// Testing RightOvary Volume
G4double RightOvaryVol = logicRightOvary->GetSolid()->GetCubicVolume();
G4cout << "Volume of RightOvary = " << RightOvaryVol / cm3 << " cm^3" << G4endl;
// Testing RightOvary Material
G4String RightOvaryMat = logicRightOvary->GetMaterial()->GetName();
G4cout << "Material of RightOvary = " << RightOvaryMat << G4endl;
// Testing Density
G4double RightOvaryDensity = logicRightOvary->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << RightOvaryDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double RightOvaryMass = (RightOvaryVol)*RightOvaryDensity;
G4cout << "Mass of RightOvary = " << RightOvaryMass / gram << " g" << G4endl;
return physRightOvary;
}

View File

@ -0,0 +1,93 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDRightScapula.h"
#include "G4Box.hh"
#include "G4Cons.hh"
#include "G4EllipticalTube.hh"
#include "G4LogicalVolume.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SubtractionSolid.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDRightScapula::G4MIRDRightScapula() {}
G4MIRDRightScapula::~G4MIRDRightScapula() {}
G4VPhysicalVolume* G4MIRDRightScapula::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4cout << "Construct " << volumeName << " with mother volume " << mother->GetName() << G4endl;
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4Material* skeleton = material->GetMaterial("skeleton");
G4double ax_in = 17. * cm;
G4double by_in = 9.8 * cm;
G4double ax_out = 19. * cm;
G4double by_out = 9.8 * cm;
G4double dz = 16.4 * cm;
G4EllipticalTube* inner_scapula = new G4EllipticalTube("ScapulaIn", ax_in, by_in, (dz + 1. * cm) / 2);
G4EllipticalTube* outer_scapula = new G4EllipticalTube("ScapulaOut", ax_out, by_out, dz / 2);
G4Box* subtraction = new G4Box("subtraction", ax_out, ax_out, ax_out);
G4double xx = -ax_out * 0.242; //(sin 14deg)
G4double yy = -ax_out * 0.97; // (cos 14 deg)
G4RotationMatrix* rm = new G4RotationMatrix();
rm->rotateZ(14. * degree);
G4SubtractionSolid* scapula_first =
new G4SubtractionSolid("Scapula_first", outer_scapula, subtraction, rm, G4ThreeVector(xx, yy, 0. * cm));
G4double xx2 = ax_out * 0.62470; //(cos 51.34deg)
G4double yy2 = ax_out * 0.78087; // (sin 51.34 deg)
G4RotationMatrix* rm2 = new G4RotationMatrix();
rm2->rotateZ(38.6598 * degree);
G4SubtractionSolid* scapula_bone =
new G4SubtractionSolid("Scapula", scapula_first, subtraction, rm2, G4ThreeVector(xx2, yy2, 0. * cm));
G4SubtractionSolid* scapula = new G4SubtractionSolid("Scapula", scapula_bone, inner_scapula);
G4LogicalVolume* logicRightScapula = new G4LogicalVolume(scapula, skeleton, "logical" + volumeName, 0, 0, 0);
G4VPhysicalVolume* physRightScapula =
new G4PVPlacement(0, G4ThreeVector(0. * cm, 0. * cm, 24.1 * cm), "physicalRightScapula", logicRightScapula,
mother, false, 0, true);
// Visualization Attributes
// G4VisAttributes* RightScapulaVisAtt = new G4VisAttributes(G4Colour(0.94,0.5,0.5));
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* RightScapulaVisAtt = new G4VisAttributes(colour);
RightScapulaVisAtt->SetForceSolid(wireFrame);
logicRightScapula->SetVisAttributes(RightScapulaVisAtt);
G4cout << "RightScapula created !!!!!!" << G4endl;
// Testing RightScapula Volume
G4double RightScapulaVol = logicRightScapula->GetSolid()->GetCubicVolume();
G4cout << "Volume of RightScapula = " << RightScapulaVol / cm3 << " cm^3" << G4endl;
// Testing RightScapula Material
G4String RightScapulaMat = logicRightScapula->GetMaterial()->GetName();
G4cout << "Material of RightScapula = " << RightScapulaMat << G4endl;
// Testing Density
G4double RightScapulaDensity = logicRightScapula->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << RightScapulaDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double RightScapulaMass = (RightScapulaVol)*RightScapulaDensity;
G4cout << "Mass of RightScapula = " << RightScapulaMass / gram << " g" << G4endl;
return physRightScapula;
}

69
src/G4MIRDRightTeste.cpp Normal file
View File

@ -0,0 +1,69 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDRightTeste.h"
#include "G4Ellipsoid.hh"
#include "G4LogicalVolume.hh"
#include "G4Material.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4UnionSolid.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDRightTeste::G4MIRDRightTeste() {}
G4MIRDRightTeste::~G4MIRDRightTeste() {}
G4VPhysicalVolume* G4MIRDRightTeste::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4cout << "Construct " << volumeName << " with mother volume " << mother->GetName() << G4endl;
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4Material* soft = material->GetMaterial("soft_tissue");
delete material;
G4double ax = 1.3 * cm;
G4double by = 1.5 * cm;
G4double cz = 2.3 * cm;
G4Ellipsoid* OneTeste = new G4Ellipsoid("OneTeste", ax, by, cz);
G4LogicalVolume* logicRightTeste = new G4LogicalVolume(OneTeste, soft, "logical" + volumeName, 0, 0, 0);
// Define rotation and position here!
G4VPhysicalVolume* physRightTeste = new G4PVPlacement(
0, G4ThreeVector(-1.4 * cm, 3 * cm, 0 * cm), "physicalRightTeste", logicRightTeste, mother, false, 0, true);
// Visualization Attributes
// G4VisAttributes* RightTesteVisAtt = new G4VisAttributes(G4Colour(0.85,0.44,0.84));
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* RightTesteVisAtt = new G4VisAttributes(colour);
RightTesteVisAtt->SetForceSolid(wireFrame);
logicRightTeste->SetVisAttributes(RightTesteVisAtt);
G4cout << "RightTeste created !!!!!!" << G4endl;
// Testing RightTeste Volume
G4double RightTesteVol = logicRightTeste->GetSolid()->GetCubicVolume();
G4cout << "Volume of RightTeste = " << RightTesteVol / cm3 << " cm^3" << G4endl;
// Testing RightTeste Material
G4String RightTesteMat = logicRightTeste->GetMaterial()->GetName();
G4cout << "Material of RightTeste = " << RightTesteMat << G4endl;
// Testing Density
G4double RightTesteDensity = logicRightTeste->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << RightTesteDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double RightTesteMass = (RightTesteVol)*RightTesteDensity;
G4cout << "Mass of RightTeste = " << RightTesteMass / gram << " g" << G4endl;
return physRightTeste;
}

84
src/G4MIRDSkull.cpp Normal file
View File

@ -0,0 +1,84 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDSkull.h"
#include "G4Box.hh"
#include "G4Ellipsoid.hh"
#include "G4EllipticalTube.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SubtractionSolid.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4UnionSolid.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VSolid.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDSkull::G4MIRDSkull() {}
G4MIRDSkull::~G4MIRDSkull() {}
G4VPhysicalVolume* G4MIRDSkull::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4cout << "Construct " << volumeName << " with mother volume " << mother->GetName() << G4endl;
G4Material* skeleton = material->GetMaterial("skeleton");
delete material;
// Outer cranium
G4double ax = 6.8 * cm; // a out skull
G4double by = 9.8 * cm; // bout
G4double cz = 8.3 * cm; // cout
G4Ellipsoid* craniumOut = new G4Ellipsoid("CraniumOut", ax, by, cz);
ax = 6. * cm; // a in
by = 9. * cm; // b in
cz = 6.5 * cm; // cin
G4Ellipsoid* craniumIn = new G4Ellipsoid("CraniumIn", ax, by, cz);
G4SubtractionSolid* cranium =
new G4SubtractionSolid("Cranium", craniumOut, craniumIn, 0, G4ThreeVector(0.0, 0.0, 1. * cm));
G4LogicalVolume* logicSkull = new G4LogicalVolume(cranium, skeleton, "logical" + volumeName, 0, 0, 0);
// Define rotation and position here!
G4VPhysicalVolume* physSkull =
new G4PVPlacement(0, G4ThreeVector(0., 0., 7.75 * cm), "physicalSkull", logicSkull, mother, false, 0, true);
// Visualization Attributes
// G4VisAttributes* SkullVisAtt = new G4VisAttributes(G4Colour(0.46,0.53,0.6));
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* SkullVisAtt = new G4VisAttributes(colour);
SkullVisAtt->SetForceSolid(wireFrame);
SkullVisAtt->SetLineWidth(4. * mm);
logicSkull->SetVisAttributes(SkullVisAtt);
G4cout << "Skull created !!!!!!" << G4endl;
// Testing Skull Volume
G4double SkullVol = logicSkull->GetSolid()->GetCubicVolume();
G4cout << "Volume of Skull = " << SkullVol / cm3 << " cm^3" << G4endl;
// Testing Skull Material
G4String SkullMat = logicSkull->GetMaterial()->GetName();
G4cout << "Material of Skull = " << SkullMat << G4endl;
// Testing Density
G4double SkullDensity = logicSkull->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << SkullDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double SkullMass = (SkullVol)*SkullDensity;
G4cout << "Mass of Skull = " << SkullMass / gram << " g" << G4endl;
return physSkull;
}

View File

@ -0,0 +1,129 @@
#include "G4HumanPhantomColour.h"
#include "G4HumanPhantomMaterial.h"
#include "G4MIRDSmallIntestine.h"
#include "G4Box.hh"
#include "G4EllipticalTube.hh"
#include "G4IntersectionSolid.hh"
#include "G4LogicalVolume.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SubtractionSolid.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4Torus.hh"
#include "G4Tubs.hh"
#include "G4UnionSolid.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VisAttributes.hh"
#include "globals.hh"
G4MIRDSmallIntestine::G4MIRDSmallIntestine() {}
G4MIRDSmallIntestine::~G4MIRDSmallIntestine() {}
G4VPhysicalVolume* G4MIRDSmallIntestine::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
const G4String& colourName, G4bool wireFrame, G4bool) {
G4cout << "Construct " << volumeName << " with mother volume " << mother->GetName() << G4endl;
G4HumanPhantomMaterial* material = new G4HumanPhantomMaterial();
G4Material* soft = material->GetMaterial("soft_tissue");
delete material;
G4double boxX = 11. * cm;
G4double boxY = 3.53 * cm;
G4double boxZ = 5 * cm;
G4Box* smallIntestineBox = new G4Box("smallIntestineBox", boxX, boxY, boxZ);
G4double tubsRmin = 0 * cm;
G4double tubsRmax = 11. * cm;
G4double tubsZ = 5 * cm;
G4double tubsSphi = 0 * degree;
G4double tubsDphi = 360 * degree;
G4Tubs* smallIntestineTubs = new G4Tubs("smallIntestineTubs", tubsRmin, tubsRmax, tubsZ, tubsSphi, tubsDphi);
// G4IntersectionSolid* SmallIntestine = new
// G4IntersectionSolid("SmallIntestine",smallIntestineTubs,smallIntestineBox,
G4IntersectionSolid* filledSmallIntestine1 = new G4IntersectionSolid(
"filledSmallIntestine1", smallIntestineTubs, smallIntestineBox, 0, G4ThreeVector(0 * cm, -1.33 * cm, 0 * cm));
G4IntersectionSolid* filledSmallIntestine = new G4IntersectionSolid(
"filledSmallIntestine", filledSmallIntestine1, smallIntestineTubs, 0, G4ThreeVector(0 * cm, 0.8 * cm, 0 * cm));
G4double dx = 2.50 * cm; // aU
G4double dy = 2.50 * cm; // bU
G4double dz = 4.775 * cm; // dzU
G4VSolid* AscendingColonUpperLargeIntestine = new G4EllipticalTube("AscendingColon", dx, dy, dz);
dx = 2.50 * cm; // bt
dy = 1.50 * cm; // ct
dz = 10.50 * cm; // x1t
G4VSolid* TraverseColonUpperLargeIntestine = new G4EllipticalTube("TraverseColon", dx, dy, dz);
G4RotationMatrix* relative_rm = new G4RotationMatrix();
relative_rm->rotateX(90. * degree);
// relative_rm -> rotateZ(180. * degree);
relative_rm->rotateY(90. * degree);
G4UnionSolid* upperLargeIntestine =
new G4UnionSolid("UpperLargeIntestine", AscendingColonUpperLargeIntestine, TraverseColonUpperLargeIntestine,
relative_rm, G4ThreeVector(-8.0 * cm, 0.0 * cm, 6.275 * cm)); //,0,dzU + ct transverse
dx = 1.88 * cm; // a
dy = 2.13 * cm; // b
dz = 7.64 * cm; //(z1-z2)/2
G4EllipticalTube* DescendingColonLowerLargeIntestine = new G4EllipticalTube("DiscendingColon", dx, dy, dz);
G4UnionSolid* upperlowerLargeIntestine =
new G4UnionSolid("UpperLowerLargeIntestine", upperLargeIntestine, DescendingColonLowerLargeIntestine, 0,
G4ThreeVector(-16.72 * cm, 0.0 * cm, -2.865 * cm)); //,0,dzU + ct t
G4SubtractionSolid* SmallIntestine =
new G4SubtractionSolid("SmallIntestine", filledSmallIntestine, upperlowerLargeIntestine, 0,
G4ThreeVector(8.0 * cm, -0.3 * cm, -2.775 * cm));
G4LogicalVolume* logicSmallIntestine = new G4LogicalVolume(SmallIntestine, soft, "logical" + volumeName, 0, 0, 0);
G4RotationMatrix* rm = new G4RotationMatrix();
rm->rotateX(180. * degree);
rm->rotateY(180. * degree);
G4VPhysicalVolume* physSmallIntestine =
new G4PVPlacement(rm,
G4ThreeVector(0 * cm, -2.66 * cm,
-13 * cm), // Xcheck the spina position the correct placement shuod be this one
// G4ThreeVector(0*cm, -5.13*cm, -13*cm), // Xcheck the spina position the correct placement
// shuod be this one G4ThreeVector(0*cm, -6*cm, -13*cm),
"physical" + volumeName, logicSmallIntestine, mother, false, 0, true);
// Visualization Attributes
// G4VisAttributes* SmallIntestineVisAtt = new G4VisAttributes(G4Colour(1.0,1.0,0.0));
G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
G4Colour colour = colourPointer->GetColour(colourName);
G4VisAttributes* SmallIntestineVisAtt = new G4VisAttributes(colour);
SmallIntestineVisAtt->SetForceSolid(wireFrame);
logicSmallIntestine->SetVisAttributes(SmallIntestineVisAtt);
G4cout << "SmallIntestine created !!!!!!" << G4endl;
// Testing SmallIntestine Volume
G4double SmallIntestineVol = logicSmallIntestine->GetSolid()->GetCubicVolume();
G4cout << "Volume of SmallIntestine = " << SmallIntestineVol / cm3 << " cm^3" << G4endl;
// Testing SmallIntestine Material
G4String SmallIntestineMat = logicSmallIntestine->GetMaterial()->GetName();
G4cout << "Material of SmallIntestine = " << SmallIntestineMat << G4endl;
// Testing Density
G4double SmallIntestineDensity = logicSmallIntestine->GetMaterial()->GetDensity();
G4cout << "Density of Material = " << SmallIntestineDensity * cm3 / g << " g/cm^3" << G4endl;
// Testing Mass
G4double SmallIntestineMass = (SmallIntestineVol)*SmallIntestineDensity;
G4cout << "Mass of SmallIntestine = " << SmallIntestineMass / gram << " g" << G4endl;
return physSmallIntestine;
}

Some files were not shown because too many files have changed in this diff Show More