Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ChargeExchangeXS.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// GEANT4 Class file
29//
30//
31// File name: G4ChargeExchangeXS
32//
33
34#include "G4ChargeExchangeXS.hh"
35#include "G4DynamicParticle.hh"
36#include "G4ElementTable.hh"
37#include "G4Material.hh"
38#include "G4Element.hh"
39#include "G4Isotope.hh"
41#include "Randomize.hh"
42#include "G4SystemOfUnits.hh"
43#include "G4NucleiProperties.hh"
44#include "G4Pow.hh"
45
46#include "G4PionZero.hh"
47#include "G4Eta.hh"
48#include "G4KaonZeroLong.hh"
49#include "G4KaonZeroShort.hh"
50#include "G4KaonPlus.hh"
51#include "G4KaonMinus.hh"
52#include "G4ParticleTable.hh"
53
54namespace {
55 // V. Lyubovitsky parameterisation
56 const G4double piA[5] = {430., 36., 1.37, 2.0, 60.}; // A
57 const G4double pAP[5] = {1.04, 1.26, 1.35, 0.94, 0.94}; // 2 - 2alphaP
58 const G4double pC0[5] = {12.7, 6.0, 6.84, 6.5, 8.0}; // c0
59 const G4double pC1[5] = {1.57, 1.6, 1.7, 1.23, 2.6}; // c1
60 const G4double pG0[5] = {2.55, 4.6, 3.7, 5.5, 4.6}; // g0
61 const G4double pG1[5] = {-0.23, -0.5, 0., 0., -2.}; // g1
62
63 // beta_prime value for calculation of cross section of pi0 and eta
64 // absorption inside different nuclei
65 const G4double beta_prime_pi = 0.0410;
66 const G4double beta_prime_eta = 0.0402;
67}
68
69
71{
72 if (verboseLevel > 1) {
73 G4cout << "G4ChargeExchangeXS::G4ChargeExchangeXS" << G4endl;
74 }
75 g4calc = G4Pow::GetInstance();
77 const G4String nam[5] = {"pi0", "eta", "eta_prime", "omega", "f2(1270)"};
78 for (G4int i=0; i<5; ++i) {
79 fPionSecPD[i] = table->FindParticle(nam[i]);
80 if (nullptr == fPionSecPD[i]) {
82 ed << "### meson " << nam[i] << " is not found out in the particle table";
83 G4Exception("G4ChargeExchangeXS::G4ChargeExchangeXS()","had044",
84 FatalException, ed,"");
85 }
86 }
87}
88
89// Print the information of this .cc file
90void G4ChargeExchangeXS::CrossSectionDescription(std::ostream& outFile) const
91{
92 outFile << "G4ChargeExchangeXS calculates charge exchange cross section for "
93 << "pi+, pi-, K+, K-, KL\n";
94}
95
97 G4int, G4int,
98 const G4Element*, const G4Material*)
99{
100 return true;
101}
102
105 G4int Z, G4int A,
106 const G4Isotope*, const G4Element*,
107 const G4Material*)
108{
109 G4double result = 0.0;
110 const G4double pE = aParticle->GetTotalEnergy();
111 if (pE <= fEnergyLimit) { return result; }
112 auto part = aParticle->GetDefinition();
113 G4int pdg = part->GetPDGEncoding();
114
115 // Get or calculate the nucleus mass, particle mass,particle kinetic energy
116 // and particle total energy
118 G4double pM = part->GetPDGMass();
119
120 // Calculate s(lorentz invariant)
121 G4double lorentz_s = tM*tM + 2*tM*pE + pM*pM;
122 if (lorentz_s <= (tM + pM)*(tM + pM)) { return result; }
123
124 // For unit conversion
125 const G4double inv1e7 = 1e-7;
126 const G4double fact = 1e-30*CLHEP::cm2;
127 const G4double pfact = 0.1/CLHEP::GeV;
128 const G4double kfact = 56.3*fact;
129
130 G4double logA = g4calc->logZ(A);
131
132 // The approximation of Glauber-Gribov formula -> extend it from interaction with
133 // proton to nuclei Z^(2/3). The factor g4calc->powA(A,-beta_prime_pi*G4Log(A))
134 // takes into account absorption of pi0 and eta
135 // pi- + p -> sum of (pi0 + eta) + n
136 if (pdg == -211) {
137 const G4double z23 = g4calc->Z23(Z);
138 const G4int z = A/2;
139 const G4double a23 = g4calc->Z23(z);
140 const G4double x = lorentz_s*inv1e7;
141 G4double sum = 122.*z23*g4calc->powA(x, -1.23)*g4calc->powZ(A,-beta_prime_pi*logA);
142 fXSecPion[0] = sum;
143 sum += 31.*z23*g4calc->powA(x, -1.53)*g4calc->powZ(A,-beta_prime_eta*logA);
144 fXSecPion[1] = sum;
145 const G4double logX = G4Log(x);
146 for (G4int i=2; i<5; ++i) {
147 sum += piA[i]*z23*g4calc->powA(x, -pAP[i])*(1.0 + pG0[i] + pG1[i]*logX)
148 *g4calc->powA(z23, -0.15*a23)/(pC0[i] + pC1[i]*logX);
149 fXSecPion[i] = sum;
150 }
151 result = sum*fact;
152 }
153
154 // pi+ + n -> sum of (pi0 + eta) + p
155 else if (pdg == 211) {
156 const G4double n23 = g4calc->Z23(A - Z);
157 const G4int z = A/2;
158 const G4double a23 = g4calc->Z23(z);
159 const G4double x = lorentz_s*inv1e7;
160 G4double sum = 122.*n23*g4calc->powA(x, -1.23)*g4calc->powZ(A,-beta_prime_pi*logA);
161 fXSecPion[0] = sum;
162 sum += 31.*n23*g4calc->powA(x, -1.53)*g4calc->powZ(A,-beta_prime_eta*logA);
163 fXSecPion[1] = sum;
164 const G4double logX = G4Log(x);
165 for (G4int i=2; i<5; ++i) {
166 sum += piA[i]*n23*g4calc->powA(x, -pAP[i])*(1.0 + pG0[i] + pG1[i]*logX)
167 *g4calc->powA(n23, -0.15*a23)/(pC0[i] + pC1[i]*logX);
168 fXSecPion[i] = sum;
169 }
170 result = sum*fact;
171 }
172
173 // K- + p -> Kbar + n
174 else if (pdg == -321){
175 // Calculate the momentum of the bombarding particles and convert
176 // it to GeV/c^2 unit
177 const G4double p_momentum = std::sqrt(pE*pE - pM*pM)*pfact;
178 result = g4calc->Z23(Z)*g4calc->powA(p_momentum, -1.60)*kfact;
179 }
180
181 // K+ + n -> Kbar + p
182 else if (pdg == 321) {
183 const G4double p_momentum = std::sqrt(pE*pE - pM*pM)*pfact;
184 result = g4calc->Z23(A-Z)*g4calc->powA(p_momentum, -1.60)*kfact;
185 }
186
187 // KL
188 else if (pdg == 130) {
189 // Cross section of K-long = 0.5*(Cross section of K+ + Cross section of K-)
190 const G4double p_momentum = std::sqrt(pE*pE - pM*pM)*pfact;
191 result = 0.5*(g4calc->Z23(Z) + g4calc->Z23(A-Z))*
192 g4calc->powA(p_momentum, -1.60)*kfact;
193 }
194
195 return result*fFactor;
196}
197
200 const G4int Z, const G4int A)
201{
202 const G4ParticleDefinition* pd = nullptr;
203 G4int pdg = part->GetPDGEncoding();
204
205 // pi- + p / pi+ + n
206 if (std::abs(pdg) == 211) {
207 const G4double x = fXSecPion[4]*G4UniformRand();
208 for (G4int i=0; i<5; ++i) {
209 if (x <= fXSecPion[i]) {
210 return fPionSecPD[i];
211 }
212 }
213 }
214
215 // K- + p / K+ + n
216 // Equal opportunity of producing k-short and k-long
217 else if (std::abs(pdg) == 321) {
218 if (G4UniformRand() > 0.5) {
220 }
221 else {
223 }
224 }
225
226 // KL + atom
227 else if (std::abs(pdg) == 130) {
228 G4double prob = (G4double)Z/(G4double)A;
229 if (G4UniformRand() > prob) {
231 }
232 else {
234 }
235 }
236
237 return pd;
238}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4double G4Log(G4double x)
Definition G4Log.hh:227
double G4double
Definition G4Types.hh:83
bool G4bool
Definition G4Types.hh:86
int G4int
Definition G4Types.hh:85
const G4double A[17]
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout
#define G4UniformRand()
Definition Randomize.hh:52
G4double GetIsoCrossSection(const G4DynamicParticle *, G4int Z, G4int A, const G4Isotope *iso, const G4Element *elm, const G4Material *mat) override
const G4ParticleDefinition * SampleSecondaryType(const G4ParticleDefinition *, const G4int Z, const G4int A)
G4bool IsIsoApplicable(const G4DynamicParticle *, G4int Z, G4int A, const G4Element *, const G4Material *) override
void CrossSectionDescription(std::ostream &) const override
G4ParticleDefinition * GetDefinition() const
G4double GetTotalEnergy() const
static G4KaonMinus * KaonMinus()
static G4KaonPlus * KaonPlus()
static G4KaonZeroLong * KaonZeroLong()
static G4KaonZeroShort * KaonZeroShort()
static G4double GetNuclearMass(const G4double A, const G4double Z)
static G4ParticleTable * GetParticleTable()
static G4Pow * GetInstance()
Definition G4Pow.cc:41
G4double logZ(G4int Z) const
Definition G4Pow.hh:137
G4double powZ(G4int Z, G4double y) const
Definition G4Pow.hh:225
G4double powA(G4double A, G4double y) const
Definition G4Pow.hh:230
G4double Z23(G4int Z) const
Definition G4Pow.hh:125