Import Geant4 11.4.0.beta source tree
This commit is contained in:
@@ -393,7 +393,7 @@ G4double G4AffineTransform::operator [] (const G4int n) const
|
||||
inline
|
||||
G4bool G4AffineTransform::IsRotated() const
|
||||
{
|
||||
return !(rxx==1.0 && ryy==1.0 && rzz==1.0);
|
||||
return rxx!=1.0 || ryy!=1.0 || rzz!=1.0;
|
||||
}
|
||||
|
||||
inline
|
||||
|
||||
@@ -47,7 +47,7 @@ class G4GeomTools
|
||||
public:
|
||||
|
||||
// ==================================================================
|
||||
// 2D Utilities
|
||||
// 2D Utilities
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
static G4double TriangleArea(G4double Ax, G4double Ay,
|
||||
@@ -108,11 +108,11 @@ class G4GeomTools
|
||||
std::vector<G4int>& iout,
|
||||
G4double tolerance = 0.0);
|
||||
// Remove collinear and coincident points from 2D polygon.
|
||||
// Indices of removed points are available in iout.
|
||||
// Indices of removed points are available in iout.
|
||||
|
||||
static G4bool DiskExtent(G4double rmin, G4double rmax,
|
||||
G4double startPhi, G4double delPhi,
|
||||
G4TwoVector& pmin, G4TwoVector& pmax);
|
||||
G4TwoVector& pmin, G4TwoVector& pmax);
|
||||
// Calculate bounding rectangle of a disk sector,
|
||||
// it returns false if input parameters do not meet the following:
|
||||
// rmin >= 0
|
||||
@@ -122,7 +122,7 @@ class G4GeomTools
|
||||
static void DiskExtent(G4double rmin, G4double rmax,
|
||||
G4double sinPhiStart, G4double cosPhiStart,
|
||||
G4double sinPhiEnd, G4double cosPhiEnd,
|
||||
G4TwoVector& pmin, G4TwoVector& pmax);
|
||||
G4TwoVector& pmin, G4TwoVector& pmax);
|
||||
// Calculate bounding rectangle of a disk sector,
|
||||
// faster version without check of parameters
|
||||
|
||||
@@ -136,7 +136,7 @@ class G4GeomTools
|
||||
// Compute the lateral surface area of an elliptic cone
|
||||
|
||||
// ==================================================================
|
||||
// 3D Utilities
|
||||
// 3D Utilities
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
static G4ThreeVector TriangleAreaNormal(const G4ThreeVector& A,
|
||||
@@ -187,7 +187,7 @@ class G4GeomTools
|
||||
static G4bool SphereExtent(G4double rmin, G4double rmax,
|
||||
G4double startTheta, G4double delTheta,
|
||||
G4double startPhi, G4double delPhi,
|
||||
G4ThreeVector& pmin, G4ThreeVector& pmax);
|
||||
G4ThreeVector& pmin, G4ThreeVector& pmax);
|
||||
// Calculate bounding box of a spherical sector,
|
||||
// it returns false if input parameters do not meet the following:
|
||||
// rmin >= 0
|
||||
@@ -196,6 +196,28 @@ class G4GeomTools
|
||||
// delTheta > 0 + kCarTolerance
|
||||
// delPhi > 0 + kCarTolerance
|
||||
|
||||
static G4double HypeStereo(G4double r0, // radius at z = 0
|
||||
G4double r, // radius at z = h
|
||||
G4double h);
|
||||
// Calculate hyperbolic surface stereo
|
||||
// Stereo is a half angle at the intersection point of the two
|
||||
// lines in the tangent plane cross section
|
||||
|
||||
static void TwistedTubeBoundingTrap(G4double twistAng, // twist angle
|
||||
G4double endInnerRad, // inner radius at z = halfZ
|
||||
G4double endOuterRad, // outer radius at z = halfZ
|
||||
G4double dPhi, // delta phi
|
||||
G4TwoVectorList& vertices); // corners of generic trap
|
||||
// Find XY-coordinates of the corners of the generic trap
|
||||
// that bounds specified twisted tube
|
||||
|
||||
static G4double HyperboloidSurfaceArea(G4double dphi, // delta phi
|
||||
G4double r0, // radius at z = 0
|
||||
G4double tanstereo, // tan(stereo)
|
||||
G4double zmin,
|
||||
G4double zmax);
|
||||
// Calculate surface area of the hyperboloid between zmin and zmax
|
||||
|
||||
private:
|
||||
|
||||
static G4bool CheckSnip(const G4TwoVectorList& contour,
|
||||
|
||||
@@ -92,7 +92,7 @@ inline
|
||||
G4FastSimulationManager* G4LogicalVolume::GetFastSimulationManager () const
|
||||
{
|
||||
G4FastSimulationManager* fFSM = nullptr;
|
||||
if(fRegion != nullptr) fFSM = fRegion->GetFastSimulationManager();
|
||||
if(fRegion != nullptr) { fFSM = fRegion->GetFastSimulationManager(); }
|
||||
return fFSM;
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ G4bool G4LogicalVolume::IsDaughter(const G4VPhysicalVolume* p) const
|
||||
{
|
||||
for (const auto & daughter : fDaughters)
|
||||
{
|
||||
if (*daughter==*p) return true;
|
||||
if (*daughter==*p) { return true; }
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -165,8 +165,9 @@ G4VSensitiveDetector* G4LogicalVolume::GetMasterSensitiveDetector() const
|
||||
inline
|
||||
G4UserLimits* G4LogicalVolume::GetUserLimits() const
|
||||
{
|
||||
if(fUserLimits != nullptr) return fUserLimits;
|
||||
if(fRegion != nullptr) return fRegion->GetUserLimits();
|
||||
if(fUserLimits != nullptr) { return fUserLimits;
|
||||
}
|
||||
if(fRegion != nullptr) { return fRegion->GetUserLimits(); }
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -268,7 +269,7 @@ inline
|
||||
G4bool G4LogicalVolume::IsRegion() const
|
||||
{
|
||||
G4bool reg = false;
|
||||
if (fRegion != nullptr) reg = true;
|
||||
if (fRegion != nullptr) { reg = true; }
|
||||
return reg;
|
||||
}
|
||||
|
||||
|
||||
@@ -216,7 +216,7 @@ G4MaterialCutsCouple* G4Region::FindCouple(G4Material* mat)
|
||||
{
|
||||
auto c = fMaterialCoupleMap.find(mat);
|
||||
G4MaterialCutsCouple* couple = nullptr;
|
||||
if(c!=fMaterialCoupleMap.cend()) couple = (*c).second;
|
||||
if(c!=fMaterialCoupleMap.cend()) { couple = (*c).second; }
|
||||
return couple;
|
||||
}
|
||||
|
||||
|
||||
@@ -70,15 +70,12 @@ G4double G4VoxelLimits::GetMaxExtent(const EAxis pAxis) const
|
||||
{
|
||||
return GetMaxXExtent();
|
||||
}
|
||||
else if (pAxis==kYAxis)
|
||||
if (pAxis==kYAxis)
|
||||
{
|
||||
return GetMaxYExtent();
|
||||
}
|
||||
else
|
||||
{
|
||||
assert(pAxis==kZAxis);
|
||||
return GetMaxZExtent();
|
||||
}
|
||||
assert(pAxis==kZAxis);
|
||||
return GetMaxZExtent();
|
||||
}
|
||||
|
||||
inline
|
||||
@@ -88,33 +85,30 @@ G4double G4VoxelLimits::GetMinExtent(const EAxis pAxis) const
|
||||
{
|
||||
return GetMinXExtent();
|
||||
}
|
||||
else if (pAxis==kYAxis)
|
||||
if (pAxis==kYAxis)
|
||||
{
|
||||
return GetMinYExtent();
|
||||
}
|
||||
else
|
||||
{
|
||||
assert(pAxis==kZAxis);
|
||||
return GetMinZExtent();
|
||||
}
|
||||
assert(pAxis==kZAxis);
|
||||
return GetMinZExtent();
|
||||
}
|
||||
|
||||
inline
|
||||
G4bool G4VoxelLimits::IsXLimited() const
|
||||
{
|
||||
return !(fxAxisMin==-kInfinity&&fxAxisMax==kInfinity);
|
||||
return fxAxisMin!=-kInfinity||fxAxisMax!=kInfinity;
|
||||
}
|
||||
|
||||
inline
|
||||
G4bool G4VoxelLimits::IsYLimited() const
|
||||
{
|
||||
return !(fyAxisMin==-kInfinity&&fyAxisMax==kInfinity);
|
||||
return fyAxisMin!=-kInfinity||fyAxisMax!=kInfinity;
|
||||
}
|
||||
|
||||
inline
|
||||
G4bool G4VoxelLimits::IsZLimited() const
|
||||
{
|
||||
return !(fzAxisMin==-kInfinity&&fzAxisMax==kInfinity);
|
||||
return fzAxisMin!=-kInfinity||fzAxisMax!=kInfinity;
|
||||
}
|
||||
|
||||
inline
|
||||
@@ -130,15 +124,12 @@ G4bool G4VoxelLimits::IsLimited(const EAxis pAxis) const
|
||||
{
|
||||
return IsXLimited();
|
||||
}
|
||||
else if (pAxis==kYAxis)
|
||||
if (pAxis==kYAxis)
|
||||
{
|
||||
return IsYLimited();
|
||||
}
|
||||
else
|
||||
{
|
||||
assert(pAxis==kZAxis);
|
||||
return IsZLimited();
|
||||
}
|
||||
assert(pAxis==kZAxis);
|
||||
return IsZLimited();
|
||||
}
|
||||
|
||||
inline
|
||||
|
||||
Reference in New Issue
Block a user