Import Geant4 10.4.0 source tree

This commit is contained in:
Gabriele Cosmo
2017-12-08 12:52:30 +01:00
parent 98e455a940
commit fc6af9e721
2166 changed files with 276760 additions and 100873 deletions
@@ -104,12 +104,12 @@ G4Transportation::G4Transportation( G4int verbosity )
fThresholdTrials( 10 ),
fNoLooperTrials( 0 ),
fSumEnergyKilled( 0.0 ), fMaxEnergyKilled( 0.0 ),
fShortStepOptimisation( false ), // Old default: true (=fast short steps)
fVerboseLevel( verbosity )
fShortStepOptimisation( false ) // Old default: true (=fast short steps)
{
// set Process Sub Type
SetProcessSubType(static_cast<G4int>(TRANSPORTATION));
pParticleChange= &fParticleChange; // Required to conform to G4VProcess
SetVerboseLevel(verbosity);
G4TransportationManager* transportMgr ;
@@ -132,7 +132,7 @@ G4Transportation::G4Transportation( G4int verbosity )
// Points to (G4VTouchable*) 0
#ifdef G4VERBOSE
if( fVerboseLevel > 0)
if( verboseLevel > 0)
{
G4cout << " G4Transportation constructor> set fShortStepOptimisation to ";
if ( fShortStepOptimisation ) G4cout << "true" << G4endl;
@@ -145,7 +145,7 @@ G4Transportation::G4Transportation( G4int verbosity )
G4Transportation::~G4Transportation()
{
if( (fVerboseLevel > 0) && (fSumEnergyKilled > 0.0 ) )
if( (verboseLevel > 0) && (fSumEnergyKilled > 0.0 ) )
{
G4cout << " G4Transportation: Statistics for looping particles " << G4endl;
G4cout << " Sum of energy of loopers killed: " << fSumEnergyKilled << G4endl;
@@ -182,12 +182,9 @@ AlongStepGetPhysicalInteractionLength( const G4Track& track,
*selection = CandidateForSelection ;
fFirstStepInVolume= fNewTrack || fLastStepInVolume;
// G4cout << " Transport::AlongStep GPIL: 1st-step= " << fFirstStepInVolume << " newTrack= " << fNewTrack << " fLastStep-in-Vol= " << fLastStepInVolume << G4endl;
fLastStepInVolume= false;
fNewTrack = false;
fParticleChange.ProposeFirstStepInVolume(fFirstStepInVolume);
// Get initial Energy/Momentum of the track
//
const G4DynamicParticle* pParticle = track.GetDynamicParticle() ;
@@ -327,11 +324,8 @@ AlongStepGetPhysicalInteractionLength( const G4Track& track,
// For insurance, could set it again
// chargeState.SetPDGSpin(pParticleDef->GetPDGSpin() ); // Provisionally in same object
G4EquationOfMotion* equationOfMotion =
(fFieldPropagator->GetChordFinder()->GetIntegrationDriver()->GetStepper())
->GetEquationOfMotion();
G4EquationOfMotion* equationOfMotion = fFieldPropagator->GetCurrentEquationOfMotion();
// equationOfMotion->SetChargeMomentumMass( particleCharge,
equationOfMotion->SetChargeMomentumMass( chargeState,
momentumMagnitude,
restMass);
@@ -418,7 +412,7 @@ AlongStepGetPhysicalInteractionLength( const G4Track& track,
no_inexact_steps++;
// Possible statistics keeping here ...
}
if( fVerboseLevel > 1 )
if( verboseLevel > 1 )
{
if( std::fabs(startEnergy- endEnergy) > perThousand * endEnergy )
{
@@ -436,7 +430,7 @@ AlongStepGetPhysicalInteractionLength( const G4Track& track,
<< " Ending E= " << std::setw(12) << endEnergy / MeV << " MeV " << G4endl;
G4cout << " Energy has been corrected -- however, review"
<< " field propagation parameters for accuracy." << G4endl;
if( (fVerboseLevel > 2 ) || (no_warnings<4) || (no_large_ediff == warnModulo * moduloFactor) )
if( (verboseLevel > 2 ) || (no_warnings<4) || (no_large_ediff == warnModulo * moduloFactor) )
{
G4cout << " These include EpsilonStepMax(/Min) in G4FieldManager "
<< " which determine fractional error per step for integrated quantities. " << G4endl
@@ -454,7 +448,7 @@ AlongStepGetPhysicalInteractionLength( const G4Track& track,
}
}
}
} // end of if (fVerboseLevel)
} // end of if (verboseLevel)
// Correct the energy for fields that conserve it
// This - hides the integration error
@@ -538,7 +532,7 @@ G4VParticleChange* G4Transportation::AlongStepDoIt( const G4Track& track,
fParticleChange.SetMomentumChanged(fMomentumChanged) ;
fParticleChange.ProposePolarization(fTransportEndSpin);
G4double deltaTime = 0.0 ;
// Calculate Lab Time of Flight (ONLY if field Equations used it!)
@@ -595,7 +589,7 @@ G4VParticleChange* G4Transportation::AlongStepDoIt( const G4Track& track,
if( endEnergy > fMaxEnergyKilled) { fMaxEnergyKilled= endEnergy; }
#ifdef G4VERBOSE
if( (fVerboseLevel > 1) &&
if( (verboseLevel > 1) &&
( endEnergy > fThreshold_Warning_Energy ) )
{
G4cout << " G4Transportation is killing track that is looping or stuck "
@@ -613,7 +607,7 @@ G4VParticleChange* G4Transportation::AlongStepDoIt( const G4Track& track,
{
fNoLooperTrials ++;
#ifdef G4VERBOSE
if( (fVerboseLevel > 2) )
if( (verboseLevel > 2) )
{
G4cout << " G4Transportation::AlongStepDoIt(): Particle looping - "
<< " Number of trials = " << fNoLooperTrials