Import Geant4 10.7.0 source tree
This commit is contained in:
@@ -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