Import Geant4 5.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:15:15 +02:00
parent 37fff30d2e
commit fbd4999cf7
4396 changed files with 56662 additions and 52446 deletions
@@ -28,6 +28,7 @@
#include <stdlib.h>
#include "G4HadronicProcess.hh"
#include "G4EffectiveCharge.hh"
#include "G4NoModelFound.hh"
//@@ add model name info, once typeinfo available #include <typeinfo.h>
@@ -89,8 +90,20 @@
G4Material *aMaterial = aTrack.GetMaterial();
G4double kineticEnergy = aParticle->GetKineticEnergy();
G4Element * anElement = ChooseAandZ( aParticle, aMaterial );
try
{
theInteraction = ChooseHadronicInteraction( kineticEnergy,
aMaterial, anElement );
}
catch(G4NoModelFound * it)
{
delete it;
G4cout << "Unrecoverable error for:"<<G4endl;
G4cout << " - Particle energy[GeV] = "<< kineticEnergy/GeV<<G4endl;
G4cout << " - Material = "<<aMaterial->GetName()<<G4endl;
G4cout << " - Particle type = "<<aParticle->GetDefinition()->GetParticleName()<<G4endl;
G4Exception("GetHadronicProcess: No model found for this energy range");
}
G4VParticleChange *result =
theInteraction->ApplyYourself( aTrack, targetNucleus);
for(G4int i=0; i<result->GetNumberOfSecondaries(); i++)