Import Geant4 11.1.2 source tree
This commit is contained in:
@@ -6,6 +6,10 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2023-03-16 Gabriele Cosmo (field-V11-00-07)
|
||||
- Fixed compilation warnings on clang-15 for mismatched bounds declarations
|
||||
in input parameters for steppers.
|
||||
|
||||
## 2022-12-09 Laurie Nevay (field-V11-00-06)
|
||||
- Reduced printout for setting any valid value for epsilon_min / _max in
|
||||
G4FieldManager.
|
||||
|
||||
@@ -51,8 +51,8 @@ G4Field* G4DELPHIMagField::Clone() const
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
void G4DELPHIMagField::GetFieldValue( const G4double yTrack[7],
|
||||
G4double B[3] ) const
|
||||
void G4DELPHIMagField::GetFieldValue( const G4double yTrack[], // [7]
|
||||
G4double B[] ) const // [3]
|
||||
{
|
||||
G4int i, n = 8 ;
|
||||
G4double a = 0.001 ; // mm -> m
|
||||
|
||||
@@ -48,8 +48,8 @@ G4HarmonicPolMagField::~G4HarmonicPolMagField()
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
void G4HarmonicPolMagField::GetFieldValue(const G4double yTrack[7],
|
||||
G4double B[3] ) const
|
||||
void G4HarmonicPolMagField::GetFieldValue(const G4double yTrack[], // [7]
|
||||
G4double B[] ) const // [3]
|
||||
{
|
||||
G4double a = 1.00 ; // mm -> m
|
||||
G4double x = a*yTrack[0], y = a*yTrack[1], z = a*yTrack[2] ;
|
||||
|
||||
@@ -46,10 +46,10 @@ G4HelixExplicitEuler::~G4HelixExplicitEuler()
|
||||
{
|
||||
}
|
||||
|
||||
void G4HelixExplicitEuler::Stepper( const G4double yInput[7],
|
||||
void G4HelixExplicitEuler::Stepper( const G4double yInput[], // [7]
|
||||
const G4double*,
|
||||
G4double Step,
|
||||
G4double yOut[7],
|
||||
G4double yOut[], // [7]
|
||||
G4double yErr[] )
|
||||
{
|
||||
// Estimation of the Stepping Angle
|
||||
|
||||
@@ -95,10 +95,10 @@ G4HelixMixedStepper::~G4HelixMixedStepper()
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
void G4HelixMixedStepper::Stepper( const G4double yInput[7],
|
||||
const G4double dydx[7],
|
||||
void G4HelixMixedStepper::Stepper( const G4double yInput[], // [7]
|
||||
const G4double dydx[], // [7]
|
||||
G4double Step,
|
||||
G4double yOut[7],
|
||||
G4double yOut[], // [7]
|
||||
G4double yErr[])
|
||||
{
|
||||
// Estimation of the Stepping Angle
|
||||
|
||||
@@ -51,8 +51,8 @@ G4LineCurrentMagField::~G4LineCurrentMagField()
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
|
||||
void G4LineCurrentMagField::GetFieldValue( const G4double yTrack[7],
|
||||
G4double B[3] ) const
|
||||
void G4LineCurrentMagField::GetFieldValue(const G4double yTrack[], // [7]
|
||||
G4double B[] ) const // [3]
|
||||
{
|
||||
// G4double fFieldConstant = 100 ;
|
||||
G4double a = 1.00 ; // mm
|
||||
|
||||
@@ -69,8 +69,8 @@ G4QuadrupoleMagField::~G4QuadrupoleMagField()
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
void G4QuadrupoleMagField::GetFieldValue( const G4double y[7],
|
||||
G4double B[3] ) const
|
||||
void G4QuadrupoleMagField::GetFieldValue( const G4double y[], // [7]
|
||||
G4double B[] ) const // [3]
|
||||
{
|
||||
// with displaced origin and rotation
|
||||
|
||||
|
||||
@@ -41,10 +41,10 @@ G4RKG3_Stepper::~G4RKG3_Stepper()
|
||||
{
|
||||
}
|
||||
|
||||
void G4RKG3_Stepper::Stepper( const G4double yInput[8],
|
||||
const G4double dydx[6],
|
||||
void G4RKG3_Stepper::Stepper( const G4double yInput[], // [8]
|
||||
const G4double dydx[], // [6]
|
||||
G4double Step,
|
||||
G4double yOut[8],
|
||||
G4double yOut[], // [8]
|
||||
G4double yErr[] )
|
||||
{
|
||||
G4double B[3];
|
||||
|
||||
@@ -63,8 +63,8 @@ G4SextupoleMagField::~G4SextupoleMagField()
|
||||
{
|
||||
}
|
||||
|
||||
void G4SextupoleMagField::GetFieldValue( const G4double y[4],
|
||||
G4double B[3] ) const
|
||||
void G4SextupoleMagField::GetFieldValue( const G4double y[], // [4]
|
||||
G4double B[] ) const // [3]
|
||||
// with displaced origin and rotation
|
||||
{
|
||||
G4ThreeVector r_global = G4ThreeVector(
|
||||
|
||||
@@ -6,6 +6,10 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2023-03-22 Gabriele Cosmo (geommng-V11-00-11)
|
||||
- G4Region: issue fatal exception if attempting to add a root logical volume
|
||||
which is already set as root for another region.
|
||||
|
||||
## 2023-01-09 Gabriele Cosmo (geommng-V11-00-10)
|
||||
- G4LogicalVolume: use std::shared_ptr for handling visualization attributes.
|
||||
Ignore calls to SetVisAttributes() from worker threads.
|
||||
|
||||
@@ -292,6 +292,20 @@ void G4Region::ScanVolumeTree(G4LogicalVolume* lv, G4bool region)
|
||||
//
|
||||
void G4Region::AddRootLogicalVolume(G4LogicalVolume* lv, G4bool search)
|
||||
{
|
||||
// Check if logical volume is already belonging to another region
|
||||
//
|
||||
if ((lv->IsRootRegion()) && (lv->GetRegion() != this))
|
||||
{
|
||||
std::ostringstream message;
|
||||
message << "Logical volume <" << lv->GetName() << "> is already set as" << G4endl
|
||||
<< "root for region <" << lv->GetRegion()->GetName() << ">." << G4endl
|
||||
<< "It cannot be root logical volume for another region <" << GetName()
|
||||
<< ">" << G4endl;
|
||||
G4Exception("G4Region::AddRootLogicalVolume()", "GeomMgt0002", FatalException,
|
||||
message, "A logical volume cannot belong to more than one region!");
|
||||
return;
|
||||
}
|
||||
|
||||
// Check the logical volume is not already in the list
|
||||
//
|
||||
if (search)
|
||||
|
||||
@@ -6,6 +6,9 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2023-03-23 Jonas Hahnfeld (geom-csg-V11-00-03)
|
||||
- G4UTrap: Fixed constructor for Right Angular Wedge with VecGeom
|
||||
|
||||
## 2022-11-10 Gabriele Cosmo (geom-csg-V11-00-02)
|
||||
- Fixed compilation warnings for implicit type conversions on macOS/XCode 14.1.
|
||||
|
||||
|
||||
@@ -97,11 +97,17 @@ G4UTrap::G4UTrap( const G4String& pName,
|
||||
CheckPlanarity(pt);
|
||||
}
|
||||
|
||||
// Constructor for Right Angular Wedge from STEP; this is different from
|
||||
// the UnplacedTrapezoid constructor taking four double's and constructing
|
||||
// a Trd1.
|
||||
G4UTrap::G4UTrap( const G4String& pName,
|
||||
G4double pZ,
|
||||
G4double pY,
|
||||
G4double pX, G4double pLTX )
|
||||
: Base_t(pName, pZ, pY, pX, pLTX)
|
||||
: Base_t(pName, 0.5*pZ, /*theta=*/0, /*phi=*/0, /*dy1=*/0.5*pY,
|
||||
/*dx1=*/0.5*pX, /*dx2=*/0.5*pLTX, /*Alpha1=*/0.5*(pLTX - pX)/pY,
|
||||
/*dy2=*/0.5*pY, /*dx3=*/0.5*pX, /*dx4=*/0.5*pLTX,
|
||||
/*Alpha2=*/0.5*(pLTX - pX)/pY)
|
||||
{
|
||||
CheckParameters();
|
||||
}
|
||||
|
||||
@@ -6,6 +6,17 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2023-06-16 Stephan Hageboeck (geom-specific-V11-00-13)
|
||||
- Fixed uninitialised value in G4VCSGfaceted::SurfaceNormal().
|
||||
|
||||
## 2023-03-20 Gabriele Cosmo (geom-specific-V11-00-12)
|
||||
- Fixed more potential uninitialised values in G4PolyconeSide,
|
||||
G4SolidExtentList and G4VTwistSurface.
|
||||
|
||||
## 2023-03-13 Gabriele Cosmo
|
||||
- Fixed potential uninitialised value for boundary type in
|
||||
G4VTwistSurface::GetBoundaryAtPZ().
|
||||
|
||||
## 2023-01-02 Evgueni Tcherniaev (geom-specific-V11-00-11)
|
||||
- G4QuadrangularFacet: fixed warning message.
|
||||
|
||||
|
||||
@@ -267,7 +267,7 @@ G4bool G4PolyconeSide::Intersect( const G4ThreeVector& p,
|
||||
G4ThreeVector& normal,
|
||||
G4bool& isAllBehind )
|
||||
{
|
||||
G4double s1, s2;
|
||||
G4double s1=0., s2=0.;
|
||||
G4double normSign = outgoing ? +1 : -1;
|
||||
|
||||
isAllBehind = allBehind;
|
||||
|
||||
@@ -75,18 +75,18 @@ void G4SolidExtentList::AddSurface( const G4ClippablePolygon& surface )
|
||||
//
|
||||
// Keep track of four surfaces
|
||||
//
|
||||
G4double min, max;
|
||||
G4double smin=.0, smax=0.;
|
||||
|
||||
surface.GetExtent( axis, min, max );
|
||||
surface.GetExtent( axis, smin, smax );
|
||||
|
||||
if (min > maxLimit)
|
||||
if (smin > maxLimit)
|
||||
{
|
||||
//
|
||||
// Nearest surface beyond maximum limit
|
||||
//
|
||||
if (surface.InFrontOf(minAbove,axis)) minAbove = surface;
|
||||
}
|
||||
else if (max < minLimit)
|
||||
else if (smax < minLimit)
|
||||
{
|
||||
//
|
||||
// Nearest surface below minimum limit
|
||||
@@ -107,7 +107,7 @@ void G4SolidExtentList::AddSurface( const G4ClippablePolygon& surface )
|
||||
//
|
||||
// Return extent after processing all surfaces
|
||||
//
|
||||
G4bool G4SolidExtentList::GetExtent( G4double& min, G4double& max ) const
|
||||
G4bool G4SolidExtentList::GetExtent( G4double& emin, G4double& emax ) const
|
||||
{
|
||||
G4double kCarTolerance = G4GeometryTolerance::GetInstance()
|
||||
->GetSurfaceTolerance();
|
||||
@@ -129,8 +129,8 @@ G4bool G4SolidExtentList::GetExtent( G4double& min, G4double& max ) const
|
||||
//
|
||||
// No. We must be entirely within the solid
|
||||
//
|
||||
max = maxLimit + kCarTolerance;
|
||||
min = minLimit - kCarTolerance;
|
||||
emax = maxLimit + kCarTolerance;
|
||||
emin = minLimit - kCarTolerance;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -142,13 +142,13 @@ G4bool G4SolidExtentList::GetExtent( G4double& min, G4double& max ) const
|
||||
//
|
||||
// Inward facing: max limit must be embedded within solid
|
||||
//
|
||||
max = maxLimit + kCarTolerance;
|
||||
emax = maxLimit + kCarTolerance;
|
||||
}
|
||||
else
|
||||
{
|
||||
G4double sMin, sMax;
|
||||
maxSurface.GetExtent( axis, sMin, sMax );
|
||||
max = ( (sMax > maxLimit) ? maxLimit : sMax ) + kCarTolerance;
|
||||
emax = ( (sMax > maxLimit) ? maxLimit : sMax ) + kCarTolerance;
|
||||
}
|
||||
|
||||
//
|
||||
@@ -159,13 +159,13 @@ G4bool G4SolidExtentList::GetExtent( G4double& min, G4double& max ) const
|
||||
//
|
||||
// Inward facing: max limit must be embedded within solid
|
||||
//
|
||||
min = minLimit - kCarTolerance;
|
||||
emin = minLimit - kCarTolerance;
|
||||
}
|
||||
else
|
||||
{
|
||||
G4double sMin, sMax;
|
||||
G4double sMin=0., sMax=0.;
|
||||
minSurface.GetExtent( axis, sMin, sMax );
|
||||
min = ( (sMin < minLimit) ? minLimit : sMin ) - kCarTolerance;
|
||||
emin = ( (sMin < minLimit) ? minLimit : sMin ) - kCarTolerance;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -229,7 +229,7 @@ G4ThreeVector G4VCSGfaceted::SurfaceNormal( const G4ThreeVector& p ) const
|
||||
G4double best = kInfinity;
|
||||
do // Loop checking, 13.08.2015, G.Cosmo
|
||||
{
|
||||
G4double distance;
|
||||
G4double distance = kInfinity;
|
||||
G4ThreeVector normal = (*face)->Normal( p, &distance );
|
||||
if (distance < best)
|
||||
{
|
||||
|
||||
@@ -715,7 +715,7 @@ G4ThreeVector G4VTwistSurface::GetBoundaryAtPZ(G4int areacode,
|
||||
|
||||
G4ThreeVector d;
|
||||
G4ThreeVector x0;
|
||||
G4int boundarytype;
|
||||
G4int boundarytype = 0;
|
||||
G4bool found = false;
|
||||
|
||||
for (G4int i=0; i<4; ++i)
|
||||
|
||||
Reference in New Issue
Block a user