Geant4-11
G4BetheHeitler5DModel.cc
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27// -------------------------------------------------------------------
28//
29// GEANT4 Class file
30//
31//
32// File name: G4BetheHeitler5DModel.cc
33//
34// Authors:
35// Igor Semeniouk and Denis Bernard,
36// LLR, Ecole polytechnique & CNRS/IN2P3, 91128 Palaiseau, France
37//
38// Acknowledgement of the support of the French National Research Agency
39// (ANR-13-BS05-0002).
40//
41// Reference: Nucl. Instrum. Meth. A 899 (2018) 85 (arXiv:1802.08253 [hep-ph])
42// Nucl. Instrum. Meth., A 936 (2019) 290
43//
44// Class Description:
45//
46// Generates the conversion of a high-energy photon to an e+e- pair, either in the field of an
47// atomic electron (triplet) or nucleus (nuclear).
48// Samples the five-dimensional (5D) differential cross-section analytical expression:
49// . Non polarized conversion:
50// H.A. Bethe, W. Heitler, Proc. R. Soc. Lond. Ser. A 146 (1934) 83.
51// . Polarized conversion:
52// T. H. Berlin and L. Madansky, Phys. Rev. 78 (1950) 623,
53// M. M. May, Phys. Rev. 84 (1951) 265,
54// J. M. Jauch and F. Rohrlich, The theory of photons and electrons, 1976.
55//
56// All the above expressions are named "Bethe-Heitler" here.
57//
58// Bethe & Heitler, put in Feynman diagram parlance, compute only the two dominant diagrams of
59// the first order Born development, which is an excellent approximation for nuclear conversion
60// and for high-energy triplet conversion.
61//
62// Only the linear polarisation of the incoming photon takes part in these expressions.
63// The circular polarisation of the incoming photon does not (take part) and no polarisation
64// is transfered to the final leptons.
65//
66// In case conversion takes place in the field of an isolated nucleus or electron, the bare
67// Bethe-Heitler expression is used.
68//
69// In case the nucleus or the electron are part of an atom, the screening of the target field
70// by the other electrons of the atom is described by a simple form factor, function of q2:
71// . nuclear: N.F. Mott, H.S.W. Massey, The Theory of Atomic Collisions, 1934.
72// . triplet: J.A. Wheeler and W.E. Lamb, Phys. Rev. 55 (1939) 858.
73//
74// The nuclear form factor that affects the probability of very large-q2 events, is not considered.
75//
76// In principle the code is valid from threshold, that is from 2 * m_e c^2 for nuclear and from
77// 4 * m_e c^2 for triplet, up to infinity, while in pratice the divergence of the differential
78// cross section at small q2 and, at high-energy, at small polar angle, make it break down at
79// some point that depends on machine precision.
80//
81// Very-high-energy (above a few tens of TeV) LPM suppression effects in the normalized differential
82// cross-section are not considered.
83//
84// The 5D differential cross section is sampled without any high-energy nor small
85// angle approximation(s).
86// The generation is strictly energy-momentum conserving when all particles in the final state
87// are taken into account, that is, including the recoiling target.
88// (In contrast with the BH expressions taken at face values, for which the electron energy is
89// taken to be EMinus = GammaEnergy - EPlus)
90//
91// Tests include the examination of 1D distributions: see TestEm15
92//
93// Total cross sections are not computed (we inherit from other classes).
94// We just convert a photon on a target when asked to do so.
95//
96// Pure nuclear, pure triplet and 1/Z triplet/nuclear mixture can be generated.
97//
98// -------------------------------------------------------------------
99
101#include "G4EmParameters.hh"
102
103#include "G4PhysicalConstants.hh"
104#include "G4SystemOfUnits.hh"
105#include "G4Electron.hh"
106#include "G4Positron.hh"
107#include "G4Gamma.hh"
108#include "G4MuonPlus.hh"
109#include "G4MuonMinus.hh"
110#include "G4IonTable.hh"
111#include "G4NucleiProperties.hh"
112
113#include "Randomize.hh"
115#include "G4Pow.hh"
116#include "G4Log.hh"
117#include "G4Exp.hh"
118
119#include "G4LorentzVector.hh"
120#include "G4ThreeVector.hh"
121#include "G4RotationMatrix.hh"
122
123#include <cassert>
124
125const G4int kEPair = 0;
126const G4int kMuPair = 1;
127
128
129//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
130
132 const G4String& nam)
133 : G4PairProductionRelModel(pd, nam),
134 fLepton1(G4Electron::Definition()),fLepton2(G4Positron::Definition()),
135 fTheMuPlus(G4MuonPlus::Definition()),fTheMuMinus(G4MuonMinus::Definition()),
136 fVerbose(1),
137 fConversionType(0),
138 fConvMode(kEPair),
139 iraw(false)
140{
142 //Q: Do we need this on Model
144}
145
146//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
147
149{}
150
151//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
152
154 const G4DataVector& vec)
155{
157
159 // place to initialise model parameters
160 // Verbosity levels: ( Can redefine as needed, but some consideration )
161 // 0 = nothing
162 // > 2 print results
163 // > 3 print rejection warning from transformation (fix bug from gammaray .. )
164 // > 4 print photon direction & polarisation
165 fVerbose = theManager->Verbose();
166 fConversionType = theManager->GetConversionType();
168 // iraw :
169 // true : isolated electron or nucleus.
170 // false : inside atom -> screening form factor
171 iraw = theManager->OnIsolated();
172 // G4cout << "BH5DModel::Initialise verbose " << fVerbose
173 // << " isolated " << iraw << " ctype "<< fConversionType << G4endl;
174
175 //Q: Do we need this on Model
176 // The Leptons defined via SetLeptonPair(..) method
178
179 if (fConvMode == kEPair) {
181 if (fVerbose > 3)
182 G4cout << "BH5DModel::Initialise conversion to e+ e-" << G4endl;
183 }
184
185 if (fConvMode == kMuPair) {
187 if (fVerbose > 3)
188 G4cout << "BH5DModel::Initialise conversion to mu+ mu-" << G4endl;
189 }
190}
191
192//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
193
195 const G4ParticleDefinition* p2)
196{
197 // Lepton1 - nagative charged particle
198 if ( p1->GetPDGEncoding() < 0 ){
199 if ( p1->GetPDGEncoding() ==
202 fLepton1 = p2;
203 fLepton2 = p1;
204 // if (fVerbose)
205 G4cout << "G4BetheHeitler5DModel::SetLeptonPair conversion to e+ e-"
206 << G4endl;
207 } else if ( p1->GetPDGEncoding() ==
210 fLepton1 = p2;
211 fLepton2 = p1;
212 // if (fVerbose)
213 G4cout << "G4BetheHeitler5DModel::SetLeptonPair conversion to mu+ mu-"
214 << G4endl;
215 } else {
216 // Exception
218 ed << "Model not applicable to particle(s) "
219 << p1->GetParticleName() << ", "
220 << p2->GetParticleName();
221 G4Exception("G4BetheHeitler5DModel::SetLeptonPair","em0002",
222 FatalException, ed);
223 }
224 } else {
225 if ( p1->GetPDGEncoding() ==
228 fLepton1 = p1;
229 fLepton2 = p2;
230 // if (fVerbose)
231 G4cout << "G4BetheHeitler5DModel::SetLeptonPair conversion to e+ e-"
232 << G4endl;
233 } else if ( p1->GetPDGEncoding() ==
236 fLepton1 = p1;
237 fLepton2 = p2;
238 // if (fVerbose)
239 G4cout << "G4BetheHeitler5DModel::SetLeptonPair conversion to mu+ mu-"
240 << G4endl;
241 } else {
242 // Exception
244 ed << "Model not applicable to particle(s) "
245 << p1->GetParticleName() << ", "
246 << p2->GetParticleName();
247 G4Exception("G4BetheHeitler5DModel::SetLeptonPair","em0002",
248 FatalException, ed);
249 }
250 }
252 G4Exception("G4BetheHeitler5DModel::SetLeptonPair","em0007",
253 FatalErrorInArgument, "pair must be particle, antiparticle ");
254 G4cerr << "BH5DModel::SetLeptonPair BAD paricle/anti particle pair"
255 << fLepton1->GetParticleName() << ", "
257 }
258}
259
260//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
261
263 G4double Z,
264 G4double e,
265 G4double loge) const
266{
267 const G4double Q = e/par[9];
268 return par[0] * G4Exp((par[2]+loge*par[4])*loge)
269 / (par[1]+ G4Exp(par[3]*loge)+G4Exp(par[5]*loge))
270 * (1+par[7]*G4Exp(par[8]*G4Log(Z))*Q/(1+Q));
271}
272
273//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
274
275void
276G4BetheHeitler5DModel::SampleSecondaries(std::vector<G4DynamicParticle*>* fvect,
277 const G4MaterialCutsCouple* couple,
278 const G4DynamicParticle* aDynamicGamma,
280{
281 // MeV
282 static const G4double ElectronMass = CLHEP::electron_mass_c2;
283
284 const G4double LeptonMass = fLepton1->GetPDGMass();
285 const G4double LeptonMass2 = LeptonMass*LeptonMass;
286
287 static const G4double alpha0 = CLHEP::fine_structure_const;
288 // mm
289 static const G4double r0 = CLHEP::classic_electr_radius;
290 // mbarn
291 static const G4double r02 = r0*r0*1.e+25;
292 static const G4double twoPi = CLHEP::twopi;
293 static const G4double factor = alpha0 * r02 / (twoPi*twoPi);
294 // static const G4double factor1 = pow((6.0 * pi),(1.0/3.0))/(8.*alpha0*ElectronMass);
295 static const G4double factor1 = 2.66134007899/(8.*alpha0*ElectronMass);
296 //
297 G4double PairInvMassMin = 2.*LeptonMass;
298 G4double TrThreshold = 2.0 * ( (LeptonMass2)/ElectronMass + LeptonMass);
299
300 //
301 static const G4double nu[2][10] = {
302 //electron
303 { 0.0227436, 0.0582046, 3.0322675, 2.8275065, -0.0034004,
304 1.1212766, 1.8989468, 68.3492750, 0.0211186, 14.4},
305 //muon
306 {0.67810E-06, 0.86037E+05, 2.0008395, 1.6739719, -0.0057279,
307 1.4222, 0.0, 263230.0, 0.0521, 51.1338}
308 };
309 static const G4double tr[2][10] = {
310 //electron
311 { 0.0332350, 4.3942537, 2.8515925, 2.6351695, -0.0031510,
312 1.5737305, 1.8104647, 20.6434021, -0.0272586, 28.9},
313 //muon
314 {0.10382E-03, 0.14408E+17, 4.1368679, 3.2662121, -0.0163091,
315 0.0000, 0.0, 0.0, 0.0000, 1.0000}
316 };
317 //
318 static const G4double para[2][3][2] = {
319 //electron
320 { {11., -16.},{-1.17, -2.95},{-2., -0.5} },
321 //muon
322 { {17.5, 1.},{-1.17, -2.95},{2., 6.} }
323 };
324 //
325 static const G4double correctionIndex = 1.4;
326 //
327 const G4double GammaEnergy = aDynamicGamma->GetKineticEnergy();
328 // Protection, Will not be true tot cross section = 0
329 if ( GammaEnergy <= PairInvMassMin) { return; }
330
331 const G4double GammaEnergy2 = GammaEnergy*GammaEnergy;
332
334 const G4ParticleMomentum GammaDirection =
335 aDynamicGamma->GetMomentumDirection();
336 G4ThreeVector GammaPolarization = aDynamicGamma->GetPolarization();
337
338 // The protection polarization perpendicular to the direction vector,
339 // as it done in G4LivermorePolarizedGammaConversionModel,
340 // assuming Direction is unitary vector
341 // (projection to plane) p_proj = p - (p o d)/(d o d) x d
342 if ( GammaPolarization.howOrthogonal(GammaDirection) != 0) {
343 GammaPolarization -= GammaPolarization.dot(GammaDirection) * GammaDirection;
344 }
345 // End of Protection
346 //
347 const G4double GammaPolarizationMag = GammaPolarization.mag();
348
350 // target element
351 // select randomly one element constituting the material
352 const G4Element* anElement = SelectTargetAtom(couple, fTheGamma, GammaEnergy,
353 aDynamicGamma->GetLogKineticEnergy() );
354 // Atomic number
355 const G4int Z = anElement->GetZasInt();
356 const G4int A = SelectIsotopeNumber(anElement);
357 const G4double iZ13 = 1./anElement->GetIonisation()->GetZ3();
358 const G4double targetMass = G4NucleiProperties::GetNuclearMass(A, Z);
359
360 const G4double NuThreshold = 2.0 * ( (LeptonMass2)/targetMass + LeptonMass);
361 // No conversion possible below nuclear threshold
362 if ( GammaEnergy <= NuThreshold) { return; }
363
364 CLHEP::HepRandomEngine* rndmEngine = G4Random::getTheEngine();
365
366 // itriplet : true -- triplet, false -- nuclear.
367 G4bool itriplet = false;
368 if (fConversionType == 1) {
369 itriplet = false;
370 } else if (fConversionType == 2) {
371 itriplet = true;
372 if ( GammaEnergy <= TrThreshold ) return;
373 } else if ( GammaEnergy > TrThreshold ) {
374 // choose triplet or nuclear from a triplet/nuclear=1/Z
375 // total cross section ratio.
376 // approximate at low energies !
377 if(rndmEngine->flat()*(Z+1) < 1.) {
378 itriplet = true;
379 }
380 }
381
382 //
383 const G4double RecoilMass = itriplet ? ElectronMass : targetMass;
384 const G4double RecoilMass2 = RecoilMass*RecoilMass;
385 const G4double sCMS = 2.*RecoilMass*GammaEnergy + RecoilMass2;
386 const G4double sCMSPlusRM2 = sCMS + RecoilMass2;
387 const G4double sqrts = std::sqrt(sCMS);
388 const G4double isqrts2 = 1./(2.*sqrts);
389 //
390 const G4double PairInvMassMax = sqrts-RecoilMass;
391 const G4double PairInvMassRange = PairInvMassMax/PairInvMassMin;
392 const G4double lnPairInvMassRange = G4Log(PairInvMassRange);
393
394 // initial state. Defines z axis of "0" frame as along photon propagation.
395 // Since CMS(0., 0., GammaEnergy, GammaEnergy+RecoilMass) set some constants
396 const G4double betaCMS = G4LorentzVector(0.0,0.0,GammaEnergy,GammaEnergy+RecoilMass).beta();
397
398 // maximum value of pdf
399 const G4double EffectiveZ = iraw ? 0.5 : Z;
400 const G4double Threshold = itriplet ? TrThreshold : NuThreshold;
401 const G4double AvailableEnergy = GammaEnergy - Threshold;
402 const G4double LogAvailableEnergy = G4Log(AvailableEnergy);
403 //
404 const G4double MaxDiffCross = itriplet
406 EffectiveZ, AvailableEnergy, LogAvailableEnergy)
408 EffectiveZ, AvailableEnergy, LogAvailableEnergy);
409 //
410 // 50% safety marging factor
411 const G4double ymax = 1.5 * MaxDiffCross;
412 // x1 bounds
413 const G4double xu1 = (LogAvailableEnergy > para[fConvMode][2][0])
414 ? para[fConvMode][0][0] +
415 para[fConvMode][1][0]*LogAvailableEnergy
416 : para[fConvMode][0][0] +
417 para[fConvMode][2][0]*para[fConvMode][1][0];
418 const G4double xl1 = (LogAvailableEnergy > para[fConvMode][2][1])
419 ? para[fConvMode][0][1] +
420 para[fConvMode][1][1]*LogAvailableEnergy
421 : para[fConvMode][0][1] +
422 para[fConvMode][2][1]*para[fConvMode][1][1];
423 //
424 G4LorentzVector Recoil;
425 G4LorentzVector LeptonPlus;
426 G4LorentzVector LeptonMinus;
427 G4double pdf = 0.;
428
429 G4double rndmv6[6];
430 // START Sampling
431 do {
432
433 rndmEngine->flatArray(6, rndmv6);
434
436 // pdf pow(x,c) with c = 1.4
437 // integral y = pow(x,(c+1))/(c+1) @ x = 1 => y = 1 /(1+c)
438 // invCdf exp( log(y /* *( c + 1.0 )/ (c + 1.0 ) */ ) /( c + 1.0) )
440 const G4double X1 =
441 G4Exp(G4Log(rndmv6[0])/(correctionIndex + 1.0));
442
443 const G4double x0 = G4Exp(xl1 + (xu1 - xl1)*rndmv6[1]);
444 const G4double dum0 = 1./(1.+x0);
445 const G4double cosTheta = (x0-1.)*dum0;
446 const G4double sinTheta = std::sqrt(4.*x0)*dum0;
447
448 const G4double PairInvMass = PairInvMassMin*G4Exp(X1*X1*lnPairInvMassRange);
449
450 // G4double rndmv3[3];
451 // rndmEngine->flatArray(3, rndmv3);
452
453 // cos and sin theta-lepton
454 const G4double cosThetaLept = std::cos(pi*rndmv6[2]);
455 // sin(ThetaLept) is always in [0,+1] if ThetaLept is in [0,pi]
456 const G4double sinThetaLept = std::sqrt((1.-cosThetaLept)*(1.+cosThetaLept));
457 // cos and sin phi-lepton
458 const G4double cosPhiLept = std::cos(twoPi*rndmv6[3]-pi);
459 // sin(PhiLept) is in [-1,0] if PhiLept in [-pi,0) and
460 // is in [0,+1] if PhiLept in [0,+pi]
461 const G4double sinPhiLept = std::copysign(std::sqrt((1.-cosPhiLept)*(1.+cosPhiLept)),rndmv6[3]-0.5);
462 // cos and sin phi
463 const G4double cosPhi = std::cos(twoPi*rndmv6[4]-pi);
464 const G4double sinPhi = std::copysign(std::sqrt((1.-cosPhi)*(1.+cosPhi)),rndmv6[4]-0.5);
465
467 // frames:
468 // 3 : the laboratory Lorentz frame, Geant4 axes definition
469 // 0 : the laboratory Lorentz frame, axes along photon direction and polarisation
470 // 1 : the center-of-mass Lorentz frame
471 // 2 : the pair Lorentz frame
473
474 // in the center-of-mass frame
475
476 const G4double RecEnergyCMS = (sCMSPlusRM2-PairInvMass*PairInvMass)*isqrts2;
477 const G4double LeptonEnergy2 = PairInvMass*0.5;
478
479 // New way of calucaltion thePRecoil to avoid underflow
480 G4double abp = std::max((2.0*GammaEnergy*RecoilMass -
481 PairInvMass*PairInvMass + 2.0*PairInvMass*RecoilMass)*
482 (2.0*GammaEnergy*RecoilMass -
483 PairInvMass*PairInvMass - 2.0*PairInvMass*RecoilMass),0.0);
484
485 G4double thePRecoil = std::sqrt(abp) * isqrts2;
486
487 // back to the center-of-mass frame
488 Recoil.set( thePRecoil*sinTheta*cosPhi,
489 thePRecoil*sinTheta*sinPhi,
490 thePRecoil*cosTheta,
491 RecEnergyCMS);
492
493 // in the pair frame
494 const G4double thePLepton = std::sqrt( (LeptonEnergy2-LeptonMass)
495 *(LeptonEnergy2+LeptonMass));
496
497 LeptonPlus.set(thePLepton*sinThetaLept*cosPhiLept,
498 thePLepton*sinThetaLept*sinPhiLept,
499 thePLepton*cosThetaLept,
500 LeptonEnergy2);
501
502 LeptonMinus.set(-LeptonPlus.x(),
503 -LeptonPlus.y(),
504 -LeptonPlus.z(),
505 LeptonEnergy2);
506
507
508 // Normalisation of final state phase space:
509 // Section 47 of Particle Data Group, Chin. Phys. C, 40, 100001 (2016)
510 // const G4double Norme = Recoil1.vect().mag() * LeptonPlus2.vect().mag();
511 const G4double Norme = Recoil.vect().mag() * LeptonPlus.vect().mag();
512
513 // e+, e- to CMS frame from pair frame
514
515 // boost vector from Pair to CMS
516 const G4ThreeVector pair2cms =
517 G4LorentzVector( -Recoil.x(), -Recoil.y(), -Recoil.z(),
518 sqrts-RecEnergyCMS).boostVector();
519
520 LeptonPlus.boost(pair2cms);
521 LeptonMinus.boost(pair2cms);
522
523 // back to the laboratory frame (make use of the CMS(0,0,Eg,Eg+RM)) form
524
525 Recoil.boostZ(betaCMS);
526 LeptonPlus.boostZ(betaCMS);
527 LeptonMinus.boostZ(betaCMS);
528
529 // Jacobian factors
530 const G4double Jacob0 = x0*dum0*dum0;
531 const G4double Jacob1 = 2.*X1*lnPairInvMassRange*PairInvMass;
532 const G4double Jacob2 = std::abs(sinThetaLept);
533
534 const G4double EPlus = LeptonPlus.t();
535 const G4double PPlus = LeptonPlus.vect().mag();
536 const G4double sinThetaPlus = LeptonPlus.vect().perp()/PPlus;
537 const G4double cosThetaPlus = LeptonPlus.vect().cosTheta();
538
539 const G4double pPX = LeptonPlus.x();
540 const G4double pPY = LeptonPlus.y();
541 const G4double dum1 = 1./std::sqrt( pPX*pPX + pPY*pPY );
542 const G4double cosPhiPlus = pPX*dum1;
543 const G4double sinPhiPlus = pPY*dum1;
544
545 // denominators:
546 // the two cancelling leading terms for forward emission at high energy, removed
547 const G4double elMassCTP = LeptonMass*cosThetaPlus;
548 const G4double ePlusSTP = EPlus*sinThetaPlus;
549 const G4double DPlus = (elMassCTP*elMassCTP + ePlusSTP*ePlusSTP)
550 /(EPlus + PPlus*cosThetaPlus);
551
552 const G4double EMinus = LeptonMinus.t();
553 const G4double PMinus = LeptonMinus.vect().mag();
554 const G4double sinThetaMinus = LeptonMinus.vect().perp()/PMinus;
555 const G4double cosThetaMinus = LeptonMinus.vect().cosTheta();
556
557 const G4double ePX = LeptonMinus.x();
558 const G4double ePY = LeptonMinus.y();
559 const G4double dum2 = 1./std::sqrt( ePX*ePX + ePY*ePY );
560 const G4double cosPhiMinus = ePX*dum2;
561 const G4double sinPhiMinus = ePY*dum2;
562
563 const G4double elMassCTM = LeptonMass*cosThetaMinus;
564 const G4double eMinSTM = EMinus*sinThetaMinus;
565 const G4double DMinus = (elMassCTM*elMassCTM + eMinSTM*eMinSTM)
566 /(EMinus + PMinus*cosThetaMinus);
567
568 // cos(phiMinus-PhiPlus)
569 const G4double cosdPhi = cosPhiPlus*cosPhiMinus + sinPhiPlus*sinPhiMinus;
570 const G4double PRec = Recoil.vect().mag();
571 const G4double q2 = PRec*PRec;
572
573 const G4double BigPhi = -LeptonMass2 / (GammaEnergy*GammaEnergy2 * q2*q2);
574
575 G4double FormFactor = 1.;
576 if (!iraw) {
577 if (itriplet) {
578 const G4double qun = factor1*iZ13*iZ13;
579 const G4double nun = qun * PRec;
580 if (nun < 1.) {
581 FormFactor = (nun < 0.01) ? (13.8-55.4*std::sqrt(nun))*nun
582 : std::sqrt(1-(nun-1)*(nun-1));
583 } // else FormFactor = 1 by default
584 } else {
585 const G4double dum3 = 217.*PRec*iZ13;
586 const G4double AFF = 1./(1. + dum3*dum3);
587 FormFactor = (1.-AFF)*(1-AFF);
588 }
589 } // else FormFactor = 1 by default
590
591 G4double betheheitler;
592 if (GammaPolarizationMag==0.) {
593 const G4double pPlusSTP = PPlus*sinThetaPlus;
594 const G4double pMinusSTM = PMinus*sinThetaMinus;
595 const G4double pPlusSTPperDP = pPlusSTP/DPlus;
596 const G4double pMinusSTMperDM = pMinusSTM/DMinus;
597 const G4double dunpol = BigPhi*(
598 pPlusSTPperDP *pPlusSTPperDP *(4.*EMinus*EMinus-q2)
599 + pMinusSTMperDM*pMinusSTMperDM*(4.*EPlus*EPlus - q2)
600 + 2.*pPlusSTPperDP*pMinusSTMperDM*cosdPhi
601 *(4.*EPlus*EMinus + q2 - 2.*GammaEnergy2)
602 - 2.*GammaEnergy2*(pPlusSTP*pPlusSTP+pMinusSTM*pMinusSTM)/(DMinus*DPlus));
603 betheheitler = dunpol * factor;
604 } else {
605 const G4double pPlusSTP = PPlus*sinThetaPlus;
606 const G4double pMinusSTM = PMinus*sinThetaMinus;
607 const G4double pPlusSTPCPPperDP = pPlusSTP*cosPhiPlus/DPlus;
608 const G4double pMinusSTMCPMperDM = pMinusSTM*cosPhiMinus/DMinus;
609 const G4double caa = 2.*(EPlus*pMinusSTMCPMperDM+EMinus*pPlusSTPCPPperDP);
610 const G4double cbb = pMinusSTMCPMperDM-pPlusSTPCPPperDP;
611 const G4double ccc = (pPlusSTP*pPlusSTP + pMinusSTM*pMinusSTM
612 +2.*pPlusSTP*pMinusSTM*cosdPhi)/ (DMinus*DPlus);
613 const G4double dtot= 2.*BigPhi*( caa*caa - q2*cbb*cbb - GammaEnergy2*ccc);
614 betheheitler = dtot * factor;
615 }
616 //
617 const G4double cross = Norme * Jacob0 * Jacob1 * Jacob2 * betheheitler
618 * FormFactor * RecoilMass / sqrts;
619 pdf = cross * (xu1 - xl1) / G4Exp(correctionIndex*G4Log(X1)); // cond1;
620 } while ( pdf < ymax * rndmv6[5] );
621 // END of Sampling
622
623 if ( fVerbose > 2 ) {
624 G4double recul = std::sqrt(Recoil.x()*Recoil.x()+Recoil.y()*Recoil.y()
625 +Recoil.z()*Recoil.z());
626 G4cout << "BetheHeitler5DModel GammaEnergy= " << GammaEnergy
627 << " PDF= " << pdf << " ymax= " << ymax
628 << " recul= " << recul << G4endl;
629 }
630
631 // back to Geant4 system
632
633 if ( fVerbose > 4 ) {
634 G4cout << "BetheHeitler5DModel GammaDirection " << GammaDirection << G4endl;
635 G4cout << "BetheHeitler5DModel GammaPolarization " << GammaPolarization << G4endl;
636 G4cout << "BetheHeitler5DModel GammaEnergy " << GammaEnergy << G4endl;
637 G4cout << "BetheHeitler5DModel Conv "
638 << (itriplet ? "triplet" : "nucl") << G4endl;
639 }
640
641 if (GammaPolarizationMag == 0.0) {
642 // set polarization axis orthohonal to direction
643 GammaPolarization = GammaDirection.orthogonal().unit();
644 } else {
645 // GammaPolarization not a unit vector
646 GammaPolarization /= GammaPolarizationMag;
647 }
648
649 // The unit norm vector that is orthogonal to the two others
650 G4ThreeVector yGrec = GammaDirection.cross(GammaPolarization);
651
652 // rotation from gamma ref. sys. to World
653 G4RotationMatrix GtoW(GammaPolarization,yGrec,GammaDirection);
654
655 Recoil.transform(GtoW);
656 LeptonPlus.transform(GtoW);
657 LeptonMinus.transform(GtoW);
658
659 if ( fVerbose > 2 ) {
660 G4cout << "BetheHeitler5DModel Recoil " << Recoil.x() << " " << Recoil.y() << " " << Recoil.z()
661 << " " << Recoil.t() << " " << G4endl;
662 G4cout << "BetheHeitler5DModel LeptonPlus " << LeptonPlus.x() << " " << LeptonPlus.y() << " "
663 << LeptonPlus.z() << " " << LeptonPlus.t() << " " << G4endl;
664 G4cout << "BetheHeitler5DModel LeptonMinus " << LeptonMinus.x() << " " << LeptonMinus.y() << " "
665 << LeptonMinus.z() << " " << LeptonMinus.t() << " " << G4endl;
666 }
667
668 // Create secondaries
669 G4DynamicParticle* aParticle1 = new G4DynamicParticle(fLepton1,LeptonMinus);
670 G4DynamicParticle* aParticle2 = new G4DynamicParticle(fLepton2,LeptonPlus);
671
672 // create G4DynamicParticle object for the particle3 ( recoil )
673 G4ParticleDefinition* RecoilPart;
674 if (itriplet) {
675 // triplet
676 RecoilPart = fTheElectron;
677 } else{
678 RecoilPart = theIonTable->GetIon(Z, A, 0);
679 }
680 G4DynamicParticle* aParticle3 = new G4DynamicParticle(RecoilPart,Recoil);
681
682 // Fill output vector
683 fvect->push_back(aParticle1);
684 fvect->push_back(aParticle2);
685 fvect->push_back(aParticle3);
686
687 // kill incident photon
690}
691
692//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
const G4int kEPair
const G4int kMuPair
@ FatalException
@ FatalErrorInArgument
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:179
G4double G4Log(G4double x)
Definition: G4Log.hh:226
CLHEP::HepLorentzVector G4LorentzVector
static constexpr double pi
Definition: G4SIunits.hh:55
@ fStopAndKill
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
const G4int Z[17]
const G4double A[17]
G4GLOB_DLL std::ostream G4cerr
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
Hep3Vector unit() const
Hep3Vector orthogonal() const
Hep3Vector cross(const Hep3Vector &) const
double dot(const Hep3Vector &) const
double mag() const
double howOrthogonal(const Hep3Vector &v) const
Definition: SpaceVector.cc:215
double cosTheta() const
double perp() const
Hep3Vector boostVector() const
HepLorentzVector & boost(double, double, double)
HepLorentzVector & boostZ(double beta)
Hep3Vector vect() const
void set(double x, double y, double z, double t)
HepLorentzVector & transform(const HepRotation &)
virtual double flat()=0
virtual void flatArray(const int size, double *vect)=0
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
const G4ParticleDefinition * fLepton2
const G4ParticleDefinition * fLepton1
void SampleSecondaries(std::vector< G4DynamicParticle * > *fvect, const G4MaterialCutsCouple *couple, const G4DynamicParticle *aDynamicGamma, G4double, G4double) override
const G4ParticleDefinition * fTheMuMinus
void SetLeptonPair(const G4ParticleDefinition *p1, const G4ParticleDefinition *p2)
G4double MaxDiffCrossSection(const G4double *par, G4double eZ, G4double e, G4double loge) const
G4BetheHeitler5DModel(const G4ParticleDefinition *p=nullptr, const G4String &nam="BetheHeitler5D")
const G4ThreeVector & GetMomentumDirection() const
G4double GetLogKineticEnergy() const
G4double GetKineticEnergy() const
const G4ThreeVector & GetPolarization() const
static G4Electron * Definition()
Definition: G4Electron.cc:48
G4IonisParamElm * GetIonisation() const
Definition: G4Element.hh:199
G4int GetZasInt() const
Definition: G4Element.hh:132
static G4EmParameters * Instance()
G4bool OnIsolated() const
G4int GetConversionType() const
G4int Verbose() const
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:522
static G4IonTable * GetIonTable()
Definition: G4IonTable.cc:170
G4double GetZ3() const
static G4MuonMinus * Definition()
Definition: G4MuonMinus.cc:51
static G4MuonPlus * Definition()
Definition: G4MuonPlus.cc:51
static G4double GetNuclearMass(const G4double A, const G4double Z)
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
G4ParticleDefinition * fTheGamma
G4ParticleChangeForGamma * fParticleChange
G4ParticleDefinition * fTheElectron
void SetProposedKineticEnergy(G4double proposedKinEnergy)
const G4String & GetParticleName() const
static G4Positron * Definition()
Definition: G4Positron.cc:48
G4int SelectIsotopeNumber(const G4Element *)
Definition: G4VEmModel.cc:319
void SetLowEnergyLimit(G4double)
Definition: G4VEmModel.hh:774
const G4Element * SelectTargetAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double logKineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
Definition: G4VEmModel.hh:597
void ProposeTrackStatus(G4TrackStatus status)
static constexpr double electron_mass_c2
static constexpr double fine_structure_const
static constexpr double twopi
Definition: SystemOfUnits.h:56
static constexpr double classic_electr_radius
T max(const T t1, const T t2)
brief Return the largest of the two arguments
const G4double twoPi
static double Q[]