Import Geant4 11.3.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2024-06-28 13:08:51 +02:00
parent f7b23877ed
commit e58e650b32
5232 changed files with 239416 additions and 244360 deletions
@@ -28,48 +28,45 @@
/// \brief Implementation of the Par02PhysicsList class
#include "Par02PhysicsList.hh"
#include "globals.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
#include "G4ProcessVector.hh"
#include "G4ParticleTypes.hh"
#include "G4ParticleTable.hh"
#include "G4BaryonConstructor.hh"
#include "G4ComptonScattering.hh"
#include "G4Decay.hh"
#include "G4FastSimulationManagerProcess.hh"
#include "G4GammaConversion.hh"
#include "G4IonConstructor.hh"
#include "G4LeptonConstructor.hh"
#include "G4Material.hh"
#include "G4MaterialTable.hh"
#include "G4ios.hh"
#include "G4SystemOfUnits.hh"
#include <iomanip>
#include "G4FastSimulationManagerProcess.hh"
#include "G4Decay.hh"
#include "G4LeptonConstructor.hh"
#include "G4MesonConstructor.hh"
#include "G4BaryonConstructor.hh"
#include "G4IonConstructor.hh"
#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4eMultipleScattering.hh"
#include "G4MuMultipleScattering.hh"
#include "G4hMultipleScattering.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"
#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuIonisation.hh"
#include "G4MuMultipleScattering.hh"
#include "G4MuPairProduction.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4ParticleTypes.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4ProcessManager.hh"
#include "G4ProcessVector.hh"
#include "G4SystemOfUnits.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eIonisation.hh"
#include "G4eMultipleScattering.hh"
#include "G4eplusAnnihilation.hh"
#include "G4hIonisation.hh"
#include "G4hMultipleScattering.hh"
#include "G4ios.hh"
#include "globals.hh"
#include <iomanip>
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Par02PhysicsList::Par02PhysicsList() : G4VUserPhysicsList() {
SetVerboseLevel( 1 );
defaultCutValue = 0.1*m;
Par02PhysicsList::Par02PhysicsList() : G4VUserPhysicsList()
{
SetVerboseLevel(1);
defaultCutValue = 0.1 * m;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -78,7 +75,8 @@ Par02PhysicsList::~Par02PhysicsList() = default;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Par02PhysicsList::ConstructParticle() {
void Par02PhysicsList::ConstructParticle()
{
// In this method, static member functions should be called for all particles
// which you want to use.
// This ensures that objects of these particle types will be created in the program.
@@ -91,7 +89,8 @@ void Par02PhysicsList::ConstructParticle() {
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Par02PhysicsList::ConstructBosons() {
void Par02PhysicsList::ConstructBosons()
{
G4Geantino::GeantinoDefinition();
G4ChargedGeantino::ChargedGeantinoDefinition();
G4Gamma::GammaDefinition();
@@ -100,35 +99,40 @@ void Par02PhysicsList::ConstructBosons() {
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Par02PhysicsList::ConstructLeptons() {
void Par02PhysicsList::ConstructLeptons()
{
G4LeptonConstructor pConstructor;
pConstructor.ConstructParticle();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Par02PhysicsList::ConstructMesons() {
void Par02PhysicsList::ConstructMesons()
{
G4MesonConstructor pConstructor;
pConstructor.ConstructParticle();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Par02PhysicsList::ConstructBaryons() {
G4BaryonConstructor pConstructor;
void Par02PhysicsList::ConstructBaryons()
{
G4BaryonConstructor pConstructor;
pConstructor.ConstructParticle();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Par02PhysicsList::ConstructIons() {
void Par02PhysicsList::ConstructIons()
{
G4IonConstructor pConstructor;
pConstructor.ConstructParticle();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Par02PhysicsList::ConstructProcess() {
void Par02PhysicsList::ConstructProcess()
{
AddTransportation();
AddParameterisation();
ConstructGeneral();
@@ -136,57 +140,59 @@ void Par02PhysicsList::ConstructProcess() {
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Par02PhysicsList::AddTransportation() {
//UseCoupledTransportation();
void Par02PhysicsList::AddTransportation()
{
// UseCoupledTransportation();
G4VUserPhysicsList::AddTransportation();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Par02PhysicsList::ConstructGeneral() {
auto theDecayProcess = new G4Decay();
auto particleIterator=GetParticleIterator();
void Par02PhysicsList::ConstructGeneral()
{
auto theDecayProcess = new G4Decay();
auto particleIterator = GetParticleIterator();
particleIterator->reset();
while ( (*particleIterator)() ) {
while ((*particleIterator)()) {
G4ParticleDefinition* particle = particleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
if ( theDecayProcess->IsApplicable( *particle ) ) {
pmanager->AddProcess( theDecayProcess );
if (theDecayProcess->IsApplicable(*particle)) {
pmanager->AddProcess(theDecayProcess);
// set ordering for PostStepDoIt and AtRestDoIt
pmanager->SetProcessOrdering( theDecayProcess, idxPostStep );
pmanager->SetProcessOrdering( theDecayProcess, idxAtRest );
pmanager->SetProcessOrdering(theDecayProcess, idxPostStep);
pmanager->SetProcessOrdering(theDecayProcess, idxAtRest);
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Par02PhysicsList::AddParameterisation() {
G4FastSimulationManagerProcess* fastSimProcess =
new G4FastSimulationManagerProcess( "G4FSMP" );
void Par02PhysicsList::AddParameterisation()
{
G4FastSimulationManagerProcess* fastSimProcess = new G4FastSimulationManagerProcess("G4FSMP");
// Registers the fastSimProcess with all the particles as a discrete and
// continuous process (this works in all cases; in the case that parallel
// geometries are not used, as in this example, it would be enough to
// add it as a discrete process).
auto particleIterator=GetParticleIterator();
auto particleIterator = GetParticleIterator();
particleIterator->reset();
while ( (*particleIterator)() ) {
while ((*particleIterator)()) {
G4ParticleDefinition* particle = particleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
//pmanager->AddDiscreteProcess( fastSimProcess ); // No parallel geometry
pmanager->AddProcess( fastSimProcess, -1, 0, 0 ); // General
// pmanager->AddDiscreteProcess( fastSimProcess ); // No parallel geometry
pmanager->AddProcess(fastSimProcess, -1, 0, 0); // General
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Par02PhysicsList::SetCuts() {
if ( verboseLevel > 1 ) {
void Par02PhysicsList::SetCuts()
{
if (verboseLevel > 1) {
G4cout << "Par02PhysicsList::SetCuts:";
}
SetCutsWithDefault();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......