51 G4double G4PenelopeAnnihilationModel::fPielr2 = 0;
55 :
G4VEmModel(nam),fParticleChange(0),fParticle(0),isInitialised(false)
57 fIntrinsicLowEnergyLimit = 0.0;
58 fIntrinsicHighEnergyLimit = 100.0*
GeV;
89 G4cout <<
"Calling G4PenelopeAnnihilationModel::Initialise()" <<
G4endl;
95 if(verboseLevel > 0) {
96 G4cout <<
"Penelope Annihilation model is initialized " << G4endl
104 if(isInitialised)
return;
106 isInitialised =
true;
113 if (verboseLevel > 3)
114 G4cout <<
"Calling G4PenelopeAnnihilationModel::InitialiseLocal()" <<
G4endl;
127 verboseLevel = theModel->verboseLevel;
139 if (verboseLevel > 3)
140 G4cout <<
"Calling ComputeCrossSectionPerAtom() of G4PenelopeAnnihilationModel" <<
143 G4double cs = Z*ComputeCrossSectionPerElectron(energy);
145 if (verboseLevel > 2)
146 G4cout <<
"Annihilation cross Section at " << energy/
keV <<
" keV for Z=" << Z <<
174 if (verboseLevel > 3)
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);
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;
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);
253 if (verboseLevel > 1)
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;
266 if (verboseLevel > 0)
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 LowEnergyLimit() const
G4double GetKineticEnergy() const
G4double HighEnergyLimit() const
static constexpr double twopi
void SetHighEnergyLimit(G4double)
virtual ~G4PenelopeAnnihilationModel()
const G4ParticleDefinition * fParticle
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
G4GLOB_DLL std::ostream G4cout
const G4ThreeVector & GetMomentumDirection() const
Hep3Vector & rotateUz(const Hep3Vector &)
static constexpr double eV
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)
static constexpr double GeV
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)
void SetProposedKineticEnergy(G4double proposedKinEnergy)
virtual void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *)
static constexpr double pi
G4ParticleChangeForGamma * fParticleChange
void ProposeTrackStatus(G4TrackStatus status)
static constexpr double barn
static constexpr double keV
double epsilon(double density, double temperature)
G4ParticleChangeForGamma * GetParticleChangeForGamma()