43#define G4MT_fsmanager ((subInstanceManager.offset[instanceID]).fFastSimulationManager)
44#define G4MT_rsaction ((subInstanceManager.offset[instanceID]).fRegionalSteppingAction)
76 std::ostringstream message;
77 message <<
"The region has NOT been registered !" <<
G4endl
78 <<
" Region " << pName <<
" already existing in store !"
182 std::ostringstream message;
183 message <<
"Logical volume <" << lv->
GetName() <<
">" <<
G4endl
184 <<
"does not have a valid material pointer." <<
G4endl
185 <<
"A logical volume belonging to the (tracking) world volume "
186 <<
"must have a valid material.";
187 G4Exception(
"G4Region::ScanVolumeTree()",
"GeomMgt0002",
192 currentRegion =
this;
193 if (volMat !=
nullptr)
208 if(noDaughters==0)
return;
221 for (
size_t mat=0; mat<matNo; ++mat)
226 std::ostringstream message;
227 message <<
"The parameterisation for the physical volume <"
229 <<
"does not return a valid material pointer." <<
G4endl
230 <<
"A volume belonging to the (tracking) world volume must "
231 <<
"have a valid material.";
232 G4Exception(
"G4Region::ScanVolumeTree()",
"GeomMgt0002",
235 if (volMat !=
nullptr)
246 for (
size_t rep=0; rep<repNo; ++rep)
251 std::ostringstream message;
252 message <<
"The parameterisation for the physical volume <"
254 <<
"does not return a valid material pointer." <<
G4endl
255 <<
"A volume belonging to the (tracking) world volume must "
256 <<
"have a valid material.";
257 G4Exception(
"G4Region::ScanVolumeTree()",
"GeomMgt0002",
260 if(volMat !=
nullptr)
273 for (
size_t i=0; i<noDaughters; ++i)
417 if (currLog->
GetRegion()==
this) {
return true;}
438 if(parent !=
nullptr)
446 std::ostringstream message;
447 message <<
"Region <" <<
fName <<
"> belongs to more than"
448 <<
" one parent region !" <<
G4endl
449 <<
"A region cannot belong to more than one direct parent region,"
451 <<
"to have fast-simulation assigned.";
452 G4Exception(
"G4Region::ClearFastSimulationManager()",
471 G4Region* parent =
nullptr; unique =
true;
476 for(
auto lvItr=lvStore->cbegin(); lvItr!=lvStore->cend(); ++lvItr)
478 G4int nD = (*lvItr)->GetNoDaughters();
479 G4Region* aR = (*lvItr)->GetRegion();
483 for(
auto iD=0; iD<nD; ++iD)
485 if((*lvItr)->GetDaughter(iD)->GetLogicalVolume()->GetRegion()==
this)
489 if(parent!=aR) { unique =
false; }
static const G4double pos
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4int CreateSubInstance()
static G4LogicalVolumeStore * GetInstance()
void SetRegionRootFlag(G4bool rreg)
void SetRegion(G4Region *reg)
size_t GetNoDaughters() const
G4bool IsRootRegion() const
G4Region * GetRegion() const
G4Material * GetMaterial() const
G4VPhysicalVolume * GetDaughter(const G4int i) const
const G4String & GetName() const
const G4Material * GetBaseMaterial() const
static void DeRegister(G4Region *pRegion)
static void Register(G4Region *pRegion)
static G4RegionStore * GetInstance()
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const
void SetMapValid(G4bool val)
G4bool BelongsTo(G4VPhysicalVolume *thePhys) const
void ScanVolumeTree(G4LogicalVolume *lv, G4bool region)
G4Region * GetParentRegion(G4bool &unique) const
G4FastSimulationManager * GetFastSimulationManager() const
void AddMaterial(G4Material *aMaterial)
void SetWorld(G4VPhysicalVolume *wp)
void RemoveRootLogicalVolume(G4LogicalVolume *lv, G4bool scan=true)
G4VUserRegionInformation * fUserInfo
G4MaterialList fMaterials
void UpdateMaterialList()
G4Region(const G4String &name)
void SetFastSimulationManager(G4FastSimulationManager *fsm)
void SetRegionalSteppingAction(G4UserSteppingAction *rusa)
static G4GEOM_DLL G4RegionManager subInstanceManager
void SetName(const G4String &name)
static const G4RegionManager & GetSubInstanceManager()
G4UserSteppingAction * GetRegionalSteppingAction() const
void ClearFastSimulationManager()
void AddRootLogicalVolume(G4LogicalVolume *lv, G4bool search=true)
G4RootLVList fRootVolumes
G4VPhysicalVolume * fWorldPhys
virtual G4VVolumeMaterialScanner * GetMaterialScanner()
virtual G4Material * ComputeMaterial(const G4int repNo, G4VPhysicalVolume *currentVol, const G4VTouchable *parentTouch=nullptr)
G4LogicalVolume * GetLogicalVolume() const
virtual G4int GetMultiplicity() const
const G4String & GetName() const
virtual G4VPVParameterisation * GetParameterisation() const =0
virtual G4bool IsParameterised() const =0
virtual G4Material * GetMaterial(G4int idx) const =0
virtual G4int GetNumberOfMaterials() const =0