Import Geant4 5.1.0 source tree
This commit is contained in:
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4LogicalVolume.icc,v 1.8 2002/05/17 17:59:47 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// $Id: G4LogicalVolume.icc,v 1.11 2003/03/05 18:07:36 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// class G4LogicalVolume Inline Implementation file
|
||||
@@ -102,6 +102,17 @@ G4FastSimulationManager* G4LogicalVolume::GetFastSimulationManager () const
|
||||
inline
|
||||
void G4LogicalVolume::AddDaughter(G4VPhysicalVolume* pNewDaughter)
|
||||
{
|
||||
if( !fDaughters.empty() && fDaughters[0]->IsReplicated() )
|
||||
{
|
||||
G4cout << "ERROR - Attempt to place a volume in a mother volume" << G4endl
|
||||
<< " already containing a replicated volume." << G4endl
|
||||
<< " A volume can either contain several placements" << G4endl
|
||||
<< " or a unique replica or parameterised volume !" << G4endl
|
||||
<< " Mother logical volume: " << GetName() << G4endl
|
||||
<< " Placing volume: " << pNewDaughter->GetName() << G4endl;
|
||||
G4Exception("G4LogicalVolume::AddDaughter() - Not a valid geometry setup !");
|
||||
}
|
||||
|
||||
fDaughters.push_back(pNewDaughter);
|
||||
|
||||
// Propagates the mother's FastSimulationManager pointer. If we are in
|
||||
@@ -137,6 +148,11 @@ void G4LogicalVolume::AddDaughter(G4VPhysicalVolume* pNewDaughter)
|
||||
{
|
||||
pDaughterLogical->SetFieldManager(fFieldManager, true);
|
||||
}
|
||||
if (fRegion)
|
||||
{
|
||||
PropagateRegion();
|
||||
fRegion->RegionModified(true);
|
||||
}
|
||||
}
|
||||
|
||||
// ********************************************************************
|
||||
@@ -170,6 +186,10 @@ void G4LogicalVolume::RemoveDaughter(const G4VPhysicalVolume* p)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (fRegion)
|
||||
{
|
||||
fRegion->RegionModified(true);
|
||||
}
|
||||
}
|
||||
|
||||
// ********************************************************************
|
||||
@@ -313,6 +333,88 @@ void G4LogicalVolume::SetOptimisation(G4bool optim)
|
||||
fOptimise = optim;
|
||||
}
|
||||
|
||||
// ********************************************************************
|
||||
// IsRootRegion
|
||||
// ********************************************************************
|
||||
//
|
||||
inline
|
||||
G4bool G4LogicalVolume::IsRootRegion() const
|
||||
{
|
||||
return fRootRegion;
|
||||
}
|
||||
|
||||
// ********************************************************************
|
||||
// SetRegionRootFlag
|
||||
// ********************************************************************
|
||||
//
|
||||
inline
|
||||
void G4LogicalVolume::SetRegionRootFlag(G4bool rreg)
|
||||
{
|
||||
fRootRegion = rreg;
|
||||
}
|
||||
|
||||
// ********************************************************************
|
||||
// IsRegion
|
||||
// ********************************************************************
|
||||
//
|
||||
inline
|
||||
G4bool G4LogicalVolume::IsRegion() const
|
||||
{
|
||||
G4bool reg = false;
|
||||
if (fRegion) reg = true;
|
||||
return reg;
|
||||
}
|
||||
|
||||
// ********************************************************************
|
||||
// SetRegion
|
||||
// ********************************************************************
|
||||
//
|
||||
inline
|
||||
void G4LogicalVolume::SetRegion(G4Region* reg)
|
||||
{
|
||||
fRegion = reg;
|
||||
}
|
||||
|
||||
// ********************************************************************
|
||||
// GetRegion
|
||||
// ********************************************************************
|
||||
//
|
||||
inline
|
||||
G4Region* G4LogicalVolume::GetRegion() const
|
||||
{
|
||||
return fRegion;
|
||||
}
|
||||
|
||||
// ********************************************************************
|
||||
// PropagateRegion
|
||||
// ********************************************************************
|
||||
//
|
||||
inline
|
||||
void G4LogicalVolume::PropagateRegion()
|
||||
{
|
||||
fRegion->ScanVolumeTree(this, true);
|
||||
}
|
||||
|
||||
// ********************************************************************
|
||||
// GetMaterialCutsCouple
|
||||
// ********************************************************************
|
||||
//
|
||||
inline
|
||||
const G4MaterialCutsCouple* G4LogicalVolume::GetMaterialCutsCouple() const
|
||||
{
|
||||
return fCutsCouple;
|
||||
}
|
||||
|
||||
// ********************************************************************
|
||||
// SetMaterialCutsCouple
|
||||
// ********************************************************************
|
||||
//
|
||||
inline
|
||||
void G4LogicalVolume::SetMaterialCutsCouple(G4MaterialCutsCouple* cuts)
|
||||
{
|
||||
fCutsCouple = cuts;
|
||||
}
|
||||
|
||||
// ********************************************************************
|
||||
// Operator ==
|
||||
// ********************************************************************
|
||||
|
||||
Reference in New Issue
Block a user