Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CML2Ph_FullWater Class Reference

#include <ML2Ph_FullWater.hh>

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 ()
 

Detailed Description

Definition at line 63 of file ML2Ph_FullWater.hh.

Constructor & Destructor Documentation

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 constexpr double mm
Definition: G4SIunits.hh:115

Here is the call graph for this function:

CML2Ph_FullWater::~CML2Ph_FullWater ( void  )

Definition at line 54 of file ML2Ph_FullWater.cc.

55 {
56 }

Member Function Documentation

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)
static constexpr double mm
Definition: G4SIunits.hh:115
G4ThreeVector GetFrameTranslation() const
CLHEP::Hep3Vector G4ThreeVector
void AddRootLogicalVolume(G4LogicalVolume *lv)
Definition: G4Region.cc:290
Definition: G4Box.hh:64
void SetProductionCut(G4double cut, G4int index=-1)
double getY() const
static G4NistManager * Instance()
double getX() const
long seed
Definition: chem4.cc:68
void SetVisibility(G4bool=true)
void SetROgeometry(G4VReadOutGeometry *value)
void AddNewDetector(G4VSensitiveDetector *aSD)
Definition: G4SDManager.cc:71
static G4SDManager * GetSDMpointer()
Definition: G4SDManager.cc:40
double getZ() const
void setBuildData(G4ThreeVector centre, G4ThreeVector halfSize, G4int NumberOfVoxelsAlongX, G4int NumberOfVoxelsAlongY, G4int NumberOfVoxelsAlongZ)
void SetProductionCuts(G4ProductionCuts *cut)
static G4Colour Red()
Definition: G4Colour.hh:148

Here is the call graph for this function:

Here is the caller graph for this function:

G4ThreeVector CML2Ph_FullWater::getHalfContainerSize ( )
inline

Definition at line 72 of file ML2Ph_FullWater.hh.

72 {return halfSize;}
G4VPhysicalVolume* CML2Ph_FullWater::getPhysicalVolume ( void  )
inline

Definition at line 71 of file ML2Ph_FullWater.hh.

71 {return PVWorld;}

Here is the caller graph for this function:

CML2SDWithVoxels* CML2Ph_FullWater::getSensDet ( )
inline

Definition at line 70 of file ML2Ph_FullWater.hh.

70 {return sensDet;}

Here is the caller graph for this function:

G4int CML2Ph_FullWater::getTotalNumberOfEvents ( )
inline

Definition at line 69 of file ML2Ph_FullWater.hh.

69 {return sensDet->getTotalNumberOfEvents();}
G4int getTotalNumberOfEvents()

Here is the call graph for this function:

Here is the caller graph for this function:

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 }
static constexpr double mm
Definition: G4SIunits.hh:115
#define G4endl
Definition: G4ios.hh:61

Here is the caller graph for this function:


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