Import Geant4 10.7.2 source tree
This commit is contained in:
@@ -16,6 +16,11 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
May 17, 2021 E.Tcherniaev geom-csg-V10-06-07
|
||||
- Bux fix in G4Sphere::GetSurfaceArea()
|
||||
- G4Sphere::GetCubicVolume() moved to source
|
||||
- Revised G4Sphere::GetPointOnSurface()
|
||||
|
||||
February 1, 2021 G.Cosmo geom-csg-V10-06-06
|
||||
- G4Trap, G4Para: removed spurious character in printout in StreamInfo().
|
||||
Addressed problem report #2318.
|
||||
|
||||
@@ -121,7 +121,7 @@ class G4Sphere : public G4CSGSolid
|
||||
|
||||
// Methods for solid
|
||||
|
||||
inline G4double GetCubicVolume();
|
||||
G4double GetCubicVolume();
|
||||
G4double GetSurfaceArea();
|
||||
|
||||
void ComputeDimensions( G4VPVParameterisation* p,
|
||||
|
||||
@@ -115,7 +115,7 @@ G4double G4Sphere::GetCosEndTheta () const
|
||||
return cosETheta;
|
||||
}
|
||||
|
||||
inline
|
||||
inline
|
||||
void G4Sphere::Initialize()
|
||||
{
|
||||
fCubicVolume = 0.;
|
||||
@@ -127,7 +127,7 @@ inline
|
||||
void G4Sphere::InitializePhiTrigonometry()
|
||||
{
|
||||
hDPhi = 0.5*fDPhi; // half delta phi
|
||||
cPhi = fSPhi + hDPhi;
|
||||
cPhi = fSPhi + hDPhi;
|
||||
ePhi = fSPhi + fDPhi;
|
||||
|
||||
sinCPhi = std::sin(cPhi);
|
||||
@@ -310,7 +310,7 @@ void G4Sphere::SetDeltaThetaAngle(G4double newDTheta)
|
||||
// Old access functions
|
||||
|
||||
inline
|
||||
G4double G4Sphere::GetRmin() const
|
||||
G4double G4Sphere::GetRmin() const
|
||||
{
|
||||
return GetInsideRadius();
|
||||
}
|
||||
@@ -344,12 +344,3 @@ G4double G4Sphere::GetDTheta() const
|
||||
{
|
||||
return GetDeltaThetaAngle();
|
||||
}
|
||||
|
||||
inline
|
||||
G4double G4Sphere::GetCubicVolume()
|
||||
{
|
||||
if(fCubicVolume != 0.) {;}
|
||||
else { fCubicVolume = fDPhi*(std::cos(fSTheta)-std::cos(fSTheta+fDTheta))*
|
||||
(fRmax*fRmax*fRmax-fRmin*fRmin*fRmin)/3.; }
|
||||
return fCubicVolume;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -16,6 +16,18 @@ committal in the source repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
30-April-2021 G.Cosmo (geom-specific-V10-06-12)
|
||||
- Fixed use of conversion factor in G4UPolyhedra wrapper for "generic"
|
||||
polyhedra constructs.
|
||||
|
||||
19-April-2021 E.Tcherniaev
|
||||
- G4Polyhedra, G4Polycone: Fix calculation of endPhi for the case
|
||||
of negative phiStart, it addresses also problem report #2362
|
||||
|
||||
18-March-2021 E.Tcherniaev
|
||||
- Fix calculation of bounding box position in G4Voxelizer::BuildVoxelLimits(),
|
||||
it addresses problem report #2301
|
||||
|
||||
13-January-2021 G.Cosmo (geom-specific-V10-06-11)
|
||||
- Reduce cases of bad speculation in G4PolyhedraSide::Inside() and
|
||||
G4PolyPhiFace::InsideEdges(), based on report in profiling analysis
|
||||
|
||||
@@ -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