Import Geant4 11.2.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2023-06-30 09:09:57 +02:00
parent aef78ca386
commit dd1f179cda
3780 changed files with 212808 additions and 142780 deletions
@@ -1,56 +0,0 @@
# ---------------------------------------------------------------------------
# GNUmakefile for physics_lists/constructors/electromagnetic library.
# Gunter Folger 10-Jan-2012.
# ---------------------------------------------------------------------------
name := G4phys_ctor_helastic
ifndef G4INSTALL
G4INSTALL = ../../../..
endif
include $(G4INSTALL)/config/architecture.gmk
CPPFLAGS += -DG4PROCESSES_EXPORT
ifdef G4LIB_BUILD_EXPAT
CPPFLAGS += -I$(G4BASE)/externals/expat/include
endif
CPPFLAGS += -I$(G4BASE)/global/management/include \
-I$(G4BASE)/global/HEPRandom/include \
-I$(G4BASE)/global/HEPNumerics/include \
-I$(G4BASE)/global/HEPGeometry/include \
-I$(G4BASE)/geometry/volumes/include \
-I$(G4BASE)/geometry/management/include \
-I$(G4BASE)/geometry/magneticfield/include \
-I$(G4BASE)/geometry/navigation/include \
-I$(G4BASE)/track/include \
-I$(G4BASE)/particles/shortlived/include \
-I$(G4BASE)/particles/management/include \
-I$(G4BASE)/particles/leptons/include \
-I$(G4BASE)/particles/bosons/include \
-I$(G4BASE)/particles/hadrons/mesons/include \
-I$(G4BASE)/particles/hadrons/barions/include \
-I$(G4BASE)/particles/hadrons/ions/include \
-I$(G4BASE)/run/include \
-I$(G4BASE)/physics_lists/builders/include \
-I$(G4BASE)/physics_lists/util/include \
-I$(G4BASE)/physics_lists/constructors/factory/include \
-I$(G4BASE)/physics_lists/constructors/hadron_inelastic/include \
-I$(G4BASE)/processes/management/include \
-I$(G4BASE)/processes/transportation/include \
-I$(G4BASE)/processes/cuts/include \
-I$(G4BASE)/processes/hadronic/cross_sections/include \
-I$(G4BASE)/processes/hadronic/stopping/include \
-I$(G4BASE)/processes/hadronic/management/include \
-I$(G4BASE)/processes/hadronic/processes/include \
-I$(G4BASE)/processes/hadronic/util/include \
-I$(G4BASE)/processes/hadronic/models/coherent_elastic/include \
-I$(G4BASE)/processes/hadronic/models/theo_high_energy/include \
-I$(G4BASE)/processes/hadronic/models/lend/include \
-I$(G4BASE)/processes/hadronic/models/particle_hp/include \
-I$(G4BASE)/processes/hadronic/util/include \
-I$(G4BASE)/materials/include
include $(G4INSTALL)/config/common.gmk
@@ -6,6 +6,14 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2023-04-13 Alberto Ribon (phys-ctor-helastic-V11-01-00)
- Created new class G4HadronElasticPhysicsHPT, which inherits from
G4HadronElasticPhysicsHP and activates the special treatment of elastic
scattering of thermal neutrons.
- G4HadronElasticPhysicsHP : changed the method ConstructProcess from "final"
to "override", to be able to define the ConstructProcess method for the
derived class G4HadronElasticPhysicsHPT.
## 2022-11-24 Gabriele Cosmo (phys-ctor-helastic-V11-00-03)
- Fixed compilation warnings for implicit type conversions on macOS/XCode 14.1.
@@ -37,6 +37,14 @@
below 20 MeV, NeutronHP elastic is used (for both cross section and
final-state model).
G4HadronElasticPhysicsHPT
-------------------------
As G4HadronElasticPhysicsHP, with the only difference that for neutrons
below 4 eV, a special treatment of elastic scattering is activated.
This special treatment, called Thermal Scattering Law (TSL), is based on
the S(alpha, beta) approach, which relieas on both experimental measurements
and molecular dynamics calculations.
G4HadronElasticPhysicsLEND
--------------------------
As G4HadronElasticPhysics, with the only difference that for neutrons
@@ -51,7 +51,7 @@ public:
// This method will be invoked in the Construct() method.
// each physics process will be instantiated and
// registered to the process manager of each particle type
void ConstructProcess() final;
void ConstructProcess() override;
G4HadronElasticPhysicsHP(G4HadronElasticPhysicsHP &) = delete;
G4HadronElasticPhysicsHP & operator=(const G4HadronElasticPhysicsHP &right) = delete;
@@ -0,0 +1,61 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//---------------------------------------------------------------------------
//
// ClassName: G4HadronElasticPhysicsHPT
//
// Author: Alberto Ribon (CERN), April 2023
//
// This class inherits from G4HadronElasticPhysicsHP and activates
// the special treatment of elastic scattering of thermal neutrons
// (i.e. with kinetic energy below 4 eV).
// This special treatment, called Thermal Scattering Law (TSL), is based on
// the S(alpha, beta) approach, which relies on both experimental measurements
// and molecular dynamics calculations.
//
// Modified:
//
//----------------------------------------------------------------------------
//
#ifndef G4HadronElasticPhysicsHPT_h
#define G4HadronElasticPhysicsHPT_h 1
#include "G4HadronElasticPhysicsHP.hh"
class G4HadronElasticPhysicsHPT : public G4HadronElasticPhysicsHP {
public:
explicit G4HadronElasticPhysicsHPT( G4int ver = 1 );
virtual ~G4HadronElasticPhysicsHPT() = default;
void ConstructProcess() final;
G4HadronElasticPhysicsHPT( G4HadronElasticPhysicsHPT & ) = delete;
G4HadronElasticPhysicsHPT & operator=( const G4HadronElasticPhysicsHPT &right ) = delete;
};
#endif
@@ -7,6 +7,7 @@ geant4_add_module(G4phys_ctor_helastic
G4HadronDElasticPhysics.hh
G4HadronElasticPhysics.hh
G4HadronElasticPhysicsHP.hh
G4HadronElasticPhysicsHPT.hh
G4HadronElasticPhysicsLEND.hh
G4HadronElasticPhysicsXS.hh
G4HadronHElasticPhysics.hh
@@ -18,6 +19,7 @@ geant4_add_module(G4phys_ctor_helastic
G4HadronDElasticPhysics.cc
G4HadronElasticPhysics.cc
G4HadronElasticPhysicsHP.cc
G4HadronElasticPhysicsHPT.cc
G4HadronElasticPhysicsLEND.cc
G4HadronElasticPhysicsXS.cc
G4HadronHElasticPhysics.cc
@@ -0,0 +1,87 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//---------------------------------------------------------------------------
//
// ClassName: G4HadronElasticPhysicsHPT
//
// Author: Alberto Ribon (CERN), April 2023
//
// This class inherits from G4HadronElasticPhysicsHP and activates
// the special treatment of elastic scattering of thermal neutrons
// (i.e. with kinetic energy below 4 eV).
// This special treatment, called Thermal Scattering Law (TSL), is based on
// the S(alpha, beta) approach, which relies on both experimental measurements
// and molecular dynamics calculations.
//
// Modified:
//
//----------------------------------------------------------------------------
//
#include "G4HadronElasticPhysicsHPT.hh"
#include "G4SystemOfUnits.hh"
#include "G4Neutron.hh"
#include "G4ParticleDefinition.hh"
#include "G4HadronicProcess.hh"
#include "G4ParticleHPThermalScattering.hh"
#include "G4ParticleHPThermalScatteringData.hh"
#include "G4HadronicParameters.hh"
#include "G4PhysListUtil.hh"
#include "G4PhysicsConstructorFactory.hh"
G4_DECLARE_PHYSCONSTR_FACTORY( G4HadronElasticPhysicsHPT );
G4HadronElasticPhysicsHPT::G4HadronElasticPhysicsHPT( G4int ver ) : G4HadronElasticPhysicsHP( ver ) {
if ( ver > 1 ) G4cout << "### G4HadronElasticPhysicsHPT: " << GetPhysicsName() << G4endl;
}
void G4HadronElasticPhysicsHPT::ConstructProcess() {
G4HadronElasticPhysicsHP::ConstructProcess();
const G4Neutron* neutron = G4Neutron::Neutron();
G4HadronicProcess* neutronElasticProcess = G4PhysListUtil::FindElasticProcess( neutron );
if ( neutronElasticProcess == nullptr ) {
G4cout << "### " << GetPhysicsName()
<< " WARNING: Fail to add thermal neutron scattering" << G4endl;
return;
}
std::size_t sizeInteractionList = neutronElasticProcess->GetHadronicInteractionList().size();
if ( sizeInteractionList < 1 ) {
G4cout << "### " << GetPhysicsName()
<< " WARNING: Fail to add thermal neutron scattering ! sizeInteractionList="
<< sizeInteractionList << G4endl;
return;
}
neutronElasticProcess->GetHadronicInteractionList()[ sizeInteractionList-1 ]->SetMinEnergy( 4.0*CLHEP::eV );
neutronElasticProcess->RegisterMe( new G4ParticleHPThermalScattering );
neutronElasticProcess->AddDataSet( new G4ParticleHPThermalScatteringData );
if ( G4HadronicParameters::Instance()->GetVerboseLevel() > 1 ) {
G4cout << "### HadronElasticPhysicsHPT is constructed " << G4endl;
}
}