Import Geant4 8.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 14:36:02 +02:00
parent d93e1e39a9
commit 8a51e0bc40
5471 changed files with 99628 additions and 55248 deletions
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ParameterisedNavigation.icc,v 1.3 2004/09/26 01:18:17 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4ParameterisedNavigation.icc,v 1.5 2005/06/14 16:09:43 japost Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// class G4ParameterisedNavigation Inline implementation
@@ -78,85 +78,3 @@ G4ParameterisedNavigation::ParamVoxelLocate( G4SmartVoxelHeader* pHead,
return fVoxelNode;
}
// ********************************************************************
// LevelLocate
// ********************************************************************
//
inline
G4bool
G4ParameterisedNavigation::LevelLocate( G4NavigationHistory& history,
const G4VPhysicalVolume* blockedVol,
const G4int blockedNum,
const G4ThreeVector& globalPoint,
const G4ThreeVector* globalDirection,
const G4bool pLocatedOnEdge,
G4ThreeVector& localPoint )
{
G4SmartVoxelHeader *motherVoxelHeader;
G4SmartVoxelNode *motherVoxelNode;
G4VPhysicalVolume *motherPhysical, *pPhysical;
G4VPVParameterisation *pParam;
G4LogicalVolume *motherLogical;
G4VSolid *pSolid;
G4ThreeVector samplePoint;
G4int voxelNoDaughters, replicaNo;
motherPhysical = history.GetTopVolume();
motherLogical = motherPhysical->GetLogicalVolume();
motherVoxelHeader = motherLogical->GetVoxelHeader();
// Find the voxel containing the point
//
motherVoxelNode = ParamVoxelLocate(motherVoxelHeader,localPoint);
voxelNoDaughters = motherVoxelNode->GetNoContained();
if ( voxelNoDaughters==0 ) return false;
pPhysical = motherLogical->GetDaughter(0);
pParam = pPhysical->GetParameterisation();
// Search replicated daughter volume
//
for ( register int sampleNo=voxelNoDaughters-1; sampleNo>=0; sampleNo-- )
{
replicaNo = motherVoxelNode->GetVolume(sampleNo);
if ( (replicaNo!=blockedNum) || (pPhysical!=blockedVol) )
{
// Obtain solid (as it can vary) and obtain its parameters
//
pSolid = pParam->ComputeSolid(replicaNo, pPhysical);
pSolid->ComputeDimensions(pParam, replicaNo, pPhysical);
pParam->ComputeTransformation(replicaNo, pPhysical);
// Setup history
//
history.NewLevel(pPhysical, kParameterised, replicaNo);
samplePoint = history.GetTopTransform().TransformPoint(globalPoint);
if ( !G4AuxiliaryNavServices::CheckPointOnSurface(pSolid,
samplePoint, globalDirection,
history.GetTopTransform(), pLocatedOnEdge) )
{
history.BackLevel();
}
else
{
// Enter this daughter
//
localPoint = samplePoint;
// Set the correct copy number in physical
//
pPhysical->SetCopyNo(replicaNo);
// Set the correct solid and material in Logical Volume
//
G4LogicalVolume *pLogical = pPhysical->GetLogicalVolume();
pLogical->SetSolid(pSolid);
pLogical->UpdateMaterial(pParam->ComputeMaterial(replicaNo, pPhysical));
return true;
}
}
}
return false;
}