Import Geant4 10.7.0 source tree
This commit is contained in:
@@ -14,6 +14,33 @@ code and to keep track of all tags.
|
||||
* Please list in reverse chronological order (last date on top)
|
||||
---------------------------------------------------------------
|
||||
|
||||
05 November 2020 Alberto Ribon (hadr-util-V10-06-08)
|
||||
--------------------------------------------------------
|
||||
- G4HadronicParameters, G4HadronicParametersMessenger : added boolean
|
||||
switch that allows to apply the Cosmic Ray (CR) coalescence algorithm
|
||||
to the secondaries produced by a string model.
|
||||
This can be useful in particular for Cosmic Ray applications.
|
||||
By default it is disabled.
|
||||
|
||||
27 October 2020 Gunter Folger (hadr-util-V10-06-07)
|
||||
--------------------------------------------------------
|
||||
- disable G4HadSignalHandler
|
||||
|
||||
02 September 2020 Vladimir Ivanchenko (hadr-util-V10-06-06)
|
||||
--------------------------------------------------------
|
||||
- G4HadronicParameters : added disable b-, c- particles by default
|
||||
|
||||
05 August 2020 Alberto Ribon (hadr-util-V10-06-05)
|
||||
--------------------------------------------------------
|
||||
- G4HadronicParametersMessenger : added new macro command to set
|
||||
the max hadronic energy (required by DAMPE/HERD Collaboration).
|
||||
|
||||
29 July 2020 Vladimir Ivanchenko (hadr-util-V10-06-04)
|
||||
--------------------------------------------------------
|
||||
- G4HadronicParameters : added Get/Set methods for cross section factors
|
||||
separately for nucleons, pions, other hadrons, and leptons; added
|
||||
high energy limit for low-energy physics
|
||||
|
||||
13 May 2020 Vladimir Ivanchenko (hadr-util-V10-06-03)
|
||||
--------------------------------------------------------
|
||||
- G4HadronicParameters : added Get/Set methods to enable b-, c- particles
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
#ifndef G4HadSignalHandler_hh
|
||||
#define G4HadSignalHandler_hh
|
||||
|
||||
#ifndef G4HadSignalHandler_off
|
||||
|
||||
//#ifndef G4HadSignalHandler_off
|
||||
#if 0
|
||||
#include <iostream>
|
||||
#include <signal.h>
|
||||
#include <vector>
|
||||
|
||||
@@ -75,17 +75,54 @@ class G4HadronicParameters {
|
||||
// transition region between the two strings models - the Quark Gluon String (QGS)
|
||||
// model and the Fritiof (FTF) model.
|
||||
|
||||
G4double EnergyThresholdForHeavyHadrons() const;
|
||||
void SetEnergyThresholdForHeavyHadrons( G4double val );
|
||||
// if max kinetic energy is below this limit EM and hadronic physics is not
|
||||
// instantiated for hyperons, anti-hyperons, anti light ions, b-, c- particles
|
||||
|
||||
G4double XSFactorNucleonInelastic() const;
|
||||
void SetXSFactorNucleonInelastic( G4double val );
|
||||
G4double XSFactorNucleonElastic() const;
|
||||
void SetXSFactorNucleonElastic( G4double val );
|
||||
// cross section factor for protons and neutrons
|
||||
|
||||
G4double XSFactorPionInelastic() const;
|
||||
void SetXSFactorPionInelastic( G4double val );
|
||||
G4double XSFactorPionElastic() const;
|
||||
void SetXSFactorPionElastic( G4double val );
|
||||
// cross section factor for pions
|
||||
|
||||
G4double XSFactorHadronInelastic() const;
|
||||
void SetXSFactorHadronInelastic( G4double val );
|
||||
G4double XSFactorHadronElastic() const;
|
||||
void SetXSFactorHadronElastic( G4double val );
|
||||
// cross section factor for other hadrons and ions
|
||||
|
||||
G4double XSFactorEM() const;
|
||||
void SetXSFactorEM( G4double val );
|
||||
// cross section factor for gamma and leptons
|
||||
|
||||
G4bool EnableBCParticles() const;
|
||||
void SetEnableBCParticles( G4bool val );
|
||||
// Baryons and mesons with c- and b- quarks may be enabled/disabled
|
||||
// This flag is used both by EM and hadronic physics constructors
|
||||
|
||||
G4bool ApplyFactorXS() const;
|
||||
void SetApplyFactorXS( G4bool val );
|
||||
// Flag enabling cross section factor definition
|
||||
|
||||
G4int GetVerboseLevel() const;
|
||||
void SetVerboseLevel( const G4int val );
|
||||
// Getter/Setter of the general verbosity level for hadronics.
|
||||
|
||||
G4bool EnableCRCoalescence() const;
|
||||
void SetEnableCRCoalescence( G4bool val );
|
||||
// Boolean switch that allows to apply the Cosmic Ray (CR) coalescence algorithm
|
||||
// to the secondaries produced by a string model. By default it is disabled.
|
||||
|
||||
private:
|
||||
G4HadronicParameters();
|
||||
|
||||
G4bool IsLocked() const;
|
||||
|
||||
static G4HadronicParameters* sInstance;
|
||||
@@ -100,8 +137,20 @@ class G4HadronicParameters {
|
||||
G4double fMaxEnergyTransitionFTF_Cascade;
|
||||
G4double fMinEnergyTransitionQGS_FTF;
|
||||
G4double fMaxEnergyTransitionQGS_FTF;
|
||||
G4int fVerboseLevel;
|
||||
G4bool fEnableBC;
|
||||
G4double fEnergyThresholdForHeavyHadrons;
|
||||
G4double fXSFactorNucleonInelastic = 1.0;
|
||||
G4double fXSFactorPionInelastic = 1.0;
|
||||
G4double fXSFactorHadronInelastic = 1.0;
|
||||
G4double fXSFactorNucleonElastic = 1.0;
|
||||
G4double fXSFactorPionElastic = 1.0;
|
||||
G4double fXSFactorHadronElastic = 1.0;
|
||||
G4double fXSFactorEM = 1.0;
|
||||
G4double fXSFactorLimit = 0.2;
|
||||
|
||||
G4int fVerboseLevel = 1;
|
||||
G4bool fEnableBC = false;
|
||||
G4bool fApplyFactorXS = false;
|
||||
G4bool fEnableCRCoalescence = false;
|
||||
};
|
||||
|
||||
inline G4double G4HadronicParameters::GetMaxEnergy() const {
|
||||
@@ -123,6 +172,38 @@ inline G4double G4HadronicParameters::GetMaxEnergyTransitionQGS_FTF() const {
|
||||
return fMaxEnergyTransitionQGS_FTF;
|
||||
}
|
||||
|
||||
inline G4double G4HadronicParameters::EnergyThresholdForHeavyHadrons() const {
|
||||
return fEnergyThresholdForHeavyHadrons;
|
||||
}
|
||||
|
||||
inline G4double G4HadronicParameters::XSFactorNucleonInelastic() const {
|
||||
return fXSFactorNucleonInelastic;
|
||||
}
|
||||
|
||||
inline G4double G4HadronicParameters::XSFactorNucleonElastic() const {
|
||||
return fXSFactorNucleonElastic;
|
||||
}
|
||||
|
||||
inline G4double G4HadronicParameters::XSFactorPionInelastic() const {
|
||||
return fXSFactorPionInelastic;
|
||||
}
|
||||
|
||||
inline G4double G4HadronicParameters::XSFactorPionElastic() const {
|
||||
return fXSFactorPionElastic;
|
||||
}
|
||||
|
||||
inline G4double G4HadronicParameters::XSFactorHadronInelastic() const {
|
||||
return fXSFactorHadronInelastic;
|
||||
}
|
||||
|
||||
inline G4double G4HadronicParameters::XSFactorHadronElastic() const {
|
||||
return fXSFactorHadronElastic;
|
||||
}
|
||||
|
||||
inline G4double G4HadronicParameters::XSFactorEM() const {
|
||||
return fXSFactorEM;
|
||||
}
|
||||
|
||||
inline G4int G4HadronicParameters::GetVerboseLevel() const {
|
||||
return fVerboseLevel;
|
||||
}
|
||||
@@ -131,4 +212,12 @@ inline G4bool G4HadronicParameters::EnableBCParticles() const {
|
||||
return fEnableBC;
|
||||
}
|
||||
|
||||
inline G4bool G4HadronicParameters::ApplyFactorXS() const {
|
||||
return fApplyFactorXS;
|
||||
}
|
||||
|
||||
inline G4bool G4HadronicParameters::EnableCRCoalescence() const {
|
||||
return fEnableCRCoalescence;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -39,6 +39,8 @@
|
||||
class G4UIdirectory;
|
||||
class G4UIcommand;
|
||||
class G4UIcmdWithAnInteger;
|
||||
class G4UIcmdWithADoubleAndUnit;
|
||||
class G4UIcmdWithABool;
|
||||
class G4HadronicParameters;
|
||||
|
||||
|
||||
@@ -51,6 +53,8 @@ class G4HadronicParametersMessenger : public G4UImessenger {
|
||||
G4HadronicParameters* theHadronicParameters;
|
||||
G4UIdirectory* theDirectory;
|
||||
G4UIcmdWithAnInteger* theVerboseCmd;
|
||||
G4UIcmdWithADoubleAndUnit* theMaxEnergyCmd;
|
||||
G4UIcmdWithABool* theCRCoalescenceCmd;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Package: Geant4.src.G4processes.G4hadronic.G4hadronic_util
|
||||
#
|
||||
# Sources description for a library.
|
||||
# Lists the sources and headers of the code explicitely.
|
||||
# Lists the sources and headers of the code explicitly.
|
||||
# Lists include paths needed.
|
||||
# Lists the internal granular and global dependencies of the library.
|
||||
# Source specific properties should be added at the end.
|
||||
@@ -14,29 +14,9 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# List external includes needed.
|
||||
include_directories(${CLHEP_INCLUDE_DIRS})
|
||||
|
||||
# List internal includes needed.
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/volumes/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPRandom/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/materials/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/bosons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/barions/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/ions/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/mesons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/leptons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/track/include)
|
||||
|
||||
#
|
||||
# Define the Geant4 Module.
|
||||
#
|
||||
include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4hadronic_util
|
||||
HEADERS
|
||||
DumpFrame.hh
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#ifndef G4HadSignalHandler_off
|
||||
|
||||
//#ifndef G4HadSignalHandler_off
|
||||
#if 0
|
||||
#include "G4HadSignalHandler.hh"
|
||||
|
||||
namespace G4HadSignalHandler_local
|
||||
|
||||
@@ -77,8 +77,7 @@ G4HadronicParameters::G4HadronicParameters() {
|
||||
fMaxEnergyTransitionFTF_Cascade = 6.0*CLHEP::GeV;
|
||||
fMinEnergyTransitionQGS_FTF = 12.0*CLHEP::GeV;
|
||||
fMaxEnergyTransitionQGS_FTF = 25.0*CLHEP::GeV;
|
||||
fVerboseLevel = 1;
|
||||
fEnableBC = false;
|
||||
fEnergyThresholdForHeavyHadrons = 1.1*CLHEP::GeV;
|
||||
fMessenger = new G4HadronicParametersMessenger( this );
|
||||
}
|
||||
|
||||
@@ -130,3 +129,69 @@ void G4HadronicParameters::SetEnableBCParticles( G4bool val ) {
|
||||
void G4HadronicParameters::SetVerboseLevel( const G4int val ) {
|
||||
if ( ! IsLocked() && val >= 0 ) fVerboseLevel = val;
|
||||
}
|
||||
|
||||
|
||||
void G4HadronicParameters::SetEnergyThresholdForHeavyHadrons( G4double val ) {
|
||||
if ( ! IsLocked() && val >= 0 && val < 5*CLHEP::GeV ) {
|
||||
fEnergyThresholdForHeavyHadrons = val;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void G4HadronicParameters::SetXSFactorNucleonInelastic( G4double val ) {
|
||||
if ( ! IsLocked() && std::abs(val - 1.0) < fXSFactorLimit ) {
|
||||
fXSFactorNucleonInelastic = val;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void G4HadronicParameters::SetXSFactorNucleonElastic( G4double val ) {
|
||||
if ( ! IsLocked() && std::abs(val - 1.0) < fXSFactorLimit ) {
|
||||
fXSFactorNucleonElastic = val;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void G4HadronicParameters::SetXSFactorPionInelastic( G4double val ) {
|
||||
if ( ! IsLocked() && std::abs(val - 1.0) < fXSFactorLimit ) {
|
||||
fXSFactorPionInelastic = val;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void G4HadronicParameters::SetXSFactorPionElastic( G4double val ) {
|
||||
if ( ! IsLocked() && std::abs(val - 1.0) < fXSFactorLimit ) {
|
||||
fXSFactorPionElastic = val;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void G4HadronicParameters::SetXSFactorHadronInelastic( G4double val ) {
|
||||
if ( ! IsLocked() && std::abs(val - 1.0) < fXSFactorLimit ) {
|
||||
fXSFactorHadronInelastic = val;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void G4HadronicParameters::SetXSFactorHadronElastic( G4double val ) {
|
||||
if ( ! IsLocked() && std::abs(val - 1.0) < fXSFactorLimit ) {
|
||||
fXSFactorHadronElastic = val;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void G4HadronicParameters::SetXSFactorEM( G4double val ) {
|
||||
if ( ! IsLocked() && std::abs(val - 1.0) < fXSFactorLimit ) {
|
||||
fXSFactorEM = val;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void G4HadronicParameters::SetApplyFactorXS( G4bool val ) {
|
||||
if ( ! IsLocked() ) fApplyFactorXS = val;
|
||||
}
|
||||
|
||||
|
||||
void G4HadronicParameters::SetEnableCRCoalescence( G4bool val ) {
|
||||
if ( ! IsLocked() ) fEnableCRCoalescence = val;
|
||||
}
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
#include "G4UIdirectory.hh"
|
||||
#include "G4UIcommand.hh"
|
||||
#include "G4UIcmdWithAnInteger.hh"
|
||||
#include "G4UIcmdWithADoubleAndUnit.hh"
|
||||
#include "G4UIcmdWithABool.hh"
|
||||
#include "G4HadronicParameters.hh"
|
||||
|
||||
|
||||
@@ -52,12 +54,29 @@ G4HadronicParametersMessenger::G4HadronicParametersMessenger( G4HadronicParamete
|
||||
theVerboseCmd->SetParameterName( "VerboseLevel", true );
|
||||
theVerboseCmd->SetDefaultValue( 1 );
|
||||
theVerboseCmd->SetRange( "VerboseLevel>=0" );
|
||||
theVerboseCmd->AvailableForStates( G4State_PreInit );
|
||||
|
||||
// This command sets the max energy for hadronics.
|
||||
theMaxEnergyCmd = new G4UIcmdWithADoubleAndUnit( "/process/had/maxEnergy", this );
|
||||
theMaxEnergyCmd->SetGuidance( "Max energy for hadronics (default: 100 TeV)" );
|
||||
theMaxEnergyCmd->SetParameterName( "MaxEnergy", false );
|
||||
theMaxEnergyCmd->SetUnitCategory( "Energy" );
|
||||
theMaxEnergyCmd->SetRange( "MaxEnergy>0.0" );
|
||||
theMaxEnergyCmd->AvailableForStates( G4State_PreInit );
|
||||
|
||||
// This command enable the Cosmic Ray (CR) coalescence
|
||||
theCRCoalescenceCmd = new G4UIcmdWithABool( "/process/had/enableCRCoalescence", this );
|
||||
theCRCoalescenceCmd->SetGuidance( "Enable Cosmic Ray (CR) coalescence." );
|
||||
theCRCoalescenceCmd->SetParameterName( "EnableCRCoalescence", false );
|
||||
theCRCoalescenceCmd->SetDefaultValue( false );
|
||||
}
|
||||
|
||||
|
||||
G4HadronicParametersMessenger::~G4HadronicParametersMessenger() {
|
||||
delete theDirectory;
|
||||
delete theVerboseCmd;
|
||||
delete theMaxEnergyCmd;
|
||||
delete theCRCoalescenceCmd;
|
||||
}
|
||||
|
||||
|
||||
@@ -67,5 +86,9 @@ void G4HadronicParametersMessenger::SetNewValue( G4UIcommand *command, G4String
|
||||
// it is the responsibility of each hadronic model, cross section and process to check
|
||||
// this verbose level and behave accordingly.
|
||||
theHadronicParameters->SetVerboseLevel( theVerboseCmd->GetNewIntValue( newValues ) );
|
||||
} else if ( command == theMaxEnergyCmd ) {
|
||||
theHadronicParameters->SetMaxEnergy( theMaxEnergyCmd->GetNewDoubleValue( newValues ) );
|
||||
} else if ( command == theCRCoalescenceCmd ) {
|
||||
theHadronicParameters->SetEnableCRCoalescence( theCRCoalescenceCmd->GetNewBoolValue( newValues ) );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user