Import Geant4 11.0.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2021-06-25 16:12:29 +02:00
parent c968e26a39
commit 6399a014b6
4200 changed files with 207479 additions and 237366 deletions
+2 -8
View File
@@ -1,12 +1,6 @@
#------------------------------------------------------------------------------
# CMakeLists.txt
# Module : G4event
# Package: Geant4.src.G4event
#------------------------------------------------------------------------------
# - G4event category build
# Add allocation export symbol for the event category
# Add (private) allocation export symbol
add_definitions(-DG4EVENT_ALLOC_EXPORT)
geant4_global_library_target(COMPONENTS sources.cmake)
+13 -1
View File
@@ -16,10 +16,22 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
June 7th, 2021 M. Asai (event-V10-06-10)
June 7th, 2021 M. Asai (event-V10-07-03)
- Fix the default value of /gps/ang/maxphi command. Addressing to
the bug report 2383.
May 18th, 2021 V.Ivanchenko (event-V10-07-02)
- G4AdjointPrimaryGenerator, G4SPSAngDistribution, G4SPSEneDistribution,
G4SPSRandomGenerator - use G4PhysicsFreeVector instead of
G4PhysicsOrderedFreeVector
April 1st, 2021 B. Morgan (event-V10-07-01)
- Migrate build to modular CMake API
March 31st, 2021 G.Cosmo (event-V10-07-00)
- Use existing facility to find physical volume in store, rather than looping
through in G4SPSPosDistribution::ConfineSourceToVolume().
November 20th, 2020 B.Morgan (event-V10-06-09)
- Bugfix of build to ensure SmartStack preprocessor define is propagated.
No changes to code.
@@ -47,7 +47,7 @@
#include "globals.hh"
#include "G4ThreeVector.hh"
#include"G4PhysicsOrderedFreeVector.hh"
#include"G4PhysicsFreeVector.hh"
class G4AdjointPosOnPhysVolGenerator;
class G4Event;
@@ -98,7 +98,7 @@ class G4AdjointPrimaryGenerator
G4double radius_spherical_source = 0.0;
G4ThreeVector center_spherical_source;
G4Navigator* fLinearNavigator = nullptr;
G4PhysicsOrderedFreeVector* theAccumulatedDepthVector = nullptr;
G4PhysicsFreeVector* theAccumulatedDepthVector = nullptr;
};
#endif
+6 -6
View File
@@ -53,7 +53,7 @@
#ifndef G4SPSAngDistribution_hh
#define G4SPSAngDistribution_hh 1
#include "G4PhysicsOrderedFreeVector.hh"
#include "G4PhysicsFreeVector.hh"
#include "G4DataInterpolation.hh"
#include "G4ParticleMomentum.hh"
@@ -184,10 +184,10 @@ class G4SPSAngDistribution
G4double Theta, Phi; // Store these for use with DEBUG
G4ThreeVector FocusPoint ; // the focusing point in mother coordinates
G4bool IPDFThetaExist, IPDFPhiExist; // tell whether IPDF histos exist
G4PhysicsOrderedFreeVector UDefThetaH; // Theta histo data
G4PhysicsOrderedFreeVector IPDFThetaH; //Cumulative Theta histogram.
G4PhysicsOrderedFreeVector UDefPhiH; // Phi histo bins
G4PhysicsOrderedFreeVector IPDFPhiH; // Cumulative phi histogram.
G4PhysicsFreeVector UDefThetaH; // Theta histo data
G4PhysicsFreeVector IPDFThetaH; //Cumulative Theta histogram.
G4PhysicsFreeVector UDefPhiH; // Phi histo bins
G4PhysicsFreeVector IPDFPhiH; // Cumulative phi histogram.
G4String UserDistType; //String to hold user distributions
G4bool UserWRTSurface; // G4bool to tell whether user wants distribution wrt
// surface normals or co-ordinate system
@@ -200,7 +200,7 @@ class G4SPSAngDistribution
G4int verbosityLevel; // Verbosity
G4PhysicsOrderedFreeVector ZeroPhysVector; // for re-set only
G4PhysicsFreeVector ZeroPhysVector; // for re-set only
G4Mutex mutex; // Protect access to shared resources
};
+9 -9
View File
@@ -57,7 +57,7 @@
#ifndef G4SPSEneDistribution_hh
#define G4SPSEneDistribution_hh 1
#include "G4PhysicsOrderedFreeVector.hh"
#include "G4PhysicsFreeVector.hh"
#include "G4ParticleMomentum.hh"
#include "G4ParticleDefinition.hh"
#include "G4DataInterpolation.hh"
@@ -182,9 +182,9 @@ class G4SPSEneDistribution
G4double Getcept() const;
G4PhysicsOrderedFreeVector GetUserDefinedEnergyHisto();
G4PhysicsFreeVector GetUserDefinedEnergyHisto();
G4PhysicsOrderedFreeVector GetArbEnergyHisto();
G4PhysicsFreeVector GetArbEnergyHisto();
G4double GenerateOne(G4ParticleDefinition*);
// Generate one random energy for the specified particle
@@ -246,12 +246,12 @@ class G4SPSEneDistribution
G4bool EnergySpec = true; // energy spectra, false - momentum spectra
G4bool DiffSpec = true; // differential spec, false integral spec
G4PhysicsOrderedFreeVector UDefEnergyH; // energy hist data
G4PhysicsOrderedFreeVector IPDFEnergyH;
G4PhysicsFreeVector UDefEnergyH; // energy hist data
G4PhysicsFreeVector IPDFEnergyH;
G4bool IPDFEnergyExist = false, IPDFArbExist = false, Epnflag = false;
G4PhysicsOrderedFreeVector ArbEnergyH; // Arb x,y histogram
G4PhysicsOrderedFreeVector IPDFArbEnergyH; // IPDF for Arb
G4PhysicsOrderedFreeVector EpnEnergyH;
G4PhysicsFreeVector ArbEnergyH; // Arb x,y histogram
G4PhysicsFreeVector IPDFArbEnergyH; // IPDF for Arb
G4PhysicsFreeVector EpnEnergyH;
G4double CDGhist[3]; // cumulative histo for cdg
std::vector<G4double>* BBHist = nullptr;
@@ -287,7 +287,7 @@ class G4SPSEneDistribution
G4int verbosityLevel;
G4PhysicsOrderedFreeVector ZeroPhysVector; // for re-set only
G4PhysicsFreeVector ZeroPhysVector; // for re-set only
std::vector<G4DataInterpolation*> SplineInt;
// Holds Spline stuff required for sampling
+17 -17
View File
@@ -51,7 +51,7 @@
#ifndef G4SPSRandomGenerator_hh
#define G4SPSRandomGenerator_hh 1
#include "G4PhysicsOrderedFreeVector.hh"
#include "G4PhysicsFreeVector.hh"
#include "G4DataInterpolation.hh"
#include "G4ThreeVector.hh"
#include "G4Threading.hh"
@@ -154,36 +154,36 @@ class G4SPSRandomGenerator
//
G4Cache<a_check> local_IPDFXBias;
G4bool XBias, IPDFXBias;
G4PhysicsOrderedFreeVector XBiasH;
G4PhysicsOrderedFreeVector IPDFXBiasH;
G4PhysicsFreeVector XBiasH;
G4PhysicsFreeVector IPDFXBiasH;
G4Cache<a_check> local_IPDFYBias;
G4bool YBias, IPDFYBias;
G4PhysicsOrderedFreeVector YBiasH;
G4PhysicsOrderedFreeVector IPDFYBiasH;
G4PhysicsFreeVector YBiasH;
G4PhysicsFreeVector IPDFYBiasH;
G4Cache<a_check> local_IPDFZBias;
G4bool ZBias, IPDFZBias;
G4PhysicsOrderedFreeVector ZBiasH;
G4PhysicsOrderedFreeVector IPDFZBiasH;
G4PhysicsFreeVector ZBiasH;
G4PhysicsFreeVector IPDFZBiasH;
G4Cache<a_check> local_IPDFThetaBias;
G4bool ThetaBias, IPDFThetaBias;
G4PhysicsOrderedFreeVector ThetaBiasH;
G4PhysicsOrderedFreeVector IPDFThetaBiasH;
G4PhysicsFreeVector ThetaBiasH;
G4PhysicsFreeVector IPDFThetaBiasH;
G4Cache<a_check> local_IPDFPhiBias;
G4bool PhiBias, IPDFPhiBias;
G4PhysicsOrderedFreeVector PhiBiasH;
G4PhysicsOrderedFreeVector IPDFPhiBiasH;
G4PhysicsFreeVector PhiBiasH;
G4PhysicsFreeVector IPDFPhiBiasH;
G4Cache<a_check> local_IPDFEnergyBias;
G4bool EnergyBias, IPDFEnergyBias;
G4PhysicsOrderedFreeVector EnergyBiasH;
G4PhysicsOrderedFreeVector IPDFEnergyBiasH;
G4PhysicsFreeVector EnergyBiasH;
G4PhysicsFreeVector IPDFEnergyBiasH;
G4Cache<a_check> local_IPDFPosThetaBias;
G4bool PosThetaBias, IPDFPosThetaBias;
G4PhysicsOrderedFreeVector PosThetaBiasH;
G4PhysicsOrderedFreeVector IPDFPosThetaBiasH;
G4PhysicsFreeVector PosThetaBiasH;
G4PhysicsFreeVector IPDFPosThetaBiasH;
G4Cache<a_check> local_IPDFPosPhiBias;
G4bool PosPhiBias, IPDFPosPhiBias;
G4PhysicsOrderedFreeVector PosPhiBiasH;
G4PhysicsOrderedFreeVector IPDFPosPhiBiasH;
G4PhysicsFreeVector PosPhiBiasH;
G4PhysicsFreeVector IPDFPosPhiBiasH;
struct bweights_t
{
+24 -47
View File
@@ -1,13 +1,8 @@
#------------------------------------------------------------------------------
# Module : G4event
# Package: Geant4.src.G4event
#------------------------------------------------------------------------------
# - G4event module build definition
#
# Define the Geant4 Module.
#
geant4_define_module(NAME G4event
HEADERS
geant4_add_module(G4event
PUBLIC_HEADERS
G4AdjointPosOnPhysVolGenerator.hh
G4AdjointPrimaryGenerator.hh
G4AdjointStackingAction.hh
@@ -72,48 +67,30 @@ geant4_define_module(NAME G4event
G4UserEventAction.cc
G4MultiEventAction.cc
G4UserStackingAction.cc
G4VPrimaryGenerator.cc
GRANULAR_DEPENDENCIES
G4baryons
G4bosons
G4detector
G4digits
G4emutils
G4geombias
G4geometrymng
G4globman
G4graphics_reps
G4hepnumerics
G4hits
G4intercoms
G4ions
G4leptons
G4materials
G4mesons
G4navigation
G4partman
G4procman
G4track
G4tracking
G4volumes
GLOBAL_DEPENDENCIES
G4digits_hits
G4geometry
G4global
G4graphics_reps
G4intercoms
G4materials
G4particles
G4processes
G4track
G4tracking
LINK_LIBRARIES
${timemory_LIBRARIES}
)
G4VPrimaryGenerator.cc)
# List any source specific properties here
# Enable smart stack
if(GEANT4_USE_SMARTSTACK)
geant4_module_compile_definitions(G4event PUBLIC G4_USESMARTSTACK)
endif()
geant4_module_link_libraries(G4event
PUBLIC
G4track
G4tracking
G4digits
G4hits
G4partman
G4geometrymng
G4navigation
G4intercoms
G4hepnumerics
G4globman
${timemory_LIBRARIES}
PRIVATE
G4procman
G4bosons
G4detector
G4graphics_reps
G4materials
G4heprandom)
@@ -175,7 +175,7 @@ ComputeAccumulatedDepthVectorAlongBackRay(G4ThreeVector glob_pos,
G4double newStep = fLinearNavigator->ComputeStep(position,direction,1.e50,
safety);
if (theAccumulatedDepthVector != nullptr) {delete theAccumulatedDepthVector;}
theAccumulatedDepthVector = new G4PhysicsOrderedFreeVector();
theAccumulatedDepthVector = new G4PhysicsFreeVector();
G4double acc_depth=0.;
G4double acc_length=0.;
@@ -427,6 +427,7 @@ G4GeneralParticleSourceMessenger(G4GeneralParticleSource* fPtclGun)
minphiCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/ang/minphi",this);
minphiCmd1->SetGuidance("Set minimum phi");
minphiCmd1->SetParameterName("MinPhi",true,false);
minphiCmd1->SetDefaultValue(0.);
minphiCmd1->SetDefaultUnit("rad");
// minphiCmd1->SetUnitCandidates("rad deg");
+2 -2
View File
@@ -285,13 +285,13 @@ G4double G4SPSEneDistribution::Getcept() const
return threadLocalData.Get().cept;
}
G4PhysicsOrderedFreeVector G4SPSEneDistribution::GetUserDefinedEnergyHisto()
G4PhysicsFreeVector G4SPSEneDistribution::GetUserDefinedEnergyHisto()
{
G4AutoLock l(&mutex);
return UDefEnergyH;
}
G4PhysicsOrderedFreeVector G4SPSEneDistribution::GetArbEnergyHisto()
G4PhysicsFreeVector G4SPSEneDistribution::GetArbEnergyHisto()
{
G4AutoLock l(&mutex);
return ArbEnergyH;
+6 -19
View File
@@ -276,28 +276,14 @@ void G4SPSPosDistribution::ConfineSourceToVolume(const G4String& Vname)
}
G4VPhysicalVolume* tempPV = nullptr;
G4PhysicalVolumeStore* PVStore = nullptr;
G4String theRequiredVolumeName = VolName;
PVStore = G4PhysicalVolumeStore::GetInstance();
G4int i = 0;
G4bool found = false;
G4PhysicalVolumeStore* PVStore = G4PhysicalVolumeStore::GetInstance();
if(verbosityLevel == 2) { G4cout << PVStore->size() << G4endl; }
while (!found && i<G4int(PVStore->size()))
{
tempPV = (*PVStore)[i];
found = tempPV->GetName() == theRequiredVolumeName;
if(verbosityLevel == 2)
{
G4cout << i << " " << " " << tempPV->GetName()
<< " " << theRequiredVolumeName << " " << found << G4endl;
}
if (!found) { ++i; }
}
tempPV = PVStore->GetVolume(VolName);
// found = true then the volume exists else it doesn't
// the volume exists else it doesn't
//
if(found == true)
if (tempPV != nullptr)
{
if(verbosityLevel >= 1)
{
@@ -307,7 +293,8 @@ void G4SPSPosDistribution::ConfineSourceToVolume(const G4String& Vname)
}
else
{
G4cout << " **** Error: Volume <" << VolName << "> does not exist **** " << G4endl;
G4cout << " **** Error: Volume <" << VolName
<< "> does not exist **** " << G4endl;
G4cout << " Ignoring confine condition" << G4endl;
Confine = false;
VolName = "NULL";
+1 -1
View File
@@ -191,7 +191,7 @@ void G4SPSRandomGenerator::SetVerbosity(G4int a)
namespace
{
G4PhysicsOrderedFreeVector ZeroPhysVector; // for re-set only
G4PhysicsFreeVector ZeroPhysVector; // for re-set only
}
void G4SPSRandomGenerator::ReSetHist(const G4String& atype)