55 if (phantomName==
"fullWater")
59 else if (phantomName==
"boxInBox")
76 bool CML2PhantomConstruction::design(
void)
79 bool bPhanExists=
false;
81 std::cout <<
"I'm building "<< phantomName<<
" phantom"<<
G4endl;
83 if (phantomName==
"fullWater")
88 else if (phantomName==
"boxInBox")
100 if (phantomName==
"fullWater")
102 else if (phantomName==
"boxInBox")
108 G4int saving_in_ROG_Voxels_every_events,
G4int seed,
119 G4Box *phmWorldB =
new G4Box(
"phmWorldG", halfPhantomInsideSize.
getX(), halfPhantomInsideSize.
getY(), halfPhantomInsideSize.
getZ());
124 phmWorldLV->SetVisAttributes(simpleAlSVisAtt);
130 if (phantomName==
"fullWater")
132 Ph_fullWater->
Construct(PVPhmWorld, saving_in_ROG_Voxels_every_events, seed, ROGOutFile, bSaveROG);
137 else if (phantomName==
"boxInBox")
139 Ph_BoxInBox->
Construct(PVPhmWorld, saving_in_ROG_Voxels_every_events, seed, ROGOutFile, bSaveROG);
154 void CML2PhantomConstruction::createPhysicalVolumeNamesList(
G4String *matNames,
G4int nMatNames)
157 for (
int i=0;i< nMatNames; i++)
161 volumeNameIdLink.push_back(svnid);
164 void CML2PhantomConstruction::createPhysicalVolumeNamesList(
G4VPhysicalVolume *PV)
172 for (
int i=0; i <nLVD1; i++)
179 volumeNameIdLink.push_back(svnid);
187 volumeNameIdLink.push_back(svnid);
193 if (idCurrentCentre <(
int) centre.size())
195 currentCentre=centre[idCurrentCentre];
205 {std::cout <<
"Actual centre: "<<idCurrentCentre<<
"/"<<centre.size() <<
" "<<
G4endl;}
206 std::cout <<
"Phantom and its ROG centre: " << currentCentre<<
G4endl;
227 sprintf(cT,
"%d",cTI);
228 translationName=
"_TrX"+
G4String(cT)+
"_";
230 sprintf(cT,
"%d",cTI);
231 translationName+=
"Y"+
G4String(cT)+
"_";
233 sprintf(cT,
"%d",cTI);
235 return translationName;
CML2SDWithVoxels * getSensDet()
void GeometryHasBeenModified(G4bool prop=true)
void setVolumeNameIdLink(std::vector< SvolumeNameId > volNameIdLink)
G4ThreeVector getHalfContainerSize()
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
G4ThreeVector getHalfContainerSize()
CLHEP::Hep3Vector G4ThreeVector
bool Construct(G4VPhysicalVolume *PVWorld, G4int saving_in_ROG_Voxels_every_events, G4int seed, G4String ROGOutFile, G4bool bSaveROG, G4bool bOnlyVisio)
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
void SetReferenceWorld(G4bool bOV)
G4Material * GetMaterial() const
const G4String & GetName() const
void SetVisibility(G4bool)
CML2PhantomConstruction(void)
G4VPhysicalVolume * GetDaughter(const G4int i) const
G4int getTotalNumberOfEvents()
G4VPhysicalVolume * getPhysicalVolume()
static G4NistManager * Instance()
void addNewCentre(G4ThreeVector val)
G4int getTotalNumberOfEvents()
const G4String & GetName() const
~CML2PhantomConstruction(void)
void SetTranslation(const G4ThreeVector &v)
G4VReadOutGeometry * GetROgeometry() const
static G4GeometryManager * GetInstance()
G4int GetNoDaughters() const
G4VPhysicalVolume * getPhysicalVolume()
static G4RunManager * GetRunManager()
G4LogicalVolume * GetLogicalVolume() const
G4int getTotalNumberOfEvents()
CML2SDWithVoxels * getSensDet()
bool Construct(G4VPhysicalVolume *PVWorld, G4int saving_in_ROG_Voxels_every_events, G4int seed, G4String ROGOutFile, G4bool bSaveROG)
bool Construct(G4VPhysicalVolume *PVWorld, G4int saving_in_ROG_Voxels_every_events, G4int seed, G4String ROGOutFile, G4bool bSaveROG)
void OpenGeometry(G4VPhysicalVolume *vol=0)
G4String getCurrentTranslationString()
static CML2PhantomConstruction * GetInstance(void)
G4bool CloseGeometry(G4bool pOptimise=true, G4bool verbose=false, G4VPhysicalVolume *vol=0)
G4VPhysicalVolume * GetROWorld() const