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
266 while ( (NoDaughters--)>0 )
286 message <<
"ERROR - Attempt to place a volume in a mother volume" <<
G4endl
287 <<
" already containing a replicated volume." <<
G4endl
288 <<
" A volume can either contain several placements" <<
G4endl
289 <<
" or a unique replica or parameterised volume !" <<
G4endl
292 G4Exception(
"G4LogicalVolume::AddDaughter()",
"GeomMgt0002",
294 "Replica or parameterised volume must be the only daughter !");
308 if( pDaughterFieldManager == 0 )
325 G4PhysicalVolumeList::iterator i;
395 instLVdata.
fSolid = pSolid;
481 for (G4PhysicalVolumeList::const_iterator itDau =
fDaughters.begin();
484 isDaughter = (*itDau)->GetLogicalVolume()->IsAncestor(aVolume);
485 if (isDaughter)
break;
501 for (G4PhysicalVolumeList::const_iterator itDau =
fDaughters.begin();
545 message <<
"No material associated to the logical volume: " <<
fName <<
" !"
547 <<
"Sorry, cannot compute the mass ...";
548 G4Exception(
"G4LogicalVolume::GetMass()",
"GeomMgt0002",
555 message <<
"No solid is associated to the logical volume: " <<
fName <<
" !"
557 <<
"Sorry, cannot compute the mass ...";
558 G4Exception(
"G4LogicalVolume::GetMass()",
"GeomMgt0002",
573 for (G4PhysicalVolumeList::const_iterator itDau =
fDaughters.begin();
592 daughterSolid = physParam->
ComputeSolid(i, physDaughter);
598 daughterSolid = logDaughter->
GetSolid();
609 massSum += logDaughter->
GetMass(
true,
true, daughterMaterial);
void SetName(const G4String &pName)
G4LogicalVolume * GetLogicalVolume() const
virtual G4Material * ComputeMaterial(const G4int repNo, G4VPhysicalVolume *currentVol, const G4VTouchable *parentTouch=0)
G4VSensitiveDetector * GetSensitiveDetector() const
G4VSensitiveDetector * fSensitiveDetector
virtual ~G4LogicalVolume()
G4PhysicalVolumeList fDaughters
virtual G4VPVParameterisation * GetParameterisation() const =0
void message(RunManager *runmanager)
G4int CreateSubInstance()
G4int GetNoDaughters() const
void SetFieldManager(G4FieldManager *pFieldMgr, G4bool forceToAllDaughters)
void UpdateMaterial(G4Material *pMaterial)
static void DeRegister(G4LogicalVolume *pVolume)
void RemoveRootLogicalVolume(G4LogicalVolume *lv, G4bool scan=true)
G4LogicalVolume(G4VSolid *pSolid, G4Material *pMaterial, const G4String &name, G4FieldManager *pFieldMgr=0, G4VSensitiveDetector *pSDetector=0, G4UserLimits *pULimits=0, G4bool optimise=true)
G4Material * GetMaterial() const
void AssignFieldManager(G4FieldManager *fldMgr)
virtual G4int GetMultiplicity() const
virtual G4VSolid * ComputeSolid(const G4int, G4VPhysicalVolume *)
static void Register(G4LogicalVolume *pVolume)
G4bool IsDaughter(const G4VPhysicalVolume *p) const
virtual G4bool IsExtended() const
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
void SetSolid(G4VSolid *pSolid)
static G4GEOM_DLL G4ThreadLocal T * offset
void InitialiseWorker(G4LogicalVolume *ptrMasterObject, G4VSolid *pSolid, G4VSensitiveDetector *pSDetector)
void RemoveDaughter(const G4VPhysicalVolume *p)
void SetMaterialCutsCouple(G4MaterialCutsCouple *cuts)
void AddDaughter(G4VPhysicalVolume *p)
void SetVisAttributes(const G4VisAttributes *pVA)
G4bool IsAncestor(const G4VPhysicalVolume *p) const
void SetUserLimits(G4UserLimits *pULimits)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
void SlaveCopySubInstanceArray()
void TerminateWorker(G4LogicalVolume *ptrMasterObject)
virtual G4double GetCubicVolume()
static G4GEOM_DLL G4LVManager subInstanceManager
G4FieldManager * GetFieldManager() const
void SetMaterial(G4Material *pMaterial)
G4VSolid * GetSolid() const
virtual void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
G4MaterialCutsCouple * FindCouple(G4Material *mat)
static const G4LVManager & GetSubInstanceManager()
void RegionModified(G4bool flag)
const G4VisAttributes * fVisAttributes
G4double GetMass(G4bool forced=false, G4bool propagate=true, G4Material *parMaterial=0)
G4int TotalVolumeEntities() const
const G4String & GetName() const
G4VPhysicalVolume * GetDaughter(const G4int i) const
const G4String & GetName() const
G4FieldManager * fFieldManager
G4double GetDensity() const
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)