Import Geant4 3.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:10:37 +02:00
parent 137e303ecc
commit 36c080dca6
3464 changed files with 119310 additions and 52696 deletions
+36 -17
View File
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4Cons.cc,v 1.16 2000/11/20 17:57:58 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4Cons.cc,v 1.18.2.1 2001/06/28 19:09:00 gunter Exp $
// GEANT4 tag $Name: $
//
// class G4Cons
//
@@ -453,7 +469,7 @@ G4bool G4Cons::CalculateExtent( const EAxis pAxis,
pMin = +kInfinity ;
pMax = -kInfinity ;
noEntries = vertices->entries() ;
noEntries = vertices->size() ;
noBetweenSections4 = noEntries-4 ;
for ( i = 0 ; i < noEntries ; i += 4 )
@@ -1928,7 +1944,8 @@ G4double G4Cons::DistanceToOut(const G4ThreeVector& p) const
G4double tanRMin,secRMin,pRMin ;
G4double tanRMax,secRMax,pRMax ;
G4double safePhi,phiC,cosPhiC,sinPhiC,ePhi ;
/*
#ifdef G4CSGDEBUG
if( Inside(p) == kOutside )
{
G4cout.precision(16) ;
@@ -1945,10 +1962,11 @@ G4double G4Cons::DistanceToOut(const G4ThreeVector& p) const
G4cout << "p.x() = " << p.x()/mm << " mm" << G4endl ;
G4cout << "p.y() = " << p.y()/mm << " mm" << G4endl ;
G4cout << "p.z() = " << p.z()/mm << " mm" << G4endl << G4endl ;
// G4Exception("Invalid call in G4Cons::DistanceToOut(p), p is outside") ;
G4cout << "G4Cons::DistanceToOut(p), p is outside ?!" << G4endl ;
G4Exception("Invalid call in G4Cons::DistanceToOut(p), p is outside") ;
// G4cout << "G4Cons::DistanceToOut(p), p is outside ?!" << G4endl ;
}
*/
#endif
rho = sqrt(p.x()*p.x() + p.y()*p.y()) ;
safeZ = fDz - fabs(p.z()) ;
@@ -2046,7 +2064,8 @@ G4Cons::CreateRotatedVertices(const G4AffineTransform& pTransform) const
{
sAngle = fSPhi ;
}
vertices = new G4ThreeVectorList(noCrossSections*4) ;
vertices = new G4ThreeVectorList();
vertices->reserve(noCrossSections*4) ;
if (vertices)
{
@@ -2075,10 +2094,10 @@ G4Cons::CreateRotatedVertices(const G4AffineTransform& pTransform) const
vertex2 = G4ThreeVector(rMaxX2,rMaxY2,+fDz) ;
vertex3 = G4ThreeVector(rMinX2,rMinY2,+fDz) ;
vertices->insert(pTransform.TransformPoint(vertex0)) ;
vertices->insert(pTransform.TransformPoint(vertex1)) ;
vertices->insert(pTransform.TransformPoint(vertex2)) ;
vertices->insert(pTransform.TransformPoint(vertex3)) ;
vertices->push_back(pTransform.TransformPoint(vertex0)) ;
vertices->push_back(pTransform.TransformPoint(vertex1)) ;
vertices->push_back(pTransform.TransformPoint(vertex2)) ;
vertices->push_back(pTransform.TransformPoint(vertex3)) ;
}
}
else