52 : fSolid(0),fSensitiveDetector(0),fFieldManager(0),
53 fMaterial(0),fMass(0.),fCutsCouple(0)
63 #define G4MT_solid ((subInstanceManager.offset[instanceID]).fSolid)
64 #define G4MT_sdetector ((subInstanceManager.offset[instanceID]).fSensitiveDetector)
65 #define G4MT_fmanager ((subInstanceManager.offset[instanceID]).fFieldManager)
66 #define G4MT_material ((subInstanceManager.offset[instanceID]).fMaterial)
67 #define G4MT_mass ((subInstanceManager.offset[instanceID]).fMass)
68 #define G4MT_ccouple ((subInstanceManager.offset[instanceID]).fCutsCouple)
69 #define G4MT_instance (subInstanceManager.offset[instanceID])
85 fVoxel(0), fOptimise(optimise), fRootRegion(false), fLock(false),
86 fSmartless(2.), fVisAttributes(0), fRegion(0), fBiasWeight(1.)
124 fName(
""), fUserLimits(0),
125 fVoxel(0), fOptimise(true), fRootRegion(false), fLock(false),
126 fSmartless(2.), fVisAttributes(0), fRegion(0), fBiasWeight(1.),
127 fSolid(0), fSensitiveDetector(0), fFieldManager(0), lvdata(0)
180 #ifdef CLONE_FIELD_MGR
257 while ( (NoDaughters--)>0 )
276 std::ostringstream message;
277 message <<
"ERROR - Attempt to place a volume in a mother volume" <<
G4endl
278 <<
" already containing a replicated volume." <<
G4endl
279 <<
" A volume can either contain several placements" <<
G4endl
280 <<
" or a unique replica or parameterised volume !" <<
G4endl
283 G4Exception(
"G4LogicalVolume::AddDaughter()",
"GeomMgt0002",
285 "Replica or parameterised volume must be the only daughter !");
299 if( pDaughterFieldManager == 0 )
316 G4PhysicalVolumeList::iterator i;
386 instLVdata.
fSolid = pSolid;
472 for (G4PhysicalVolumeList::const_iterator itDau =
fDaughters.begin();
475 isDaughter = (*itDau)->GetLogicalVolume()->IsAncestor(aVolume);
476 if (isDaughter)
break;
492 for (G4PhysicalVolumeList::const_iterator itDau =
fDaughters.begin();
535 std::ostringstream message;
536 message <<
"No material associated to the logical volume: " <<
fName <<
" !"
538 <<
"Sorry, cannot compute the mass ...";
539 G4Exception(
"G4LogicalVolume::GetMass()",
"GeomMgt0002",
545 std::ostringstream message;
546 message <<
"No solid is associated to the logical volume: " <<
fName <<
" !"
548 <<
"Sorry, cannot compute the mass ...";
549 G4Exception(
"G4LogicalVolume::GetMass()",
"GeomMgt0002",
564 for (G4PhysicalVolumeList::const_iterator itDau =
fDaughters.begin();
583 daughterSolid = physParam->
ComputeSolid(i, physDaughter);
589 daughterSolid = logDaughter->
GetSolid();
600 massSum += logDaughter->
GetMass(
true,
true, daughterMaterial);
virtual G4Material * ComputeMaterial(const G4int repNo, G4VPhysicalVolume *currentVol, const G4VTouchable *parentTouch=0)
G4Material * GetMaterial() const
void UpdateMaterial(G4Material *pMaterial)
G4FieldManager * fFieldManager
static G4GEOM_DLL G4ThreadLocal T * offset
static G4GEOM_DLL G4LVManager subInstanceManager
virtual void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
static void DeRegister(G4LogicalVolume *pVolume)
G4bool IsAncestor(const G4VPhysicalVolume *p) const
virtual G4VSolid * ComputeSolid(const G4int, G4VPhysicalVolume *)
static const G4LVManager & GetSubInstanceManager()
void SetUserLimits(G4UserLimits *pULimits)
virtual G4double GetCubicVolume()
G4double GetDensity() const
G4VSolid * GetSolid() const
G4VPhysicalVolume * GetDaughter(const G4int i) const
void SetSolid(G4VSolid *pSolid)
void RegionModified(G4bool flag)
const char * name(G4int ptype)
G4int CreateSubInstance()
void InitialiseWorker(G4LogicalVolume *ptrMasterObject, G4VSolid *pSolid, G4VSensitiveDetector *pSDetector)
void SetFieldManager(G4FieldManager *pFieldMgr, G4bool forceToAllDaughters)
void AssignFieldManager(G4FieldManager *fldMgr)
const G4String & GetName() const
void SlaveCopySubInstanceArray()
virtual G4VPVParameterisation * GetParameterisation() const =0
virtual ~G4LogicalVolume()
void SetMaterialCutsCouple(G4MaterialCutsCouple *cuts)
G4MaterialCutsCouple * FindCouple(G4Material *mat)
G4int TotalVolumeEntities() const
G4LogicalVolume(G4VSolid *pSolid, G4Material *pMaterial, const G4String &name, G4FieldManager *pFieldMgr=0, G4VSensitiveDetector *pSDetector=0, G4UserLimits *pULimits=0, G4bool optimise=true)
G4int GetNoDaughters() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
void TerminateWorker(G4LogicalVolume *ptrMasterObject)
G4LogicalVolume * GetLogicalVolume() const
G4bool IsDaughter(const G4VPhysicalVolume *p) const
void SetName(const G4String &pName)
virtual G4int GetMultiplicity() const
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
G4FieldManager * GetFieldManager() const
G4double GetMass(G4bool forced=false, G4bool propagate=true, G4Material *parMaterial=0)
const G4String & GetName() const
void AddDaughter(G4VPhysicalVolume *p)
G4VSensitiveDetector * fSensitiveDetector
void SetMaterial(G4Material *pMaterial)
static void Register(G4LogicalVolume *pVolume)
virtual G4bool IsExtended() const
G4VSensitiveDetector * GetSensitiveDetector() const
void RemoveRootLogicalVolume(G4LogicalVolume *lv, G4bool scan=true)
void SetVisAttributes(const G4VisAttributes *pVA)
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)
void RemoveDaughter(const G4VPhysicalVolume *p)
G4PhysicalVolumeList fDaughters
const G4VisAttributes * fVisAttributes