Import Geant4 11.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2024-12-06 11:11:40 +01:00
parent e58e650b32
commit 32390e802b
1984 changed files with 98713 additions and 83996 deletions
@@ -0,0 +1,84 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// --------------------------------------------------------------------------
//
// GEANT4 source file
//
// File name: G4ChargedUnknownPhysics.cc
//
// Author: A.Ribon
//
// Creation date: August 2024
//
// Description: This physics list constructor class is similar to
// G4UnknownDecayPhysics (which assigns the decay process
// (and transportation as well) to unknown particles),
// for charged unknown particles: it assigns the two EM
// processes of ionisation and multiple scattering
// (and transportation as well).
//
// Modifications:
//
// --------------------------------------------------------------------------
//
#include "G4ChargedUnknownPhysics.hh"
#include "G4ChargedUnknownParticle.hh"
#include "G4UnknownParticle.hh"
#include "G4ProcessManager.hh"
#include "G4DynamicParticleMSC.hh"
#include "G4DynamicParticleIonisation.hh"
// factory
#include "G4PhysicsConstructorFactory.hh"
//
G4_DECLARE_PHYSCONSTR_FACTORY( G4ChargedUnknownPhysics );
G4ChargedUnknownPhysics::G4ChargedUnknownPhysics( G4int ver )
: G4VPhysicsConstructor( "ChargedUnknownPhysics" ), verbose( ver ) {}
G4ChargedUnknownPhysics::G4ChargedUnknownPhysics( const G4String& name, G4int ver )
: G4VPhysicsConstructor( name ), verbose( ver ) {}
void G4ChargedUnknownPhysics::ConstructParticle() {
// Although this class deals only with 'chargedunknown' particles,
// it is more consistent to define also 'unknown' particles.
G4ChargedUnknownParticle::ChargedUnknownParticleDefinition();
G4UnknownParticle::UnknownParticleDefinition();
}
void G4ChargedUnknownPhysics::ConstructProcess() {
G4ProcessManager* pmanager = G4ChargedUnknownParticle::Definition()->GetProcessManager();
pmanager->AddProcess( new G4DynamicParticleMSC, -1, 1, -1 );
pmanager->AddProcess( new G4DynamicParticleIonisation, -1, 2, 2 );
if ( verbose > 1 ) {
G4cout << "### Added ionization and multiple scattering for chargedunknown" << G4endl;
}
}
@@ -55,17 +55,23 @@ void G4ChemDissociationChannels::ConstructMolecule()
G4Electron_aq::Definition();
G4H2O2::Definition();
G4H2::Definition();
auto G4OHm = new G4MoleculeDefinition("OH",/*mass*/ 17.00734 * g / Avogadro * c_squared,
2.8e-9 * (m * m / s), -1,
5, 0.958 * angstrom, // radius
2 // number of atoms
);
auto molTable = G4MoleculeTable::Instance();
molTable->CreateConfiguration("H3Op", G4H3O::Definition());
G4MolecularConfiguration* OHm =
molTable->CreateConfiguration("OHm", // just a tag to store and retrieve
// from G4MoleculeTable
G4OH::Definition(),
G4OHm,
-1, // charge
5.0e-9 * (m2 / s));
OHm->SetMass(17.0079 * g / Avogadro * c_squared);
molTable->CreateConfiguration("OH", G4OH::Definition());
molTable->CreateConfiguration("°OH", G4OH::Definition());
molTable->CreateConfiguration("e_aq", G4Electron_aq::Definition());
molTable->CreateConfiguration("H", G4Hydrogen::Definition());
molTable->CreateConfiguration("H2", G4H2::Definition());
@@ -79,7 +85,7 @@ void G4ChemDissociationChannels::ConstructDissociationChannels()
//-----------------------------------
// Get the molecular configuration
auto molTable = G4MoleculeTable::Instance();
G4MolecularConfiguration* OH = molTable->GetConfiguration("OH");
G4MolecularConfiguration* OH = molTable->GetConfiguration("°OH");
G4MolecularConfiguration* OHm = molTable->GetConfiguration("OHm");
G4MolecularConfiguration* e_aq = molTable->GetConfiguration("e_aq");
G4MolecularConfiguration* H2 = molTable->GetConfiguration("H2");
@@ -72,6 +72,18 @@ void G4ChemDissociationChannels_option1::ConstructMolecule()
G4Oxygen::Definition();
G4O3::Definition();
auto G4OHm = new G4MoleculeDefinition("OH",/*mass*/ 17.00734 * g / Avogadro * c_squared,
2.8e-9 * (m * m / s), -1,
5, 0.958 * angstrom, // radius
2 // number of atoms
);
auto G4HO2m = new G4MoleculeDefinition("HO_2", 33.0034 * g / Avogadro * c_squared,
2.3e-9 * (m * m / s), -1, 0,
2.1 * angstrom, 3);
auto G4Om = new G4MoleculeDefinition("O", 15.99773 * g / Avogadro * c_squared,
2.0e-9 * (m * m / s), 0, 0,
2.0 * angstrom, 1);
//____________________________________________________________________________
auto molTable = G4MoleculeTable::Instance();
molTable->CreateConfiguration("H3Op", G4H3O::Definition());
@@ -79,14 +91,14 @@ void G4ChemDissociationChannels_option1::ConstructMolecule()
* (m2 / s));
molTable->GetConfiguration("H3Op")->SetVanDerVaalsRadius(0.25 * nm);
molTable->CreateConfiguration("OH", G4OH::Definition());
molTable->GetConfiguration("OH")->SetDiffusionCoefficient(2.2e-9 * (m2 / s));
molTable->GetConfiguration("OH")->SetVanDerVaalsRadius(0.22 * nm);
molTable->CreateConfiguration("°OH", G4OH::Definition());
molTable->GetConfiguration("°OH")->SetDiffusionCoefficient(2.2e-9 * (m2 / s));
molTable->GetConfiguration("°OH")->SetVanDerVaalsRadius(0.22 * nm);
G4MolecularConfiguration* OHm =
molTable->CreateConfiguration("OHm", // just a tag to store and retrieve
// from G4MoleculeTable
G4OH::Definition(),
G4OHm,
-1, // charge
5.3e-9 * (m2 / s));
OHm->SetMass(17.0079 * g / Avogadro * c_squared);
@@ -108,13 +120,13 @@ void G4ChemDissociationChannels_option1::ConstructMolecule()
// molecules extension (RITRACKS)
molTable->CreateConfiguration("HO2", G4HO2::Definition());
molTable->GetConfiguration("HO2")->SetVanDerVaalsRadius(0.21 * nm);
molTable->CreateConfiguration("HO2°", G4HO2::Definition());
molTable->GetConfiguration("HO2°")->SetVanDerVaalsRadius(0.21 * nm);
G4MolecularConfiguration* HO2m =
molTable->CreateConfiguration("HO2m", // just a tag to store and retrieve
// from G4MoleculeTable
G4HO2::Definition(),
G4HO2m,
-1, // charge
1.4e-9 * (m2 / s));
HO2m->SetMass(33.00396 * g / Avogadro * c_squared);
@@ -126,7 +138,7 @@ void G4ChemDissociationChannels_option1::ConstructMolecule()
G4MolecularConfiguration* Om =
molTable->CreateConfiguration("Om", // just a tag to store and retrieve from
// G4MoleculeTable
G4Oxygen::Definition(),
G4Om,
-1, // charge
2.0e-9 * (m2 / s));
Om->SetMass(15.99829 * g / Avogadro * c_squared);
@@ -170,7 +182,7 @@ void G4ChemDissociationChannels_option1::ConstructMolecule()
molTable->CreateConfiguration("OHm(B)", // just a tag to store and retrieve
// from G4MoleculeTable
G4OH::Definition(),
G4OHm,
-1, // charge
0 * (m2 / s));
@@ -184,7 +196,7 @@ void G4ChemDissociationChannels_option1::ConstructDissociationChannels()
//-----------------------------------
// Get the molecular configuration
auto molTable = G4MoleculeTable::Instance();
G4MolecularConfiguration* OH = molTable->GetConfiguration("OH");
G4MolecularConfiguration* OH = molTable->GetConfiguration("°OH");
G4MolecularConfiguration* OHm = molTable->GetConfiguration("OHm");
G4MolecularConfiguration* e_aq = molTable->GetConfiguration("e_aq");
G4MolecularConfiguration* H2 = molTable->GetConfiguration("H2");
@@ -97,7 +97,7 @@ void G4EmDNAChemistry::ConstructReactionTable(G4DNAMolecularReactionTable*
//-----------------------------------
//Get the molecular configuration
G4MolecularConfiguration* OH =
G4MoleculeTable::Instance()->GetConfiguration("OH");
G4MoleculeTable::Instance()->GetConfiguration("°OH");
G4MolecularConfiguration* OHm =
G4MoleculeTable::Instance()->GetConfiguration("OHm");
G4MolecularConfiguration* e_aq =
@@ -80,7 +80,7 @@ void G4EmDNAChemistry_option1::ConstructMolecule()
9.46e-9 * (m2/s));
G4MoleculeTable::Instance()->GetConfiguration("OHm")->SetDiffusionCoefficient(
5.3e-9 * (m2 / s));
G4MoleculeTable::Instance()->GetConfiguration("OH")->SetDiffusionCoefficient(
G4MoleculeTable::Instance()->GetConfiguration("°OH")->SetDiffusionCoefficient(
2.2e-9 * (m2/s));
G4MoleculeTable::Instance()->GetConfiguration("H2")->SetDiffusionCoefficient(
4.8e-9 * (m2/s));
@@ -103,7 +103,7 @@ void G4EmDNAChemistry_option1::ConstructReactionTable(G4DNAMolecularReactionTabl
//-----------------------------------
//Get the molecular configuration
G4MolecularConfiguration* OH =
G4MoleculeTable::Instance()->GetConfiguration("OH");
G4MoleculeTable::Instance()->GetConfiguration("°OH");
G4MolecularConfiguration* OHm =
G4MoleculeTable::Instance()->GetConfiguration("OHm");
G4MolecularConfiguration* e_aq =
@@ -141,7 +141,7 @@ void G4EmDNAChemistry_option2::ConstructReactionTable(
//-----------------------------------
//Get the molecular configuration
G4MolecularConfiguration* OH =
G4MoleculeTable::Instance()->GetConfiguration("OH");
G4MoleculeTable::Instance()->GetConfiguration("°OH");
G4MolecularConfiguration* OHm =
G4MoleculeTable::Instance()->GetConfiguration("OHm");
G4MolecularConfiguration* e_aq =
@@ -100,7 +100,7 @@ void G4EmDNAChemistry_option3::ConstructReactionTable(G4DNAMolecularReactionTabl
//-----------------------------------
//Get the molecular configuration
G4MolecularConfiguration* OH =
G4MoleculeTable::Instance()->GetConfiguration("OH");
G4MoleculeTable::Instance()->GetConfiguration("°OH");
G4MolecularConfiguration* OHm =
G4MoleculeTable::Instance()->GetConfiguration("OHm");
G4MolecularConfiguration* e_aq =
@@ -114,7 +114,7 @@ void G4EmDNAChemistry_option3::ConstructReactionTable(G4DNAMolecularReactionTabl
G4MolecularConfiguration* H2O2 =
G4MoleculeTable::Instance()->GetConfiguration("H2O2");
G4MolecularConfiguration* HO2 =
G4MoleculeTable::Instance()->GetConfiguration("HO2");
G4MoleculeTable::Instance()->GetConfiguration("HO2°");
G4MolecularConfiguration* HO2m =
G4MoleculeTable::Instance()->GetConfiguration("HO2m");
G4MolecularConfiguration* O =
@@ -64,6 +64,7 @@
// e+
#include "G4eplusAnnihilation.hh"
#include "G4eplusTo2or3GammaModel.hh"
// hadrons
#include "G4hMultipleScattering.hh"
@@ -138,8 +139,7 @@ G4EmLivermorePhysics::G4EmLivermorePhysics(G4int ver, const G4String& pname)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmLivermorePhysics::~G4EmLivermorePhysics()
{}
G4EmLivermorePhysics::~G4EmLivermorePhysics() = default;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -290,11 +290,17 @@ void G4EmLivermorePhysics::ConstructProcess()
brem->SetEmModel(br2);
br1->SetHighEnergyLimit(GeV);
// annihilation
auto anni = new G4eplusAnnihilation();
if (param->Use3GammaAnnihilationOnFly()) {
anni->SetEmModel(new G4eplusTo2or3GammaModel());
}
// register processes
ph->RegisterProcess(eioni, particle);
ph->RegisterProcess(brem, particle);
ph->RegisterProcess(ee, particle);
ph->RegisterProcess(new G4eplusAnnihilation(), particle);
ph->RegisterProcess(anni, particle);
ph->RegisterProcess(ss, particle);
// generic ion
@@ -131,8 +131,7 @@ G4EmPenelopePhysics::G4EmPenelopePhysics(G4int ver, const G4String&)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmPenelopePhysics::~G4EmPenelopePhysics()
{}
G4EmPenelopePhysics::~G4EmPenelopePhysics() = default;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -271,10 +270,10 @@ void G4EmPenelopePhysics::ConstructProcess()
theBremPenelope = new G4PenelopeBremsstrahlungModel();
theBremPenelope->SetHighEnergyLimit(PenelopeHighEnergyLimit);
brem->SetEmModel(theBremPenelope);
//Annihilation
G4eplusAnnihilation* anni = new G4eplusAnnihilation();
G4PenelopeAnnihilationModel* theAnnPenelope = new G4PenelopeAnnihilationModel();
auto anni = new G4eplusAnnihilation();
auto theAnnPenelope = new G4PenelopeAnnihilationModel();
theAnnPenelope->SetHighEnergyLimit(PenelopeHighEnergyLimit);
anni->AddEmModel(0, theAnnPenelope);
@@ -50,6 +50,7 @@
#include "G4LivermorePhotoElectricModel.hh"
#include "G4LivermorePolarizedRayleighModel.hh"
#include "G4PhotoElectricAngularGeneratorPolarized.hh"
#include "G4eplusTo2or3GammaModel.hh"
#include "G4hMultipleScattering.hh"
#include "G4CoulombScattering.hh"
@@ -96,8 +97,7 @@ G4EmStandardPhysics::G4EmStandardPhysics(G4int ver, const G4String&)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmStandardPhysics::~G4EmStandardPhysics()
{}
G4EmStandardPhysics::~G4EmStandardPhysics() = default;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -209,9 +209,15 @@ void G4EmStandardPhysics::ConstructProcess()
ssm->SetLowEnergyLimit(highEnergyLimit);
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
// annihilation
auto anni = new G4eplusAnnihilation();
if (param->Use3GammaAnnihilationOnFly()) {
anni->SetEmModel(new G4eplusTo2or3GammaModel());
}
ph->RegisterProcess(new G4eIonisation(), particle);
ph->RegisterProcess(new G4eBremsstrahlung(), particle);
ph->RegisterProcess(new G4eplusAnnihilation(), particle);
ph->RegisterProcess(anni, particle);
ph->RegisterProcess(ss, particle);
// generic ion
@@ -75,7 +75,7 @@
#include "G4BraggIonModel.hh"
#include "G4IonFluctuations.hh"
#include "G4NuclearStopping.hh"
#include "G4eplusTo2GammaOKVIModel.hh"
#include "G4eplusTo2or3GammaModel.hh"
#include "G4Gamma.hh"
#include "G4Electron.hh"
@@ -214,7 +214,7 @@ void G4EmStandardPhysicsWVI::ConstructProcess()
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
G4eplusAnnihilation* ann = new G4eplusAnnihilation();
ann->SetEmModel(new G4eplusTo2GammaOKVIModel());
ann->SetEmModel(new G4eplusTo2or3GammaModel());
ph->RegisterProcess(msc, particle);
ph->RegisterProcess(new G4eIonisation(), particle);
@@ -55,6 +55,7 @@
#include "G4LivermorePolarizedRayleighModel.hh"
#include "G4PhotoElectricAngularGeneratorPolarized.hh"
#include "G4BetheHeitler5DModel.hh"
#include "G4eplusTo2or3GammaModel.hh"
#include "G4eMultipleScattering.hh"
#include "G4hMultipleScattering.hh"
@@ -128,8 +129,7 @@ G4EmStandardPhysics_option3::G4EmStandardPhysics_option3(G4int ver,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmStandardPhysics_option3::~G4EmStandardPhysics_option3()
{}
G4EmStandardPhysics_option3::~G4EmStandardPhysics_option3() = default;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -242,8 +242,14 @@ void G4EmStandardPhysics_option3::ConstructProcess()
ph->RegisterProcess(eIoni, particle);
ph->RegisterProcess(brem, particle);
// annihilation
auto anni = new G4eplusAnnihilation();
if (param->Use3GammaAnnihilationOnFly()) {
anni->SetEmModel(new G4eplusTo2or3GammaModel());
}
ph->RegisterProcess(ee, particle);
ph->RegisterProcess(new G4eplusAnnihilation(), particle);
ph->RegisterProcess(anni, particle);
// generic ion
particle = G4GenericIon::GenericIon();
@@ -86,7 +86,7 @@
#include "G4IonParametrisedLossModel.hh"
#include "G4LindhardSorensenIonModel.hh"
#include "G4NuclearStopping.hh"
#include "G4eplusTo2GammaOKVIModel.hh"
#include "G4eplusTo2or3GammaModel.hh"
#include "G4Gamma.hh"
#include "G4Electron.hh"
@@ -129,6 +129,7 @@ G4EmStandardPhysics_option4::G4EmStandardPhysics_option4(G4int ver,
param->SetMuHadLateralDisplacement(true);
param->SetFluo(true);
param->SetUseICRU90Data(true);
param->Set3GammaAnnihilationOnFly(true);
param->SetFluctuationType(fUrbanFluctuation);
param->SetMaxNIELEnergy(1*CLHEP::MeV);
param->SetPositronAtRestModelType(fAllisonPositronium);
@@ -137,8 +138,7 @@ G4EmStandardPhysics_option4::G4EmStandardPhysics_option4(G4int ver,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmStandardPhysics_option4::~G4EmStandardPhysics_option4()
{}
G4EmStandardPhysics_option4::~G4EmStandardPhysics_option4() = default;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -304,7 +304,9 @@ void G4EmStandardPhysics_option4::ConstructProcess()
// annihilation
auto anni = new G4eplusAnnihilation();
anni->SetEmModel(new G4eplusTo2GammaOKVIModel());
if (param->Use3GammaAnnihilationOnFly()) {
anni->SetEmModel(new G4eplusTo2or3GammaModel());
}
// register processes
ph->RegisterProcess(eioni, particle);