G4LogicalVolume Class Reference

#include <G4LogicalVolume.hh>


Public Member Functions

 G4LogicalVolume (G4VSolid *pSolid, G4Material *pMaterial, const G4String &name, G4FieldManager *pFieldMgr=0, G4VSensitiveDetector *pSDetector=0, G4UserLimits *pULimits=0, G4bool optimise=true)
 ~G4LogicalVolume ()
G4String GetName () const
void SetName (const G4String &pName)
G4int GetNoDaughters () const
G4VPhysicalVolumeGetDaughter (const G4int i) const
void AddDaughter (G4VPhysicalVolume *p)
G4bool IsDaughter (const G4VPhysicalVolume *p) const
G4bool IsAncestor (const G4VPhysicalVolume *p) const
void RemoveDaughter (const G4VPhysicalVolume *p)
void ClearDaughters ()
G4int TotalVolumeEntities () const
G4VSolidGetSolid () const
void SetSolid (G4VSolid *pSolid)
G4MaterialGetMaterial () const
void SetMaterial (G4Material *pMaterial)
void UpdateMaterial (G4Material *pMaterial)
G4double GetMass (G4bool forced=false, G4bool propagate=true, G4Material *parMaterial=0)
G4FieldManagerGetFieldManager () const
void SetFieldManager (G4FieldManager *pFieldMgr, G4bool forceToAllDaughters)
G4VSensitiveDetectorGetSensitiveDetector () const
void SetSensitiveDetector (G4VSensitiveDetector *pSDetector)
G4UserLimitsGetUserLimits () const
void SetUserLimits (G4UserLimits *pULimits)
G4SmartVoxelHeaderGetVoxelHeader () const
void SetVoxelHeader (G4SmartVoxelHeader *pVoxel)
G4double GetSmartless () const
void SetSmartless (G4double s)
G4bool IsToOptimise () const
void SetOptimisation (G4bool optim)
G4bool IsRootRegion () const
void SetRegionRootFlag (G4bool rreg)
G4bool IsRegion () const
void SetRegion (G4Region *reg)
G4RegionGetRegion () const
void PropagateRegion ()
const G4MaterialCutsCoupleGetMaterialCutsCouple () const
void SetMaterialCutsCouple (G4MaterialCutsCouple *cuts)
G4bool operator== (const G4LogicalVolume &lv) const
const G4VisAttributesGetVisAttributes () const
void SetVisAttributes (const G4VisAttributes *pVA)
void SetVisAttributes (const G4VisAttributes &VA)
G4FastSimulationManagerGetFastSimulationManager () const
void SetBiasWeight (G4double w)
G4double GetBiasWeight () const
 G4LogicalVolume (__void__ &)
void Lock ()


Detailed Description

Definition at line 133 of file G4LogicalVolume.hh.


Constructor & Destructor Documentation

G4LogicalVolume::G4LogicalVolume ( G4VSolid pSolid,
G4Material pMaterial,
const G4String name,
G4FieldManager pFieldMgr = 0,
G4VSensitiveDetector pSDetector = 0,
G4UserLimits pULimits = 0,
G4bool  optimise = true 
)

Definition at line 56 of file G4LogicalVolume.cc.

References G4LogicalVolumeStore::Register(), SetMaterial(), SetName(), SetSensitiveDetector(), SetSolid(), and SetUserLimits().

00063  : fDaughters(0,(G4VPhysicalVolume*)0), fFieldManager(pFieldMgr),
00064    fVoxel(0), fOptimise(optimise), fRootRegion(false), fLock(false),
00065    fSmartless(2.), fMass(0.), fVisAttributes(0), fRegion(0), fCutsCouple(0)
00066 {
00067   SetSolid(pSolid);
00068   SetMaterial(pMaterial);
00069   SetName(name);
00070   SetSensitiveDetector(pSDetector);
00071   SetUserLimits(pULimits);    
00072   //
00073   // Add to store
00074   //
00075   G4LogicalVolumeStore::Register(this);
00076 }

G4LogicalVolume::~G4LogicalVolume (  ) 

Definition at line 99 of file G4LogicalVolume.cc.

References G4LogicalVolumeStore::DeRegister(), and G4Region::RemoveRootLogicalVolume().

00100 {
00101   if (!fLock && fRootRegion)  // De-register root region first if not locked
00102   {                           // and flagged as root logical-volume
00103     fRegion->RemoveRootLogicalVolume(this, true);
00104   }
00105   G4LogicalVolumeStore::DeRegister(this);
00106 }

G4LogicalVolume::G4LogicalVolume ( __void__ &   ) 

Definition at line 83 of file G4LogicalVolume.cc.

References G4LogicalVolumeStore::Register().

00084  : fDaughters(0,(G4VPhysicalVolume*)0), fFieldManager(0),
00085    fMaterial(0), fName(""), fSensitiveDetector(0), fSolid(0), fUserLimits(0),
00086    fVoxel(0), fOptimise(true), fRootRegion(false), fLock(false), fSmartless(2.),
00087    fMass(0.), fVisAttributes(0), fRegion(0), fCutsCouple(0), fBiasWeight(0.)
00088 {
00089   // Add to store
00090   //
00091   G4LogicalVolumeStore::Register(this);
00092 }


Member Function Documentation

void G4LogicalVolume::AddDaughter ( G4VPhysicalVolume p  )  [inline]

Definition at line 107 of file G4LogicalVolume.icc.

References FatalException, G4endl, G4Exception(), GetFieldManager(), G4VPhysicalVolume::GetLogicalVolume(), G4VPhysicalVolume::GetName(), GetName(), PropagateRegion(), G4Region::RegionModified(), and SetFieldManager().

Referenced by G4PVDivision::G4PVDivision(), G4PVPlacement::G4PVPlacement(), and G4PVReplica::G4PVReplica().

00108 {
00109   if( !fDaughters.empty() && fDaughters[0]->IsReplicated() )
00110   {
00111     std::ostringstream message;
00112     message << "ERROR - Attempt to place a volume in a mother volume" << G4endl
00113             << "        already containing a replicated volume." << G4endl
00114             << "        A volume can either contain several placements" << G4endl
00115             << "        or a unique replica or parameterised volume !" << G4endl
00116             << "           Mother logical volume: " << GetName() << G4endl
00117             << "           Placing volume: " << pNewDaughter->GetName() << G4endl;
00118     G4Exception("G4LogicalVolume::AddDaughter()", "GeomMgt0002",
00119                 FatalException, message,
00120                 "Replica or parameterised volume must be the only daughter !");
00121   }
00122 
00123   fMass = 0.;
00124   fDaughters.push_back(pNewDaughter);
00125 
00126   G4LogicalVolume* pDaughterLogical = pNewDaughter->GetLogicalVolume();
00127 
00128   // Propagate the Field Manager, if the daughter has no field Manager.
00129   //
00130   G4FieldManager* pDaughterFieldManager = pDaughterLogical->GetFieldManager();
00131 
00132   if( pDaughterFieldManager == 0 )
00133   {
00134     pDaughterLogical->SetFieldManager(fFieldManager, false);
00135   }
00136   if (fRegion)
00137   {
00138     PropagateRegion();
00139     fRegion->RegionModified(true);
00140   }
00141 }

void G4LogicalVolume::ClearDaughters (  )  [inline]

Definition at line 186 of file G4LogicalVolume.icc.

References G4Region::RegionModified().

00187 {
00188   G4PhysicalVolumeList::iterator i;
00189   for ( i=fDaughters.begin(); i!=fDaughters.end(); ++i )
00190   {
00191     fDaughters.erase(i);
00192   }
00193   if (fRegion)
00194   {
00195     fRegion->RegionModified(true);
00196   }
00197   fMass = 0.;
00198 }

G4double G4LogicalVolume::GetBiasWeight (  )  const [inline]

Definition at line 494 of file G4LogicalVolume.icc.

00495 {
00496   return fBiasWeight;
00497 }

G4VPhysicalVolume * G4LogicalVolume::GetDaughter ( const G4int  i  )  const [inline]

Definition at line 85 of file G4LogicalVolume.icc.

Referenced by G4GMocrenFileSceneHandler::AddSolid(), G4Region::BelongsTo(), G4SmartVoxelHeader::BuildNodes(), G4SmartVoxelHeader::BuildReplicaVoxels(), G4Navigator::CharacteriseDaughters(), G4ITNavigator::CharacteriseDaughters(), G4PVPlacement::CheckOverlaps(), G4VoxelNavigation::ComputeSafety(), G4ReplicaNavigation::ComputeSafety(), G4ParameterisedNavigation::ComputeSafety(), G4NormalNavigation::ComputeSafety(), G4VoxelNavigation::ComputeStep(), G4ReplicaNavigation::ComputeStep(), G4RegularNavigation::ComputeStep(), G4ParameterisedNavigation::ComputeStep(), G4NormalNavigation::ComputeStep(), G4SmartVoxelHeader::G4SmartVoxelHeader(), G4GeomTestOvershootList::GetDaughter(), G4GeomTestOverlapList::GetDaughter1(), G4GeomTestOverlapList::GetDaughter2(), G4Navigator::GetDaughtersRegularStructureId(), G4ITNavigator::GetDaughtersRegularStructureId(), G4ReplicaNavigation::LevelLocate(), G4RegularNavigation::LevelLocate(), G4ParameterisedNavigation::LevelLocate(), G4NormalNavigation::LevelLocate(), G4VoxelSafety::SafetyForVoxelNode(), G4Region::ScanVolumeTree(), SetFieldManager(), G4GeomTestVolume::TestOneLine(), G4GeomTestVolume::TestRecursiveCartGrid(), G4GeomTestVolume::TestRecursiveCylinder(), G4GeomTestVolume::TestRecursiveLine(), and G4GDMLWriteStructure::TraverseVolumeTree().

00086 {
00087   return fDaughters[i];
00088 }

G4FastSimulationManager * G4LogicalVolume::GetFastSimulationManager (  )  const [inline]

Definition at line 95 of file G4LogicalVolume.icc.

References G4Region::GetFastSimulationManager().

Referenced by G4FastSimulationManagerProcess::AtRestGetPhysicalInteractionLength(), GFlashHitMaker::make(), and G4FastSimulationManagerProcess::PostStepGetPhysicalInteractionLength().

00096 {
00097   G4FastSimulationManager* fFSM = 0;
00098   if(fRegion) fFSM = fRegion->GetFastSimulationManager();
00099   return fFSM;
00100 }

G4FieldManager * G4LogicalVolume::GetFieldManager (  )  const [inline]

Definition at line 65 of file G4LogicalVolume.icc.

Referenced by AddDaughter(), G4PropagatorInField::FindAndSetFieldManager(), and SetFieldManager().

00066 {
00067   return fFieldManager;
00068 }

G4double G4LogicalVolume::GetMass ( G4bool  forced = false,
G4bool  propagate = true,
G4Material parMaterial = 0 
)

Definition at line 193 of file G4LogicalVolume.cc.

References G4VSolid::ComputeDimensions(), FatalException, G4endl, G4Exception(), G4VSolid::GetCubicVolume(), G4Material::GetDensity(), GetMass(), GetMaterial(), and GetSolid().

Referenced by GetMass(), and G4ASCIITreeSceneHandler::RequestPrimitives().

00196 {
00197   // Return the cached non-zero value, if not forced
00198   //
00199   if ( (fMass) && (!forced) ) return fMass;
00200 
00201   // Global density and computed mass associated to the logical
00202   // volume without considering its daughters
00203   //
00204   G4Material* logMaterial = parMaterial ? parMaterial : fMaterial;
00205   if (!logMaterial)
00206   {
00207     std::ostringstream message;
00208     message << "No material associated to the logical volume: " << fName << " !"
00209             << G4endl
00210             << "Sorry, cannot compute the mass ...";
00211     G4Exception("G4LogicalVolume::GetMass()", "GeomMgt0002",
00212                 FatalException, message);
00213     return 0;
00214   }
00215   if (!fSolid)
00216   {
00217     std::ostringstream message;
00218     message << "No solid is associated to the logical volume: " << fName << " !"
00219             << G4endl
00220             << "Sorry, cannot compute the mass ...";
00221     G4Exception("G4LogicalVolume::GetMass()", "GeomMgt0002",
00222                 FatalException, message);
00223     return 0;
00224   }
00225   G4double globalDensity = logMaterial->GetDensity();
00226   fMass = fSolid->GetCubicVolume() * globalDensity;
00227 
00228   // For each daughter in the tree, subtract the mass occupied
00229   // and if required by the propagate flag, add the real daughter's
00230   // one computed recursively
00231 
00232   for (G4PhysicalVolumeList::const_iterator itDau = fDaughters.begin();
00233        itDau != fDaughters.end(); itDau++)
00234   {
00235     G4VPhysicalVolume* physDaughter = (*itDau);
00236     G4LogicalVolume* logDaughter = physDaughter->GetLogicalVolume();
00237     G4double subMass=0.;
00238     G4VSolid* daughterSolid = 0;
00239     G4Material* daughterMaterial = 0;
00240 
00241     // Compute the mass to subtract and to add for each daughter
00242     // considering its multiplicity (i.e. replicated or not) and
00243     // eventually its parameterisation (by solid and/or by material)
00244     //
00245     for (G4int i=0; i<physDaughter->GetMultiplicity(); i++)
00246     {
00247       G4VPVParameterisation*
00248         physParam = physDaughter->GetParameterisation();
00249       if (physParam)
00250       {
00251         daughterSolid = physParam->ComputeSolid(i, physDaughter);
00252         daughterSolid->ComputeDimensions(physParam, i, physDaughter);
00253         daughterMaterial = physParam->ComputeMaterial(i, physDaughter);
00254       }
00255       else
00256       {
00257         daughterSolid = logDaughter->GetSolid();
00258         daughterMaterial = logDaughter->GetMaterial();
00259       }
00260       subMass = daughterSolid->GetCubicVolume() * globalDensity;
00261 
00262       // Subtract the daughter's portion for the mass and, if required,
00263       // add the real daughter's mass computed recursively
00264       //
00265       fMass -= subMass;
00266       if (propagate)
00267       {
00268         fMass += logDaughter->GetMass(true, true, daughterMaterial);
00269       }
00270     }
00271   }
00272 
00273   return fMass;
00274 }

G4Material * G4LogicalVolume::GetMaterial (  )  const [inline]

Definition at line 227 of file G4LogicalVolume.icc.

Referenced by G4VPVParameterisation::ComputeMaterial(), G4tgbGeometryDumper::DumpLogVol(), GetMass(), G4Step::InitializeStep(), G4VXTRenergyLoss::PostStepDoIt(), G4Transportation::PostStepDoIt(), G4ITTransportation::PostStepDoIt(), G4CoupledTransportation::PostStepDoIt(), G4Region::ScanVolumeTree(), and G4GDMLWriteStructure::TraverseVolumeTree().

00228 {
00229   return fMaterial;
00230 }

const G4MaterialCutsCouple * G4LogicalVolume::GetMaterialCutsCouple (  )  const [inline]

Definition at line 424 of file G4LogicalVolume.icc.

Referenced by G4Step::InitializeStep(), G4Transportation::PostStepDoIt(), G4ITTransportation::PostStepDoIt(), and G4CoupledTransportation::PostStepDoIt().

00425 {
00426   return fCutsCouple;
00427 }

G4String G4LogicalVolume::GetName (  )  const [inline]

Definition at line 45 of file G4LogicalVolume.icc.

Referenced by G4AdjointCrossSurfChecker::AddanExtSurfaceOfAvolume(), AddDaughter(), G4HepRepSceneHandler::AddSolid(), G4SmartVoxelHeader::BuildNodes(), G4SmartVoxelHeader::BuildReplicaVoxels(), G4SmartVoxelHeader::BuildVoxelsWithinLimits(), G4PVPlacement::CheckOverlaps(), G4PVParameterised::CheckOverlaps(), checkVol(), G4tgbVolume::ConstructG4LogVol(), G4tgbVolume::ConstructG4PhysVol(), G4tgbVolume::ConstructG4Volumes(), G4PhysicalVolumeModel::CreateCurrentAttValues(), G3Division::CreatePVReplica(), G4AdjointCrossSurfChecker::CrossingAnInterfaceBetweenTwoVolumes(), G4RadioactiveDecay::DecayIt(), G4RunManagerKernel::DefineWorldVolume(), G4RadioactiveDecay::DeselectAVolume(), G4ReflectionFactory::Divide(), G4GDMLReadStructure::DivisionvolRead(), G4GDMLWriteStructure::DivisionvolWrite(), G4TrajectoryDrawByOriginVolume::Draw(), G4tgbVolumeMgr::DumpG4LogVolLeaf(), G4tgbGeometryDumper::DumpLogVol(), G4tgbGeometryDumper::DumpPhysVol(), G4tgbGeometryDumper::DumpPVParameterised(), G4tgbGeometryDumper::DumpPVPlacement(), G4tgbGeometryDumper::DumpPVReplica(), G4TrajectoryOriginVolumeFilter::Evaluate(), G4BuildGeom(), G4PVReplica::G4PVReplica(), G4GDMLRead::GeneratePhysvolName(), G4Navigator::GetLocalExitNormal(), G4PolarizedCompton::GetMeanFreePath(), G4eplusPolarizedAnnihilation::GetMeanFreePath(), G4tgbVolumeMgr::GetTopLogVol(), G4tgbVolumeMgr::GetTopPhysVol(), G4GDMLReadStructure::GetWorldVolume(), G4AdjointCrossSurfChecker::GoingInOrOutOfaVolumeByExtSurface(), G4GDMLWriteParamvol::ParamvolAlgorithmWrite(), G4GDMLReadParamvol::ParamvolRead(), G4GDMLWriteParamvol::ParamvolWrite(), G4GDMLReadStructure::PhysvolRead(), G4GDMLWriteStructure::PhysvolWrite(), G4ReflectionFactory::Place(), G4PolarizedCompton::PostStepGetPhysicalInteractionLength(), G4eplusPolarizedAnnihilation::PostStepGetPhysicalInteractionLength(), G4tgbVolumeMgr::RegisterMe(), G4GDMLReadStructure::ReplicaRead(), G4ReflectionFactory::Replicate(), G4GDMLWriteStructure::ReplicavolWrite(), G4ASCIITreeSceneHandler::RequestPrimitives(), G4VoxelSafety::SafetyForVoxelHeader(), G4PolarizedComptonModel::SampleSecondaries(), G4Region::ScanVolumeTree(), G4RadioactiveDecay::SelectAllVolumes(), G4RadioactiveDecay::SelectAVolume(), G4VisCommandGeometryRestore::SetNewValue(), G4GDMLWriteSetup::SetupWrite(), G4PolarizationManager::SetVolumePolarization(), G4GDMLWriteStructure::SkinSurfaceCache(), and G4GDMLWriteStructure::TraverseVolumeTree().

00046 {
00047   return fName;
00048 }

G4int G4LogicalVolume::GetNoDaughters (  )  const [inline]

Definition at line 75 of file G4LogicalVolume.icc.

Referenced by G4GMocrenFileSceneHandler::AddSolid(), G4Region::BelongsTo(), G4SmartVoxelHeader::BuildNodes(), G4SmartVoxelHeader::BuildReplicaVoxels(), G4SmartVoxelHeader::BuildVoxels(), G4Navigator::CharacteriseDaughters(), G4ITNavigator::CharacteriseDaughters(), G4PVPlacement::CheckOverlaps(), G4VoxelSafety::ComputeSafety(), G4ReplicaNavigation::ComputeSafety(), G4NormalNavigation::ComputeSafety(), G4VoxelNavigation::ComputeStep(), G4ReplicaNavigation::ComputeStep(), G4NormalNavigation::ComputeStep(), G4PhysicalVolumeModel::DescribeAndDescend(), G4DrawVoxels::DrawVoxels(), G4PVReplica::G4PVReplica(), G4SmartVoxelHeader::G4SmartVoxelHeader(), G4Navigator::GetDaughtersRegularStructureId(), G4ITNavigator::GetDaughtersRegularStructureId(), G4NormalNavigation::LevelLocate(), G4ASCIITreeSceneHandler::RequestPrimitives(), G4Region::ScanVolumeTree(), SetFieldManager(), G4GeomTestVolume::TestOneLine(), G4GeomTestVolume::TestRecursiveCartGrid(), G4GeomTestVolume::TestRecursiveCylinder(), G4GeomTestVolume::TestRecursiveLine(), and G4GDMLWriteStructure::TraverseVolumeTree().

00076 {
00077   return fDaughters.size();
00078 }

G4Region * G4LogicalVolume::GetRegion (  )  const [inline]

Definition at line 404 of file G4LogicalVolume.icc.

Referenced by G4Region::BelongsTo(), G4PhysicalVolumeModel::CreateCurrentAttValues(), G4RunManagerKernel::DefineWorldVolume(), G4PropagatorInField::FindAndSetFieldManager(), G4VTransitionRadiation::GetMeanFreePath(), G4VTransitionRadiation::PostStepDoIt(), G4SteppingManager::Stepping(), and G4MSSteppingAction::UserSteppingAction().

00405 {
00406   return fRegion;
00407 }

G4VSensitiveDetector * G4LogicalVolume::GetSensitiveDetector (  )  const [inline]

Definition at line 260 of file G4LogicalVolume.icc.

Referenced by G4Step::InitializeStep(), GFlashHitMaker::make(), G4Transportation::PostStepDoIt(), G4ScoreSplittingProcess::PostStepDoIt(), G4ITTransportation::PostStepDoIt(), G4CoupledTransportation::PostStepDoIt(), and G4ASCIITreeSceneHandler::RequestPrimitives().

00261 {
00262   return fSensitiveDetector;
00263 }

G4double G4LogicalVolume::GetSmartless (  )  const [inline]

Definition at line 322 of file G4LogicalVolume.icc.

Referenced by G4SmartVoxelHeader::BuildNodes().

00323 {
00324   return fSmartless;
00325 }

G4VSolid * G4LogicalVolume::GetSolid (  )  const [inline]

Definition at line 205 of file G4LogicalVolume.icc.

Referenced by G4AdjointCrossSurfChecker::AddanExtSurfaceOfAvolume(), G4GMocrenFileSceneHandler::AddPrimitive(), G4ReplicaNavigation::BackLocate(), G4PhantomParameterisation::BuildContainerSolid(), G4SmartVoxelHeader::BuildNodes(), G4SmartVoxelHeader::BuildReplicaVoxels(), G4SmartVoxelHeader::BuildVoxelsWithinLimits(), G4PVPlacement::CheckOverlaps(), G4PVParameterised::CheckOverlaps(), G4VoxelSafety::ComputeSafety(), G4VoxelNavigation::ComputeSafety(), G4ReplicaNavigation::ComputeSafety(), G4ParameterisedNavigation::ComputeSafety(), G4NormalNavigation::ComputeSafety(), G4VPVParameterisation::ComputeSolid(), G4VNestedParameterisation::ComputeSolid(), G4PhantomParameterisation::ComputeSolid(), G4VoxelNavigation::ComputeStep(), G4ReplicaNavigation::ComputeStep(), G4ParameterisedNavigation::ComputeStep(), G4NormalNavigation::ComputeStep(), G4Navigator::ComputeStep(), G4ITNavigator::ComputeStep(), G4RegularNavigation::ComputeStepSkippingEqualMaterials(), G4PSPassageCellFlux::ComputeVolume(), G4PSDoseDeposit::ComputeVolume(), G4PSCellFlux::ComputeVolume(), G4tgbVolume::ConstructG4PhysVol(), G4TheRayTracer::CreateBitMap(), G4PhysicalVolumeModel::CreateCurrentAttValues(), G4Navigator::CreateGRSSolid(), G4ITNavigator::CreateGRSSolid(), G3Division::CreatePVReplica(), G4AdjointPosOnPhysVolGenerator::DefinePhysicalVolume(), G4VisManager::Draw(), G4tgbGeometryDumper::DumpLogVol(), G4Navigator::GetLocalExitNormal(), GetMass(), G4TransportationManager::GetParallelWorld(), G4TouchableHistory::GetSolid(), G4GRSVolume::GetSolid(), G4Navigator::LocateGlobalPointAndSetup(), G4ITNavigator::LocateGlobalPointAndSetup(), G4VXTRenergyLoss::PostStepDoIt(), G4NavigationLogger::PreComputeStepLog(), G4PSSphereSurfaceFlux::ProcessHits(), G4PSSphereSurfaceCurrent::ProcessHits(), G4PSFlatSurfaceFlux::ProcessHits(), G4PSFlatSurfaceCurrent::ProcessHits(), G4PSCylinderSurfaceFlux::ProcessHits(), G4PSCylinderSurfaceCurrent::ProcessHits(), G4VoxelSafety::SafetyForVoxelHeader(), G4VoxelSafety::SafetyForVoxelNode(), G4GeomTestVolume::TestOneLine(), and G4GDMLWriteStructure::TraverseVolumeTree().

00206 {
00207   return fSolid;
00208 }

G4UserLimits * G4LogicalVolume::GetUserLimits (  )  const [inline]

Definition at line 280 of file G4LogicalVolume.icc.

References G4Region::GetUserLimits().

Referenced by MinEkineCuts::PostStepGetPhysicalInteractionLength(), MaxTimeCuts::PostStepGetPhysicalInteractionLength(), G4UserSpecialCuts::PostStepGetPhysicalInteractionLength(), and G4StepLimiter::PostStepGetPhysicalInteractionLength().

00281 {
00282   if(fUserLimits) return fUserLimits;
00283   if(fRegion) return fRegion->GetUserLimits();
00284   return 0;
00285 }

const G4VisAttributes * G4LogicalVolume::GetVisAttributes (  )  const [inline]

Definition at line 464 of file G4LogicalVolume.icc.

Referenced by G4RayTrajectory::AppendStep(), G4PhysicalVolumeModel::DescribeAndDescend(), G4BuildGeom(), G4VVisCommandGeometrySet::SetLVVisAtts(), and G4VisCommandGeometryRestore::SetNewValue().

00465 {
00466   return fVisAttributes;
00467 }

G4SmartVoxelHeader * G4LogicalVolume::GetVoxelHeader (  )  const [inline]

Definition at line 302 of file G4LogicalVolume.icc.

Referenced by G4VoxelSafety::ComputeSafety(), G4Navigator::ComputeSafety(), G4ITNavigator::ComputeSafety(), G4DrawVoxels::CreatePlacedPolyhedra(), G4VoxelNavigation::LevelLocate(), G4ReplicaNavigation::LevelLocate(), G4ParameterisedNavigation::LevelLocate(), G4Navigator::LocateGlobalPointAndSetup(), G4ITNavigator::LocateGlobalPointAndSetup(), G4Navigator::LocateGlobalPointWithinVolume(), G4ITNavigator::LocateGlobalPointWithinVolume(), and G4RunManager::ReOptimize().

00303 {
00304   return fVoxel;
00305 }

G4bool G4LogicalVolume::IsAncestor ( const G4VPhysicalVolume p  )  const

Definition at line 139 of file G4LogicalVolume.cc.

References IsDaughter().

00140 {
00141   G4bool isDaughter = IsDaughter(aVolume);
00142   if (!isDaughter)
00143   {
00144     for (G4PhysicalVolumeList::const_iterator itDau = fDaughters.begin();
00145          itDau != fDaughters.end(); itDau++)
00146     {
00147       isDaughter = (*itDau)->GetLogicalVolume()->IsAncestor(aVolume);
00148       if (isDaughter)  break;
00149     }
00150   }
00151   return isDaughter;
00152 }

G4bool G4LogicalVolume::IsDaughter ( const G4VPhysicalVolume p  )  const [inline]

Definition at line 148 of file G4LogicalVolume.icc.

Referenced by IsAncestor().

00149 {
00150   G4PhysicalVolumeList::const_iterator i;
00151   for ( i=fDaughters.begin(); i!=fDaughters.end(); ++i )
00152   {
00153     if (**i==*p) return true;
00154   }
00155   return false;
00156 }

G4bool G4LogicalVolume::IsRegion (  )  const [inline]

Definition at line 382 of file G4LogicalVolume.icc.

00383 {
00384   G4bool reg = false;
00385   if (fRegion) reg = true;
00386   return reg;
00387 }

G4bool G4LogicalVolume::IsRootRegion (  )  const [inline]

Definition at line 362 of file G4LogicalVolume.icc.

Referenced by G4PhysicalVolumeModel::CreateCurrentAttValues().

00363 {
00364   return fRootRegion;
00365 }

G4bool G4LogicalVolume::IsToOptimise (  )  const [inline]

Definition at line 342 of file G4LogicalVolume.icc.

00343 {
00344   return fOptimise;
00345 }

void G4LogicalVolume::Lock (  )  [inline]

Definition at line 444 of file G4LogicalVolume.icc.

00445 {
00446   fLock = true;
00447 }

G4bool G4LogicalVolume::operator== ( const G4LogicalVolume lv  )  const [inline]

Definition at line 454 of file G4LogicalVolume.icc.

00455 {
00456   return (this==&lv) ? true : false;
00457 }

void G4LogicalVolume::PropagateRegion (  )  [inline]

Definition at line 414 of file G4LogicalVolume.icc.

References G4Region::ScanVolumeTree().

Referenced by AddDaughter().

00415 {
00416   fRegion->ScanVolumeTree(this, true);
00417 }

void G4LogicalVolume::RemoveDaughter ( const G4VPhysicalVolume p  )  [inline]

Definition at line 163 of file G4LogicalVolume.icc.

References G4Region::RegionModified().

Referenced by G4PhysicalVolumeStore::DeRegister().

00164 {
00165   G4PhysicalVolumeList::iterator i;
00166   for ( i=fDaughters.begin(); i!=fDaughters.end(); ++i )
00167   {
00168     if (**i==*p)
00169     {
00170       fDaughters.erase(i);
00171       break;
00172     }
00173   }
00174   if (fRegion)
00175   {
00176     fRegion->RegionModified(true);
00177   }
00178   fMass = 0.;
00179 }

void G4LogicalVolume::SetBiasWeight ( G4double  w  )  [inline]

Definition at line 484 of file G4LogicalVolume.icc.

00485 {
00486   fBiasWeight = weight;
00487 }

void G4LogicalVolume::SetFieldManager ( G4FieldManager pFieldMgr,
G4bool  forceToAllDaughters 
)

Definition at line 113 of file G4LogicalVolume.cc.

References GetDaughter(), GetFieldManager(), G4VPhysicalVolume::GetLogicalVolume(), GetNoDaughters(), and SetFieldManager().

Referenced by AddDaughter(), and SetFieldManager().

00115 {
00116   fFieldManager = pNewFieldMgr;
00117 
00118   G4int NoDaughters = GetNoDaughters();
00119   while ( (NoDaughters--)>0 )
00120   {
00121     G4LogicalVolume* DaughterLogVol; 
00122     DaughterLogVol = GetDaughter(NoDaughters)->GetLogicalVolume();
00123     if ( forceAllDaughters || (DaughterLogVol->GetFieldManager() == 0) )
00124     {
00125       DaughterLogVol->SetFieldManager(pNewFieldMgr, forceAllDaughters);
00126     }
00127   }
00128 }

void G4LogicalVolume::SetMaterial ( G4Material pMaterial  )  [inline]

Definition at line 237 of file G4LogicalVolume.icc.

Referenced by G4LogicalVolume(), and G4ScoreSplittingProcess::PostStepDoIt().

00238 {
00239   fMaterial=pMaterial;
00240   fMass = 0.;
00241 }

void G4LogicalVolume::SetMaterialCutsCouple ( G4MaterialCutsCouple cuts  )  [inline]

Definition at line 434 of file G4LogicalVolume.icc.

00435 {
00436   fCutsCouple = cuts;
00437 }

void G4LogicalVolume::SetName ( const G4String pName  )  [inline]

Definition at line 55 of file G4LogicalVolume.icc.

Referenced by G4LogicalVolume().

00056 {
00057   fName = pName;
00058 }

void G4LogicalVolume::SetOptimisation ( G4bool  optim  )  [inline]

Definition at line 352 of file G4LogicalVolume.icc.

00353 {
00354   fOptimise = optim;
00355 }

void G4LogicalVolume::SetRegion ( G4Region reg  )  [inline]

Definition at line 394 of file G4LogicalVolume.icc.

Referenced by G4RunManagerKernel::DefineWorldVolume(), and G4Region::ScanVolumeTree().

00395 {
00396   fRegion = reg;
00397 }

void G4LogicalVolume::SetRegionRootFlag ( G4bool  rreg  )  [inline]

Definition at line 372 of file G4LogicalVolume.icc.

Referenced by G4Region::AddRootLogicalVolume(), and G4Region::RemoveRootLogicalVolume().

00373 {
00374   fRootRegion = rreg;
00375 }

void G4LogicalVolume::SetSensitiveDetector ( G4VSensitiveDetector pSDetector  )  [inline]

Definition at line 270 of file G4LogicalVolume.icc.

Referenced by G4LogicalVolume().

00271 {
00272   fSensitiveDetector = pSDetector;
00273 }

void G4LogicalVolume::SetSmartless ( G4double  s  )  [inline]

Definition at line 332 of file G4LogicalVolume.icc.

00333 {
00334   fSmartless = smt;
00335 }

void G4LogicalVolume::SetSolid ( G4VSolid pSolid  )  [inline]

Definition at line 215 of file G4LogicalVolume.icc.

Referenced by G4LogicalVolume(), G4Navigator::GetMotherToDaughterTransform(), G4ITNavigator::GetMotherToDaughterTransform(), G4ParameterisedNavigation::LevelLocate(), G4Navigator::LocateGlobalPointAndSetup(), G4ITNavigator::LocateGlobalPointAndSetup(), G4Navigator::SetupHierarchy(), and G4ITNavigator::SetupHierarchy().

00216 {
00217   assert(pSolid != 0);
00218   fSolid=pSolid;
00219   fMass = 0.;
00220 }

void G4LogicalVolume::SetUserLimits ( G4UserLimits pULimits  )  [inline]

Definition at line 292 of file G4LogicalVolume.icc.

Referenced by G4LogicalVolume().

00293 {
00294   fUserLimits = pULimits;
00295 }

void G4LogicalVolume::SetVisAttributes ( const G4VisAttributes VA  ) 

Definition at line 276 of file G4LogicalVolume.cc.

00277 {
00278   fVisAttributes = new G4VisAttributes(VA);
00279 }

void G4LogicalVolume::SetVisAttributes ( const G4VisAttributes pVA  )  [inline]

Definition at line 474 of file G4LogicalVolume.icc.

Referenced by G4tgbVolume::ConstructG4LogVol(), G4BuildGeom(), G4GDMLReadStructure::GetWorldVolume(), and G4VisCommandGeometryRestore::SetNewValue().

00475 {
00476   fVisAttributes = pVA;
00477 }

void G4LogicalVolume::SetVoxelHeader ( G4SmartVoxelHeader pVoxel  )  [inline]

Definition at line 312 of file G4LogicalVolume.icc.

Referenced by G4RunManager::ReOptimize().

00313 {
00314   fVoxel = pVoxel;
00315 }

G4int G4LogicalVolume::TotalVolumeEntities (  )  const

Definition at line 161 of file G4LogicalVolume.cc.

00162 {
00163   G4int vols = 1;
00164   for (G4PhysicalVolumeList::const_iterator itDau = fDaughters.begin();
00165        itDau != fDaughters.end(); itDau++)
00166   {
00167     G4VPhysicalVolume* physDaughter = (*itDau);
00168     vols += physDaughter->GetMultiplicity()
00169            *physDaughter->GetLogicalVolume()->TotalVolumeEntities();
00170   }
00171   return vols;
00172 }

void G4LogicalVolume::UpdateMaterial ( G4Material pMaterial  )  [inline]

Definition at line 248 of file G4LogicalVolume.icc.

References G4Region::FindCouple().

Referenced by G4RegularNavigation::LevelLocate(), G4ParameterisedNavigation::LevelLocate(), G4Navigator::LocateGlobalPointAndSetup(), G4ITNavigator::LocateGlobalPointAndSetup(), G4Navigator::SetupHierarchy(), and G4ITNavigator::SetupHierarchy().

00249 {
00250   fMaterial=pMaterial;
00251   if(fRegion) { fCutsCouple = fRegion->FindCouple(pMaterial); }
00252   fMass = 0.;
00253 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:52:26 2013 for Geant4 by  doxygen 1.4.7