Import Geant4 11.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2023-12-08 10:43:34 +01:00
parent dd1f179cda
commit 860a2b92bf
3962 changed files with 139318 additions and 164259 deletions
@@ -0,0 +1,86 @@
//
// ********************************************************************
// * 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 file
//
//
// File name: G4LightIonQMDCollision.hh
//
// Author: Koi, Tatsumi (tkoi@slac.stanford.edu)
//
// Creation date: 9 April 2007
// -----------------------------------------------------------------------------
//
// 081120 Add deltaT in signature of CalKinematicsOfBinaryCollisions
#ifndef G4LightIonQMDCollision_hh
#define G4LightIonQMDCollision_hh
#include "G4QMDSystem.hh"
#include "G4LightIonQMDMeanField.hh"
#include "G4Scatterer.hh"
class G4LightIonQMDCollision
{
public:
G4LightIonQMDCollision();
~G4LightIonQMDCollision();
void CalKinematicsOfBinaryCollisions( G4double );
G4bool CalFinalStateOfTheBinaryCollision( G4int , G4int );
G4bool CalFinalStateOfTheBinaryCollisionJQMD( G4double , G4double , G4ThreeVector , G4double , G4double , G4ThreeVector , G4double , G4int , G4int );
// CalFinalStateOfTheBinaryCollision ( sig , cutoff , pcm , prcm , srt, beta , gamma , i , j );
void SetMeanField ( G4LightIonQMDMeanField* meanfield ){ theMeanField = meanfield; theSystem = meanfield->GetSystem(); }
// Get, Set method of parameters; For expert only
void deltar( G4double x ){ fdeltar = x; };
G4double deltar(){ return fdeltar; };
void bcmax0( G4double x ){ fbcmax0 = x; };
G4double bcmax0(){ return fbcmax0; };
void bcmax1( G4double x ){ fbcmax1 = x; };
G4double bcmax1(){ return fbcmax1; };
void epse( G4double x ){ fepse = x; };
G4double epse(){ return fepse; };
private:
//copy is unexpeced
G4LightIonQMDCollision( const G4LightIonQMDCollision& ){;};
const G4LightIonQMDCollision& operator= ( const G4LightIonQMDCollision& );
G4QMDSystem* theSystem;
G4LightIonQMDMeanField* theMeanField;
G4double fdeltar;
G4double fbcmax0 , fbcmax1;
//G4double sig0 , sig1;
G4double fepse;
G4Scatterer* theScatterer;
};
#endif
@@ -0,0 +1,99 @@
//
// ********************************************************************
// * 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 file
//
//
// File name: G4LightIonQMDGroundStateNucleus.hh
//
// Author: Koi, Tatsumi (tkoi@slac.stanford.edu)
//
// Creation date: 11 May 2007
// -------------------------------------------------------------------
//
// 230308 "samplingPosition_cluster" function added by S-H. Sato and A. Haga
#ifndef G4LightIonQMDGroundStateNucleus_hh
#define G4LightIonQMDGroundStateNucleus_hh
#include "G4LightIonQMDNucleus.hh"
#include "G4LightIonQMDMeanField.hh"
#include "G4LightIonQMDParameters.hh"
class G4LightIonQMDGroundStateNucleus : public G4LightIonQMDNucleus
{
public:
G4LightIonQMDGroundStateNucleus();
G4LightIonQMDGroundStateNucleus( G4int z , G4int a );
~G4LightIonQMDGroundStateNucleus()
{
rho_l.clear();
d_pot.clear();
};
private:
void packNucleons();
void killCMMotionAndAngularM();
G4int maxTrial;
G4bool samplingPosition( G4int );
G4bool samplingPosition_cluster( G4int ); // Cluster
G4bool samplingMomentum( G4int );
G4double r00 , r01 , saa , rada , radb;
G4double dsam, ddif, dsam2, ddif2;
G4double cdp;
G4double c0p,clp,c3p,csp;
G4double hbc;
G4double gamm;
G4double cpw;
G4double cph;
G4double epsx;
G4double cpc;
G4double rmax,rt00,radm;
std::vector< G4double > phase_g;
std::vector< G4double > rho_l;
std::vector< G4double > d_pot;
G4double ebini;
G4double edepth;
G4double epse;
G4LightIonQMDMeanField* meanfield;
};
#endif
@@ -0,0 +1,134 @@
//
// ********************************************************************
// * 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 file
//
//
// File name: G4LightIonQMDMeanField.hh
//
// Author: Koi, Tatsumi (tkoi@slac.stanford.edu)
//
// Creation date: 29 March 2007
// -----------------------------------------------------------------------------
// 081120 Add Update
//
// 230307 Skyrme-QMD parameters added by Y-H. Sato and A. Haga
// 230307 "CalDensityProfile" and "CalChargeDensityProfile" functions added by Y-H. Sato and A. Haga
// 230307 "GetSingleEnergy" and "GetTotalEnergy" functions added by Y-H. Sato and A. Haga
#ifndef G4LightIonQMDMeanField_hh
#define G4LightIonQMDMeanField_hh
#include "G4QMDSystem.hh"
#include "G4LightIonQMDNucleus.hh"
class G4LightIonQMDMeanField
{
public:
G4LightIonQMDMeanField();
~G4LightIonQMDMeanField() = default;
void SetSystem ( G4QMDSystem* aSystem );
void SetNucleus ( G4LightIonQMDNucleus* aSystem );
inline G4QMDSystem* GetSystem () { return system; }
void Cal2BodyQuantities();
void Cal2BodyQuantities( G4int );
void CalGraduate();
G4bool IsPauliBlocked( G4int );
G4double GetTotalPotential();
G4double GetPotential( G4int );
void DoPropagation( G4double );
std::vector< G4LightIonQMDNucleus* > DoClusterJudgment();
inline G4double GetRR2( G4int i , G4int j ) { return rr2[i][j]; }
inline G4double GetRHA( G4int i , G4int j ) { return rha[i][j]; }
inline G4double GetRHE( G4int i , G4int j ) { return rhe[i][j]; }
inline G4ThreeVector GetFFr( G4int i ) { return ffr[i]; }
inline G4ThreeVector GetFFp( G4int i ) { return ffp[i]; }
std::vector< G4double > GetLocalDensity();
std::vector< G4double > GetDepthOfPotential();
void Update();
G4double GetTotalEnergy(); // added by Y-H.S and A.H.
G4double GetSingleEnergy( G4int ); // added by Y-H.S and A.H.
private:
G4double calPauliBlockingFactor( G4int );
private:
G4QMDSystem* system;
G4double rclds { 3.99 }; // distance for cluster judgement
G4double hbc , rho0;
G4double epsx { -20.0 }; // gauss term
G4double epscl { 0.0001 }; // coulomb term
G4double cpc;
//G4int icoul, irelcr;
G4int irelcr { 1 };
G4double gamm, c0, c3, cs, cl, wl;
G4double g0, g0iso, gtau0, eta, kappas; //Skyrme-QMD
//G4double c0w, c3w, clw, c0sw;
G4double c0w, clw, c0sw;
G4double c0g,c3g,csg,pag;
G4double cg0,cgtau0,pag_tau; //Skyrme-QMD
G4double cpw,cph;
// 2 Body Quantities
std::vector < std::vector < G4double > > rr2;
std::vector < std::vector < G4double > > pp2;
std::vector < std::vector < G4double > > rbij;
// Gauss
std::vector < std::vector < G4double > > rha;
// Coulomb
std::vector < std::vector < G4double > > rhe;
std::vector < std::vector < G4double > > rhc;
std::vector < G4ThreeVector > ffr;
std::vector < G4ThreeVector > ffp;
std::vector < G4double > rh3d;
std::vector < G4double > rh3d_tau; // Skyrme-QMD
};
#endif
@@ -0,0 +1,115 @@
//
// ********************************************************************
// * 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 file
//
//
// File name: G4LightIonQMDNucleus.hh
//
// Author: Koi, Tatsumi (tkoi@slac.stanford.edu)
//
// Creation date: 3 April 2007
// -------------------------------------------------------------------
// 230309 Skyrme-QMD parameters added by Y-H. Sato and A. Haga
// 230309 Total energy evaluated by Lorentz covariant version by Y-H. Sato and A. Haga
#ifndef G4LightIonQMDNucleus_hh
#define G4LightIonQMDNucleus_hh
#include "G4QMDSystem.hh"
#include "G4LightIonQMDParameters.hh"
class G4LightIonQMDNucleus : public G4QMDSystem
{
public:
G4LightIonQMDNucleus();
//virtual ~G4LightIonQMDNucleus();
G4LorentzVector Get4Momentum();
// Number of Nucleons (Proton or Neutron)
G4int GetMassNumber();
// Number of Protons
G4int GetAtomicNumber();
void CalEnergyAndAngularMomentumInCM();
// rest mass from G4NucleiPropertiesTable
G4double GetNuclearMass();
void SetTotalPotential( G4double x ){ potentialEnergy = x; };
G4double GetExcitationEnergy(){ return excitationEnergy; };
G4int GetAngularMomentum(){ return jj; };
private:
G4double hbc;
std::vector < G4ThreeVector > rcm, pcm;
std::vector < G4double > es;
G4int jj;
G4double potentialEnergy;
G4double excitationEnergy;
//G4double bindingEnergy;
//G4double kineticEnergyPerNucleon;
//G4double bindingEnergyPerNucleon;
//G4double potentialEnergyPerNucleon;
G4double GetNuclPotential( G4int );
//G4double rclds;
G4double rho0;
G4double epsx , epscl;
G4double cpc;
//G4int icoul, irelcr;
G4int irelcr;
G4double gamm, c0, c3, cs, cl, wl;
//G4double c0w, c3w, clw, c0sw;
G4double c0w, clw, c0sw;
G4double c0g,c3g,csg,pag;
G4double cpw,cph;
// Skyrme-QMD
G4double gtau0;
G4double g0;
G4double g0iso;
G4double eta;
G4double kappas;
G4double pag_tau;
G4double cg0;
G4double cgtau0;
};
#endif
@@ -0,0 +1,124 @@
//
// ********************************************************************
// * 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 file
//
//
// File name: G4LightIonQMDParameters.hh
//
// Author: Koi, Tatsumi (tkoi@slac.stanford.edu)
//
// Creation date: 12 May 2007
// -----------------------------------------------------------------------------
// 230307 Skyrme-QMD parameters added by Y-H. Sato and A. Haga
#ifndef G4LightIonQMDParameters_hh
#define G4LightIonQMDParameters_hh
#include "globals.hh"
class G4LightIonQMDParameters
{
static G4ThreadLocal G4LightIonQMDParameters* parameters;
G4LightIonQMDParameters();
public:
~G4LightIonQMDParameters();
static G4LightIonQMDParameters* GetInstance()
{
if ( parameters == NULL ) parameters = new G4LightIonQMDParameters();
return parameters;
}
// GroundStateNucleus
G4double Get_wl() { return wl; };
G4double Get_cl() { return cl; };
G4double Get_hbc() { return hbc; };
G4double Get_rho0() { return rho0; };
G4double Get_gamm() { return gamm; };
G4double Get_cpw() { return cpw; };
G4double Get_cph() { return cph; };
G4double Get_epsx() { return epsx; };
G4double Get_cpc() { return cpc; };
G4double Get_cs() { return cs; };
G4double Get_c0() { return c0; };
G4double Get_c0p() { return c0p; };
G4double Get_clp() { return clp; };
G4double Get_c3() { return c3; };
G4double Get_c3p() { return c3p; };
G4double Get_csp() { return csp; };
G4double Get_cdp() { return cdp; };
G4double Get_g0p() { return g0p; }; // Skyrme-QMD
G4double Get_g0isop() { return g0isop; }; // Skyrme-QMD
G4double Get_gtau0p() { return gtau0p; };// Skyrme-QMD
G4double Get_eta() { return eta; }; // Skyrme-QMD
G4double Get_kappas() { return kappas; }; // Skyrme-QMD
G4double Get_g0() { return g0; }; // Skyrme-QMD
G4double Get_g0iso() { return g0iso; }; // Skyrme-QMD
G4double Get_gtau0() { return gtau0; }; // Skyrme-QMD
protected:
G4double wl;
G4double cl;
G4double hbc;
G4double rho0;
G4double gamm;
/*
G4double rho0;
G4double t0;
G4double aaa;
*/
// Skyrme-QMD
G4double gtau0;
G4double g0;
G4double g0iso;
G4double eta;
G4double kappas;
G4double g0p;
G4double g0isop;
G4double gtau0p;
// MeanField
G4double c0, c3, cs;
// GroundStateNucleus
G4double cpw;
G4double cph;
G4double epsx;
G4double cpc;
G4double c0p , clp , c3p , csp , cdp;
};
#endif
@@ -0,0 +1,136 @@
//
// ********************************************************************
// * 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 file
//
//
// File name: G4LightIonQMDReaction.hh
//
// Author: Koi, Tatsumi (tkoi@slac.stanford.edu)
//
// Creation date: 02 April 2007
// -----------------------------------------------------------------------------
//
// 081107 Add UnUseGEM (then use the default channel of G4Evaporation)
// UseFrag (chage criterion of a inelastic reaction)
// 090331 Change member shenXS and genspaXS object to pointer
//
#ifndef G4LightIonQMDReaction_hh
#define G4LightIonQMDReaction_hh
#include "G4QMDSystem.hh"
#include "G4LightIonQMDCollision.hh"
#include "G4LightIonQMDMeanField.hh"
#include "G4QMDParticipant.hh"
#include "G4HadronicInteraction.hh"
#include "G4Evaporation.hh"
#include "G4ExcitationHandler.hh"
class G4VCrossSectionDataSet;
class G4BGGPionElasticXS;
class G4BGGPionInelasticXS;
class G4LightIonQMDReaction : public G4HadronicInteraction
{
public:
G4LightIonQMDReaction();
~G4LightIonQMDReaction() override;
std::vector< G4QMDSystem* > GetFinalStates();
G4HadFinalState* ApplyYourself(const G4HadProjectile &aTrack,
G4Nucleus & targetNucleus) override;
G4ExcitationHandler* GetExcitationHandler() {return excitationHandler;};
void UnUseGEM() {gem = false; setEvaporationCh();};
void UseFRAG() {frag = true;};
void SetTMAX(G4int i) { maxTime = i; };
void SetDT(G4double t) { deltaT = t; };
void SetEF(G4double x) { envelopF = x; };
void ModelDescription(std::ostream& outFile) const override;
//copy is unexpected
G4LightIonQMDReaction(const G4LightIonQMDReaction& right) = delete;
const G4LightIonQMDReaction& operator = (const G4LightIonQMDReaction& right) = delete;
private:
void setEvaporationCh();
void setHighEnergyModel();
G4LightIonQMDMeanField* meanField;
G4LightIonQMDCollision* collision;
void doCollision();
std::vector< G4QMDSystem* > doClusterJudgment();
G4QMDSystem* system;
G4double deltaT;
G4int maxTime;
G4double envelopF;
G4ExcitationHandler* excitationHandler;
// b pd_proj pd_targ z_p a_p z_t a_t plab elab
// G4double offSetOfCollision( G4double , G4ParticleDefinition* , G4ParticleDefinition* , G4int , G4int , G4int , G4int , G4double , G4double );
// b pd_proj pd_targ plab elab bmax boostToCM
void calcOffSetOfCollision(G4double, const G4ParticleDefinition*,
const G4ParticleDefinition*, G4double,
G4double, G4double, G4ThreeVector);
G4double coulomb_collision_gamma_proj;
G4double coulomb_collision_rx_proj;
G4double coulomb_collision_rz_proj;
G4double coulomb_collision_px_proj;
G4double coulomb_collision_pz_proj;
G4double coulomb_collision_gamma_targ;
G4double coulomb_collision_rx_targ;
G4double coulomb_collision_rz_targ;
G4double coulomb_collision_px_targ;
G4double coulomb_collision_pz_targ;
G4VCrossSectionDataSet* theXS;
G4BGGPionElasticXS* pipElNucXS;
G4BGGPionElasticXS* pimElNucXS;
G4BGGPionInelasticXS* pipInelNucXS;
G4BGGPionInelasticXS* pimInelNucXS;
G4bool gem;
G4bool frag;
G4int secID; // Creator model ID for the secondaries
};
#endif
@@ -60,12 +60,12 @@ class G4QMDReaction : public G4HadronicInteraction
{
public:
G4QMDReaction();
~G4QMDReaction();
~G4QMDReaction() override;
std::vector< G4QMDSystem* > GetFinalStates();
G4HadFinalState* ApplyYourself(const G4HadProjectile &aTrack,
G4Nucleus & targetNucleus);
G4Nucleus & targetNucleus) override;
G4ExcitationHandler* GetExcitationHandler() {return excitationHandler;};
@@ -76,12 +76,13 @@ class G4QMDReaction : public G4HadronicInteraction
void SetDT(G4double t) { deltaT = t; };
void SetEF(G4double x) { envelopF = x; };
virtual void ModelDescription(std::ostream& outFile) const;
void ModelDescription(std::ostream& outFile) const override;
//copy is unexpected
G4QMDReaction(const G4QMDReaction& right) = delete;
const G4QMDReaction& operator = (const G4QMDReaction& right) = delete;
private:
//copy is unexpected
void operator =( const G4QMDReaction& ){};
G4QMDReaction( const G4QMDReaction& ):G4HadronicInteraction("QMDModel"){};
void setEvaporationCh();
void setHighEnergyModel();
@@ -98,7 +99,6 @@ class G4QMDReaction : public G4HadronicInteraction
G4int maxTime;
G4double envelopF;
G4Evaporation* evaporation;
G4ExcitationHandler* excitationHandler;
// b pd_proj pd_targ z_p a_p z_t a_t plab elab