Import Geant4 11.1.1 source tree
This commit is contained in:
+1
-1
@@ -167,7 +167,7 @@ endif
|
||||
|
||||
banner:
|
||||
@$(ECHO) "*************************************************************"
|
||||
@$(ECHO) " Installation Geant4 version geant4-11-01 "
|
||||
@$(ECHO) " Installation Geant4 version geant4-11-01-patch-01 "
|
||||
@$(ECHO) " Copyright (C) 1994-2023 Geant4 Collaboration "
|
||||
@$(ECHO) "*************************************************************"
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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*){});
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
//______________________________________________________________________________
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -6,6 +6,10 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2022-12-20 Vladimir Ivanchenko (global-V11-00-34)
|
||||
- G4DataVector: simplified inline methods in order to remove compilation
|
||||
warnings at some CMSSW platforms
|
||||
|
||||
## 2022-11-29 Gabriele Cosmo (global-V11-00-33)
|
||||
- Updated tag IDs for geant4-11-01-ref-00.
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ class G4DataVector : public std::vector<G4double>
|
||||
inline void insertAt(std::size_t, const G4double&);
|
||||
// Insert an element at given position
|
||||
|
||||
inline std::size_t index(const G4double&);
|
||||
inline std::size_t index(const G4double&) const;
|
||||
// Returns back index of the element same as given value
|
||||
|
||||
inline G4bool contains(const G4double&) const;
|
||||
|
||||
@@ -45,31 +45,22 @@ inline void G4DataVector::insertAt(std::size_t pos, const G4double& a)
|
||||
}
|
||||
}
|
||||
|
||||
inline std::size_t G4DataVector::index(const G4double& a)
|
||||
inline std::size_t G4DataVector::index(const G4double& a) const
|
||||
{
|
||||
std::size_t ptn = 0;
|
||||
for(auto i = cbegin(); i != cend(); ++i, ++ptn)
|
||||
{
|
||||
if(!(*i != a))
|
||||
if((*i) == a)
|
||||
{
|
||||
return ptn;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return (ptn = ~(std::size_t) 0);
|
||||
return ptn;
|
||||
}
|
||||
|
||||
inline G4bool G4DataVector::contains(const G4double& a) const
|
||||
{
|
||||
for(double i : *this)
|
||||
{
|
||||
if(!(i != a))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return (index(a) < size());
|
||||
}
|
||||
|
||||
inline G4bool G4DataVector::remove(const G4double& a)
|
||||
|
||||
@@ -40,11 +40,11 @@
|
||||
// |--> patch number
|
||||
|
||||
#ifndef G4VERSION_NUMBER
|
||||
#define G4VERSION_NUMBER 1110
|
||||
#define G4VERSION_NUMBER 1111
|
||||
#endif
|
||||
|
||||
#ifndef G4VERSION_TAG
|
||||
#define G4VERSION_TAG "$Name: geant4-11-01 $"
|
||||
#define G4VERSION_TAG "$Name: geant4-11-01-patch-01 $"
|
||||
#endif
|
||||
|
||||
// as variables
|
||||
@@ -53,10 +53,10 @@
|
||||
#include "G4Types.hh"
|
||||
|
||||
#ifdef G4MULTITHREADED
|
||||
static const G4String G4Version = "$Name: geant4-11-01 [MT]$";
|
||||
static const G4String G4Version = "$Name: geant4-11-01-patch-01 [MT]$";
|
||||
#else
|
||||
static const G4String G4Version = "$Name: geant4-11-01 $";
|
||||
static const G4String G4Version = "$Name: geant4-11-01-patch-01 $";
|
||||
#endif
|
||||
static const G4String G4Date = "(9-December-2022)";
|
||||
static const G4String G4Date = "(10-February-2023)";
|
||||
|
||||
#endif
|
||||
|
||||
@@ -6,6 +6,9 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2022-12-09 Vladimir Ivanchenko (materials-V11-00-20)
|
||||
- G4Material - allowed recursive search for based material (fix problem #2520)
|
||||
|
||||
## 2022-11-16 Gabriele Cosmo (materials-V11-00-19)
|
||||
- Fixed compilation warnings for implicit type conversions on macOS/XCode 14.1.
|
||||
|
||||
|
||||
@@ -204,6 +204,15 @@ G4Material::G4Material(const G4String& name, G4double density,
|
||||
fPressure = pressure;
|
||||
|
||||
fBaseMaterial = bmat;
|
||||
auto ptr = bmat;
|
||||
if(nullptr != ptr) {
|
||||
while(1) {
|
||||
ptr = ptr->GetBaseMaterial();
|
||||
if(nullptr == ptr) { break; }
|
||||
else { fBaseMaterial = ptr; }
|
||||
}
|
||||
}
|
||||
|
||||
fChemicalFormula = fBaseMaterial->GetChemicalFormula();
|
||||
fMassOfMolecule = fBaseMaterial->GetMassOfMolecule();
|
||||
|
||||
|
||||
@@ -6,6 +6,15 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2023-02-07 Sandro Wenzel (particles-V11-00-17)
|
||||
- G4OmegacZero, G4AntiOmegacZero : fixed mean lifetime according to the PDG.
|
||||
Thanks to Francesco Mazzaschi of ALICE for reporting it.
|
||||
|
||||
## 2023-01-11 Alberto Ribon (particles-V11-00-16)
|
||||
- G4AntiNeutron : set the "PDG stable" flag to "false", as for G4Neutron
|
||||
(this has no practical consequences, i.e. anti_neutron decays regardless
|
||||
of this flag, but it is confusing).
|
||||
|
||||
## 2022-11-18 Gabriele Cosmo (particles-V11-00-15)
|
||||
- Fixed compilation warnings for implicit type conversions on macOS/XCode 14.1
|
||||
in G4IonTable.
|
||||
|
||||
@@ -75,7 +75,7 @@ G4AntiNeutron* G4AntiNeutron::Definition()
|
||||
1, +1, 0,
|
||||
1, +1, 0,
|
||||
"baryon", 0, -1, -2112,
|
||||
true, 880.2*second, NULL,
|
||||
false, 880.2*second, NULL,
|
||||
false, "nucleon", 2112
|
||||
);
|
||||
// Magnetic Moment
|
||||
|
||||
@@ -72,7 +72,7 @@ G4AntiOmegacZero* G4AntiOmegacZero::Definition()
|
||||
1, +1, 0,
|
||||
0, 0, 0,
|
||||
"baryon", 0, -1, -4332,
|
||||
false, 0.069e-3*ns, NULL,
|
||||
false, 0.0268e-3*ns, NULL,
|
||||
false, "omega_c");
|
||||
|
||||
//Decay Table is not defined here, wth expectation of pre-assigned
|
||||
|
||||
@@ -72,7 +72,7 @@ G4OmegacZero* G4OmegacZero::Definition()
|
||||
1, +1, 0,
|
||||
0, 0, 0,
|
||||
"baryon", 0, +1, 4332,
|
||||
false, 0.069e-3*ns, NULL,
|
||||
false, 0.0268e-3*ns, NULL,
|
||||
false, "omega_c");
|
||||
}
|
||||
theInstance = static_cast<G4OmegacZero*>(anInstance);
|
||||
|
||||
@@ -6,6 +6,9 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2022-12-30 Vladimir Ivanchenko (phys-builders-V11-00-03)
|
||||
- Updated table of processes
|
||||
|
||||
## 2022-11-24 Gabriele Cosmo (phys-builders-V11-00-02)
|
||||
- Fixed compilation warnings for implicit type conversions on macOS/XCode 14.1.
|
||||
|
||||
|
||||
@@ -7,16 +7,16 @@ PairProdCharged 2 4 -1 -1 4 0
|
||||
Annih 2 5 5 -1 5 0
|
||||
AnnihToMuMu 2 6 -1 -1 6 0
|
||||
AnnihToHad 2 7 -1 -1 7 0
|
||||
NuclearStopp 2 8 -1 8 -1 0
|
||||
ElectronSuper 2 9 -1 1 1 0
|
||||
NuclearStopping 2 8 -1 8 -1 0
|
||||
ElectronGeneral 2 9 -1 1 1 0
|
||||
Msc 2 10 -1 1 -1 0
|
||||
Rayleigh 2 11 -1 -1 1000 0
|
||||
PhotoElectric 2 12 -1 -1 1000 0
|
||||
Compton 2 13 -1 -1 1000 0
|
||||
Conv 2 14 -1 -1 1000 0
|
||||
ConvToMuMu 2 15 -1 -1 1000 0
|
||||
GammaSuper 2 16 -1 -1 1000 0
|
||||
PositronSuper 2 17 1 1 1 0
|
||||
GammaGeneral 2 16 -1 -1 1000 0
|
||||
PositronGeneral 2 17 1 1 1 0
|
||||
Cerenkov 2 21 -1 -1 1000 0
|
||||
Scintillation 2 22 9999 -1 9999 0
|
||||
SynchRad 2 23 -1 -1 1000 0
|
||||
@@ -28,6 +28,7 @@ OpRayleigh 3 33 -1 -1 1000 0
|
||||
OpWLS 3 34 -1 -1 1000 0
|
||||
OpMieHG 3 35 -1 -1 1000 0
|
||||
OpWLS2 3 36 -1 -1 1000 0
|
||||
MuPairByMuon 2 49 -1 -1 10 0
|
||||
DNAElastic 2 51 -1 -1 1000 0
|
||||
DNAExcit 2 52 -1 -1 1000 0
|
||||
DNAIonisation 2 53 -1 -1 1000 0
|
||||
@@ -43,6 +44,7 @@ DNADoubleIoni 2 62 -1 -1 1000 0
|
||||
DNADoubleCap 2 63 -1 -1 1000 0
|
||||
DNAIoniTransfer 2 64 -1 -1 1000 0
|
||||
HadElastic 4 111 -1 -1 1000 0
|
||||
NeutronGeneral 4 116 -1 -1 1000 0
|
||||
HadInelastic 4 121 -1 -1 1000 0
|
||||
HadCapture 4 131 -1 -1 1000 0
|
||||
MuAtomCapture 4 132 -1 -1 1000 0
|
||||
@@ -61,4 +63,3 @@ UsrSpecCuts 7 402 -1 -1 1000 0
|
||||
NeutronKiller 7 403 -1 -1 1000 0
|
||||
ParallelWorld 10 491 9900 1 9900 1
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,22 @@
|
||||
# Category phys-ctor-decay History
|
||||
|
||||
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
|
||||
which **must** added in reverse chronological order (newest at the top). It must **not**
|
||||
be used as a substitute for writing good git commit messages!
|
||||
which **must** added in reverse chronological order (newest at the top).
|
||||
It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2023-01-11 Alberto Ribon (phys-ctor-decay-V11-00-04)
|
||||
- G4RadioactiveDecayPhysics : assigned the RadioactiveDecay process
|
||||
to G4Triton (which is the only light ion that decays).
|
||||
Note: before, triton did not have beta decay, i.e. it was wrongly
|
||||
treated as stable even when radioactive decay physics was enabled;
|
||||
anti_triton did not, and still does not, have beta decay
|
||||
(because RadioactiveDecay, in its current implementation, does
|
||||
not handle any kind of anti-ions): in practice, this is an acceptable
|
||||
approximation because of its relatively long lifetime and the fact
|
||||
that annihilation and nuclear capture are more likely to happen
|
||||
before decay.
|
||||
|
||||
## 2022-11-16 Vladimir Ivanchenko (phys-ctor-decay-V11-00-03)
|
||||
- added calls to G4EmBuilder and G4PhysListUtil in order to
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#include "G4DeexPrecoParameters.hh"
|
||||
#include "G4NuclideTable.hh"
|
||||
#include "G4PhysListUtil.hh"
|
||||
#include "G4Triton.hh"
|
||||
|
||||
// factory
|
||||
#include "G4PhysicsConstructorFactory.hh"
|
||||
@@ -99,6 +100,15 @@ void G4RadioactiveDecayPhysics::ConstructProcess()
|
||||
|
||||
G4PhysicsListHelper::GetPhysicsListHelper()->
|
||||
RegisterProcess(new G4RadioactiveDecay(), G4GenericIon::GenericIon());
|
||||
|
||||
// Triton (which is not a generic ion) is the only light ion that decays.
|
||||
// Note that the anti_triton does not have beta decay, because RadioactiveDecay,
|
||||
// in its current implementation, does not handle any kind of anti-ions:
|
||||
// in practice, this is an acceptable approximation because of its relatively
|
||||
// long lifetime and the fact that annihilation and nuclear capture
|
||||
// are more likely to happen before decay.
|
||||
G4PhysicsListHelper::GetPhysicsListHelper()->
|
||||
RegisterProcess(new G4RadioactiveDecay(), G4Triton::Triton());
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -6,6 +6,9 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2022-12-09 Vladimir Ivanchenko (phys-ctor-em-V11-00-36)
|
||||
- G4GammaGeneralProcess - in all cases select sub-process (fix problem #2521)
|
||||
|
||||
## 2022-11-24 Gabriele Cosmo (phys-ctor-em-V11-00-35)
|
||||
- Fixed compilation warnings for implicit type conversions on macOS/XCode 14.1.
|
||||
|
||||
|
||||
@@ -604,6 +604,8 @@ G4VParticleChange* G4GammaGeneralProcess::PostStepDoIt(const G4Track& track,
|
||||
SelectEmProcess(step, theCompton);
|
||||
} else if(theRayleigh) {
|
||||
SelectEmProcess(step, theRayleigh);
|
||||
} else {
|
||||
SelectEmProcess(step, thePhotoElectric);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -616,6 +618,8 @@ G4VParticleChange* G4GammaGeneralProcess::PostStepDoIt(const G4Track& track,
|
||||
SelectEmProcess(step, thePhotoElectric);
|
||||
} else if(theGammaNuclear) {
|
||||
SelectHadProcess(track, step, theGammaNuclear);
|
||||
} else {
|
||||
SelectEmProcess(step, theConversionEE);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -630,6 +634,8 @@ G4VParticleChange* G4GammaGeneralProcess::PostStepDoIt(const G4Track& track,
|
||||
SelectHadProcess(track, step, theGammaNuclear);
|
||||
} else if(theConversionMM) {
|
||||
SelectedProcess(step, theConversionMM);
|
||||
} else {
|
||||
SelectEmProcess(step, theConversionEE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,9 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2022-12-30 Vladimir Ivanchenko (phys-util-V11-00-10)
|
||||
- G4HadProcesses - avoid double instantiation of capture cross section
|
||||
|
||||
## 2022-11-24 Gabriele Cosmo (phys-util-V11-00-09)
|
||||
- Fixed compilation warnings for implicit type conversions on macOS/XCode 14.1.
|
||||
|
||||
|
||||
@@ -194,7 +194,6 @@ void G4HadProcesses::BuildNeutronInelasticAndCapture(G4HadronicProcess* nInel)
|
||||
auto neutron = G4Neutron::Neutron();
|
||||
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
|
||||
nInel->AddDataSet(new G4NeutronInelasticXS());
|
||||
nCap->AddDataSet(new G4NeutronCaptureXS());
|
||||
ph->RegisterProcess(nInel, neutron);
|
||||
ph->RegisterProcess(nCap, neutron);
|
||||
if( param->ApplyFactorXS() ) {
|
||||
|
||||
@@ -6,6 +6,12 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2022-12-21 V.Ivanchenko (emstand-V11-00-22)
|
||||
- G4GoudsmithSoundersonMscModel - fixed warning when build CMSSW
|
||||
|
||||
## 2022-12-11 V.Ivanchenko
|
||||
- G4UrbanMscModel - added flag MscPositronCorrection
|
||||
|
||||
## 2022-11-23 Gabriele Cosmo (emstand-V11-00-21)
|
||||
- Fixed more compilation warnings for implicit type conversions.
|
||||
|
||||
|
||||
@@ -277,7 +277,7 @@ void G4GoudsmitSaundersonMscModel::SetParticle(const G4ParticleDefinition* p)
|
||||
inline
|
||||
G4double G4GoudsmitSaundersonMscModel::Randomizetlimit()
|
||||
{
|
||||
G4double temptlimit = tlimit;
|
||||
G4double temptlimit;
|
||||
do {
|
||||
temptlimit = G4RandGauss::shoot(rndmEngineMod,tlimit,0.1*tlimit);
|
||||
} while ( (temptlimit<0.) || (temptlimit>2.*tlimit));
|
||||
|
||||
@@ -192,6 +192,7 @@ private:
|
||||
|
||||
G4bool latDisplasmentbackup;
|
||||
G4bool dispAlg96;
|
||||
G4bool fPosiCorrection = true;
|
||||
G4bool isFirstInstance = false;
|
||||
};
|
||||
|
||||
|
||||
@@ -151,7 +151,8 @@ void G4UrbanMscModel::Initialise(const G4ParticleDefinition* p,
|
||||
InitialiseParameters(p);
|
||||
|
||||
latDisplasmentbackup = latDisplasment;
|
||||
dispAlg96 = (G4EmParameters::Instance()->LateralDisplacementAlg96());
|
||||
dispAlg96 = G4EmParameters::Instance()->LateralDisplacementAlg96();
|
||||
fPosiCorrection = G4EmParameters::Instance()->MscPositronCorrection();
|
||||
|
||||
// initialise cache only once
|
||||
if(0 == msc.size()) {
|
||||
@@ -983,7 +984,7 @@ G4double G4UrbanMscModel::ComputeTheta0(G4double trueStepLength,
|
||||
}
|
||||
G4double y = trueStepLength/currentRadLength;
|
||||
|
||||
if(particle == positron)
|
||||
if(fPosiCorrection && particle == positron)
|
||||
{
|
||||
static const G4double xl= 0.6;
|
||||
static const G4double xh= 0.9;
|
||||
|
||||
@@ -6,6 +6,10 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2022-12-11 V.Ivanchenko (emutils-V11-00-39)
|
||||
- G4EmParameters, G4EmParametersMessenger, added parameter, UI command,
|
||||
GetSet methods - MscPositronCorrection
|
||||
|
||||
## 2022-11-23 Gabriele Cosmo (emutils-V11-00-38)
|
||||
- Fixed more compilation warnings for implicit type conversions.
|
||||
|
||||
|
||||
@@ -205,6 +205,9 @@ public:
|
||||
G4bool PhotoeffectBelowKShell() const;
|
||||
void SetPhotoeffectBelowKShell(G4bool v);
|
||||
|
||||
G4bool MscPositronCorrection() const;
|
||||
void SetMscPositronCorrection(G4bool v);
|
||||
|
||||
// 5d
|
||||
void SetOnIsolated(G4bool val);
|
||||
G4bool OnIsolated() const;
|
||||
@@ -421,6 +424,7 @@ private:
|
||||
G4bool fPolarisation;
|
||||
G4bool fMuDataFromFile;
|
||||
G4bool fPEKShell;
|
||||
G4bool fMscPosiCorr;
|
||||
G4bool onIsolated; // 5d model conversion on free ions
|
||||
G4bool fDNA;
|
||||
G4bool fIsPrinted;
|
||||
|
||||
@@ -104,6 +104,7 @@ private:
|
||||
G4UIcmdWithABool* icru90Cmd;
|
||||
G4UIcmdWithABool* mudatCmd;
|
||||
G4UIcmdWithABool* peKCmd;
|
||||
G4UIcmdWithABool* mscPCmd;
|
||||
|
||||
G4UIcmdWithADoubleAndUnit* minEnCmd;
|
||||
G4UIcmdWithADoubleAndUnit* maxEnCmd;
|
||||
|
||||
@@ -135,6 +135,7 @@ void G4EmParameters::Initialise()
|
||||
fPolarisation = false;
|
||||
fMuDataFromFile = false;
|
||||
fPEKShell = true;
|
||||
fMscPosiCorr = true;
|
||||
fDNA = false;
|
||||
fIsPrinted = false;
|
||||
|
||||
@@ -513,6 +514,17 @@ void G4EmParameters::SetPhotoeffectBelowKShell(G4bool v)
|
||||
fPEKShell = v;
|
||||
}
|
||||
|
||||
G4bool G4EmParameters::MscPositronCorrection() const
|
||||
{
|
||||
return fMscPosiCorr;
|
||||
}
|
||||
|
||||
void G4EmParameters::SetMscPositronCorrection(G4bool v)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
fMscPosiCorr = v;
|
||||
}
|
||||
|
||||
void G4EmParameters::ActivateDNA()
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
|
||||
@@ -196,6 +196,13 @@ G4EmParametersMessenger::G4EmParametersMessenger(G4EmParameters* ptr)
|
||||
peKCmd->AvailableForStates(G4State_PreInit);
|
||||
peKCmd->SetToBeBroadcasted(false);
|
||||
|
||||
mscPCmd = new G4UIcmdWithABool("/process/msc/PositronCorrection",this);
|
||||
mscPCmd->SetGuidance("Enable msc positron correction");
|
||||
mscPCmd->SetParameterName("mscPC",true);
|
||||
mscPCmd->SetDefaultValue(true);
|
||||
mscPCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
|
||||
mscPCmd->SetToBeBroadcasted(false);
|
||||
|
||||
minEnCmd = new G4UIcmdWithADoubleAndUnit("/process/eLoss/minKinEnergy",this);
|
||||
minEnCmd->SetGuidance("Set the min kinetic energy for EM tables");
|
||||
minEnCmd->SetParameterName("emin",true);
|
||||
@@ -474,6 +481,7 @@ G4EmParametersMessenger::~G4EmParametersMessenger()
|
||||
delete icru90Cmd;
|
||||
delete mudatCmd;
|
||||
delete peKCmd;
|
||||
delete mscPCmd;
|
||||
|
||||
delete minEnCmd;
|
||||
delete maxEnCmd;
|
||||
@@ -563,6 +571,8 @@ void G4EmParametersMessenger::SetNewValue(G4UIcommand* command,
|
||||
theParameters->SetRetrieveMuDataFromFile(mudatCmd->GetNewBoolValue(newValue));
|
||||
} else if (command == peKCmd) {
|
||||
theParameters->SetPhotoeffectBelowKShell(peKCmd->GetNewBoolValue(newValue));
|
||||
} else if (command == mscPCmd) {
|
||||
theParameters->SetMscPositronCorrection(mscPCmd->GetNewBoolValue(newValue));
|
||||
|
||||
} else if (command == minEnCmd) {
|
||||
theParameters->SetMinEnergy(minEnCmd->GetNewDoubleValue(newValue));
|
||||
|
||||
@@ -6,6 +6,10 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2023-01-17 Vladimir Ivanchenko (hadr-man-V11-00-09)
|
||||
- G4HadronicProcess - moved several class members to be protected, which
|
||||
is needed for hadron elastic process (and may be other processes)
|
||||
|
||||
## 2022-11-26 Gabriele Cosmo (hadr-man-V11-00-08)
|
||||
- Fixed compilation warnings for implicit type conversions on macOS/XCode 14.1.
|
||||
|
||||
|
||||
@@ -218,16 +218,22 @@ protected:
|
||||
G4HadProjectile thePro;
|
||||
|
||||
G4ParticleChange* theTotalResult;
|
||||
G4CrossSectionDataStore* theCrossSectionDataStore;
|
||||
|
||||
G4double fWeight = 1.0;
|
||||
G4double aScaleFactor = 1.0;
|
||||
G4double theLastCrossSection = 0.0;
|
||||
G4double mfpKinEnergy = DBL_MAX;
|
||||
G4long epReportLevel = 0;
|
||||
|
||||
G4HadXSType fXSType = fHadNoIntegral;
|
||||
|
||||
private:
|
||||
|
||||
G4EnergyRangeManager theEnergyRangeManager;
|
||||
G4Nucleus targetNucleus;
|
||||
|
||||
G4HadronicInteraction* theInteraction = nullptr;
|
||||
G4CrossSectionDataStore* theCrossSectionDataStore;
|
||||
G4HadronicProcessStore* theProcessStore;
|
||||
const G4HadronicProcess* masterProcess = nullptr;
|
||||
const G4ParticleDefinition* firstParticle = nullptr;
|
||||
@@ -238,14 +244,9 @@ private:
|
||||
std::vector<G4double>* theEnergyOfCrossSectionMax = nullptr;
|
||||
std::vector<G4TwoPeaksHadXS*>* fXSpeaks = nullptr;
|
||||
|
||||
G4double aScaleFactor = 1.0;
|
||||
G4double theLastCrossSection = 0.0;
|
||||
G4double mfpKinEnergy = DBL_MAX;
|
||||
G4double theMFP = DBL_MAX;
|
||||
G4double minKinEnergy;
|
||||
|
||||
G4HadXSType fXSType = fHadNoIntegral;
|
||||
|
||||
// counters
|
||||
G4int nMatWarn = 0;
|
||||
G4int nKaonWarn = 0;
|
||||
|
||||
@@ -6,6 +6,9 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2023-02-06 Gabriele Cosmo (hadr-lend-V11-00-08)
|
||||
- Fixed potential uninitialised variables in MCGIDI_energy_parseMadlandNixFromTOM().
|
||||
|
||||
## 2022-11-26 Gabriele Cosmo (hadr-lend-V11-00-07)
|
||||
- Fixed compilation warnings for implicit type conversions on macOS/XCode 14.1.
|
||||
|
||||
|
||||
@@ -310,7 +310,8 @@ err:
|
||||
static int MCGIDI_energy_parseMadlandNixFromTOM( statusMessageReporting *smr, xDataTOM_element *functional, MCGIDI_energy *energy ) {
|
||||
|
||||
int iE, length, nXs, i1, n;
|
||||
double E, T_M, EFL, EFH, argList[3], xs[] = { 1e-5, 1e-3, 1e-1, 1e1, 1e3, 1e5, 3e7 }, norm;
|
||||
double E=0., T_M=0., EFL=0., EFH=0., argList[3] = { 0., 0., 0. },
|
||||
xs[] = { 1e-5, 1e-3, 1e-1, 1e1, 1e3, 1e5, 3e7 }, norm;
|
||||
ptwXYPoints *ptwXY_TM = NULL, *pdfXY = NULL;
|
||||
ptwXYPoint *point;
|
||||
ptwXPoints *cdfX = NULL;
|
||||
|
||||
@@ -6,6 +6,9 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2023-02-06 Gabriele Cosmo (hadr-hpp-V11-00-20)
|
||||
- Minor cleanup in G4ParticleHPDeExGammas header for data initialisation.
|
||||
|
||||
## 2022-11-26 Gabriele Cosmo (hadr-hpp-V11-00-19)
|
||||
- Fixed more compilation warnings for implicit type conversions.
|
||||
- Some code cleanup.
|
||||
|
||||
@@ -46,31 +46,26 @@ class G4ParticleHPDeExGammas
|
||||
|
||||
G4ParticleHPDeExGammas()
|
||||
{
|
||||
levelStart = 0;
|
||||
levelSize = 0;
|
||||
nLevels = 0;
|
||||
theLevels = 0;
|
||||
}
|
||||
~G4ParticleHPDeExGammas()
|
||||
{
|
||||
if(levelStart!=0) delete [] levelStart;
|
||||
if(levelSize!=0) delete [] levelSize;
|
||||
if(theLevels!=0) delete [] theLevels;
|
||||
delete [] levelStart;
|
||||
delete [] levelSize;
|
||||
delete [] theLevels;
|
||||
}
|
||||
|
||||
void Init(std::istream & aDataFile);
|
||||
|
||||
inline G4ReactionProductVector * GetDecayGammas(G4int aLevel)
|
||||
{
|
||||
if(aLevel>nLevels-1 || aLevel<0) return 0;
|
||||
if(aLevel>nLevels-1 || aLevel<0) return nullptr;
|
||||
if(nLevels==0) return new G4ReactionProductVector();
|
||||
G4ReactionProductVector * result = new G4ReactionProductVector;
|
||||
G4DynamicParticleVector * theResult;
|
||||
|
||||
theResult = theLevels[aLevel]. GetDecayGammas();
|
||||
G4ReactionProduct * theCurrent;
|
||||
unsigned int i;
|
||||
for(i=0; i<theResult->size(); i++)
|
||||
for(unsigned int i=0; i<theResult->size(); ++i)
|
||||
{
|
||||
theCurrent = new G4ReactionProduct;
|
||||
*theCurrent = *(theResult->operator[](i));
|
||||
@@ -90,7 +85,7 @@ class G4ParticleHPDeExGammas
|
||||
|
||||
inline G4ParticleHPLevel * GetLevel(G4int i)
|
||||
{
|
||||
if(i>nLevels-1) return 0;
|
||||
if(i>nLevels-1) return nullptr;
|
||||
return theLevels+i;
|
||||
}
|
||||
|
||||
@@ -104,10 +99,10 @@ class G4ParticleHPDeExGammas
|
||||
}
|
||||
private:
|
||||
|
||||
G4int * levelStart;
|
||||
G4int * levelSize;
|
||||
G4int nLevels;
|
||||
G4ParticleHPLevel * theLevels;
|
||||
G4int * levelStart = nullptr;
|
||||
G4int * levelSize = nullptr;
|
||||
G4int nLevels = 0;
|
||||
G4ParticleHPLevel * theLevels = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -6,6 +6,9 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2023-02-06 Gabriele Cosmo (hadr-qgsm-V11-00-04)
|
||||
- Fixed potential uninitialised variables in G4QGSMSplitableHadron::GetValenceQuarkFlavors().
|
||||
|
||||
## 2022-10-07 Gabriele Cosmo (hadr-qgsm-V11-00-03)
|
||||
- Fixed compilation warning on Intel/icx compiler for variables set
|
||||
but not used in G4QGSMSplitableHadron and G4QGSParticipants.
|
||||
|
||||
@@ -225,8 +225,8 @@ void G4QGSMSplitableHadron::GetValenceQuarkFlavors(const G4ParticleDefinition *
|
||||
G4Parton *& Parton1, G4Parton *& Parton2)
|
||||
{
|
||||
// Note! convention aEnd = q or (qq)bar and bEnd = qbar or qq.
|
||||
G4int aEnd;
|
||||
G4int bEnd;
|
||||
G4int aEnd=0;
|
||||
G4int bEnd=0;
|
||||
G4int HadronEncoding = aPart->GetPDGEncoding();
|
||||
if (aPart->GetBaryonNumber() == 0)
|
||||
{
|
||||
|
||||
@@ -6,6 +6,24 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2023-02-10 Vladimir Ivanchenko (hadr-proc-V11-00-13)
|
||||
- G4NeutronGeneralProcess - added extra Set method
|
||||
|
||||
## 2023-02-01 Vladimir Ivanchenko (hadr-proc-V11-00-12)
|
||||
- G4HadronElasticProcess, G4NeutronGeneralProcess - fixed problems identified
|
||||
by Coverity
|
||||
|
||||
## 2023-01-17 Vladimir Ivanchenko
|
||||
- G4HadronElasticProcess - removed obsolete (try/catch construction not
|
||||
applicable for hadron elastic models; added forgotten integral approach
|
||||
for charged particles
|
||||
|
||||
## 2022-12-30 Vladimir Ivanchenko
|
||||
- G4NeutronGeneralProcess - optimized code: initialisation methods are
|
||||
moved to the source, avoid double instantiation of capture cross section;
|
||||
reduced number of calls to cross section, added cross section data store
|
||||
pointer
|
||||
|
||||
## 2022-11-26 Gabriele Cosmo (hadr-proc-V11-00-11)
|
||||
- Fixed compilation warnings for implicit type conversions on macOS/XCode 14.1.
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ class G4Track;
|
||||
class G4ParticleDefinition;
|
||||
class G4VParticleChange;
|
||||
class G4VCrossSectionDataSet;
|
||||
class G4CrossSectionDataStore;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -102,14 +103,16 @@ public:
|
||||
// Temporary method
|
||||
G4int GetSubProcessSubType() const;
|
||||
|
||||
void SetInelasticProcess(G4HadronicProcess*);
|
||||
void SetElasticProcess(G4HadronicProcess*);
|
||||
void SetCaptureProcess(G4HadronicProcess*);
|
||||
|
||||
inline const G4VProcess* GetSelectedProcess() const;
|
||||
|
||||
inline void SetInelasticProcess(G4HadronicProcess*);
|
||||
inline void SetElasticProcess(G4HadronicProcess*);
|
||||
inline void SetCaptureProcess(G4HadronicProcess*);
|
||||
|
||||
inline void SetTimeLimit(G4double val);
|
||||
|
||||
inline void SetMinEnergyLimit(G4double val);
|
||||
|
||||
// hide copy constructor and assignment operator
|
||||
G4NeutronGeneralProcess(G4NeutronGeneralProcess &) = delete;
|
||||
G4NeutronGeneralProcess & operator=
|
||||
@@ -125,15 +128,15 @@ protected:
|
||||
inline G4double GetProbability(size_t idxt);
|
||||
|
||||
inline void SelectedProcess(const G4Step& step, G4HadronicProcess* ptr,
|
||||
G4VCrossSectionDataSet* xs);
|
||||
|
||||
void SelectHadProcess(const G4Track&, const G4Step&, G4HadronicProcess*);
|
||||
G4CrossSectionDataStore*);
|
||||
|
||||
private:
|
||||
|
||||
// partial cross section
|
||||
G4double ComputeCrossSection(G4VCrossSectionDataSet*, const G4Material*,
|
||||
G4double kinEnergy, G4double loge);
|
||||
G4double kinEnergy, G4double loge);
|
||||
|
||||
G4VCrossSectionDataSet* InitialisationXS(G4HadronicProcess*);
|
||||
|
||||
// total cross section
|
||||
inline void CurrentCrossSection(const G4Track&);
|
||||
@@ -147,10 +150,14 @@ private:
|
||||
G4HadronicProcess* fCapture = nullptr;
|
||||
G4HadronicProcess* fSelectedProc = nullptr;
|
||||
|
||||
G4VCrossSectionDataSet* fInelasticXS;
|
||||
G4VCrossSectionDataSet* fElasticXS;
|
||||
G4VCrossSectionDataSet* fCaptureXS;
|
||||
G4VCrossSectionDataSet* fXS = nullptr;
|
||||
G4VCrossSectionDataSet* fInelasticXS = nullptr;
|
||||
G4VCrossSectionDataSet* fElasticXS = nullptr;
|
||||
G4VCrossSectionDataSet* fCaptureXS = nullptr;
|
||||
|
||||
G4CrossSectionDataStore* fXSSInelastic = nullptr;
|
||||
G4CrossSectionDataStore* fXSSElastic = nullptr;
|
||||
G4CrossSectionDataStore* fXSSCapture = nullptr;
|
||||
G4CrossSectionDataStore* fCurrentXSS = nullptr;
|
||||
|
||||
const G4ParticleDefinition* fNeutron;
|
||||
const G4Material* fCurrMat = nullptr;
|
||||
@@ -178,31 +185,6 @@ private:
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline void
|
||||
G4NeutronGeneralProcess::SetInelasticProcess(G4HadronicProcess* ptr)
|
||||
{
|
||||
fInelastic = ptr;
|
||||
ptr->AddDataSet(fInelasticXS);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline void G4NeutronGeneralProcess::SetElasticProcess(G4HadronicProcess* ptr)
|
||||
{
|
||||
fElastic = ptr;
|
||||
ptr->AddDataSet(fElasticXS);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline void G4NeutronGeneralProcess::SetCaptureProcess(G4HadronicProcess* ptr)
|
||||
{
|
||||
fCapture = ptr;
|
||||
ptr->AddDataSet(fCaptureXS);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline G4double
|
||||
G4NeutronGeneralProcess::ComputeGeneralLambda(std::size_t idxe, std::size_t idxt)
|
||||
{
|
||||
@@ -224,11 +206,11 @@ inline G4double G4NeutronGeneralProcess::GetProbability(std::size_t idxt)
|
||||
inline void
|
||||
G4NeutronGeneralProcess::SelectedProcess(const G4Step& step,
|
||||
G4HadronicProcess* ptr,
|
||||
G4VCrossSectionDataSet* xs)
|
||||
G4CrossSectionDataStore* xs)
|
||||
|
||||
{
|
||||
fSelectedProc = ptr;
|
||||
fXS = xs;
|
||||
fCurrentXSS = xs;
|
||||
step.GetPostStepPoint()->SetProcessDefinedStep(ptr);
|
||||
}
|
||||
|
||||
@@ -245,18 +227,11 @@ inline void G4NeutronGeneralProcess::CurrentCrossSection(const G4Track& track)
|
||||
{
|
||||
G4double energy = track.GetKineticEnergy();
|
||||
const G4Material* mat = track.GetMaterial();
|
||||
G4bool recompute = false;
|
||||
if(mat != fCurrMat) {
|
||||
if(mat != fCurrMat || energy != fCurrE) {
|
||||
fCurrMat = mat;
|
||||
matIndex = mat->GetIndex();
|
||||
recompute = true;
|
||||
}
|
||||
if(energy != fCurrE) {
|
||||
fCurrE = energy;
|
||||
fCurrLogE = track.GetDynamicParticle()->GetLogKineticEnergy();
|
||||
recompute = true;
|
||||
}
|
||||
if(recompute) {
|
||||
fLambda = (energy <= fMiddleEnergy) ? ComputeGeneralLambda(0, 0)
|
||||
: ComputeGeneralLambda(1, 3);
|
||||
currentInteractionLength = 1.0/fLambda;
|
||||
@@ -272,4 +247,11 @@ inline void G4NeutronGeneralProcess::SetTimeLimit(G4double val)
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline void G4NeutronGeneralProcess::SetMinEnergyLimit(G4double val)
|
||||
{
|
||||
fMinEnergy = val;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#endif
|
||||
|
||||
@@ -68,30 +68,41 @@ G4HadronElasticProcess::PostStepDoIt(const G4Track& track,
|
||||
theTotalResult->ProposeWeight(weight);
|
||||
|
||||
// For elastic scattering, _any_ result is considered an interaction
|
||||
ClearNumberOfInteractionLengthLeft();
|
||||
theNumberOfInteractionLengthLeft = -1.0;
|
||||
|
||||
G4double kineticEnergy = track.GetKineticEnergy();
|
||||
const G4DynamicParticle* dynParticle = track.GetDynamicParticle();
|
||||
G4double kineticEnergy = dynParticle->GetKineticEnergy();
|
||||
G4TrackStatus status = track.GetTrackStatus();
|
||||
if(kineticEnergy == 0.0 || track.GetTrackStatus() != fAlive) {
|
||||
return theTotalResult;
|
||||
}
|
||||
|
||||
const G4DynamicParticle* dynParticle = track.GetDynamicParticle();
|
||||
const G4ParticleDefinition* part = dynParticle->GetDefinition();
|
||||
const G4Material* material = track.GetMaterial();
|
||||
|
||||
// check only for charged particles
|
||||
if(fXSType != fHadNoIntegral) {
|
||||
mfpKinEnergy = DBL_MAX;
|
||||
G4double xs = aScaleFactor*
|
||||
theCrossSectionDataStore->ComputeCrossSection(dynParticle, material);
|
||||
if(xs < theLastCrossSection*G4UniformRand()) {
|
||||
// No interaction
|
||||
return theTotalResult;
|
||||
}
|
||||
}
|
||||
|
||||
const G4ParticleDefinition* part = dynParticle->GetDefinition();
|
||||
G4Nucleus* targNucleus = GetTargetNucleusPointer();
|
||||
|
||||
// Select element
|
||||
const G4Element* elm =
|
||||
GetCrossSectionDataStore()->SampleZandA(dynParticle, material, *targNucleus);
|
||||
theCrossSectionDataStore->SampleZandA(dynParticle, material, *targNucleus);
|
||||
|
||||
// Initialize the hadronic projectile from the track
|
||||
G4HadProjectile theProj(track);
|
||||
G4HadronicInteraction* hadi = nullptr;
|
||||
G4HadFinalState* result = nullptr;
|
||||
|
||||
if(fDiffraction)
|
||||
{
|
||||
if(nullptr != fDiffraction) {
|
||||
G4double ratio =
|
||||
fDiffractionRatio->ComputeRatio(part, kineticEnergy,
|
||||
targNucleus->GetZ_asInt(),
|
||||
@@ -108,7 +119,8 @@ G4HadronElasticProcess::PostStepDoIt(const G4Track& track,
|
||||
G4ExceptionDescription ed;
|
||||
aR.Report(ed);
|
||||
ed << "Call for " << fDiffraction->GetModelName() << G4endl;
|
||||
ed << "Target element "<< elm->GetName()<<" Z= "
|
||||
ed << part->GetParticleName()
|
||||
<< " off target element " << elm->GetName() << " Z= "
|
||||
<< targNucleus->GetZ_asInt()
|
||||
<< " A= " << targNucleus->GetA_asInt() << G4endl;
|
||||
DumpState(track,"ApplyYourself",ed);
|
||||
@@ -118,9 +130,7 @@ G4HadronElasticProcess::PostStepDoIt(const G4Track& track,
|
||||
}
|
||||
// Check the result for catastrophic energy non-conservation
|
||||
result = CheckResult(theProj, *targNucleus, result);
|
||||
|
||||
result->SetTrafoToLab(theProj.GetTrafoToLab());
|
||||
ClearNumberOfInteractionLengthLeft();
|
||||
|
||||
// The following method of the base class takes care also of setting
|
||||
// the creator model ID for the secondaries that are created
|
||||
@@ -134,28 +144,25 @@ G4HadronElasticProcess::PostStepDoIt(const G4Track& track,
|
||||
}
|
||||
|
||||
// ordinary elastic scattering
|
||||
try
|
||||
{
|
||||
hadi = ChooseHadronicInteraction( theProj, *targNucleus, material, elm );
|
||||
}
|
||||
catch(G4HadronicException & aE)
|
||||
{
|
||||
G4ExceptionDescription ed;
|
||||
aE.Report(ed);
|
||||
ed << "Target element "<< elm->GetName()<<" Z= "
|
||||
<< targNucleus->GetZ_asInt() << " A= "
|
||||
<< targNucleus->GetA_asInt() << G4endl;
|
||||
DumpState(track,"ChooseHadronicInteraction",ed);
|
||||
ed << " No HadronicInteraction found out" << G4endl;
|
||||
G4Exception("G4HadronElasticProcess::PostStepDoIt", "had005",
|
||||
FatalException, ed);
|
||||
}
|
||||
hadi = ChooseHadronicInteraction( theProj, *targNucleus, material, elm );
|
||||
if(nullptr == hadi) {
|
||||
G4ExceptionDescription ed;
|
||||
ed << part->GetParticleName()
|
||||
<< " off target element " << elm->GetName() << " Z= "
|
||||
<< targNucleus->GetZ_asInt() << " A= "
|
||||
<< targNucleus->GetA_asInt() << G4endl;
|
||||
DumpState(track,"ChooseHadronicInteraction",ed);
|
||||
ed << " No HadronicInteraction found out" << G4endl;
|
||||
G4Exception("G4HadronElasticProcess::PostStepDoIt", "had005",
|
||||
FatalException, ed);
|
||||
return theTotalResult;
|
||||
}
|
||||
|
||||
size_t idx = track.GetMaterialCutsCouple()->GetIndex();
|
||||
G4double tcut = (*(G4ProductionCutsTable::GetProductionCutsTable()
|
||||
->GetEnergyCutsVector(3)))[idx];
|
||||
hadi->SetRecoilEnergyThreshold(tcut);
|
||||
|
||||
/*
|
||||
if(verboseLevel>1) {
|
||||
G4cout << "G4HadronElasticProcess::PostStepDoIt for "
|
||||
<< part->GetParticleName()
|
||||
@@ -164,24 +171,8 @@ G4HadronElasticProcess::PostStepDoIt(const G4Track& track,
|
||||
<< " A= " << targNucleus->GetA_asInt()
|
||||
<< " Tcut(MeV)= " << tcut << G4endl;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
result = hadi->ApplyYourself( theProj, *targNucleus);
|
||||
}
|
||||
catch(G4HadronicException & aR)
|
||||
{
|
||||
G4ExceptionDescription ed;
|
||||
aR.Report(ed);
|
||||
ed << "Call for " << hadi->GetModelName() << G4endl;
|
||||
ed << "Target element "<< elm->GetName()<<" Z= "
|
||||
<< targNucleus->GetZ_asInt()
|
||||
<< " A= " << targNucleus->GetA_asInt() << G4endl;
|
||||
DumpState(track,"ApplyYourself",ed);
|
||||
ed << " ApplyYourself failed" << G4endl;
|
||||
G4Exception("G4HadronElasticProcess::PostStepDoIt", "had006",
|
||||
FatalException, ed);
|
||||
}
|
||||
*/
|
||||
result = hadi->ApplyYourself( theProj, *targNucleus);
|
||||
|
||||
// Check the result for catastrophic energy non-conservation
|
||||
// cannot be applied because is not guranteed that recoil
|
||||
@@ -191,7 +182,7 @@ G4HadronElasticProcess::PostStepDoIt(const G4Track& track,
|
||||
// directions
|
||||
G4ThreeVector indir = track.GetMomentumDirection();
|
||||
G4ThreeVector outdir = result->GetMomentumChange();
|
||||
|
||||
/*
|
||||
if(verboseLevel>1) {
|
||||
G4cout << "Efin= " << result->GetEnergyChange()
|
||||
<< " de= " << result->GetLocalEnergyDeposit()
|
||||
@@ -199,7 +190,7 @@ G4HadronElasticProcess::PostStepDoIt(const G4Track& track,
|
||||
<< " dir= " << outdir
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
*/
|
||||
// energies
|
||||
G4double edep = std::max(result->GetLocalEnergyDeposit(), 0.0);
|
||||
G4double efinal = std::max(result->GetEnergyChange(), 0.0);
|
||||
|
||||
@@ -48,8 +48,8 @@
|
||||
#include "G4NeutronGeneralProcess.hh"
|
||||
#include "G4PhysicalConstants.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4HadronicProcess.hh"
|
||||
#include "G4CrossSectionDataStore.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
@@ -62,7 +62,6 @@
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "G4Element.hh"
|
||||
#include "G4Neutron.hh"
|
||||
#include "G4Nucleus.hh"
|
||||
#include "G4NeutronInelasticXS.hh"
|
||||
#include "G4NeutronElasticXS.hh"
|
||||
#include "G4NeutronCaptureXS.hh"
|
||||
@@ -87,14 +86,6 @@ G4NeutronGeneralProcess::G4NeutronGeneralProcess(const G4String& pname)
|
||||
SetVerboseLevel(1);
|
||||
SetProcessSubType(fNeutronGeneral);
|
||||
|
||||
fElasticXS = new G4NeutronElasticXS();
|
||||
fInelasticXS = new G4NeutronInelasticXS();
|
||||
fCaptureXS = new G4NeutronCaptureXS();
|
||||
|
||||
AddDataSet(fElasticXS);
|
||||
AddDataSet(fInelasticXS);
|
||||
AddDataSet(fCaptureXS);
|
||||
|
||||
fNeutron = G4Neutron::Neutron();
|
||||
|
||||
if(G4Threading::IsWorkerThread()) {
|
||||
@@ -121,6 +112,58 @@ G4bool G4NeutronGeneralProcess::IsApplicable(const G4ParticleDefinition&)
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4NeutronGeneralProcess::SetInelasticProcess(G4HadronicProcess* ptr)
|
||||
{
|
||||
fInelastic = ptr;
|
||||
fXSSInelastic = ptr->GetCrossSectionDataStore();
|
||||
fInelasticXS = InitialisationXS(ptr);
|
||||
if(nullptr == fInelasticXS) {
|
||||
fInelasticXS = new G4NeutronInelasticXS();
|
||||
ptr->AddDataSet(fInelasticXS);
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4NeutronGeneralProcess::SetElasticProcess(G4HadronicProcess* ptr)
|
||||
{
|
||||
fElastic = ptr;
|
||||
fXSSElastic = ptr->GetCrossSectionDataStore();
|
||||
fElasticXS = InitialisationXS(ptr);
|
||||
if(nullptr == fElasticXS) {
|
||||
fElasticXS = new G4NeutronElasticXS();
|
||||
ptr->AddDataSet(fElasticXS);
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4NeutronGeneralProcess::SetCaptureProcess(G4HadronicProcess* ptr)
|
||||
{
|
||||
fCapture = ptr;
|
||||
fXSSCapture = ptr->GetCrossSectionDataStore();
|
||||
fCaptureXS = InitialisationXS(ptr);
|
||||
if(nullptr == fCaptureXS) {
|
||||
fCaptureXS = new G4NeutronCaptureXS();
|
||||
ptr->AddDataSet(fCaptureXS);
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4VCrossSectionDataSet*
|
||||
G4NeutronGeneralProcess::InitialisationXS(G4HadronicProcess* proc)
|
||||
{
|
||||
G4VCrossSectionDataSet* ptr = nullptr;
|
||||
auto xsv = proc->GetCrossSectionDataStore()->GetDataSetList();
|
||||
if(!xsv.empty()) {
|
||||
ptr = xsv[0];
|
||||
}
|
||||
return ptr;
|
||||
}
|
||||
|
||||
//....Ooooo0ooooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4NeutronGeneralProcess::PreparePhysicsTable(const G4ParticleDefinition& part)
|
||||
{
|
||||
if(1 < verboseLevel) {
|
||||
@@ -211,7 +254,6 @@ void G4NeutronGeneralProcess::BuildPhysicsTable(const G4ParticleDefinition& part
|
||||
fElastic->BuildPhysicsTable(part);
|
||||
fInelastic->BuildPhysicsTable(part);
|
||||
fCapture->BuildPhysicsTable(part);
|
||||
fCaptureXS->BuildPhysicsTable(part);
|
||||
|
||||
if(isMaster) {
|
||||
std::size_t nmat = G4Material::GetNumberOfMaterials();
|
||||
@@ -349,7 +391,7 @@ G4double G4NeutronGeneralProcess::PostStepGetPhysicalInteractionLength(
|
||||
G4VParticleChange* G4NeutronGeneralProcess::PostStepDoIt(const G4Track& track,
|
||||
const G4Step& step)
|
||||
{
|
||||
fSelectedProc = nullptr;
|
||||
fSelectedProc = this;
|
||||
// time limit
|
||||
if(0.0 == fLambda) {
|
||||
theTotalResult->Initialize(track);
|
||||
@@ -365,46 +407,26 @@ G4VParticleChange* G4NeutronGeneralProcess::PostStepDoIt(const G4Track& track,
|
||||
*/
|
||||
if (0 == idxEnergy) {
|
||||
if(q <= GetProbability(1)) {
|
||||
SelectedProcess(step, fElastic, fElasticXS);
|
||||
SelectedProcess(step, fElastic, fXSSElastic);
|
||||
} else if(q <= GetProbability(2)) {
|
||||
SelectedProcess(step, fInelastic, fInelasticXS);
|
||||
SelectedProcess(step, fInelastic, fXSSInelastic);
|
||||
} else {
|
||||
SelectedProcess(step, fCapture, fCaptureXS);
|
||||
SelectedProcess(step, fCapture, fXSSCapture);
|
||||
}
|
||||
} else {
|
||||
if(q <= GetProbability(4)) {
|
||||
SelectedProcess(step, fInelastic, fInelasticXS);
|
||||
SelectedProcess(step, fInelastic, fXSSInelastic);
|
||||
} else {
|
||||
SelectedProcess(step, fElastic, fElasticXS);
|
||||
SelectedProcess(step, fElastic, fXSSElastic);
|
||||
}
|
||||
}
|
||||
const G4Element* elm = fCurrMat->GetElement(0);
|
||||
G4int nelm = (G4int)fCurrMat->GetNumberOfElements();
|
||||
if(1 < nelm) {
|
||||
auto natom = fCurrMat->GetVecNbOfAtomsPerVolume();
|
||||
G4double sig = 0.0;
|
||||
for(G4int i=0; i<nelm; ++i) {
|
||||
sig += natom[i] *
|
||||
fXS->ComputeCrossSectionPerElement(fCurrE, fCurrLogE, fNeutron,
|
||||
fCurrMat->GetElement(i),
|
||||
fCurrMat);
|
||||
fXsec[i] = sig;
|
||||
}
|
||||
sig *= G4UniformRand();
|
||||
for(G4int i=0; i<nelm; ++i) {
|
||||
if(fXsec[i] >= sig) {
|
||||
elm = fCurrMat->GetElement(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// total cross section is needed for selection of an element
|
||||
if(fCurrMat->GetNumberOfElements() > 1) {
|
||||
fCurrentXSS->ComputeCrossSection(track.GetDynamicParticle(), fCurrMat);
|
||||
}
|
||||
fSelectedProc->GetCrossSectionDataStore()->SetForcedElement(elm);
|
||||
const G4Isotope* iso = fXS->SelectIsotope(elm, fCurrE, fCurrLogE);
|
||||
fSelectedProc->GetTargetNucleusPointer()->SetIsotope(iso);
|
||||
/*
|
||||
G4cout << "## neutron E(MeV)=" << fCurrE << " "
|
||||
G4cout << "## neutron E(MeV)=" << fCurrE << " inside " << fCurrMat->GetName()
|
||||
<< fSelectedProc->GetProcessName()
|
||||
<< " on Z=" << iso->GetZ() << " A=" << iso->GetN()
|
||||
<< " time(ns)=" << track.GetGlobalTime()/ns << G4endl;
|
||||
*/
|
||||
// sample secondaries
|
||||
@@ -457,7 +479,7 @@ void G4NeutronGeneralProcess::ProcessDescription(std::ostream& out) const
|
||||
|
||||
const G4String& G4NeutronGeneralProcess::GetSubProcessName() const
|
||||
{
|
||||
return (fSelectedProc) ? fSelectedProc->GetProcessName()
|
||||
return (nullptr != fSelectedProc) ? fSelectedProc->GetProcessName()
|
||||
: G4VProcess::GetProcessName();
|
||||
}
|
||||
|
||||
@@ -465,7 +487,8 @@ const G4String& G4NeutronGeneralProcess::GetSubProcessName() const
|
||||
|
||||
G4int G4NeutronGeneralProcess::GetSubProcessSubType() const
|
||||
{
|
||||
return (fSelectedProc) ? fSelectedProc->GetProcessSubType() : 16;
|
||||
return (nullptr != fSelectedProc) ? fSelectedProc->GetProcessSubType()
|
||||
: fNeutronGeneral;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -6,6 +6,14 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2023-01-25 John Apostolakis (transport-V11-00-11)
|
||||
- Fix unwanted change of default looper parameters.
|
||||
( Reversed inadvertent creation of G4TransportationParameters in
|
||||
calls to G4Transportation constructor.)
|
||||
|
||||
## 2023-01-09 Jonas Hahnfeld
|
||||
- Fix compilation warning about unused variable without `G4VERBOSE`.
|
||||
|
||||
## 2022-11-25 Gabriele Cosmo (transport-V11-00-10)
|
||||
- Removed debug printouts in G4Transportation.
|
||||
|
||||
|
||||
@@ -380,13 +380,13 @@ AlongStepGetPhysicalInteractionLength( const G4Track& track,
|
||||
//
|
||||
fEndGlobalTimeComputed = false;
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
// Check that the integration preserved the energy
|
||||
// - and if not correct this!
|
||||
G4double startEnergy= track.GetKineticEnergy();
|
||||
G4double endEnergy= fTransportEndKineticEnergy;
|
||||
|
||||
G4double absEdiff = std::fabs(startEnergy- endEnergy);
|
||||
#ifdef G4VERBOSE
|
||||
if( (verboseLevel > 1) && ( absEdiff > perThousand * endEnergy) )
|
||||
{
|
||||
ReportInexactEnergy(startEnergy, endEnergy);
|
||||
|
||||
@@ -95,10 +95,10 @@ G4Transportation::G4Transportation( G4int verbosity, const G4String& aName )
|
||||
|
||||
fpLogger = new G4TransportationLogger("G4Transportation", verbosity);
|
||||
|
||||
auto trParams= G4TransportationParameters::Instance();
|
||||
if( G4TransportationParameters::Exists() )
|
||||
{
|
||||
SetThresholdWarningEnergy( trParams->GetWarningEnergy() );
|
||||
auto trParams= G4TransportationParameters::Instance();
|
||||
|
||||
SetThresholdWarningEnergy( trParams->GetWarningEnergy() );
|
||||
SetThresholdImportantEnergy( trParams->GetImportantEnergy() );
|
||||
SetThresholdTrials( trParams->GetNumberOfTrials() );
|
||||
|
||||
@@ -6,6 +6,14 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2023-02-03 Gabriele Cosmo (run-V11-00-12)
|
||||
- Reduced printout in destruction of run-manager (master and workers), to be
|
||||
coherent with verbose level greater than 1.
|
||||
|
||||
## 2022-12-30 Vladimir Ivanchenko
|
||||
- G4PhysicsListHelper - added forgotten process of muon pair production by muons
|
||||
(problem #2523); added general processes
|
||||
|
||||
## 2022-11-18 Gabriele Cosmo (run-V11-00-11)
|
||||
- More compilation warnings fixes for implicit type conversions.
|
||||
|
||||
|
||||
@@ -734,7 +734,7 @@ void G4PhysicsListHelper::ReadInDefaultOrderingParameter()
|
||||
theTable->push_back(tmp);
|
||||
sizeOfTable += 1;
|
||||
|
||||
tmp.processTypeName = "NuclearStopp";
|
||||
tmp.processTypeName = "NuclearStopping";
|
||||
tmp.processType = fElectromagnetic;
|
||||
tmp.processSubType = fNuclearStopping;
|
||||
tmp.ordering[0] = -1;
|
||||
@@ -744,7 +744,7 @@ void G4PhysicsListHelper::ReadInDefaultOrderingParameter()
|
||||
theTable->push_back(tmp);
|
||||
sizeOfTable += 1;
|
||||
|
||||
tmp.processTypeName = "ElectronSuper";
|
||||
tmp.processTypeName = "ElectronGeneral";
|
||||
tmp.processType = fElectromagnetic;
|
||||
tmp.processSubType = fElectronGeneralProcess;
|
||||
tmp.ordering[0] = -1;
|
||||
@@ -814,7 +814,7 @@ void G4PhysicsListHelper::ReadInDefaultOrderingParameter()
|
||||
theTable->push_back(tmp);
|
||||
sizeOfTable += 1;
|
||||
|
||||
tmp.processTypeName = "GammaSuper";
|
||||
tmp.processTypeName = "GammaGeneral";
|
||||
tmp.processType = fElectromagnetic;
|
||||
tmp.processSubType = fGammaGeneralProcess;
|
||||
tmp.ordering[0] = -1;
|
||||
@@ -824,7 +824,7 @@ void G4PhysicsListHelper::ReadInDefaultOrderingParameter()
|
||||
theTable->push_back(tmp);
|
||||
sizeOfTable += 1;
|
||||
|
||||
tmp.processTypeName = "PositronSuper";
|
||||
tmp.processTypeName = "PositronGeneral";
|
||||
tmp.processType = fElectromagnetic;
|
||||
tmp.processSubType = fPositronGeneralProcess;
|
||||
tmp.ordering[0] = 1;
|
||||
@@ -834,6 +834,16 @@ void G4PhysicsListHelper::ReadInDefaultOrderingParameter()
|
||||
theTable->push_back(tmp);
|
||||
sizeOfTable += 1;
|
||||
|
||||
tmp.processTypeName = "MuPairByMuon";
|
||||
tmp.processType = fElectromagnetic;
|
||||
tmp.processSubType = fMuonPairProdByCharged;
|
||||
tmp.ordering[0] = -1;
|
||||
tmp.ordering[1] = -1;
|
||||
tmp.ordering[2] = 10;
|
||||
tmp.isDuplicable = false;
|
||||
theTable->push_back(tmp);
|
||||
sizeOfTable += 1;
|
||||
|
||||
tmp.processTypeName = "Cerenkov";
|
||||
tmp.processType = fElectromagnetic;
|
||||
tmp.processSubType = fCerenkov;
|
||||
@@ -1114,6 +1124,16 @@ void G4PhysicsListHelper::ReadInDefaultOrderingParameter()
|
||||
theTable->push_back(tmp);
|
||||
sizeOfTable += 1;
|
||||
|
||||
tmp.processTypeName = "NeutronGeneral";
|
||||
tmp.processType = fHadronic;
|
||||
tmp.processSubType = fNeutronGeneral;
|
||||
tmp.ordering[0] = -1;
|
||||
tmp.ordering[1] = -1;
|
||||
tmp.ordering[2] = 1000;
|
||||
tmp.isDuplicable = false;
|
||||
theTable->push_back(tmp);
|
||||
sizeOfTable += 1;
|
||||
|
||||
tmp.processTypeName = "HadInelastic";
|
||||
tmp.processType = fHadronic;
|
||||
tmp.processSubType = fHadronInelastic;
|
||||
|
||||
@@ -202,7 +202,7 @@ G4RunManager::~G4RunManager()
|
||||
// set the application state to the quite state
|
||||
if(pStateManager->GetCurrentState() != G4State_Quit)
|
||||
{
|
||||
if(verboseLevel > 0)
|
||||
if(verboseLevel > 1)
|
||||
G4cout << "G4 kernel has come to Quit state." << G4endl;
|
||||
pStateManager->SetNewState(G4State_Quit);
|
||||
}
|
||||
|
||||
@@ -356,7 +356,7 @@ G4RunManagerKernel::~G4RunManagerKernel()
|
||||
// set the application state to the quite state
|
||||
if(pStateManager->GetCurrentState() != G4State_Quit)
|
||||
{
|
||||
if(verboseLevel > 0)
|
||||
if(verboseLevel > 1)
|
||||
G4cout << "G4 kernel has come to Quit state." << G4endl;
|
||||
pStateManager->SetNewState(G4State_Quit);
|
||||
}
|
||||
@@ -410,12 +410,11 @@ G4RunManagerKernel::~G4RunManagerKernel()
|
||||
}
|
||||
|
||||
G4UImanager* pUImanager = G4UImanager::GetUIpointer();
|
||||
if((runManagerKernelType == workerRMK) && (verboseLevel > 0))
|
||||
if((runManagerKernelType == workerRMK) && (verboseLevel > 1))
|
||||
{
|
||||
G4cout << "Thread-local UImanager is to be deleted." << G4endl
|
||||
<< "There should not be any thread-local G4cout/G4cerr hereafter."
|
||||
<< G4endl;
|
||||
verboseLevel = 0;
|
||||
}
|
||||
delete pUImanager;
|
||||
if(verboseLevel > 1)
|
||||
@@ -425,7 +424,7 @@ G4RunManagerKernel::~G4RunManagerKernel()
|
||||
if(verboseLevel > 1)
|
||||
G4cout << "StateManager deleted." << G4endl;
|
||||
delete defaultExceptionHandler;
|
||||
if(verboseLevel > 0)
|
||||
if(verboseLevel > 1)
|
||||
G4cout << "RunManagerKernel is deleted. Good bye :)" << G4endl;
|
||||
fRunManagerKernel = nullptr;
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ G4WorkerRunManager::~G4WorkerRunManager()
|
||||
userWorkerThreadInitialization = nullptr;
|
||||
userActionInitialization = nullptr;
|
||||
physicsList = nullptr;
|
||||
if(verboseLevel > 0)
|
||||
if(verboseLevel > 1)
|
||||
G4cout << "Destroying WorkerRunManager (" << this << ")" << G4endl;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,12 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2022-12-13 John Allison (modeling-V11-00-15)
|
||||
- G4TextModel: Fix transform.
|
||||
- The rotation part of the transform was being ignored. This impacted
|
||||
the implementation of /vis/scene/add/localAxes.
|
||||
- G4AxesModel: Tidied.
|
||||
|
||||
## 2022-11-25 Gabriele Cosmo (modeling-V11-00-14)
|
||||
- Fixed compilation warnings for implicit type conversions on macOS/XCode 14.1.
|
||||
|
||||
|
||||
@@ -124,9 +124,6 @@ void G4AxesModel::Construct
|
||||
}
|
||||
|
||||
G4String annotation = G4BestUnit(length,"Length");
|
||||
|
||||
G4Text* text = 0;
|
||||
G4VisAttributes* va = 0;
|
||||
G4int lineSegmentsPerCircle = 6;
|
||||
|
||||
G4Colour xColour(colour);
|
||||
@@ -136,22 +133,19 @@ void G4AxesModel::Construct
|
||||
xColour, "x-axis: " + description,
|
||||
lineSegmentsPerCircle, fTransform);
|
||||
if (withAnnotation) {
|
||||
text = new G4Text("x",G4Point3D(x0+1.05*length, y0, z0));
|
||||
text->SetScreenSize(textSize);
|
||||
text->SetOffset(0.5*textSize,0.5*textSize);
|
||||
text->SetLayout(G4Text::centre);
|
||||
va = new G4VisAttributes(xColour);
|
||||
text->SetVisAttributes(va);
|
||||
fXLabelModel = new G4TextModel(*text,fTransform);
|
||||
delete text;
|
||||
text = new G4Text(annotation,G4Point3D(x0+0.8*length, y0, z0));
|
||||
text->SetScreenSize(textSize);
|
||||
text->SetOffset(-1.5*textSize,-1.5*textSize);
|
||||
text->SetLayout(G4Text::centre);
|
||||
va = new G4VisAttributes(xColour);
|
||||
text->SetVisAttributes(va);
|
||||
fXAnnotationModel = new G4TextModel(*text,fTransform);
|
||||
delete text;
|
||||
G4VisAttributes va(xColour);
|
||||
G4Text lmtext("x",G4Point3D(x0+1.05*length,y0,z0));
|
||||
lmtext.SetScreenSize(textSize);
|
||||
lmtext.SetOffset(0.5*textSize,0.5*textSize);
|
||||
lmtext.SetLayout(G4Text::centre);
|
||||
lmtext.SetVisAttributes(va);
|
||||
fXLabelModel = new G4TextModel(lmtext,fTransform);
|
||||
G4Text amtext(annotation,G4Point3D(x0+0.8*length,y0,z0));
|
||||
amtext.SetScreenSize(textSize);
|
||||
amtext.SetOffset(-1.5*textSize,-1.5*textSize);
|
||||
amtext.SetLayout(G4Text::centre);
|
||||
amtext.SetVisAttributes(va);
|
||||
fXAnnotationModel = new G4TextModel(amtext,fTransform);
|
||||
}
|
||||
|
||||
G4Colour yColour(colour);
|
||||
@@ -161,22 +155,19 @@ void G4AxesModel::Construct
|
||||
yColour, "y-axis: " + description,
|
||||
lineSegmentsPerCircle, fTransform);
|
||||
if (withAnnotation) {
|
||||
text = new G4Text("y",G4Point3D(x0, y0+1.05*length, z0));
|
||||
text->SetScreenSize(textSize);
|
||||
text->SetOffset(0.5*textSize,0.5*textSize);
|
||||
text->SetLayout(G4Text::centre);
|
||||
va = new G4VisAttributes(yColour);
|
||||
text->SetVisAttributes(va);
|
||||
fYLabelModel = new G4TextModel(*text,fTransform);
|
||||
delete text;
|
||||
text = new G4Text(annotation,G4Point3D(x0, y0+0.8*length, z0));
|
||||
text->SetScreenSize(textSize);
|
||||
text->SetOffset(-1.5*textSize,-1.5*textSize);
|
||||
text->SetLayout(G4Text::centre);
|
||||
va = new G4VisAttributes(yColour);
|
||||
text->SetVisAttributes(va);
|
||||
fYAnnotationModel = new G4TextModel(*text,fTransform);
|
||||
delete text;
|
||||
G4VisAttributes va(yColour);
|
||||
G4Text lmtext("y",G4Point3D(x0,y0+1.05*length,z0));
|
||||
lmtext.SetScreenSize(textSize);
|
||||
lmtext.SetOffset(0.5*textSize,0.5*textSize);
|
||||
lmtext.SetLayout(G4Text::centre);
|
||||
lmtext.SetVisAttributes(va);
|
||||
fYLabelModel = new G4TextModel(lmtext,fTransform);
|
||||
G4Text amtext(annotation,G4Point3D(x0,y0+0.8*length,z0));
|
||||
amtext.SetScreenSize(textSize);
|
||||
amtext.SetOffset(-1.5*textSize,-1.5*textSize);
|
||||
amtext.SetLayout(G4Text::centre);
|
||||
amtext.SetVisAttributes(va);
|
||||
fYAnnotationModel = new G4TextModel(amtext,fTransform);
|
||||
}
|
||||
|
||||
G4Colour zColour(colour);
|
||||
@@ -186,22 +177,19 @@ void G4AxesModel::Construct
|
||||
zColour, "z-axis: " + description,
|
||||
lineSegmentsPerCircle, fTransform);
|
||||
if (withAnnotation) {
|
||||
text = new G4Text("z",G4Point3D(x0, y0, z0+1.05*length));
|
||||
text->SetScreenSize(textSize);
|
||||
text->SetOffset(0.5*textSize,0.5*textSize);
|
||||
text->SetLayout(G4Text::centre);
|
||||
va = new G4VisAttributes(zColour);
|
||||
text->SetVisAttributes(va);
|
||||
fZLabelModel = new G4TextModel(*text,fTransform);
|
||||
delete text;
|
||||
text = new G4Text(annotation,G4Point3D(x0, y0, z0+0.8*length));
|
||||
text->SetScreenSize(textSize);
|
||||
text->SetOffset(-1.5*textSize,-1.5*textSize);
|
||||
text->SetLayout(G4Text::centre);
|
||||
va = new G4VisAttributes(zColour);
|
||||
text->SetVisAttributes(va);
|
||||
fZAnnotationModel = new G4TextModel(*text,fTransform);
|
||||
delete text;
|
||||
G4VisAttributes va(zColour);
|
||||
G4Text lmtext("z",G4Point3D(x0,y0,z0+1.05*length));
|
||||
lmtext.SetScreenSize(textSize);
|
||||
lmtext.SetOffset(0.5*textSize,0.5*textSize);
|
||||
lmtext.SetLayout(G4Text::centre);
|
||||
lmtext.SetVisAttributes(va);
|
||||
fZLabelModel = new G4TextModel(lmtext,fTransform);
|
||||
G4Text amtext(annotation,G4Point3D(x0,y0,z0+0.8*length));
|
||||
amtext.SetScreenSize(textSize);
|
||||
amtext.SetOffset(-1.5*textSize,-1.5*textSize);
|
||||
amtext.SetLayout(G4Text::centre);
|
||||
amtext.SetVisAttributes(va);
|
||||
fZAnnotationModel = new G4TextModel(amtext,fTransform);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ G4TextModel::G4TextModel (const G4Text& g4Text, const G4Transform3D& transform)
|
||||
fGlobalTag = oss.str();
|
||||
fGlobalDescription = fGlobalTag;
|
||||
|
||||
fG4Text.SetPosition(fG4Text.GetPosition()+transform.getTranslation());
|
||||
fG4Text.SetPosition(fG4Text.GetPosition().transform(transform));
|
||||
}
|
||||
|
||||
void G4TextModel::DescribeYourselfTo (G4VGraphicsScene& sceneHandler) {
|
||||
|
||||
Reference in New Issue
Block a user