Import Geant4 0.1.0 source tree
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4GeometryManager.cc,v 2.2 1998/07/13 16:51:22 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4GeometryManager.cc,v 1.1 1999/01/07 16:07:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// class G4GeometryManager
|
||||
//
|
||||
|
||||
@@ -5,13 +5,14 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4LogicalVolume.cc,v 2.1 1998/11/11 11:38:21 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4LogicalVolume.cc,v 1.2 1999/02/15 10:58:17 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// class G4LogicalVolume Implementation
|
||||
//
|
||||
// History:
|
||||
// 12.02.99 S.Giani: Deafult initialization of voxelization quality.
|
||||
// 10.20.97 - P. MoraDeFreitas : "Fast" replaces "Parameterisation" in
|
||||
// class/method names. (release B.00 for parameterisation).
|
||||
// 04.08.97 P.MoraDeFreitas/J.A. Added methods for ParameterisedSimulation
|
||||
@@ -28,7 +29,7 @@ G4LogicalVolume::G4LogicalVolume( G4VSolid *pSolid, G4Material *pMaterial,
|
||||
G4FieldManager *pFieldMgr,
|
||||
G4VSensitiveDetector *pSDetector,
|
||||
G4UserLimits *pULimits) :
|
||||
fDaughters(0), fVoxel(0), fVisAttributes (0) , fFastSimulationManager (0),
|
||||
fDaughters(0), fVoxel(0), fSmartless(2.), fVisAttributes (0) , fFastSimulationManager (0),
|
||||
fIsEnvelope(FALSE), fFieldManager(pFieldMgr)
|
||||
{
|
||||
SetSolid(pSolid);
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4LogicalVolumeStore.cc,v 2.1 1998/07/12 02:55:38 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4LogicalVolumeStore.cc,v 1.2 1999/05/10 17:08:53 fbehner Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// G4LogicalVolumeStore
|
||||
//
|
||||
@@ -27,7 +27,7 @@ G4LogicalVolumeStore::G4LogicalVolumeStore() : RWTPtrOrderedVector<G4LogicalVolu
|
||||
// Destructor
|
||||
G4LogicalVolumeStore::~G4LogicalVolumeStore()
|
||||
{
|
||||
while (!isEmpty()) delete first();
|
||||
while (!isEmpty()) removeFirst();
|
||||
}
|
||||
|
||||
// Static class variable
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PVParameterised.cc,v 2.0 1998/07/02 16:57:27 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4PVParameterised.cc,v 1.1 1999/01/07 16:07:20 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// class G4PVParameterised
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PVPlacement.cc,v 2.1 1998/07/12 02:55:39 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4PVPlacement.cc,v 1.1 1999/01/07 16:07:20 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// class G4PVPlacement Implementation
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PVReplica.cc,v 2.0 1998/07/02 16:57:24 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4PVReplica.cc,v 1.1 1999/01/07 16:07:20 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// class G4PVReplica Implementation
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PhysicalVolumeStore.cc,v 2.1 1998/07/12 02:55:40 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4PhysicalVolumeStore.cc,v 1.2 1999/05/10 17:08:52 fbehner Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// G4PhysicalVolumeStore
|
||||
//
|
||||
@@ -27,7 +27,7 @@ G4PhysicalVolumeStore::G4PhysicalVolumeStore() : RWTPtrOrderedVector<G4VPhysical
|
||||
// Destructor
|
||||
G4PhysicalVolumeStore::~G4PhysicalVolumeStore()
|
||||
{
|
||||
while (!isEmpty()) delete first();
|
||||
while (!isEmpty()) removeFirst();
|
||||
}
|
||||
|
||||
// Static class variable
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4SmartVoxelHeader.cc,v 2.1 1998/11/11 11:38:22 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4SmartVoxelHeader.cc,v 1.4 1999/06/04 17:26:37 sgiani Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// class G4SmartVoxelHeader
|
||||
@@ -16,6 +16,8 @@
|
||||
// Define G4GEOMETRY_VOXELDEBUG for debugging information on G4cout
|
||||
//
|
||||
// History:
|
||||
// 12.02.99 Introduction of new quality/smartless: max for (slices/candid) S.G.
|
||||
// 11.02.99 Voxels at lower levels are now built for collapsed slices S.G.
|
||||
// 21.07.95 Full implementation, supporting non divided physical volumes
|
||||
// 14.07.95 Initial version - stubb definitions only
|
||||
|
||||
@@ -323,6 +325,7 @@ void G4SmartVoxelHeader::BuildVoxelsWithinLimits(G4LogicalVolume* pVolume,
|
||||
G4double goodSliceScore=kInfinity,testSliceScore;
|
||||
EAxis goodSliceAxis,testAxis;
|
||||
G4int node,maxNode,iaxis;
|
||||
G4VoxelLimits noLimits;
|
||||
|
||||
// Try all non-limited cartesian axes
|
||||
for (iaxis=0;iaxis<3;iaxis++)
|
||||
@@ -402,14 +405,15 @@ void G4SmartVoxelHeader::BuildVoxelsWithinLimits(G4LogicalVolume* pVolume,
|
||||
// Calculate and set min and max extents given our axis
|
||||
G4VSolid* outerSolid=pVolume->GetSolid();
|
||||
const G4AffineTransform origin;
|
||||
outerSolid->CalculateExtent(faxis,pLimits,
|
||||
origin,
|
||||
fminExtent,fmaxExtent);
|
||||
if(!outerSolid->CalculateExtent(faxis,pLimits,origin,fminExtent,fmaxExtent)){
|
||||
outerSolid->CalculateExtent(faxis,noLimits,origin,fminExtent,fmaxExtent);
|
||||
};
|
||||
|
||||
// Calculate equivalent nos
|
||||
BuildEquivalentSliceNos();
|
||||
CollectEquivalentNodes(); // Collect common nodes
|
||||
RefineNodes(pVolume,pLimits); // Refine nodes creating headers
|
||||
CollectEquivalentHeaders(); // Collect any common headers
|
||||
// No common headers can exist because collapsed by construction
|
||||
}
|
||||
|
||||
// Destructor - Delete all proxies and underlying objects
|
||||
@@ -645,6 +649,8 @@ G4ProxyVector* G4SmartVoxelHeader::BuildNodes(G4LogicalVolume* pVolume,
|
||||
G4bool replicated;
|
||||
G4int nCandidates;
|
||||
G4int nVol,nNode,targetVolNo;
|
||||
G4VoxelLimits noLimits;
|
||||
|
||||
nCandidates=pCandidates->entries();
|
||||
#ifdef G4GEOMETRY_VOXELDEBUG
|
||||
G4cout << "**** G4SmartVoxelHeader::BuildNodes" << endl
|
||||
@@ -657,9 +663,9 @@ G4ProxyVector* G4SmartVoxelHeader::BuildNodes(G4LogicalVolume* pVolume,
|
||||
// NOTE: results stored locally and not preserved/reused
|
||||
G4VSolid* outerSolid=pVolume->GetSolid();
|
||||
const G4AffineTransform origin;
|
||||
outerSolid->CalculateExtent(pAxis,pLimits,
|
||||
origin,
|
||||
motherMinExtent,motherMaxExtent);
|
||||
if(!outerSolid->CalculateExtent(pAxis,pLimits,origin,motherMinExtent,motherMaxExtent)){
|
||||
outerSolid->CalculateExtent(pAxis,noLimits,origin,motherMinExtent,motherMaxExtent);
|
||||
};
|
||||
|
||||
G4VolumeExtentVector minExtents(nCandidates);
|
||||
G4VolumeExtentVector maxExtents(nCandidates);
|
||||
@@ -719,10 +725,9 @@ G4ProxyVector* G4SmartVoxelHeader::BuildNodes(G4LogicalVolume* pVolume,
|
||||
}
|
||||
|
||||
// Calc extents
|
||||
targetSolid->CalculateExtent(pAxis,pLimits,
|
||||
targetTransform,
|
||||
targetMinExtent,
|
||||
targetMaxExtent);
|
||||
if(!targetSolid->CalculateExtent(pAxis,pLimits,targetTransform,targetMinExtent,targetMaxExtent)){
|
||||
targetSolid->CalculateExtent(pAxis,noLimits,targetTransform,targetMinExtent,targetMaxExtent);
|
||||
};
|
||||
minExtents(nVol)=targetMinExtent;
|
||||
maxExtents(nVol)=targetMaxExtent;
|
||||
// Check not entirely outside mother when processing toplevel nodes
|
||||
@@ -779,10 +784,23 @@ G4ProxyVector* G4SmartVoxelHeader::BuildNodes(G4LogicalVolume* pVolume,
|
||||
//
|
||||
// mother width/half min daughter width +1
|
||||
G4double noNodesExactD=((motherMaxExtent-motherMinExtent)*2.0/minWidth)+1.0;
|
||||
G4int noNodesExactI=G4int (noNodesExactD);
|
||||
|
||||
G4int noNodes=((noNodesExactD-noNodesExactI)>=0.5) ? noNodesExactI+1 : noNodesExactI;
|
||||
// Compare with "smartless quality", i.e. the average number of slices used per
|
||||
// contained volume:
|
||||
|
||||
G4double smartlessComputed = noNodesExactD / nCandidates;
|
||||
|
||||
G4double smartlessUser = pVolume->GetSmartless();
|
||||
|
||||
G4double smartless = (smartlessComputed <= smartlessUser) ?
|
||||
smartlessComputed : smartlessUser ;
|
||||
|
||||
G4double noNodesSmart = smartless * nCandidates;
|
||||
|
||||
G4int noNodesExactI = G4int(noNodesSmart);
|
||||
|
||||
G4int noNodes = ((noNodesSmart-noNodesExactI)>=0.5) ?
|
||||
noNodesExactI + 1 : noNodesExactI ;
|
||||
//
|
||||
//
|
||||
|
||||
@@ -1043,10 +1061,8 @@ void G4SmartVoxelHeader::RefineNodes(G4LogicalVolume* pVolume,
|
||||
delete targetNode;
|
||||
|
||||
// Create new headers + proxies and replace in fslices
|
||||
for (replaceNo=minNo;replaceNo<=maxNo;replaceNo++)
|
||||
{
|
||||
newLimits=pLimits;
|
||||
newLimits.AddLimit(faxis,fminExtent+sliceWidth*replaceNo,fminExtent+sliceWidth*(replaceNo+1));
|
||||
newLimits.AddLimit(faxis,fminExtent+sliceWidth*minNo,fminExtent+sliceWidth*(maxNo+1));
|
||||
replaceHeader=new G4SmartVoxelHeader(pVolume,newLimits,targetList,replaceNo);
|
||||
if (!replaceHeader)
|
||||
{
|
||||
@@ -1059,6 +1075,9 @@ void G4SmartVoxelHeader::RefineNodes(G4LogicalVolume* pVolume,
|
||||
{
|
||||
G4Exception("G4SmartVoxelHeader::RefineNodes - Refined VoxelProxy new failed");
|
||||
}
|
||||
for (replaceNo=minNo;replaceNo<=maxNo;replaceNo++)
|
||||
{
|
||||
|
||||
fslices(replaceNo)=replaceHeaderProxy;
|
||||
}
|
||||
// Finished replacing current `equivalent' group
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4SmartVoxelNode.cc,v 2.1 1998/11/11 11:38:22 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4SmartVoxelNode.cc,v 1.1 1999/01/07 16:07:21 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// Class G4SmartVoxelNode
|
||||
//
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4SolidStore.cc,v 2.1 1998/07/12 02:55:40 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4SolidStore.cc,v 1.2 1999/05/18 15:26:56 stesting Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// G4SolidStore
|
||||
//
|
||||
@@ -27,7 +27,7 @@ G4SolidStore::G4SolidStore() : RWTPtrOrderedVector<G4VSolid>(100)
|
||||
// Destructor
|
||||
G4SolidStore::~G4SolidStore()
|
||||
{
|
||||
while (!isEmpty()) delete first();
|
||||
clearAndDestroy();
|
||||
}
|
||||
|
||||
// Static class variable
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VPVParameterisation.cc,v 2.0 1998/07/02 16:57:32 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VPVParameterisation.cc,v 1.1 1999/01/07 16:07:22 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// Default implementations for Parameterisations that do not
|
||||
// parameterise solid and/or material
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VPhysicalVolume.cc,v 2.1 1998/07/12 02:55:41 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VPhysicalVolume.cc,v 1.1 1999/01/07 16:07:22 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// class G4VPhysicalVolume Implementation
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VSolid.cc,v 2.1 1998/07/12 02:55:42 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VSolid.cc,v 1.1 1999/01/07 16:07:22 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// class G4VSolid
|
||||
//
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VoxelLimits.cc,v 2.1 1998/11/11 11:38:22 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VoxelLimits.cc,v 1.1 1999/01/07 16:07:22 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// class G4VoxelLimits
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user