64 fVoxel(0), fOptimise(optimise), fRootRegion(false), fLock(false),
65 fSmartless(2.), fMass(0.), fVisAttributes(0), fRegion(0), fCutsCouple(0)
85 fMaterial(0), fName(
""), fSensitiveDetector(0), fSolid(0), fUserLimits(0),
86 fVoxel(0), fOptimise(true), fRootRegion(false), fLock(false), fSmartless(2.),
87 fMass(0.), fVisAttributes(0), fRegion(0), fCutsCouple(0), fBiasWeight(0.)
101 if (!fLock && fRootRegion)
116 fFieldManager = pNewFieldMgr;
119 while ( (NoDaughters--)>0 )
144 for (G4PhysicalVolumeList::const_iterator itDau = fDaughters.begin();
145 itDau != fDaughters.end(); itDau++)
147 isDaughter = (*itDau)->GetLogicalVolume()->IsAncestor(aVolume);
148 if (isDaughter)
break;
164 for (G4PhysicalVolumeList::const_iterator itDau = fDaughters.begin();
165 itDau != fDaughters.end(); itDau++)
199 if ( (fMass) && (!forced) )
return fMass;
204 G4Material* logMaterial = parMaterial ? parMaterial : fMaterial;
207 std::ostringstream message;
208 message <<
"No material associated to the logical volume: " << fName <<
" !"
210 <<
"Sorry, cannot compute the mass ...";
211 G4Exception(
"G4LogicalVolume::GetMass()",
"GeomMgt0002",
217 std::ostringstream message;
218 message <<
"No solid is associated to the logical volume: " << fName <<
" !"
220 <<
"Sorry, cannot compute the mass ...";
221 G4Exception(
"G4LogicalVolume::GetMass()",
"GeomMgt0002",
232 for (G4PhysicalVolumeList::const_iterator itDau = fDaughters.begin();
233 itDau != fDaughters.end(); itDau++)
251 daughterSolid = physParam->
ComputeSolid(i, physDaughter);
257 daughterSolid = logDaughter->
GetSolid();
268 fMass += logDaughter->
GetMass(
true,
true, daughterMaterial);
static void DeRegister(G4LogicalVolume *pVolume)
static void Register(G4LogicalVolume *pVolume)
G4VSolid * GetSolid() const
void SetName(const G4String &pName)
G4int GetNoDaughters() const
G4bool IsAncestor(const G4VPhysicalVolume *p) const
void SetFieldManager(G4FieldManager *pFieldMgr, G4bool forceToAllDaughters)
void SetUserLimits(G4UserLimits *pULimits)
G4double GetMass(G4bool forced=false, G4bool propagate=true, G4Material *parMaterial=0)
G4LogicalVolume(G4VSolid *pSolid, G4Material *pMaterial, const G4String &name, G4FieldManager *pFieldMgr=0, G4VSensitiveDetector *pSDetector=0, G4UserLimits *pULimits=0, G4bool optimise=true)
G4bool IsDaughter(const G4VPhysicalVolume *p) const
G4Material * GetMaterial() const
G4VPhysicalVolume * GetDaughter(const G4int i) const
G4FieldManager * GetFieldManager() const
void SetVisAttributes(const G4VisAttributes *pVA)
G4int TotalVolumeEntities() const
void SetMaterial(G4Material *pMaterial)
void SetSolid(G4VSolid *pSolid)
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)
G4double GetDensity() const
void RemoveRootLogicalVolume(G4LogicalVolume *lv, G4bool scan=true)
virtual G4Material * ComputeMaterial(const G4int repNo, G4VPhysicalVolume *currentVol, const G4VTouchable *parentTouch=0)
virtual G4VSolid * ComputeSolid(const G4int, G4VPhysicalVolume *)
G4LogicalVolume * GetLogicalVolume() const
virtual G4int GetMultiplicity() const
virtual G4VPVParameterisation * GetParameterisation() const =0
virtual void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
virtual G4double GetCubicVolume()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)