Files
geant4/source/processes/photolepton_hadron/src/G4ParametrizedHadronicVertex.cc
T
2016-06-01 15:25:35 +02:00

19 lines
636 B
C++

#include "G4ParametrizedHadronicVertex.hh"
G4VParticleChange * G4ParametrizedHadronicVertex::
ApplyYourself(const G4Nucleus & theTarget, const G4Track &thePhoton)
{
G4double theKineticEnergy = thePhoton.GetKineticEnergy();
if(RandFlat::shootBit())
{
if(theKineticEnergy<20*GeV) return theLowEPionMinus.ApplyYourself(thePhoton, theTarget);
return theHighEPionMinus.ApplyYourself(thePhoton, theTarget);
}
else
{
if(theKineticEnergy<20*GeV) return theLowEPionPlus.ApplyYourself(thePhoton, theTarget);
return theHighEPionPlus.ApplyYourself(thePhoton, theTarget);
}
return NULL;
}