Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
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.

References python.hepunit::mm, and CLHEP::Hep3Vector::set().

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

References G4SDManager::AddNewDetector(), G4Region::AddRootLogicalVolume(), G4VReadOutGeometry::BuildROGeometry(), G4NistManager::FindOrBuildMaterial(), G4VPhysicalVolume::GetFrameTranslation(), G4SDManager::GetSDMpointer(), CLHEP::Hep3Vector::getX(), CLHEP::Hep3Vector::getY(), CLHEP::Hep3Vector::getZ(), G4NistManager::Instance(), python.hepunit::mm, G4Colour::Red(), CML2ReadOutGeometry::setBuildData(), G4ProductionCuts::SetProductionCut(), G4Region::SetProductionCuts(), G4VSensitiveDetector::SetROgeometry(), and G4VisAttributes::SetVisibility().

Referenced by CML2PhantomConstruction::Construct().

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)
G4ThreeVector GetFrameTranslation() const
CLHEP::Hep3Vector G4ThreeVector
void AddRootLogicalVolume(G4LogicalVolume *lv)
Definition: G4Region.cc:254
Definition: G4Box.hh:63
void SetVisibility(G4bool)
void SetProductionCut(G4double cut, G4int index=-1)
double getY() const
static G4NistManager * Instance()
double getX() const
void SetROgeometry(G4VReadOutGeometry *value)
void AddNewDetector(G4VSensitiveDetector *aSD)
Definition: G4SDManager.cc:67
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
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.

Referenced by CML2PhantomConstruction::Construct().

71 {return PVWorld;}
CML2SDWithVoxels* CML2Ph_FullWater::getSensDet ( )
inline

Definition at line 70 of file ML2Ph_FullWater.hh.

Referenced by CML2PhantomConstruction::Construct().

70 {return sensDet;}
G4int CML2Ph_FullWater::getTotalNumberOfEvents ( )
inline
void CML2Ph_FullWater::writeInfo ( )

Definition at line 57 of file ML2Ph_FullWater.cc.

References G4endl, and python.hepunit::mm.

Referenced by CML2PhantomConstruction::Construct().

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

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