Import Geant4 5.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:28:22 +02:00
parent fbd4999cf7
commit 4aea781e80
5454 changed files with 223141 additions and 67347 deletions
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4BooleanSolid.cc,v 1.8 2002/10/29 14:15:52 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4BooleanSolid.cc,v 1.9 2003/06/16 16:53:14 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
// Implementation for the abstract base class for solids created by boolean
// operations between other solids
@@ -155,7 +155,7 @@ G4GeometryType G4BooleanSolid::GetEntityType() const
//
// Stream object contents to an output stream
G4std::ostream& G4BooleanSolid::StreamInfo(G4std::ostream& os) const
std::ostream& G4BooleanSolid::StreamInfo(std::ostream& os) const
{
os << "-----------------------------------------------------------\n"
<< " *** Dump for Boolean solid - " << GetName() << " ***\n"
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4DisplacedSolid.cc,v 1.16 2002/10/29 14:13:53 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4DisplacedSolid.cc,v 1.17 2003/06/16 16:53:15 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
// Implementation for G4DisplacedSolid class for boolean
// operations between other solids
@@ -325,7 +325,7 @@ G4DisplacedSolid::ComputeDimensions( G4VPVParameterisation*,
//
// Stream object contents to an output stream
G4std::ostream& G4DisplacedSolid::StreamInfo(G4std::ostream& os) const
std::ostream& G4DisplacedSolid::StreamInfo(std::ostream& os) const
{
os << "-----------------------------------------------------------\n"
<< " *** Dump for Displaced solid - " << GetName() << " ***\n"
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4IntersectionSolid.cc,v 1.18 2002/10/28 11:36:29 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4IntersectionSolid.cc,v 1.19 2003/06/16 16:53:16 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
// Implementation of methods for the class G4IntersectionSolid
//
@@ -112,8 +112,8 @@ G4IntersectionSolid::CalculateExtent(const EAxis pAxis,
->CalculateExtent( pAxis, pVoxelLimit, pTransform, minB, maxB);
if(retA && retB)
{
pMin = G4std::max( minA, minB ) ;
pMax = G4std::min( maxA, maxB ) ;
pMin = std::max( minA, minB ) ;
pMax = std::min( maxA, maxB ) ;
out = true ;
}
else out = false ;
@@ -421,7 +421,7 @@ G4IntersectionSolid::DistanceToIn( const G4ThreeVector& p) const
}
else
{
dist = G4std::min(fPtrSolidA->DistanceToIn(p),
dist = std::min(fPtrSolidA->DistanceToIn(p),
fPtrSolidB->DistanceToIn(p) ) ;
}
}
@@ -468,7 +468,7 @@ G4IntersectionSolid::DistanceToOut( const G4ThreeVector& p,
G4double distA = fPtrSolidA->DistanceToOut(p,v,calcNorm,&validNormA,&nA) ;
G4double distB = fPtrSolidB->DistanceToOut(p,v,calcNorm,&validNormB,&nB) ;
G4double dist = G4std::min(distA,distB) ;
G4double dist = std::min(distA,distB) ;
if( calcNorm )
{
@@ -508,7 +508,7 @@ G4IntersectionSolid::DistanceToOut( const G4ThreeVector& p ) const
}
#endif
return G4std::min(fPtrSolidA->DistanceToOut(p),
return std::min(fPtrSolidA->DistanceToOut(p),
fPtrSolidB->DistanceToOut(p) ) ;
}
@@ -21,9 +21,9 @@
// ********************************************************************
//
//
// $Id: G4ReflectedSolid.cc,v 1.10 2003/03/25 17:03:03 gcosmo Exp $
// $Id: G4ReflectedSolid.cc,v 1.11 2003/06/16 16:53:17 gunter Exp $
//
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
// Implementation for G4ReflectedSolid class for boolean
// operations between other solids
@@ -484,7 +484,7 @@ G4ReflectedSolid::ComputeDimensions( G4VPVParameterisation*,
//
// Stream object contents to an output stream
G4std::ostream& G4ReflectedSolid::StreamInfo(G4std::ostream& os) const
std::ostream& G4ReflectedSolid::StreamInfo(std::ostream& os) const
{
os << "-----------------------------------------------------------\n"
<< " *** Dump for Reflected solid - " << GetName() << " ***\n"
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ReflectionFactory.cc,v 1.6 2003/03/25 17:03:03 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4ReflectionFactory.cc,v 1.9 2003/06/12 12:47:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
// Author: Ivana Hrivnacova, 16.10.2001 (Ivana.Hrivnacova@cern.ch)
@@ -82,6 +82,7 @@ G4ReflectionFactory::G4ReflectionFactory()
// Protected singleton constructor.
// ---
fScalePrecision = 10.*kCarTolerance;
fInstance = this;
}
@@ -543,6 +544,14 @@ G4bool G4ReflectionFactory::IsReflection(const G4Scale3D& scale) const
//_____________________________________________________________________________
const G4ReflectedVolumesMap&
G4ReflectionFactory::GetReflectedVolumesMap() const
{
return fReflectedLVMap;
}
//_____________________________________________________________________________
void G4ReflectionFactory::PrintConstituentLVMap()
{
// temporary - for debugging purpose
@@ -571,7 +580,7 @@ void G4ReflectionFactory::CheckScale(const G4Scale3D& scale) const
for (G4int j=0; j<4; j++)
diff += abs(scale(i,j) - fScale(i,j));
if (diff > kCarTolerance*10.)
if (diff > fScalePrecision)
{
G4cout << "ERROR - G4ReflectionFactory::CheckScale()" << G4endl
<< " Unexpected scale. Difference: " << diff << G4endl;
@@ -583,6 +592,20 @@ void G4ReflectionFactory::CheckScale(const G4Scale3D& scale) const
//_____________________________________________________________________________
void G4ReflectionFactory::SetScalePrecision(G4double scaleValue)
{
fScalePrecision = scaleValue;
}
//_____________________________________________________________________________
G4double G4ReflectionFactory::GetScalePrecision() const
{
return fScalePrecision;
}
//_____________________________________________________________________________
void G4ReflectionFactory::SetVerboseLevel(G4int verboseLevel)
{
fVerboseLevel = verboseLevel;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4SubtractionSolid.cc,v 1.17 2002/10/28 11:36:29 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4SubtractionSolid.cc,v 1.18 2003/06/16 16:53:18 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
// Implementation of methods for the class G4IntersectionSolid
//
@@ -401,7 +401,7 @@ G4SubtractionSolid::DistanceToOut( const G4ThreeVector& p ) const
}
else
{
dist= G4std::min(fPtrSolidA->DistanceToOut(p),
dist= std::min(fPtrSolidA->DistanceToOut(p),
fPtrSolidB->DistanceToIn(p) ) ;
}
return dist;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4UnionSolid.cc,v 1.21 2002/10/28 11:36:29 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4UnionSolid.cc,v 1.22 2003/06/16 16:53:19 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
// Implementation of methods for the class G4IntersectionSolid
//
@@ -118,8 +118,8 @@ G4UnionSolid::CalculateExtent( const EAxis pAxis,
pTransform, minB, maxB);
if( touchesA || touchesB )
{
pMin = G4std::min( minA, minB );
pMax = G4std::max( maxA, maxB );
pMin = std::min( minA, minB );
pMax = std::max( maxA, maxB );
out = true ;
}
else out = false ;
@@ -230,7 +230,7 @@ G4UnionSolid::DistanceToIn( const G4ThreeVector& p,
}
#endif
return G4std::min(fPtrSolidA->DistanceToIn(p,v),
return std::min(fPtrSolidA->DistanceToIn(p,v),
fPtrSolidB->DistanceToIn(p,v) ) ;
}
@@ -257,7 +257,7 @@ G4UnionSolid::DistanceToIn( const G4ThreeVector& p) const
#endif
G4double distA = fPtrSolidA->DistanceToIn(p) ;
G4double distB = fPtrSolidB->DistanceToIn(p) ;
G4double safety = G4std::min(distA,distB) ;
G4double safety = std::min(distA,distB) ;
if(safety < 0.0) safety = 0.0 ;
return safety ;
}
@@ -385,7 +385,7 @@ G4UnionSolid::DistanceToOut( const G4ThreeVector& p ) const
(positionA == kInside && positionB == kSurface ) ||
(positionA == kSurface && positionB == kInside ) )
{
distout= G4std::max(fPtrSolidA->DistanceToOut(p),
distout= std::max(fPtrSolidA->DistanceToOut(p),
fPtrSolidB->DistanceToOut(p) ) ;
}
else