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
@@ -0,0 +1,73 @@
//
// ********************************************************************
// * 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 Class header file
//
// File name: G4AllisonPositronAtRestModel
//
// Author: Vladimir Ivanchenko
//
// Creation date: 14 May 2024
//
// Class Description:
//
// Allison AtRest positron 2-gamma annihilation model
// Electron of media is assumed to have the MaxwellBoltzmann
// distribution defined by the temperature of the media.
// Energy of mean ionisation should not be zero - some amount of free
// electrons should be in the media.
// Polarisation of gamma according to M.H.L.Pryce and J.C.Ward,
// Nature 4065 (1947) 435.
// Snyder et al, Physical Review 73 (1948) p.440.
//
// -------------------------------------------------------------------
//
#ifndef G4AllisonPositronAtRestModel_h
#define G4AllisonPositronAtRestModel_h 1
#include "G4VPositronAtRestModel.hh"
class G4AllisonPositronAtRestModel : public G4VPositronAtRestModel
{
public:
G4AllisonPositronAtRestModel();
~G4AllisonPositronAtRestModel() override = default;
void SampleSecondaries(std::vector<G4DynamicParticle*>& secParticles,
G4double&, const G4Material*) const override;
void PrintGeneratorInformation() const override;
G4AllisonPositronAtRestModel& operator=
(const G4AllisonPositronAtRestModel& right) = delete;
G4AllisonPositronAtRestModel(const G4AllisonPositronAtRestModel&) = delete;
};
#endif
@@ -0,0 +1,69 @@
//
// ********************************************************************
// * 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 Class header file
//
// File name: G4OrePowellAtRestModel
//
// Author: I.Semeniouk & D.Bernard
//
// Creation date: 4 Juin 2024
//
// Class Description:
//
// Simple AtRest positron 3-gamma annihilation model.
// Electron of media is assumed to have zero kinetic energy.
// Ortho - Positronium three-photon annihilation by Ore and
// Powell, Phys. Rev. 75 (1949).
// Polarisation set randomly.
//
// -------------------------------------------------------------------
//
#ifndef G4OrePowellAtRestModel_h
#define G4OrePowellAtRestModel_h 1
#include "G4VPositronAtRestModel.hh"
class G4OrePowellAtRestModel : public G4VPositronAtRestModel
{
public:
G4OrePowellAtRestModel();
~G4OrePowellAtRestModel() override = default;
void SampleSecondaries(std::vector<G4DynamicParticle*>& secParticles,
G4double&, const G4Material*) const override;
void PrintGeneratorInformation() const override;
G4OrePowellAtRestModel& operator=
(const G4OrePowellAtRestModel& right) = delete;
G4OrePowellAtRestModel(const G4OrePowellAtRestModel&) = delete;
};
#endif
@@ -0,0 +1,68 @@
//
// ********************************************************************
// * 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 Class header file
//
// File name: G4SimplePositronAtRestModel
//
// Author: Vladimir Ivanchenko
//
// Creation date: 14 May 2024
//
// Class Description:
//
// Simple AtRest positron 2-gamma annihilation model.
// Electron of media is assumed to have zero kinetic energy.
// Polarisation of gamma according to M.H.L.Pryce and J.C.Ward,
// Nature 4065 (1947) 435.
//
// -------------------------------------------------------------------
//
#ifndef G4SimplePositronAtRestModel_h
#define G4SimplePositronAtRestModel_h 1
#include "G4VPositronAtRestModel.hh"
class G4SimplePositronAtRestModel : public G4VPositronAtRestModel
{
public:
G4SimplePositronAtRestModel();
~G4SimplePositronAtRestModel() override = default;
void SampleSecondaries(std::vector<G4DynamicParticle*>& secParticles,
G4double&, const G4Material*) const override;
void PrintGeneratorInformation() const override;
G4SimplePositronAtRestModel& operator=
(const G4SimplePositronAtRestModel& right) = delete;
G4SimplePositronAtRestModel(const G4SimplePositronAtRestModel&) = delete;
};
#endif
@@ -0,0 +1,75 @@
//
// ********************************************************************
// * 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 Class header file
//
// File name: G4SimplePsAtRestModel
//
// Author: I.Semeniouk & D.Bernard
//
// Creation date: 4 Juin 2024
//
// Class Description:
//
// Simple switcher between positron 2-gamma annihilation at rest model and
// positron 2-gamma annihilation at rest model.
//
// -------------------------------------------------------------------
//
#ifndef G4SimplePsAtRestModel_h
#define G4SimplePsAtRestModel_h 1
#include "G4VPositronAtRestModel.hh"
class G4SimplePositronAtRestModel;
class G4OrePowellAtRestModel;
class G4SimplePsAtRestModel : public G4VPositronAtRestModel
{
public:
G4SimplePsAtRestModel();
~G4SimplePsAtRestModel() override;
void SampleSecondaries(std::vector<G4DynamicParticle*>& secParticles,
G4double&, const G4Material*) const override;
void PrintGeneratorInformation() const override;
G4SimplePsAtRestModel& operator=
(const G4SimplePsAtRestModel& right) = delete;
G4SimplePsAtRestModel(const G4SimplePsAtRestModel&) = delete;
private:
G4double f3gFranction;
G4SimplePositronAtRestModel *model2g;
G4OrePowellAtRestModel *model3g;
};
#endif
@@ -44,8 +44,9 @@
//
// Class Description:
//
// Implementation of e+ annihilation into 2 gamma
// Implementation of e+ annihilation into 2 gamma on fly
// Annihilation at rest is sampled by G4VPositronAtRestModel
//
// -------------------------------------------------------------------
//
@@ -53,6 +54,7 @@
#define G4eeToTwoGammaModel_h 1
#include "G4VEmModel.hh"
#include <vector>
class G4ParticleChangeForGamma;
@@ -99,8 +101,6 @@ private:
G4double pi_rcl2;
const G4ParticleDefinition* theGamma;
G4ParticleChangeForGamma* fParticleChange;
static G4bool fSampleAtomicPDF;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -48,9 +48,12 @@
//
// Class Description:
//
// This class manages the process of e+ annihilation into 2 gammas
// This class manages the process of e+ annihilation at rest and on fly
// It is possible to enable ApplyCuts and Entanglement options via
// G4EmParameters class using UI commands or C++ interface.
// EM splitting or Russian roulette are allowed is corresponding options
// are enabled.
//
// -------------------------------------------------------------------
//
@@ -60,6 +63,7 @@
#include "G4VEmProcess.hh"
class G4ParticleDefinition;
class G4VPositronAtRestModel;
class G4eplusAnnihilation : public G4VEmProcess
{
@@ -95,11 +99,12 @@ protected:
void StreamProcessInfo(std::ostream& outFile) const override;
private:
G4bool isInitialised = false;
const G4ParticleDefinition* theGamma;
const G4ParticleDefinition* theElectron;
G4VPositronAtRestModel* fAtRestModel{nullptr};
G4int fEntanglementModelID;
G4bool isInitialised{false};
G4bool fEntangled{false};
G4bool fApplyCuts{false};
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -38,8 +38,18 @@
//
// Class Description:
//
// Implementation of e+ annihilation into 2 gamma
// Implementation of e+ annihilation into 2 or 3 gamma on fly
// Annihilation at rest is sampled by G4VPositronAtRestModel
// Implementation of 3-gamma annihilation is performed by
// G4eplusTo3GammaOKVIModel. Cross section of both models
// depend on cut parameter fDelta, which defines relative low-energy
// limit on 3d gamma energy. For computation of the cross section
// next to leading order radiative corrections are taken into account,
// atomic effects at low-energy are not considered.
//
// V.N.Baier, V.S. Fadin, V.A. Khose, E.A. Kuraev,
// Physics Reports 78 (1981) 293-393.
//
// -------------------------------------------------------------------
//
@@ -58,8 +68,7 @@ class G4eplusTo2GammaOKVIModel : public G4VEmModel
public:
explicit G4eplusTo2GammaOKVIModel(const G4ParticleDefinition* p = nullptr,
const G4String& nam = "eplus2ggOKVI");
G4eplusTo2GammaOKVIModel();
~G4eplusTo2GammaOKVIModel() override;
@@ -73,21 +82,21 @@ public:
G4double Z,
G4double A = 0.,
G4double cutEnergy = 0.,
G4double maxEnergy = DBL_MAX) final;
G4double maxEnergy = DBL_MAX) override;
G4double CrossSectionPerVolume(const G4Material*,
const G4ParticleDefinition*,
G4double kineticEnergy,
G4double cutEnergy = 0.0,
G4double maxEnergy = DBL_MAX) final;
G4double maxEnergy = DBL_MAX) override;
void SampleSecondaries(std::vector<G4DynamicParticle*>*,
const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double tmin = 0.0,
G4double maxEnergy = DBL_MAX) final;
G4double maxEnergy = DBL_MAX) override;
inline void SetDelta(G4double val) { if(val > 0.0) { fDelta = val; } };
void SetDelta(G4double val) { if(val > 0.0) { fDeltaMin = val; } };
// hide assignment operator
G4eplusTo2GammaOKVIModel & operator=
@@ -97,16 +106,14 @@ public:
private:
const G4ParticleDefinition* theGamma;
G4ParticleChangeForGamma* fParticleChange;
G4eplusTo3GammaOKVIModel* f3GModel;
const G4DataVector* fCuts;
G4double fDelta;
G4double fGammaTh;
G4double fDeltaMin; // fixed minimal relative limit
G4double fDelta; // running limit - function of energy
G4double fGammaTh; // 3-gamma annihilation low-energy limit
static G4PhysicsVector* fCrossSection;
static G4PhysicsVector* fCrossSection3G;
static G4PhysicsVector* f3GProbability;
};
@@ -38,8 +38,11 @@
//
// Class Description:
//
// Implementation of e+ annihilation into 3 gamma
// Implementation of e+ annihilation into 3 gamma on fly
//
// V.N.Baier, V.S. Fadin, V.A. Khose, E.A. Kuraev,
// Physics Reports 78 (1981) 293-393.
//
// -------------------------------------------------------------------
//
@@ -60,7 +63,7 @@ public:
~G4eplusTo3GammaOKVIModel() override;
void Initialise(const G4ParticleDefinition*, const G4DataVector&) final;
void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
G4double ComputeCrossSectionPerElectron(G4double kinEnergy);
@@ -100,8 +103,7 @@ public:
private:
G4double fDelta;
const G4ParticleDefinition* theGamma;
G4ParticleChangeForGamma* fParticleChange;
const G4ParticleDefinition* theGamma;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......