Geant4-11
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
G4RKFieldIntegrator Class Reference

#include <G4RKFieldIntegrator.hh>

Inheritance diagram for G4RKFieldIntegrator:
G4FieldPropagation

Public Member Functions

 G4RKFieldIntegrator ()
 
 G4RKFieldIntegrator (const G4RKFieldIntegrator &)
 
G4double GetAntiprotonPotential (G4double radius)
 
G4double GetAntiprotonPotential (G4ThreeVector &aPosition)
 
G4double GetExcitationEnergy (G4int nHitNucleons, const G4KineticTrackVector &theParticles)
 
G4double GetKaonPotential (G4double radius)
 
G4double GetKaonPotential (G4ThreeVector &aPosition)
 
G4double GetNeutronPotential (G4double radius)
 
G4double GetNeutronPotential (G4ThreeVector &aPosition)
 
G4double GetPionPotential (G4double radius)
 
G4double GetPionPotential (G4ThreeVector &aPosition)
 
G4double GetProtonPotential (G4double radius)
 
G4double GetProtonPotential (G4ThreeVector &aPosition)
 
void Init (G4int z, G4int a)
 
G4bool operator!= (const G4RKFieldIntegrator &) const
 
const G4RKFieldIntegratoroperator= (const G4RKFieldIntegrator &)
 
G4bool operator== (const G4RKFieldIntegrator &) const
 
void Transport (G4KineticTrackVector &theActive, const G4KineticTrackVector &theSpectators, G4double theTimeStep)
 
 ~G4RKFieldIntegrator ()
 

Private Member Functions

G4double CalculateTotalEnergy (const G4KineticTrackVector &Barions)
 
G4double Erf (G4double X)
 
void Integrate (const G4KineticTrackVector &theActive, G4double theTimeStep)
 

Private Attributes

G4int theA
 
G4int theZ
 

Static Private Attributes

static const G4double a_antiproton = 1.53
 
static const G4double a_kaon = 0.35
 
static const G4double a_pion = 0.35
 ! for pions it has todiffer from kaons More...
 
static const G4double coulomb = 1.44 / 1.14 * MeV
 

Detailed Description

Definition at line 31 of file G4RKFieldIntegrator.hh.

Constructor & Destructor Documentation

◆ G4RKFieldIntegrator() [1/2]

G4RKFieldIntegrator::G4RKFieldIntegrator ( )
inline

Definition at line 34 of file G4RKFieldIntegrator.hh.

34{}

◆ G4RKFieldIntegrator() [2/2]

G4RKFieldIntegrator::G4RKFieldIntegrator ( const G4RKFieldIntegrator )
inline

Definition at line 35 of file G4RKFieldIntegrator.hh.

◆ ~G4RKFieldIntegrator()

G4RKFieldIntegrator::~G4RKFieldIntegrator ( )
inline

Definition at line 37 of file G4RKFieldIntegrator.hh.

37{}

Member Function Documentation

◆ CalculateTotalEnergy()

G4double G4RKFieldIntegrator::CalculateTotalEnergy ( const G4KineticTrackVector Barions)
private

Definition at line 53 of file G4RKFieldIntegrator.cc.

54{
55 const G4double Alpha = 0.25/fermi/fermi;
56 const G4double t1 = -7264.04*fermi*fermi*fermi;
57 const G4double tGamma = 87.65*fermi*fermi*fermi*fermi*fermi*fermi;
58// const G4double Gamma = 1.676;
59 const G4double Vo = -0.498*fermi;
60 const G4double GammaY = 1.4*fermi;
61
62 G4double Etot = 0;
63 G4int nBarion = Barions.size();
64 for(G4int c1 = 0; c1 < nBarion; c1++)
65 {
66 G4KineticTrack* p1 = Barions.operator[](c1);
67 // Ekin
68 Etot += p1->Get4Momentum().e();
69 for(G4int c2 = c1 + 1; c2 < nBarion; c2++)
70 {
71 G4KineticTrack* p2 = Barions.operator[](c2);
72 G4double r12 = (p1->GetPosition() - p2->GetPosition()).mag()*fermi;
73
74 // Esk2
75 Etot += t1*G4Pow::GetInstance()->A23(Alpha/pi)*G4Exp(-Alpha*r12*r12);
76
77 // Eyuk
78 Etot += Vo*0.5/r12*G4Exp(1/(4*Alpha*GammaY*GammaY))*
79 (G4Exp(-r12/GammaY)*(1 - Erf(0.5/GammaY/std::sqrt(Alpha) - std::sqrt(Alpha)*r12)) -
80 G4Exp( r12/GammaY)*(1 - Erf(0.5/GammaY/std::sqrt(Alpha) + std::sqrt(Alpha)*r12)));
81
82 // Ecoul
83 Etot += 1.44*p1->GetDefinition()->GetPDGCharge()*p2->GetDefinition()->GetPDGCharge()/r12*Erf(std::sqrt(Alpha)*r12);
84
85 // Epaul
86 Etot = 0;
87
88 for(G4int c3 = c2 + 1; c3 < nBarion; c3++)
89 {
90 G4KineticTrack* p3 = Barions.operator[](c3);
91 G4double r13 = (p1->GetPosition() - p3->GetPosition()).mag()*fermi;
92
93 // Esk3
94 Etot = tGamma*G4Pow::GetInstance()->powA(4*Alpha*Alpha/3/pi/pi, 1.5)*G4Exp(-Alpha*(r12*r12 + r13*r13));
95 }
96 }
97 }
98 return Etot;
99}
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:179
static constexpr double fermi
Definition: G4SIunits.hh:83
static constexpr double pi
Definition: G4SIunits.hh:55
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
const G4ThreeVector & GetPosition() const
const G4ParticleDefinition * GetDefinition() const
const G4LorentzVector & Get4Momentum() const
G4double GetPDGCharge() const
static G4Pow * GetInstance()
Definition: G4Pow.cc:41
G4double powA(G4double A, G4double y) const
Definition: G4Pow.hh:230
G4double A23(G4double A) const
Definition: G4Pow.hh:131
G4double Erf(G4double X)

References G4Pow::A23(), Alpha, CLHEP::HepLorentzVector::e(), Erf(), fermi, G4Exp(), G4KineticTrack::Get4Momentum(), G4KineticTrack::GetDefinition(), G4Pow::GetInstance(), G4ParticleDefinition::GetPDGCharge(), G4KineticTrack::GetPosition(), pi, and G4Pow::powA().

◆ Erf()

G4double G4RKFieldIntegrator::Erf ( G4double  X)
private

Definition at line 103 of file G4RKFieldIntegrator.cc.

104{
105 const G4double Z1 = 1;
106 const G4double HF = Z1/2;
107 const G4double C1 = 0.56418958;
108
109 const G4double P10 = +3.6767877;
110 const G4double Q10 = +3.2584593;
111 const G4double P11 = -9.7970465E-2;
112
113// static G4ThreadLocal G4double P2[5] = { 7.3738883, 6.8650185, 3.0317993, 0.56316962, 4.3187787e-5 };
114// static G4ThreadLocal G4double Q2[5] = { 7.3739609, 15.184908, 12.79553, 5.3542168, 1. };
115 const G4double P2[5] = { 7.3738883, 6.8650185, 3.0317993, 0.56316962, 4.3187787e-5 };
116 const G4double Q2[5] = { 7.3739609, 15.184908, 12.79553, 5.3542168, 1. };
117
118 const G4double P30 = -1.2436854E-1;
119 const G4double Q30 = +4.4091706E-1;
120 const G4double P31 = -9.6821036E-2;
121
122 G4double V = std::abs(X);
123 G4double H;
124 G4double Y;
125 G4int c1;
126
127 if(V < HF)
128 {
129 Y = V*V;
130 H = X*(P10 + P11*Y)/(Q10+Y);
131 }
132 else
133 {
134 if(V < 4)
135 {
136 G4double AP = P2[4];
137 G4double AQ = Q2[4];
138 for(c1 = 3; c1 >= 0; c1--)
139 {
140 AP = P2[c1] + V*AP;
141 AQ = Q2[c1] + V*AQ;
142 }
143 H = 1 - G4Exp(-V*V)*AP/AQ;
144 }
145 else
146 {
147 Y = 1./V*V;
148 H = 1 - G4Exp(-V*V)*(C1+Y*(P30 + P31*Y)/(Q30 + Y))/V;
149 }
150 if (X < 0)
151 H = -H;
152 }
153 return H;
154}
G4double Y(G4double density)
static const G4double P10[nE]
static const G4double P11[nE]
static const G4double * P2[nN]
const double C1
static const G4double Z1[5]
Definition: paraMaker.cc:41
static const G4double AP[5]
Definition: paraMaker.cc:42

References anonymous_namespace{paraMaker.cc}::AP, C1, G4Exp(), P10, P11, P2, Y(), and anonymous_namespace{paraMaker.cc}::Z1.

Referenced by CalculateTotalEnergy().

◆ GetAntiprotonPotential() [1/2]

G4double G4RKFieldIntegrator::GetAntiprotonPotential ( G4double  radius)
virtual

Implements G4FieldPropagation.

Definition at line 296 of file G4RKFieldIntegrator.cc.

297{
298 /*
299 //G4double theM = G4NucleiProperties::GetAtomicMass(theA, theZ);
300 G4double theM = theZ * G4Proton::Proton()->GetPDGMass()
301 + (theA - theZ) * G4Neutron::Neutron()->GetPDGMass()
302 + G4CreateNucleus::GetBindingEnergy(theZ, theA);
303
304 const G4double Mp = 938.27231 * MeV; // mass of proton
305 G4double mu = (theM * Mp)/(theM + Mp);
306
307 // antiproton's potential coefficient
308 // V = coeff_antiproton * nucleus_density
309 G4double coeff_antiproton = -2.*pi/mu * (1. + Mp) * a_antiproton;
310
311 G4VNuclearDensity *theDencity;
312 if(theA < 17) theDencity = new G4NuclearShellModelDensity(theA, theZ);
313 else theDencity = new G4NuclearFermiDensity(theA, theZ);
314
315 // GetDencity() accepts only G4ThreeVector so build it:
316 G4ThreeVector aPosition(0.0, 0.0, radius);
317 G4double density = theDencity->GetDensity(aPosition);
318 delete theDencity;
319
320 return coeff_antiproton * density;
321 */
322
323 return 0.0;
324}

◆ GetAntiprotonPotential() [2/2]

G4double G4RKFieldIntegrator::GetAntiprotonPotential ( G4ThreeVector aPosition)
inlinevirtual

Implements G4FieldPropagation.

Definition at line 61 of file G4RKFieldIntegrator.hh.

61{return GetAntiprotonPotential(aPosition.mag());};
double mag() const
G4double GetAntiprotonPotential(G4double radius)

References GetAntiprotonPotential(), and CLHEP::Hep3Vector::mag().

Referenced by GetAntiprotonPotential().

◆ GetExcitationEnergy()

G4double G4RKFieldIntegrator::GetExcitationEnergy ( G4int  nHitNucleons,
const G4KineticTrackVector theParticles 
)
virtual

Implements G4FieldPropagation.

Definition at line 185 of file G4RKFieldIntegrator.cc.

186{
187 const G4double MeanE = 50;
188 G4double Sum = 0;
189 for(G4int c1 = 0; c1 < nHitNucleons; c1++)
190 {
191 Sum += -MeanE*G4Log(G4UniformRand());
192 }
193 return Sum;
194}
G4double G4Log(G4double x)
Definition: G4Log.hh:226
#define G4UniformRand()
Definition: Randomize.hh:52

References G4Log(), and G4UniformRand.

◆ GetKaonPotential() [1/2]

G4double G4RKFieldIntegrator::GetKaonPotential ( G4double  radius)
virtual

Implements G4FieldPropagation.

Definition at line 326 of file G4RKFieldIntegrator.cc.

327{
328 /*
329 //G4double theM = G4NucleiProperties::GetAtomicMass(theA, theZ);
330 G4double theM = theZ * G4Proton::Proton()->GetPDGMass()
331 + (theA - theZ) * G4Neutron::Neutron()->GetPDGMass()
332 + G4CreateNucleus::GetBindingEnergy(theZ, theA);
333
334 const G4double Mk = 496. * MeV; // mass of "kaon"
335 G4double mu = (theM * Mk)/(theM + Mk);
336
337 // kaon's potential coefficient
338 // V = coeff_kaon * nucleus_density
339 G4double coeff_kaon = -2.*pi/mu * (1. + Mk/theM) * a_kaon;
340
341 G4VNuclearDensity *theDencity;
342 if(theA < 17) theDencity = new G4NuclearShellModelDensity(theA, theZ);
343 else theDencity = new G4NuclearFermiDensity(theA, theZ);
344
345 // GetDencity() accepts only G4ThreeVector so build it:
346 G4ThreeVector aPosition(0.0, 0.0, radius);
347 G4double density = theDencity->GetDensity(aPosition);
348 delete theDencity;
349
350 return coeff_kaon * density;
351 */
352
353 return 0.0;
354}

◆ GetKaonPotential() [2/2]

G4double G4RKFieldIntegrator::GetKaonPotential ( G4ThreeVector aPosition)
inlinevirtual

Implements G4FieldPropagation.

Definition at line 64 of file G4RKFieldIntegrator.hh.

64{return GetKaonPotential(aPosition.mag());}
G4double GetKaonPotential(G4double radius)

References GetKaonPotential(), and CLHEP::Hep3Vector::mag().

Referenced by GetKaonPotential().

◆ GetNeutronPotential() [1/2]

G4double G4RKFieldIntegrator::GetNeutronPotential ( G4double  radius)
virtual

Implements G4FieldPropagation.

Definition at line 239 of file G4RKFieldIntegrator.cc.

240{
241 /*
242 const G4double Mn = 939.56563 * MeV; // mass of nuetron
243
244 G4VNuclearDensity *theDencity;
245 if(theA < 17) theDencity = new G4NuclearShellModelDensity(theA, theZ);
246 else theDencity = new G4NuclearFermiDensity(theA, theZ);
247
248 // GetDencity() accepts only G4ThreeVector so build it:
249 G4ThreeVector aPosition(0.0, 0.0, radius);
250 G4double density = theDencity->GetDensity(aPosition);
251 delete theDencity;
252
253 G4FermiMomentum *fm = new G4FermiMomentum();
254 fm->Init(theA, theZ);
255 G4double fermiMomentum = fm->GetFermiMomentum(density);
256 delete fm;
257
258 return sqr(fermiMomentum)/(2 * Mn)
259 + G4CreateNucleus::GetBindingEnergy(theZ, theA)/theA;
260 //+ G4NucleiProperties::GetBindingEnergy(theZ, theA)/theA;
261 */
262
263 return 0.0;
264}

◆ GetNeutronPotential() [2/2]

G4double G4RKFieldIntegrator::GetNeutronPotential ( G4ThreeVector aPosition)
inlinevirtual

Implements G4FieldPropagation.

Definition at line 55 of file G4RKFieldIntegrator.hh.

55{return GetNeutronPotential(aPosition.mag());}
G4double GetNeutronPotential(G4double radius)

References GetNeutronPotential(), and CLHEP::Hep3Vector::mag().

Referenced by GetNeutronPotential().

◆ GetPionPotential() [1/2]

G4double G4RKFieldIntegrator::GetPionPotential ( G4double  radius)
virtual

Implements G4FieldPropagation.

Definition at line 356 of file G4RKFieldIntegrator.cc.

357{
358 /*
359 //G4double theM = G4NucleiProperties::GetAtomicMass(theA, theZ);
360 G4double theM = theZ * G4Proton::Proton()->GetPDGMass()
361 + (theA - theZ) * G4Neutron::Neutron()->GetPDGMass()
362 + G4CreateNucleus::GetBindingEnergy(theZ, theA);
363
364 const G4double Mpi = 139. * MeV; // mass of "pion"
365 G4double mu = (theM * Mpi)/(theM + Mpi);
366
367 // pion's potential coefficient
368 // V = coeff_pion * nucleus_density
369 G4double coeff_pion = -2.*pi/mu * (1. + Mpi) * a_pion;
370
371 G4VNuclearDensity *theDencity;
372 if(theA < 17) theDencity = new G4NuclearShellModelDensity(theA, theZ);
373 else theDencity = new G4NuclearFermiDensity(theA, theZ);
374
375 // GetDencity() accepts only G4ThreeVector so build it:
376 G4ThreeVector aPosition(0.0, 0.0, radius);
377 G4double density = theDencity->GetDensity(aPosition);
378 delete theDencity;
379
380 return coeff_pion * density;
381 */
382
383 return 0.0;
384}

◆ GetPionPotential() [2/2]

G4double G4RKFieldIntegrator::GetPionPotential ( G4ThreeVector aPosition)
inlinevirtual

Implements G4FieldPropagation.

Definition at line 67 of file G4RKFieldIntegrator.hh.

67{return GetPionPotential(aPosition.mag());}
G4double GetPionPotential(G4double radius)

References GetPionPotential(), and CLHEP::Hep3Vector::mag().

Referenced by GetPionPotential().

◆ GetProtonPotential() [1/2]

G4double G4RKFieldIntegrator::GetProtonPotential ( G4double  radius)
virtual

Implements G4FieldPropagation.

Definition at line 266 of file G4RKFieldIntegrator.cc.

267{
268 /*
269 // calculate Coulomb barrier value
270 G4double theCoulombBarrier = coulomb * theZ/(1. + G4Pow::GetInstance()->Z13(theA));
271 const G4double Mp = 938.27231 * MeV; // mass of proton
272
273 G4VNuclearDensity *theDencity;
274 if(theA < 17) theDencity = new G4NuclearShellModelDensity(theA, theZ);
275 else theDencity = new G4NuclearFermiDensity(theA, theZ);
276
277 // GetDencity() accepts only G4ThreeVector so build it:
278 G4ThreeVector aPosition(0.0, 0.0, radius);
279 G4double density = theDencity->GetDensity(aPosition);
280 delete theDencity;
281
282 G4FermiMomentum *fm = new G4FermiMomentum();
283 fm->Init(theA, theZ);
284 G4double fermiMomentum = fm->GetFermiMomentum(density);
285 delete fm;
286
287 return sqr(fermiMomentum)/ (2 * Mp)
288 + G4CreateNucleus::GetBindingEnergy(theZ, theA)/theA;
289 //+ G4NucleiProperties::GetBindingEnergy(theZ, theA)/theA
290 + theCoulombBarrier;
291 */
292
293 return 0.0;
294}

◆ GetProtonPotential() [2/2]

G4double G4RKFieldIntegrator::GetProtonPotential ( G4ThreeVector aPosition)
inlinevirtual

Implements G4FieldPropagation.

Definition at line 58 of file G4RKFieldIntegrator.hh.

58{return GetProtonPotential(aPosition.mag());}
G4double GetProtonPotential(G4double radius)

References GetProtonPotential(), and CLHEP::Hep3Vector::mag().

Referenced by GetProtonPotential().

◆ Init()

void G4RKFieldIntegrator::Init ( G4int  z,
G4int  a 
)
inlinevirtual

Implements G4FieldPropagation.

Definition at line 51 of file G4RKFieldIntegrator.hh.

51{theZ = z; theA = a;} // prepare potentials' functions

References theA, and theZ.

◆ Integrate()

void G4RKFieldIntegrator::Integrate ( const G4KineticTrackVector theActive,
G4double  theTimeStep 
)
private

Definition at line 210 of file G4RKFieldIntegrator.cc.

211{
212 for(size_t cParticle = 0; cParticle < theBarions.size(); cParticle++)
213 {
214 G4KineticTrack* pKineticTrack = theBarions[cParticle];
215 pKineticTrack->SetPosition(pKineticTrack->GetPosition() + theTimeStep*pKineticTrack->Get4Momentum().boostVector());
216 }
217}
Hep3Vector boostVector() const
void SetPosition(const G4ThreeVector aPosition)

References CLHEP::HepLorentzVector::boostVector(), G4KineticTrack::Get4Momentum(), G4KineticTrack::GetPosition(), and G4KineticTrack::SetPosition().

◆ operator!=()

G4bool G4RKFieldIntegrator::operator!= ( const G4RKFieldIntegrator ) const
inline

Definition at line 43 of file G4RKFieldIntegrator.hh.

43{return 1;}

◆ operator=()

const G4RKFieldIntegrator & G4RKFieldIntegrator::operator= ( const G4RKFieldIntegrator )
inline

Definition at line 40 of file G4RKFieldIntegrator.hh.

40{return *this;}

◆ operator==()

G4bool G4RKFieldIntegrator::operator== ( const G4RKFieldIntegrator ) const
inline

Definition at line 42 of file G4RKFieldIntegrator.hh.

42{return 1;}

◆ Transport()

void G4RKFieldIntegrator::Transport ( G4KineticTrackVector theActive,
const G4KineticTrackVector theSpectators,
G4double  theTimeStep 
)
virtual

Implements G4FieldPropagation.

Definition at line 45 of file G4RKFieldIntegrator.cc.

46{
47 (void)theActive;
48 (void)theSpectators;
49 (void)theTimeStep;
50}

Field Documentation

◆ a_antiproton

const G4double G4RKFieldIntegrator::a_antiproton = 1.53
staticprivate

Definition at line 83 of file G4RKFieldIntegrator.hh.

◆ a_kaon

const G4double G4RKFieldIntegrator::a_kaon = 0.35
staticprivate

Definition at line 81 of file G4RKFieldIntegrator.hh.

◆ a_pion

const G4double G4RKFieldIntegrator::a_pion = 0.35
staticprivate

! for pions it has todiffer from kaons

Definition at line 82 of file G4RKFieldIntegrator.hh.

◆ coulomb

const G4double G4RKFieldIntegrator::coulomb = 1.44 / 1.14 * MeV
staticprivate

Definition at line 80 of file G4RKFieldIntegrator.hh.

◆ theA

G4int G4RKFieldIntegrator::theA
private

Definition at line 75 of file G4RKFieldIntegrator.hh.

Referenced by Init().

◆ theZ

G4int G4RKFieldIntegrator::theZ
private

Definition at line 76 of file G4RKFieldIntegrator.hh.

Referenced by Init().


The documentation for this class was generated from the following files: