Geant4  10.02.p03
CML2Ph_FullWater Class Reference

#include <ML2Ph_FullWater.hh>

Collaboration diagram for CML2Ph_FullWater:

Public Member Functions

 CML2Ph_FullWater ()
 
 ~CML2Ph_FullWater (void)
 
bool Construct (G4VPhysicalVolume *PVWorld, G4int saving_in_ROG_Voxels_every_events, G4int seed, G4String ROGOutFile, G4bool bSaveROG)
 
G4int getTotalNumberOfEvents ()
 
CML2SDWithVoxelsgetSensDet ()
 
G4VPhysicalVolumegetPhysicalVolume ()
 
G4ThreeVector getHalfContainerSize ()
 
void writeInfo ()
 

Private Attributes

G4VPhysicalVolumePVWorld
 
G4VPhysicalVolumefullWaterPhantomPV
 
CML2SDWithVoxelssensDet
 
G4ThreeVector centre
 
G4ThreeVector halfSize
 

Detailed Description

Definition at line 63 of file ML2Ph_FullWater.hh.

Constructor & Destructor Documentation

◆ CML2Ph_FullWater()

CML2Ph_FullWater::CML2Ph_FullWater ( )

Definition at line 46 of file ML2Ph_FullWater.cc.

47 {
48  // phantom size and position
49  halfSize.set(150.*mm,150.*mm,150.*mm);
50  // phantom position
51  centre.set(0.,0.,0.);
52 }
void set(double x, double y, double z)
static const double mm
Definition: G4SIunits.hh:114
G4ThreeVector halfSize
G4ThreeVector centre
Here is the call graph for this function:

◆ ~CML2Ph_FullWater()

CML2Ph_FullWater::~CML2Ph_FullWater ( void  )

Definition at line 54 of file ML2Ph_FullWater.cc.

55 {
56 }

Member Function Documentation

◆ Construct()

bool CML2Ph_FullWater::Construct ( G4VPhysicalVolume PVWorld,
G4int  saving_in_ROG_Voxels_every_events,
G4int  seed,
G4String  ROGOutFile,
G4bool  bSaveROG 
)

Definition at line 62 of file ML2Ph_FullWater.cc.

63 {
64  PVWorld=PWorld;
65 
66  bool bCreated=false;
68  G4Box *fullWaterPhantomBox = new G4Box("fullWaterPhantomBox", halfSize.getX(), halfSize.getY(), halfSize.getZ());
69  G4LogicalVolume *fullWaterPhantomLV = new G4LogicalVolume(fullWaterPhantomBox, WATER, "fullWaterPhantomLV", 0, 0, 0);
70  fullWaterPhantomPV = new G4PVPlacement(0, centre, "fullWaterPhantomPV", fullWaterPhantomLV, PVWorld, false, 0);
71 
72  // Region for cuts
73  G4Region *regVol= new G4Region("fullWaterPhantomR");
75  cuts->SetProductionCut(0.1*mm);
76  regVol->SetProductionCuts(cuts);
77 
78  fullWaterPhantomLV->SetRegion(regVol);
79  regVol->AddRootLogicalVolume(fullWaterPhantomLV);
80 
81  // Visibility
82  G4VisAttributes* simpleAlSVisAtt= new G4VisAttributes(G4Colour::Red());
83  simpleAlSVisAtt->SetVisibility(true);
84 // simpleAlSVisAtt->SetForceSolid(true);
85  fullWaterPhantomLV->SetVisAttributes(simpleAlSVisAtt);
86 
87  // Sensitive detector
88  sensDet=new CML2SDWithVoxels("Water phantom", saving_in_ROG_Voxels_every_events, seed, ROGOutFile, bSaveROG, G4ThreeVector(0.,0.,0.), halfSize, 100, 100, 100);
90  SDManager->AddNewDetector(sensDet);
91 
92  // Read Out Geometry
94  ROG->setBuildData(PVWorld->GetFrameTranslation(), halfSize, 100, 100, 100);
95  ROG->BuildROGeometry();
96  sensDet->SetROgeometry(ROG);
97  fullWaterPhantomLV->SetSensitiveDetector(sensDet);
98 
99  bCreated=true;
100  return bCreated;
101 }
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
CLHEP::Hep3Vector G4ThreeVector
void AddRootLogicalVolume(G4LogicalVolume *lv)
Definition: G4Region.cc:290
Definition: G4Box.hh:64
G4ThreeVector GetFrameTranslation() const
CML2SDWithVoxels * sensDet
void SetVisibility(G4bool)
void SetProductionCut(G4double cut, G4int index=-1)
static G4NistManager * Instance()
double getY() const
double getX() const
void SetROgeometry(G4VReadOutGeometry *value)
double getZ() const
void AddNewDetector(G4VSensitiveDetector *aSD)
Definition: G4SDManager.cc:71
static G4SDManager * GetSDMpointer()
Definition: G4SDManager.cc:40
void setBuildData(G4ThreeVector centre, G4ThreeVector halfSize, G4int NumberOfVoxelsAlongX, G4int NumberOfVoxelsAlongY, G4int NumberOfVoxelsAlongZ)
void SetProductionCuts(G4ProductionCuts *cut)
static G4Colour Red()
Definition: G4Colour.hh:148
G4VPhysicalVolume * fullWaterPhantomPV
static const double mm
Definition: G4SIunits.hh:114
G4ThreeVector halfSize
G4ThreeVector centre
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getHalfContainerSize()

G4ThreeVector CML2Ph_FullWater::getHalfContainerSize ( )
inline

Definition at line 72 of file ML2Ph_FullWater.hh.

72 {return halfSize;}
G4ThreeVector halfSize
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPhysicalVolume()

G4VPhysicalVolume* CML2Ph_FullWater::getPhysicalVolume ( void  )
inline

Definition at line 71 of file ML2Ph_FullWater.hh.

71 {return PVWorld;}
G4VPhysicalVolume * PVWorld
Here is the caller graph for this function:

◆ getSensDet()

CML2SDWithVoxels* CML2Ph_FullWater::getSensDet ( )
inline

Definition at line 70 of file ML2Ph_FullWater.hh.

70 {return sensDet;}
CML2SDWithVoxels * sensDet
Here is the caller graph for this function:

◆ getTotalNumberOfEvents()

G4int CML2Ph_FullWater::getTotalNumberOfEvents ( )
inline

Definition at line 69 of file ML2Ph_FullWater.hh.

CML2SDWithVoxels * sensDet
G4int getTotalNumberOfEvents()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeInfo()

void CML2Ph_FullWater::writeInfo ( )

Definition at line 57 of file ML2Ph_FullWater.cc.

58 {
59  std::cout<<"\n\n\tcentre of the phantom: " <<centre/mm<<" [mm]"<< G4endl;
60  std::cout<<"\thalf thickness of the phantom: " <<halfSize/mm<<" [mm]\n"<< G4endl;
61 }
#define G4endl
Definition: G4ios.hh:61
static const double mm
Definition: G4SIunits.hh:114
G4ThreeVector halfSize
G4ThreeVector centre
Here is the caller graph for this function:

Member Data Documentation

◆ centre

G4ThreeVector CML2Ph_FullWater::centre
private

Definition at line 79 of file ML2Ph_FullWater.hh.

◆ fullWaterPhantomPV

G4VPhysicalVolume* CML2Ph_FullWater::fullWaterPhantomPV
private

Definition at line 76 of file ML2Ph_FullWater.hh.

◆ halfSize

G4ThreeVector CML2Ph_FullWater::halfSize
private

Definition at line 79 of file ML2Ph_FullWater.hh.

◆ PVWorld

G4VPhysicalVolume* CML2Ph_FullWater::PVWorld
private

Definition at line 75 of file ML2Ph_FullWater.hh.

◆ sensDet

CML2SDWithVoxels* CML2Ph_FullWater::sensDet
private

Definition at line 78 of file ML2Ph_FullWater.hh.


The documentation for this class was generated from the following files: