284{
285
286 static const G4double ElectronMass = CLHEP::electron_mass_c2;
287
289 const G4double LeptonMass2 = LeptonMass*LeptonMass;
290
291 static const G4double alpha0 = CLHEP::fine_structure_const;
292
293 static const G4double r0 = CLHEP::classic_electr_radius;
294
295 static const G4double r02 = r0*r0*1.e+25;
298
299 static const G4double factor1 = 2.66134007899/(8.*alpha0*ElectronMass);
300
301 G4double PairInvMassMin = 2.*LeptonMass;
302 G4double TrThreshold = 2.0 * ( (LeptonMass2)/ElectronMass + LeptonMass);
303
304
306
307 { 0.0227436, 0.0582046, 3.0322675, 2.8275065, -0.0034004,
308 1.1212766, 1.8989468, 68.3492750, 0.0211186, 14.4},
309
310 {0.67810E-06, 0.86037E+05, 2.0008395, 1.6739719, -0.0057279,
311 1.4222, 0.0, 263230.0, 0.0521, 51.1338}
312 };
314
315 { 0.0332350, 4.3942537, 2.8515925, 2.6351695, -0.0031510,
316 1.5737305, 1.8104647, 20.6434021, -0.0272586, 28.9},
317
318 {0.10382E-03, 0.14408E+17, 4.1368679, 3.2662121, -0.0163091,
319 0.0000, 0.0, 0.0, 0.0000, 1.0000}
320 };
321
322 static const G4double para[2][3][2] = {
323
324 { {11., -16.},{-1.17, -2.95},{-2., -0.5} },
325
326 { {17.5, 1.},{-1.17, -2.95},{2., 6.} }
327 };
328
329 static const G4double correctionIndex = 1.4;
330
332
333 if ( GammaEnergy <= PairInvMassMin) { return; }
334
335 const G4double GammaEnergy2 = GammaEnergy*GammaEnergy;
336
337
341
342
343
344
345
347 GammaPolarization -= GammaPolarization.
dot(GammaDirection) * GammaDirection;
348 }
349
350
351 const G4double GammaPolarizationMag = GammaPolarization.
mag();
352
353
354
355
358
363
364 const G4double NuThreshold = 2.0 * ( (LeptonMass2)/targetMass + LeptonMass);
365
366 if ( GammaEnergy <= NuThreshold) { return; }
367
369
370
372 if (fConversionType == 1) {
373 itriplet = false;
374 } else if (fConversionType == 2) {
375 itriplet = true;
376 if ( GammaEnergy <= TrThreshold ) return;
377 } else if ( GammaEnergy > TrThreshold ) {
378
379
380
381 if(rndmEngine->
flat()*(Z+1) < 1.) {
382 itriplet = true;
383 }
384 }
385
386
387 const G4double RecoilMass = itriplet ? ElectronMass : targetMass;
388 const G4double RecoilMass2 = RecoilMass*RecoilMass;
389 const G4double sCMS = 2.*RecoilMass*GammaEnergy + RecoilMass2;
390 const G4double sCMSPlusRM2 = sCMS + RecoilMass2;
391 const G4double sqrts = std::sqrt(sCMS);
392 const G4double isqrts2 = 1./(2.*sqrts);
393
394 const G4double PairInvMassMax = sqrts-RecoilMass;
395 const G4double PairInvMassRange = PairInvMassMax/PairInvMassMin;
397
398
399
401
402
403 const G4double EffectiveZ = iraw ? 0.5 : Z;
404 const G4double Threshold = itriplet ? TrThreshold : NuThreshold;
405 const G4double AvailableEnergy = GammaEnergy - Threshold;
407
408 const G4double MaxDiffCross = itriplet
409 ? MaxDiffCrossSection(tr[fConvMode],
410 EffectiveZ, AvailableEnergy, LogAvailableEnergy)
411 : MaxDiffCrossSection(nu[fConvMode],
412 EffectiveZ, AvailableEnergy, LogAvailableEnergy);
413
414
415 const G4double ymax = 1.5 * MaxDiffCross;
416
417 const G4double xu1 = (LogAvailableEnergy > para[fConvMode][2][0])
418 ? para[fConvMode][0][0] +
419 para[fConvMode][1][0]*LogAvailableEnergy
420 : para[fConvMode][0][0] +
421 para[fConvMode][2][0]*para[fConvMode][1][0];
422 const G4double xl1 = (LogAvailableEnergy > para[fConvMode][2][1])
423 ? para[fConvMode][0][1] +
424 para[fConvMode][1][1]*LogAvailableEnergy
425 : para[fConvMode][0][1] +
426 para[fConvMode][2][1]*para[fConvMode][1][1];
427
432
434
435 do {
436
438
439
440
441
442
443
445 G4Exp(
G4Log(rndmv6[0])/(correctionIndex + 1.0));
446
449 const G4double cosTheta = (x0-1.)*dum0;
450 const G4double sinTheta = std::sqrt(4.*x0)*dum0;
451
452 const G4double PairInvMass = PairInvMassMin*
G4Exp(X1*X1*lnPairInvMassRange);
453
454
455
456
457
458 const G4double cosThetaLept = std::cos(pi*rndmv6[2]);
459
460 const G4double sinThetaLept = std::sqrt((1.-cosThetaLept)*(1.+cosThetaLept));
461
462 const G4double cosPhiLept = std::cos(twoPi*rndmv6[3]-pi);
463
464
465 const G4double sinPhiLept = std::copysign(std::sqrt((1.-cosPhiLept)*(1.+cosPhiLept)),rndmv6[3]-0.5);
466
467 const G4double cosPhi = std::cos(twoPi*rndmv6[4]-pi);
468 const G4double sinPhi = std::copysign(std::sqrt((1.-cosPhi)*(1.+cosPhi)),rndmv6[4]-0.5);
469
470
471
472
473
474
475
476
477
478
479
480 const G4double RecEnergyCMS = (sCMSPlusRM2-PairInvMass*PairInvMass)*isqrts2;
481 const G4double LeptonEnergy2 = PairInvMass*0.5;
482
483
484 G4double abp = std::max((2.0*GammaEnergy*RecoilMass -
485 PairInvMass*PairInvMass + 2.0*PairInvMass*RecoilMass)*
486 (2.0*GammaEnergy*RecoilMass -
487 PairInvMass*PairInvMass - 2.0*PairInvMass*RecoilMass),0.0);
488
489 G4double thePRecoil = std::sqrt(abp) * isqrts2;
490
491
492 Recoil.
set( thePRecoil*sinTheta*cosPhi,
493 thePRecoil*sinTheta*sinPhi,
494 thePRecoil*cosTheta,
495 RecEnergyCMS);
496
497
498 const G4double thePLepton = std::sqrt( (LeptonEnergy2-LeptonMass)
499 *(LeptonEnergy2+LeptonMass));
500
501 LeptonPlus.
set(thePLepton*sinThetaLept*cosPhiLept,
502 thePLepton*sinThetaLept*sinPhiLept,
503 thePLepton*cosThetaLept,
504 LeptonEnergy2);
505
506 LeptonMinus.
set(-LeptonPlus.
x(),
509 LeptonEnergy2);
510
511
512
513
514
516
517
518
519
523
524 LeptonPlus.
boost(pair2cms);
525 LeptonMinus.
boost(pair2cms);
526
527
528
530 LeptonPlus.
boostZ(betaCMS);
531 LeptonMinus.
boostZ(betaCMS);
532
533
534 const G4double Jacob0 = x0*dum0*dum0;
535 const G4double Jacob1 = 2.*X1*lnPairInvMassRange*PairInvMass;
536 const G4double Jacob2 = std::abs(sinThetaLept);
537
542
545 const G4double dum1 = 1./std::sqrt( pPX*pPX + pPY*pPY );
546 const G4double cosPhiPlus = pPX*dum1;
547 const G4double sinPhiPlus = pPY*dum1;
548
549
550
551 const G4double elMassCTP = LeptonMass*cosThetaPlus;
552 const G4double ePlusSTP = EPlus*sinThetaPlus;
553 const G4double DPlus = (elMassCTP*elMassCTP + ePlusSTP*ePlusSTP)
554 /(EPlus + PPlus*cosThetaPlus);
555
560
563 const G4double dum2 = 1./std::sqrt( ePX*ePX + ePY*ePY );
564 const G4double cosPhiMinus = ePX*dum2;
565 const G4double sinPhiMinus = ePY*dum2;
566
567 const G4double elMassCTM = LeptonMass*cosThetaMinus;
568 const G4double eMinSTM = EMinus*sinThetaMinus;
569 const G4double DMinus = (elMassCTM*elMassCTM + eMinSTM*eMinSTM)
570 /(EMinus + PMinus*cosThetaMinus);
571
572
573 const G4double cosdPhi = cosPhiPlus*cosPhiMinus + sinPhiPlus*sinPhiMinus;
576
577 const G4double BigPhi = -LeptonMass2 / (GammaEnergy*GammaEnergy2 * q2*q2);
578
580 if (!iraw) {
581 if (itriplet) {
582 const G4double qun = factor1*iZ13*iZ13;
584 if (nun < 1.) {
585 FormFactor = (nun < 0.01) ? (13.8-55.4*std::sqrt(nun))*nun
586 : std::sqrt(1-(nun-1)*(nun-1));
587 }
588 } else {
589 const G4double dum3 = 217.*PRec*iZ13;
590 const G4double AFF = 1./(1. + dum3*dum3);
591 FormFactor = (1.-AFF)*(1-AFF);
592 }
593 }
594
596 if (GammaPolarizationMag==0.) {
597 const G4double pPlusSTP = PPlus*sinThetaPlus;
598 const G4double pMinusSTM = PMinus*sinThetaMinus;
599 const G4double pPlusSTPperDP = pPlusSTP/DPlus;
600 const G4double pMinusSTMperDM = pMinusSTM/DMinus;
602 pPlusSTPperDP *pPlusSTPperDP *(4.*EMinus*EMinus-q2)
603 + pMinusSTMperDM*pMinusSTMperDM*(4.*EPlus*EPlus - q2)
604 + 2.*pPlusSTPperDP*pMinusSTMperDM*cosdPhi
605 *(4.*EPlus*EMinus + q2 - 2.*GammaEnergy2)
606 - 2.*GammaEnergy2*(pPlusSTP*pPlusSTP+pMinusSTM*pMinusSTM)/(DMinus*DPlus));
607 betheheitler = dunpol * factor;
608 } else {
609 const G4double pPlusSTP = PPlus*sinThetaPlus;
610 const G4double pMinusSTM = PMinus*sinThetaMinus;
611 const G4double pPlusSTPCPPperDP = pPlusSTP*cosPhiPlus/DPlus;
612 const G4double pMinusSTMCPMperDM = pMinusSTM*cosPhiMinus/DMinus;
613 const G4double caa = 2.*(EPlus*pMinusSTMCPMperDM+EMinus*pPlusSTPCPPperDP);
614 const G4double cbb = pMinusSTMCPMperDM-pPlusSTPCPPperDP;
615 const G4double ccc = (pPlusSTP*pPlusSTP + pMinusSTM*pMinusSTM
616 +2.*pPlusSTP*pMinusSTM*cosdPhi)/ (DMinus*DPlus);
617 const G4double dtot= 2.*BigPhi*( caa*caa - q2*cbb*cbb - GammaEnergy2*ccc);
618 betheheitler = dtot * factor;
619 }
620
621 const G4double cross = Norme * Jacob0 * Jacob1 * Jacob2 * betheheitler
622 * FormFactor * RecoilMass / sqrts;
623 pdf = cross * (xu1 - xl1) /
G4Exp(correctionIndex*
G4Log(X1));
624 } while ( pdf < ymax * rndmv6[5] );
625
626
627 if ( fVerbose > 2 ) {
628 G4double recul = std::sqrt(Recoil.
x()*Recoil.
x()+Recoil.
y()*Recoil.
y()
629 +Recoil.
z()*Recoil.
z());
630 G4cout <<
"BetheHeitler5DModel GammaEnergy= " << GammaEnergy
631 << " PDF= " << pdf << " ymax= " << ymax
632 <<
" recul= " << recul <<
G4endl;
633 }
634
635
636
637 if ( fVerbose > 4 ) {
638 G4cout <<
"BetheHeitler5DModel GammaDirection " << GammaDirection <<
G4endl;
639 G4cout <<
"BetheHeitler5DModel GammaPolarization " << GammaPolarization <<
G4endl;
640 G4cout <<
"BetheHeitler5DModel GammaEnergy " << GammaEnergy <<
G4endl;
641 G4cout <<
"BetheHeitler5DModel Conv "
642 << (itriplet ?
"triplet" :
"nucl") <<
G4endl;
643 }
644
645 if (GammaPolarizationMag == 0.0) {
646
648 } else {
649
650 GammaPolarization /= GammaPolarizationMag;
651 }
652
653
655
656
658
662
663 if ( fVerbose > 2 ) {
664 G4cout <<
"BetheHeitler5DModel Recoil " << Recoil.
x() <<
" " << Recoil.
y() <<
" " << Recoil.
z()
665 <<
" " << Recoil.
t() <<
" " <<
G4endl;
666 G4cout <<
"BetheHeitler5DModel LeptonPlus " << LeptonPlus.
x() <<
" " << LeptonPlus.
y() <<
" "
667 << LeptonPlus.
z() <<
" " << LeptonPlus.
t() <<
" " <<
G4endl;
668 G4cout <<
"BetheHeitler5DModel LeptonMinus " << LeptonMinus.
x() <<
" " << LeptonMinus.
y() <<
" "
669 << LeptonMinus.
z() <<
" " << LeptonMinus.
t() <<
" " <<
G4endl;
670 }
671
672
675
676
678 if (itriplet) {
679
681 } else{
682 RecoilPart = theIonTable->
GetIon(Z, A, 0);
683 }
685
686
687 fvect->push_back(aParticle1);
688 fvect->push_back(aParticle2);
689 fvect->push_back(aParticle3);
690
691
694}
double A(double temperature)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double G4Log(G4double x)
CLHEP::HepLorentzVector G4LorentzVector
Hep3Vector orthogonal() const
Hep3Vector cross(const Hep3Vector &) const
double dot(const Hep3Vector &) const
double howOrthogonal(const Hep3Vector &v) const
Hep3Vector boostVector() const
HepLorentzVector & boost(double, double, double)
HepLorentzVector & boostZ(double beta)
void set(double x, double y, double z, double t)
HepLorentzVector & transform(const HepRotation &)
virtual void flatArray(const int size, double *vect)=0
const G4ThreeVector & GetMomentumDirection() const
G4double GetLogKineticEnergy() const
G4double GetKineticEnergy() const
const G4ThreeVector & GetPolarization() const
G4IonisParamElm * GetIonisation() const
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
static G4double GetNuclearMass(const G4double A, const G4double Z)
G4ParticleDefinition * fTheGamma
G4ParticleChangeForGamma * fParticleChange
void SetProposedKineticEnergy(G4double proposedKinEnergy)
G4int SelectIsotopeNumber(const G4Element *)
const G4Element * SelectTargetAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double logKineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
void ProposeTrackStatus(G4TrackStatus status)