Import Geant4 10.7.2 source tree
This commit is contained in:
@@ -220,11 +220,16 @@ void G4Polycone::Create( G4double phiStart,
|
||||
|
||||
numCorner = rz->NumVertices();
|
||||
|
||||
startPhi = phiStart;
|
||||
|
||||
while( startPhi < 0. ) // Loop checking, 13.08.2015, G.Cosmo
|
||||
startPhi += twopi;
|
||||
|
||||
//
|
||||
// Phi opening? Account for some possible roundoff, and interpret
|
||||
// nonsense value as representing no phi opening
|
||||
//
|
||||
if (phiTotal <= 0 || phiTotal > twopi-1E-10)
|
||||
if ( (phiTotal <= 0) || (phiTotal > twopi*(1-DBL_EPSILON)) )
|
||||
{
|
||||
phiIsOpen = false;
|
||||
startPhi = 0.;
|
||||
@@ -233,17 +238,7 @@ void G4Polycone::Create( G4double phiStart,
|
||||
else
|
||||
{
|
||||
phiIsOpen = true;
|
||||
|
||||
//
|
||||
// Convert phi into our convention
|
||||
//
|
||||
startPhi = phiStart;
|
||||
while( startPhi < 0. ) // Loop checking, 13.08.2015, G.Cosmo
|
||||
startPhi += twopi;
|
||||
|
||||
endPhi = phiStart+phiTotal;
|
||||
while( endPhi < startPhi ) // Loop checking, 13.08.2015, G.Cosmo
|
||||
endPhi += twopi;
|
||||
endPhi = startPhi + phiTotal;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -248,18 +248,12 @@ void G4Polyhedra::Create( G4double phiStart,
|
||||
if ( (phiTotal <= 0) || (phiTotal > twopi*(1-DBL_EPSILON)) )
|
||||
{
|
||||
phiIsOpen = false;
|
||||
endPhi = phiStart+twopi;
|
||||
endPhi = startPhi + twopi;
|
||||
}
|
||||
else
|
||||
{
|
||||
phiIsOpen = true;
|
||||
|
||||
//
|
||||
// Convert phi into our convention
|
||||
//
|
||||
endPhi = phiStart+phiTotal;
|
||||
while( endPhi < startPhi ) // Loop checking, 13.08.2015, G.Cosmo
|
||||
endPhi += twopi;
|
||||
endPhi = startPhi + phiTotal;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Implementation of G4UPolycone wrapper class
|
||||
// Implementation of G4UPolyhedra wrapper class
|
||||
//
|
||||
// 31.10.13 G.Cosmo, CERN
|
||||
// --------------------------------------------------------------------
|
||||
@@ -116,11 +116,10 @@ G4UPolyhedra::G4UPolyhedra(const G4String& name,
|
||||
wrDelta = twopi;
|
||||
}
|
||||
wrNumSide = numSide;
|
||||
G4double convertRad = 1./std::cos(0.5*wrDelta/wrNumSide);
|
||||
rzcorners.resize(0);
|
||||
for (G4int i=0; i<numRZ; ++i)
|
||||
{
|
||||
rzcorners.push_back(G4TwoVector(r[i]*convertRad,z[i]));
|
||||
rzcorners.push_back(G4TwoVector(r[i],z[i]));
|
||||
}
|
||||
std::vector<G4int> iout;
|
||||
G4GeomTools::RemoveRedundantVertices(rzcorners,iout,2*kCarTolerance);
|
||||
@@ -261,7 +260,8 @@ void G4UPolyhedra::SetOriginalParameters()
|
||||
fOriginalParameters.Rmin = new G4double[numPlanes];
|
||||
fOriginalParameters.Rmax = new G4double[numPlanes];
|
||||
|
||||
G4double convertRad = std::cos(0.5*deltaPhi/numSides);
|
||||
G4double convertRad = fGenericPgon
|
||||
? 1.0 : std::cos(0.5*deltaPhi/numSides);
|
||||
for (G4int i=0; i<numPlanes; ++i)
|
||||
{
|
||||
fOriginalParameters.Z_values[i] = GetZPlanes()[i];
|
||||
|
||||
@@ -116,10 +116,6 @@ void G4Voxelizer::BuildEmpty()
|
||||
void G4Voxelizer::BuildVoxelLimits(std::vector<G4VSolid*>& solids,
|
||||
std::vector<G4Transform3D>& transforms)
|
||||
{
|
||||
G4Rotate3D rot;
|
||||
G4Translate3D transl ;
|
||||
G4Scale3D scale;
|
||||
|
||||
// "BuildVoxelLimits"'s aim is to store the coordinates of the origin as
|
||||
// well as the half lengths related to the bounding box of each node.
|
||||
// These quantities are stored in the array "fBoxes" (6 different values per
|
||||
@@ -157,9 +153,8 @@ void G4Voxelizer::BuildVoxelLimits(std::vector<G4VSolid*>& solids,
|
||||
max += toleranceVector;
|
||||
}
|
||||
TransformLimits(min, max, transform);
|
||||
fBoxes[i].hlen = (max - min) / 2;
|
||||
transform.getDecomposition(scale,rot,transl);
|
||||
fBoxes[i].pos = transl.getTranslation();
|
||||
fBoxes[i].hlen = (max - min) / 2.;
|
||||
fBoxes[i].pos = (max + min) / 2.;
|
||||
}
|
||||
fTotalCandidates = fBoxes.size();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user