Import Geant4 11.1.1 source tree

This commit is contained in:
Gabriele Cosmo
2023-02-14 13:57:32 +01:00
parent 9f34590941
commit 84a556a9dc
312 changed files with 35018 additions and 36005 deletions
+4
View File
@@ -6,6 +6,10 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2022-12-09 Laurie Nevay (field-V11-00-06)
- Reduced printout for setting any valid value for epsilon_min / _max in
G4FieldManager.
## 2022-11-28 Gabriele Cosmo (field-V11-00-05)
- Fixed restore of stream precision in G4FieldManager::ReportBadEpsilonValue().
@@ -259,9 +259,11 @@ G4bool G4FieldManager::SetMaximumEpsilonStep( G4double newEpsMax )
if(newEpsMax >= fEpsilonMin){
fEpsilonMax = newEpsMax;
succeeded = true;
// if(verbose)
G4cout << "G4FieldManager/SetEpsMax : eps_max = " << std::setw(10) << fEpsilonMax
<< " ( Note: unchanged eps_min=" << std::setw(10) << fEpsilonMin << " )" << G4endl;
if (fVerboseConstruction)
{
G4cout << "G4FieldManager/SetEpsMax : eps_max = " << std::setw(10) << fEpsilonMax
<< " ( Note: unchanged eps_min=" << std::setw(10) << fEpsilonMin << " )" << G4endl;
}
} else {
G4ExceptionDescription erm;
erm << " Call to set eps_max = " << newEpsMax << " . The problem is that"
@@ -300,8 +302,11 @@ G4bool G4FieldManager::SetMinimumEpsilonStep( G4double newEpsMin )
//*********
succeeded= true;
G4cout << "G4FieldManager/SetEpsMin : eps_min = "
<< std::setw(10) << fEpsilonMin << G4endl;
if (fVerboseConstruction)
{
G4cout << "G4FieldManager/SetEpsMin : eps_min = "
<< std::setw(10) << fEpsilonMin << G4endl;
}
if( fEpsilonMax < fEpsilonMin ){
// Ensure consistency
G4ExceptionDescription erm;
+4
View File
@@ -6,6 +6,10 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 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.
## 2022-11-16 Gabriele Cosmo (geommng-V11-00-09)
- Fixed more compilation warnings for implicit type conversions on
macOS/XCode 14.1 in G4SmartVoxelNode source.
@@ -105,6 +105,7 @@
#define G4LOGICALVOLUME_HH 1
#include <vector>
#include <memory>
#include "G4Types.hh"
#include "G4Region.hh" // Required by inline methods
@@ -120,9 +121,9 @@ class G4VSensitiveDetector;
class G4VSolid;
class G4UserLimits;
class G4SmartVoxelHeader;
class G4VisAttributes;
class G4FastSimulationManager;
class G4MaterialCutsCouple;
class G4VisAttributes;
class G4LVData
{
@@ -323,11 +324,11 @@ class G4LogicalVolume
// Equality defined by address only.
// Returns true if objects are at same address, else false.
inline const G4VisAttributes* GetVisAttributes () const;
inline void SetVisAttributes (const G4VisAttributes* pVA);
void SetVisAttributes (const G4VisAttributes& VA);
// Gets and sets visualization attributes. A copy of 'VA' on the heap
// will be made in the case the call with a const reference is used.
const G4VisAttributes* GetVisAttributes () const;
void SetVisAttributes (const G4VisAttributes* pVA);
void SetVisAttributes (const G4VisAttributes& VA);
// Gets and sets visualization attributes.
// Arguments are converted to shared_ptr.
inline G4FastSimulationManager* GetFastSimulationManager () const;
// Gets current FastSimulationManager pointer if exists, otherwise null.
@@ -405,12 +406,12 @@ class G4LogicalVolume
G4double fSmartless = 2.0;
// Quality for optimisation, average number of voxels to be spent
// per content.
const G4VisAttributes* fVisAttributes = nullptr;
// Pointer (possibly nullptr) to visualization attributes.
G4Region* fRegion = nullptr;
// Pointer to the cuts region (if any)
// Pointer to the cuts region (if any).
G4double fBiasWeight = 1.0;
// Weight used in the event biasing technique.
std::shared_ptr<const G4VisAttributes> fVisAttributes;
// Pointer to visualization attributes.
// Shadow of master pointers.
// Each worker thread can access this field from the master thread
@@ -322,26 +322,6 @@ G4bool G4LogicalVolume::operator == ( const G4LogicalVolume& lv) const
return (this==&lv) ? true : false;
}
// ********************************************************************
// GetVisAttributes
// ********************************************************************
//
inline
const G4VisAttributes* G4LogicalVolume::GetVisAttributes () const
{
return fVisAttributes;
}
// ********************************************************************
// SetVisAttributes
// ********************************************************************
//
inline
void G4LogicalVolume::SetVisAttributes (const G4VisAttributes* pVA)
{
fVisAttributes = pVA;
}
// ********************************************************************
// SetBiasWeight
// ********************************************************************
@@ -361,3 +341,13 @@ G4double G4LogicalVolume::GetBiasWeight() const
{
return fBiasWeight;
}
// ********************************************************************
// GetVisAttributes
// ********************************************************************
//
inline
const G4VisAttributes* G4LogicalVolume::GetVisAttributes () const
{
return fVisAttributes.get();
}
@@ -641,11 +641,6 @@ G4double G4LogicalVolume::GetMass(G4bool forced,
return massSum;
}
void G4LogicalVolume::SetVisAttributes (const G4VisAttributes& VA)
{
fVisAttributes = new G4VisAttributes(VA);
}
// ********************************************************************
// Change the daughters volume type -- checking proposed values
//
@@ -677,3 +672,23 @@ G4bool G4LogicalVolume::ChangeDaughtersType(EVolume aType)
}
return works;
}
// ********************************************************************
// SetVisAttributes - copy version
// ********************************************************************
//
void G4LogicalVolume::SetVisAttributes (const G4VisAttributes& VA)
{
if (G4Threading::IsWorkerThread()) return;
fVisAttributes = std::make_shared<const G4VisAttributes>(VA);
}
// ********************************************************************
// SetVisAttributes
// ********************************************************************
//
void G4LogicalVolume::SetVisAttributes (const G4VisAttributes* pVA)
{
if (G4Threading::IsWorkerThread()) return;
fVisAttributes = std::shared_ptr<const G4VisAttributes>(pVA,[](const G4VisAttributes*){});
}
+4
View File
@@ -6,6 +6,10 @@ It must **not** be used as a substitute for writing good git commit messages!
------------------------------------------------------------------------------
## 2022-12-20 Ivana Hrivnacova (geom-bool-V11-00-08)
- Fixed hang-out in G4MultiUnion, caused by oveflow of 'size-1' when 'size' value is zero
after changing G4int type to size_t
## 2022-11-10 Gabriele Cosmo (geom-bool-V11-00-07)
- Fixed compilation warnings for implicit type conversions on macOS/XCode 14.1.
@@ -480,6 +480,12 @@ EInside G4MultiUnion::InsideWithExclusion(const G4ThreeVector& aPoint,
// located around will correspond to kInside (cf. G4UnionSolid)
std::size_t size = surfaces.size();
if (size == 0)
{
return EInside::kOutside;
}
for (std::size_t i = 0; i < size - 1; ++i)
{
G4MultiUnionSurface& left = surfaces[i];
@@ -494,9 +500,7 @@ EInside G4MultiUnion::InsideWithExclusion(const G4ThreeVector& aPoint,
}
}
location = size ? EInside::kSurface : EInside::kOutside;
return location;
return EInside::kSurface;
}
//______________________________________________________________________________
+3
View File
@@ -6,6 +6,9 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2023-01-02 Evgueni Tcherniaev (geom-specific-V11-00-11)
- G4QuadrangularFacet: fixed warning message.
## 2022-11-10 Gabriele Cosmo (geom-specific-V11-00-10)
- Fixed compilation warnings for implicit type conversions on macOS/XCode 14.1.
@@ -131,10 +131,11 @@ G4QuadrangularFacet::G4QuadrangularFacet (const G4ThreeVector& vt0,
<< "P1 = " << GetVertex(1) << G4endl
<< "P2 = " << GetVertex(2) << G4endl
<< "P3 = " << GetVertex(3) << G4endl
<< "Height in P0-P1-P2 = " << h1 << G4endl
<< "Height in P1-P2-P3 = " << h2 << G4endl
<< "Height in P2-P3-P4 = " << h3 << G4endl
<< "Height in P4-P0-P1 = " << h4;
<< "Smallest heights:" << G4endl
<< " in triangle P0-P1-P2 = " << h1 << G4endl
<< " in triangle P1-P2-P3 = " << h2 << G4endl
<< " in triangle P2-P3-P0 = " << h3 << G4endl
<< " in triangle P3-P0-P1 = " << h4;
G4Exception("G4QuadrangularFacet::G4QuadrangularFacet()",
"GeomSolids1001", JustWarning, message);
return;