46 #define G4MT_fsmanager ((subInstanceManager.offset[instanceID]).fFastSimulationManager)
47 #define G4MT_rsaction ((subInstanceManager.offset[instanceID]).fRegionalSteppingAction)
69 :
fName(pName), fRegionMod(true), fCut(0), fUserInfo(0), fUserLimits(0),
70 fFieldManager(0), fWorldPhys(0),
71 fInMassGeometry(false), fInParallelGeometry(false)
82 message <<
"The region has NOT been registered !" <<
G4endl
83 <<
" Region " << pName <<
" already existing in store !"
100 :
fName(
""), fRegionMod(true), fCut(0), fUserInfo(0), fUserLimits(0),
101 fFieldManager(0), fWorldPhys(0),
102 fInMassGeometry(false), fInParallelGeometry(false)
180 message <<
"Logical volume <" << lv->
GetName() <<
">" <<
G4endl
181 <<
"does not have a valid material pointer." <<
G4endl
182 <<
"A logical volume belonging to the (tracking) world volume "
183 <<
"must have a valid material.";
184 G4Exception(
"G4Region::ScanVolumeTree()",
"GeomMgt0002",
189 currentRegion =
this;
205 if(noDaughters==0)
return;
224 message <<
"The parameterisation for the physical volume <"
226 <<
"does not return a valid material pointer." <<
G4endl
227 <<
"A volume belonging to the (tracking) world volume must "
228 <<
"have a valid material.";
229 G4Exception(
"G4Region::ScanVolumeTree()",
"GeomMgt0002",
243 for (
size_t rep=0; rep<repNo; rep++)
249 message <<
"The parameterisation for the physical volume <"
251 <<
"does not return a valid material pointer." <<
G4endl
252 <<
"A volume belonging to the (tracking) world volume must "
253 <<
"have a valid material.";
254 G4Exception(
"G4Region::ScanVolumeTree()",
"GeomMgt0002",
270 for (
size_t i=0; i<noDaughters; i++)
294 G4RootLVList::iterator
pos;
323 G4RootLVList::iterator
pos;
378 G4RootLVList::iterator pLV;
410 if (currLog->
GetRegion()==
this) {
return true;}
440 message <<
"Region <" <<
fName <<
"> belongs to more than"
441 <<
" one parent region !" <<
G4endl
442 <<
"A region cannot belong to more than one direct parent region,"
444 <<
"to have fast-simulation assigned.";
445 G4Exception(
"G4Region::ClearFastSimulationManager()",
464 G4Region* parent = 0; unique =
true;
466 G4LogicalVolumeStore::iterator lvItr;
470 for(lvItr=lvStore->begin(); lvItr!=lvStore->end(); lvItr++)
472 G4int nD = (*lvItr)->GetNoDaughters();
473 G4Region* aR = (*lvItr)->GetRegion();
477 for(
G4int iD=0; iD<nD; iD++)
479 if((*lvItr)->GetDaughter(iD)->GetLogicalVolume()->GetRegion()==
this)
483 if(parent!=aR) { unique =
false; }
void AddRootLogicalVolume(G4LogicalVolume *lv)
G4FastSimulationManager * GetFastSimulationManager() const
static const G4double pos
G4LogicalVolume * GetLogicalVolume() const
virtual G4bool IsParameterised() const =0
virtual G4Material * ComputeMaterial(const G4int repNo, G4VPhysicalVolume *currentVol, const G4VTouchable *parentTouch=0)
G4Region(const G4String &name)
virtual G4Material * GetMaterial(G4int idx) const =0
G4VPhysicalVolume * fWorldPhys
virtual G4VPVParameterisation * GetParameterisation() const =0
static const G4RegionManager & GetSubInstanceManager()
G4UserSteppingAction * GetRegionalSteppingAction() const
void message(RunManager *runmanager)
G4int CreateSubInstance()
G4int GetNoDaughters() const
void SetWorld(G4VPhysicalVolume *wp)
G4RootLVList fRootVolumes
void RemoveRootLogicalVolume(G4LogicalVolume *lv, G4bool scan=true)
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const
G4Material * GetMaterial() const
virtual G4int GetMultiplicity() const
G4MaterialList fMaterials
virtual G4int GetNumberOfMaterials() const =0
virtual G4VVolumeMaterialScanner * GetMaterialScanner()
static void Register(G4Region *pRegion)
G4bool BelongsTo(G4VPhysicalVolume *thePhys) const
void SetRegion(G4Region *reg)
G4bool IsRootRegion() const
G4VUserRegionInformation * fUserInfo
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
void AddMaterial(G4Material *aMaterial)
void UpdateMaterialList()
void ScanVolumeTree(G4LogicalVolume *lv, G4bool region)
static G4RegionStore * GetInstance()
static void DeRegister(G4Region *pRegion)
void SetFastSimulationManager(G4FastSimulationManager *fsm)
void SetRegionRootFlag(G4bool rreg)
G4Region * GetParentRegion(G4bool &unique) const
void SetRegionalSteppingAction(G4UserSteppingAction *rusa)
static G4GEOM_DLL G4RegionManager subInstanceManager
void ClearFastSimulationManager()
G4Region * GetRegion() const
const G4Material * GetBaseMaterial() const
static G4LogicalVolumeStore * GetInstance()
const G4String & GetName() const
G4VPhysicalVolume * GetDaughter(const G4int i) const
const G4String & GetName() const