55 :
G4VEmModel(nam),fParticleChange(0),fParticle(0),isInitialised(false)
66 fPielr2 =
pi*classic_electr_radius*classic_electr_radius;
89 G4cout <<
"Calling G4PenelopeAnnihilationModel::Initialise()" <<
G4endl;
96 G4cout <<
"Penelope Annihilation model is initialized " << G4endl
114 G4cout <<
"Calling G4PenelopeAnnihilationModel::InitialiseLocal()" <<
G4endl;
140 G4cout <<
"Calling ComputeCrossSectionPerAtom() of G4PenelopeAnnihilationModel" <<
146 G4cout <<
"Annihilation cross Section at " << energy/
keV <<
" keV for Z=" << Z <<
175 G4cout <<
"Calling SamplingSecondaries() of G4PenelopeAnnihilationModel" <<
G4endl;
183 if (kineticEnergy == 0.0)
187 G4double sinTheta = std::sqrt(1.0-cosTheta*cosTheta);
189 G4ThreeVector direction (sinTheta*std::cos(phi),sinTheta*std::sin(phi),cosTheta);
191 direction, electron_mass_c2);
193 -direction, electron_mass_c2);
195 fvect->push_back(firstGamma);
196 fvect->push_back(secondGamma);
204 G4double gamma21 = std::sqrt(gamma*gamma-1);
206 G4double chimin = 1.0/(ani+gamma21);
207 G4double rchi = (1.0-chimin)/chimin;
217 G4double totalAvailableEnergy = kineticEnergy + 2.0*electron_mass_c2;
218 G4double photon1Energy = epsilon*totalAvailableEnergy;
225 G4double sinTheta1 = std::sqrt(1.-cosTheta1*cosTheta1);
227 G4double dirx1 = sinTheta1 * std::cos(phi1);
228 G4double diry1 = sinTheta1 * std::sin(phi1);
231 G4double sinTheta2 = std::sqrt(1.-cosTheta2*cosTheta2);
233 G4double dirx2 = sinTheta2 * std::cos(phi2);
234 G4double diry2 = sinTheta2 * std::sin(phi2);
238 photon1Direction.rotateUz(positronDirection);
243 fvect->push_back(aParticle1);
246 photon2Direction.rotateUz(positronDirection);
251 fvect->push_back(aParticle2);
255 G4cout <<
"-----------------------------------------------------------" <<
G4endl;
256 G4cout <<
"Energy balance from G4PenelopeAnnihilation" <<
G4endl;
257 G4cout <<
"Kinetic positron energy: " << kineticEnergy/
keV <<
" keV" <<
G4endl;
258 G4cout <<
"Total available energy: " << totalAvailableEnergy/
keV <<
" keV " <<
G4endl;
259 G4cout <<
"-----------------------------------------------------------" <<
G4endl;
260 G4cout <<
"Photon energy 1: " << photon1Energy/
keV <<
" keV" <<
G4endl;
261 G4cout <<
"Photon energy 2: " << photon2Energy/
keV <<
" keV" <<
G4endl;
262 G4cout <<
"Total final state: " << (photon1Energy+photon2Energy)/
keV <<
264 G4cout <<
"-----------------------------------------------------------" <<
G4endl;
268 G4double energyDiff = std::fabs(totalAvailableEnergy-photon1Energy-photon2Energy);
269 if (energyDiff > 0.05*
keV)
270 G4cout <<
"Warning from G4PenelopeAnnihilation: problem with energy conservation: " <<
271 (photon1Energy+photon2Energy)/
keV <<
272 " keV (final) vs. " <<
273 totalAvailableEnergy/
keV <<
" keV (initial)" << G4endl;
293 G4double crossSection =
fPielr2*((gamma2+4.0*gamma+1.0)*std::log(gamma+f1)/f2
294 - (gamma+3.0)/
f1)/(gamma+1.0);
G4double fIntrinsicHighEnergyLimit
G4double LowEnergyLimit() const
G4double GetKineticEnergy() const
CLHEP::Hep3Vector G4ThreeVector
G4double HighEnergyLimit() const
G4double ComputeCrossSectionPerElectron(G4double energy)
void SetHighEnergyLimit(G4double)
virtual ~G4PenelopeAnnihilationModel()
const G4ParticleDefinition * fParticle
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
void SetParticle(const G4ParticleDefinition *)
G4GLOB_DLL std::ostream G4cout
const G4ThreeVector & GetMomentumDirection() const
static const double twopi
G4PenelopeAnnihilationModel(const G4ParticleDefinition *p=0, const G4String &processName="PenAnnih")
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4double energy(const ThreeVector &p, const G4double m)
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0, G4double cut=0, G4double emax=DBL_MAX)
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)
G4double fIntrinsicLowEnergyLimit
void SetProposedKineticEnergy(G4double proposedKinEnergy)
virtual void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *)
G4ParticleChangeForGamma * fParticleChange
void ProposeTrackStatus(G4TrackStatus status)
G4ThreeVector G4ParticleMomentum
double epsilon(double density, double temperature)
G4ParticleChangeForGamma * GetParticleChangeForGamma()