#ifndef Phantom_h #define Phantom_h 1 #include "G4Material.hh" #include "G4VSolid.hh" #include "G4LogicalVolume.hh" #include "G4VPhysicalVolume.hh" #include "G4RotationMatrix.hh" #include "G4ThreeVector.hh" #include "G4String.hh" #include "MaterialDefinitions.hh" #include "PhantomMessenger.hh" class Phantom { //-------------------------- // General Phantom Functions //-------------------------- public: Phantom(); ~Phantom(); void ConstructPhantom(G4LogicalVolume*); void ConstructSphericalPhantom(); void ConstructEllipsoidalPhantom(); void ConstructPacmanPhantom(); void ConstructRectangularPhantom(); void SetPhantomMaterial(G4String); G4Material* GetPhantomMaterial() { return phantomMaterial; }; void SetPhantomName(G4String name) { phantomName = name; }; G4String GetPhantomName() { return phantomName; }; void SetPhantomRotation(G4RotationMatrix* rot) { phantomRotation = rot; }; G4RotationMatrix* GetPhantomRotation() { return phantomRotation;}; void SetPhantomPosition(G4ThreeVector pos) { phantomPosition = pos;}; G4ThreeVector GetPhantomPosition() { return phantomPosition;}; G4bool ConstructPhantom(){ return constructPhantom; }; void SetConstructPhantom(G4bool b) { constructPhantom = b; }; G4bool ConstructCompensator() { return constructCompensator; }; void SetConstructCompensator(G4bool b) { constructCompensator = b; }; void SetCompensatorPosition(G4ThreeVector pos) { compensatorPosition = pos; }; G4ThreeVector GetCompensatorPosition() { return compensatorPosition; }; private: G4Material* phantomMotherMaterial; G4VSolid* motherSphere; G4LogicalVolume* worldLV; G4LogicalVolume* motherLV; G4VPhysicalVolume* motherPV; MaterialDefinitions* materialDefinition; PhantomMessenger* phantomMessenger; G4RotationMatrix* phantomRotation; G4ThreeVector phantomPosition; G4Material* phantomMaterial; G4String phantomName; G4ThreeVector compensatorPosition; G4VSolid* phantomCompensator; G4LogicalVolume* phantomCompensatorLV; G4VPhysicalVolume* phantomCompensatorPV; G4bool constructPhantom; G4bool constructCompensator; //---------------------------- // Spherical Phantom Functions //---------------------------- public: void SetSphericalPhantomRadius(G4double r) { phantomSphereRadius = r; }; G4double GetSphericalPhantomRadius() { return phantomSphereRadius;}; void SetSphericalPhantomInsert1Radius(G4double r) { insert1radius = r; }; G4double GetSphericalPhantomInsert1Radius() { return insert1radius; }; void SetSphericalPhantomInsert1Length(G4double l) { insert1length = l; }; G4double GetSphericalPhantomInsert1Length() { return insert1length; }; void SetSphericalPhantomInsert1Material(G4String s); void SetSphericalPhantomInsert2Radius(G4double r) { insert2radius = r; }; G4double GetSphericalPhantomInsert2Radius() { return insert2radius; }; void SetSphericalPhantomInsert2Length(G4double l) { insert2length = l; }; G4double GetSphericalPhantomInsert2Length() { return insert2length; }; void SetSphericalPhantomInsert2Material(G4String s); void SetSphericalPhantomInsert3Radius(G4double r) { insert3radius = r; }; G4double GetSphericalPhantomInsert3Radius() { return insert3radius; }; void SetSphericalPhantomInsert3Length(G4double l) { insert3length = l; }; G4double GetSphericalPhantomInsert3Length() { return insert3length; }; void SetSphericalPhantomInsert3Material(G4String s); private: // Spherical Phantom G4double phantomSphereRadius; G4VSolid* phantomSphere; G4LogicalVolume* phantomSphereLV; G4VPhysicalVolume* phantomSpherePV; G4double insert1radius ; G4double insert1length; G4Material* insert1material; G4double insert2radius; G4double insert2length; G4Material* insert2material; G4double insert3radius; G4double insert3length; G4Material* insert3material; G4Material* ballMaterial; //------------------------------ // Ellipsoidal Phantom Functions //------------------------------ public: void SetEllopsoidalPhantomSemiX(G4double semiX) { phantomEllipsoidSemiX = semiX; }; G4double GetEllopsoidalPhantomSemiX() { return phantomEllipsoidSemiX; }; void SetEllopsoidalPhantomSemiY(G4double semiY) { phantomEllipsoidSemiY = semiY; }; G4double GetEllopsoidalPhantomSemiY() { return phantomEllipsoidSemiY; }; void SetEllopsoidalPhantomSemiZ(G4double semiZ) { phantomEllipsoidSemiZ = semiZ; }; G4double GetEllopsoidalPhantomSemiZ() { return phantomEllipsoidSemiZ; }; private: G4double phantomEllipsoidSemiX; G4double phantomEllipsoidSemiY; G4double phantomEllipsoidSemiZ; G4VSolid* phantomEllipsoid; G4LogicalVolume* phantomEllipsoidLV; G4VPhysicalVolume* phantomEllipsoidPV; //------------------------- // Pacman Phantom Functions //------------------------- public: void SetPacmanPhantomRadius(G4double r) { phantomPacmanRadius = r; }; G4double GetPacmanPhantomRadius() { return phantomPacmanRadius; }; void SetPacmanPhantomHalfZ(G4double hz) { phantomPacmanHalfZ = hz; }; G4double GetPacmanPhantomHalfZ() { return phantomPacmanHalfZ; }; void SetPacmanPhantomSpanningAngle(G4double angle) { phantomPacmanSpanningAngle = angle; }; G4double GetPacmanPhantomSpanningAngle() { return phantomPacmanSpanningAngle; }; private: G4double phantomPacmanRadius; G4double phantomPacmanHalfZ; G4double phantomPacmanSpanningAngle; G4VSolid* phantomPacman; G4LogicalVolume* phantomPacmanLV; G4VPhysicalVolume* phantomPacmanPV; //------------------------- // Rectangle Phantom Functions //------------------------- public: void SetRectangularPhantomSize(G4ThreeVector size) { phantomRectangleSize = size; }; G4ThreeVector GetRectangularPhantomSize() { return phantomRectangleSize; }; private: G4ThreeVector phantomRectangleSize; G4VSolid* phantomRectangle; G4LogicalVolume* phantomRectangleLV; G4VPhysicalVolume* phantomRectanglePV; }; #endif