219 if (Egam <= LowestEnergyLimit) {
225 const G4Element* anElement = SelectRandomAtom(aDynamicGamma, aMaterial);
247 G4double sqrtx=sqrt(.25-GammaMuonInv);
255 /(1.+2.*sBZ*Mmuon*GammaMuonInv));
263 G4double del=Mmuon*Mmuon/(2.*Egam*xPM);
264 W=Winfty*(1.+Ds2*del/Mmuon)/(1.+sBZ*del);
265 if(W<=1. || nn > nmax) {
break; }
267 result=xxp*
G4Log(W)*LogWmaxInv;
269 G4cout <<
"G4GammaConversionToMuons::PostStepDoIt WARNING:"
270 <<
" in dSigxPlusGen, result=" << result <<
" > 1" <<
G4endl;
273 if(nn >= nmax) {
break; }
283 G4double thetaPlus,thetaMinus,phiHalf;
295 f1=(1.-2.*xPM+4.*xPM*t*(1.-t)) / (1.+C1/(t*t));
296 if(f1<0 || f1> f1_max)
298 G4cout <<
"G4GammaConversionToMuons::PostStepDoIt WARNING:"
299 <<
"outside allowed range f1=" << f1 <<
" is set to zero"
303 if(nn > nmax) {
break; }
308 G4double f2_max=1.-2.*xPM*(1.-4.*t*(1.-t));
316 f2=1.-2.*xPM+4.*xPM*t*(1.-t)*(1.+cos(2.*psi));
317 if(f2<0 || f2> f2_max)
319 G4cout <<
"G4GammaConversionToMuons::PostStepDoIt WARNING:"
320 <<
"outside allowed range f2=" << f2 <<
" is set to zero"
324 if(nn >= nmax) {
break; }
330 G4double C2Term1=GammaMuonInv/(2.*xPM*t);
331 G4double C2=4./sqrt(xPM)*pow(C2Term1*C2Term1+C2Term2*C2Term2,2.);
339 phiHalf=0.5*rho/u*sin(psi);
341 thetaPlus =GammaMuonInv*(u+xiHalf)/xPlus;
342 thetaMinus=GammaMuonInv*(u-xiHalf)/xMinus;
346 if(std::abs(thetaPlus)>
pi) { thetaPlus = 0.0; }
347 if(std::abs(thetaMinus)>
pi) { thetaMinus = 0.0; }
351 }
while ( std::abs(thetaPlus)>
pi || std::abs(thetaMinus) >
pi);
360 G4ThreeVector MuPlusDirection ( sin(thetaPlus) *cos(phi0+phiHalf),
361 sin(thetaPlus) *sin(phi0+phiHalf), cos(thetaPlus) );
362 G4ThreeVector MuMinusDirection (-sin(thetaMinus)*cos(phi0-phiHalf),
363 -sin(thetaMinus) *sin(phi0-phiHalf), cos(thetaMinus) );
365 MuPlusDirection.rotateUz(GammaDirection);
366 MuMinusDirection.rotateUz(GammaDirection);
G4double G4ParticleHPJENDLHEData::G4double result
static G4MuonPlus * MuonPlus()
G4double GetKineticEnergy() const
const G4DynamicParticle * GetDynamicParticle() const
double B(double temperature)
static G4NistManager * Instance()
G4GLOB_DLL std::ostream G4cout
static const G4double sqrte
const G4ThreeVector & GetMomentumDirection() const
G4Material * GetMaterial() const
G4double G4Log(G4double x)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
virtual void Initialize(const G4Track &)
void SetNumberOfSecondaries(G4int totSecondaries)
void ProposeEnergy(G4double finalEnergy)
G4ParticleChange aParticleChange
void AddSecondary(G4Track *aSecondary)
static G4MuonMinus * MuonMinus()
static constexpr double pi
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
void ProposeTrackStatus(G4TrackStatus status)
virtual G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)