Import Geant4 10.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-10 12:08:39 +02:00
parent 286caacf06
commit c9b32a6c0a
5770 changed files with 1050949 additions and 367105 deletions
@@ -29,12 +29,10 @@
#include "G4BOptnForceCommonTruncatedExp.hh"
#include "G4BiasingProcessInterface.hh"
//#include "G4Exception.hh"
G4ILawCommonTruncatedExp::G4ILawCommonTruncatedExp(G4String name)
: G4VBiasingInteractionLaw(name),
fExpInteractionLaw("expLawFor"+name)
//fIsSingular(false)
{}
G4ILawCommonTruncatedExp::~G4ILawCommonTruncatedExp()
@@ -43,18 +41,14 @@ G4ILawCommonTruncatedExp::~G4ILawCommonTruncatedExp()
G4double G4ILawCommonTruncatedExp::ComputeEffectiveCrossSectionAt(G4double distance) const
{
return fExpInteractionLaw.ComputeEffectiveCrossSectionAt( distance ) * fOperation->GetTriggeredProcessXSfraction();
return fExpInteractionLaw.ComputeEffectiveCrossSectionAt( distance ) * fSelectedProcessXSfraction;
}
G4double G4ILawCommonTruncatedExp::ComputeNonInteractionProbabilityAt(G4double distance) const
{
G4double niProba = fExpInteractionLaw.ComputeNonInteractionProbabilityAt( distance );
if ( niProba > 0.0 )
{
return std::exp( std::log(niProba) / fNumberOfSharing );
}
else
if ( niProba <= 0.0 )
{
G4ExceptionDescription ed;
ed << " Negative probability for `" << GetName() << "' p = " << niProba << " distance = " << distance << " !!! " << G4endl;
@@ -62,27 +56,20 @@ G4double G4ILawCommonTruncatedExp::ComputeNonInteractionProbabilityAt(G4double d
"BIAS.GEN.08",
JustWarning,
ed);
return niProba;
}
return niProba;
}
G4double G4ILawCommonTruncatedExp::SampleInteractionLength()
{
if ( fFirstSamplingCall ) fInteractionDistance = fExpInteractionLaw.SampleInteractionLength();
fFirstSamplingCall = false;
return DBL_MAX;
fInteractionDistance = fExpInteractionLaw.SampleInteractionLength();
return fInteractionDistance;
}
G4double G4ILawCommonTruncatedExp::UpdateInteractionLengthForStep(G4double truePathLength)
{
if ( fFirstUpdateCall )
fInteractionDistance = fExpInteractionLaw.UpdateInteractionLengthForStep(truePathLength);
fFirstUpdateCall = false;
return DBL_MAX;
}
void G4ILawCommonTruncatedExp::reset()
{
fFirstSamplingCall = true;
fFirstUpdateCall = true;
fInteractionDistance = fExpInteractionLaw.UpdateInteractionLengthForStep(truePathLength);
return fInteractionDistance;
}