58 const G4double piA[5] = {122., 78.8, 59.4, 24.0, 213.5};
59 const G4double pAP[5] = {1.23, 1.53, 1.35, 0.94, 0.94};
60 const G4double pC0[5] = {12.7, 6.0, 6.84, 6.5, 8.0};
61 const G4double pC1[5] = {1.57, 1.6, 1.7, 1.23, 2.6};
62 const G4double pG0[5] = {2.55, 4.6, 3.7, 5.5, 4.6};
63 const G4double pG1[5] = {-0.23, -0.5, 0., 0., -2.};
66 const G4double beta_prime_pi = 0.0036;
71 const G4double fact = 1e-30*CLHEP::cm2;
72 const G4double pfact = 0.1/CLHEP::GeV;
80 G4cout <<
"G4ChargeExchangeXS::G4ChargeExchangeXS" <<
G4endl;
85 const G4String nam[5] = {
"pi0",
"eta",
"eta_prime",
"omega",
"f2(1270)"};
86 for (
G4int i=0; i<5; ++i) {
87 fPionSecPD[i] = table->FindParticle(nam[i]);
88 if (
nullptr == fPionSecPD[i]) {
90 ed <<
"### meson " << nam[i] <<
" is not found out in the particle table";
91 G4Exception(
"G4ChargeExchangeXS::G4ChargeExchangeXS()",
"had044",
100 outFile <<
"G4ChargeExchangeXS calculates charge exchange cross section for "
101 <<
"pi+, pi-, K+, K-, KL\n";
115 return (pE > fEnergyLimit) ?
127 G4double tM = CLHEP::proton_mass_c2;
129 G4double lorentz_s = tM*tM + 2*tM*pEtot + pM*pM;
131 if (lorentz_s <= (tM + pM)*(tM + pM)) {
return result; }
133 const G4int Z = std::min(ZZ, ZMAXNUCLEARDATA);
138 <<
" Z=" << Z <<
" A=" <<
A <<
" Etot(GeV)=" << pEtot/CLHEP::GeV
152 G4double xf = fact*g4calc->powZ(
A, -beta_prime_pi*(logA + 2*logA));
154 for (
G4int i=0; i<5; ++i) {
155 G4double xg = std::max(1.0 + pG0[i] + pG1[i]*logX, 0.0);
156 G4double xc = std::max(pC0[i] + pC1[i]*logX, csmax);
157 G4double xs = z23*piA[i]*g4calc->powA(x, -pAP[i])*xf*xg/xc;
165 else if (pdg == 211) {
170 G4double xf = fact*g4calc->powZ(
A, -beta_prime_pi*(logA + 2*logA));
174 if (1 == Z) { n23 = ComputeDeuteronFraction(mat); }
176 for (
G4int i=0; i<5; ++i) {
177 G4double xg = std::max(1.0 + pG0[i] + pG1[i]*logX, 0.0);
178 G4double xc = std::max(pC0[i] + pC1[i]*logX, csmax);
179 G4double xs = n23*piA[i]*g4calc->powA(x, -pAP[i])*xf*xg/xc;
188 else if (pdg == -321) {
189 G4double p_momentum = std::sqrt(pEtot*pEtot - pM*pM)*pfact;
190 result = g4calc->Z23(Z)*g4calc->powA(p_momentum, -1.60)*kfact;
194 else if (pdg == 321) {
195 G4double p_momentum = std::sqrt(pEtot*pEtot - pM*pM)*pfact;
199 if (1 == Z) { n23 = ComputeDeuteronFraction(mat); }
200 result = n23*g4calc->powA(p_momentum, -1.60)*kfact;
204 else if (pdg == 130) {
206 const G4double p_momentum = std::sqrt(pEtot*pEtot - pM*pM)*pfact;
207 result = 0.5*(g4calc->Z23(Z) + g4calc->Z23(
A-Z))*
208 g4calc->powA(p_momentum, -1.60)*kfact;
214 <<
" res(mb)=" << result/CLHEP::millibarn <<
G4endl;
227 GetCrossSection(part, mat, Z, etot);
236 for (findex = 0; findex < 5; ++findex) {
237 if (x <= fXSecPion[findex]) {
238 pd = fPionSecPD[findex];
246 else if (pdg == 321) {
256 else if (pdg == 130) {
266 G4cout <<
"G4ChargeExchangeXS::SampleSecondaryType for "
277 G4double tM = CLHEP::proton_mass_c2;
278 G4double logX =
G4Log((tM*tM + 2*tM*etot + fMassPi*fMassPi)*inv1e7);
280 G4double gl = pG0[findex] + pG1[findex]*logX;
281 G4double cl = pC0[findex] + pC1[findex]*logX;
285 G4double sigmaMax = (gc > 0.0) ? gl*
G4Exp(-(gl - 1.0)/gl) : 1.0;
286 for (
G4int i = 0; i < 100000; ++i) {
297G4ChargeExchangeXS::ComputeDeuteronFraction(
const G4Material* mat)
const
300 if (1 == elm->GetZasInt()) {
302 const G4int nIso = (
G4int)elm->GetNumberOfIsotopes();
303 const G4double* abu = elm->GetRelativeAbundanceVector();
304 for (
G4int j = 0; j < nIso; ++j) {
305 auto const iso = elm->GetIsotope(j);
306 ab += (iso->GetN() - iso->GetZ())*abu[j];
317 if (0 == idx) { res = fXSecPion[0]; }
318 else if (0 < idx && 5 > idx) {
319 res = fXSecPion[idx] - fXSecPion[idx - 1];
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double G4Log(G4double x)
G4GLOB_DLL std::ostream G4cout
G4double SampleTforPion(const G4double etot, const G4double tmax) const
G4bool IsElementApplicable(const G4DynamicParticle *, G4int Z, const G4Material *) final
G4double GetPartialPionXS(G4int idx) const
void CrossSectionDescription(std::ostream &) const final
const G4ParticleDefinition * SampleSecondaryType(const G4ParticleDefinition *, const G4Material *, G4int Z, G4int A, G4double etot)
G4double GetElementCrossSection(const G4DynamicParticle *, G4int Z, const G4Material *) final
G4ParticleDefinition * GetDefinition() const
G4double GetTotalEnergy() const
static G4KaonMinus * KaonMinus()
static G4KaonPlus * KaonPlus()
static G4KaonZeroLong * KaonZeroLong()
static G4KaonZeroShort * KaonZeroShort()
const G4ElementVector * GetElementVector() const
G4double GetPDGMass() const
G4int GetPDGEncoding() const
const G4String & GetParticleName() const
static G4ParticleTable * GetParticleTable()
static G4PionPlus * PionPlus()
static G4Pow * GetInstance()