Import Geant4 11.4.1 source tree
This commit is contained in:
@@ -6,6 +6,16 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2026-01-21 Vladimir Ivanchenko (hadr-cross-V11-03-10)
|
||||
- G4ChargeExchangeXS - added two different biasing factors for pions and
|
||||
kaons (urgent request NA64).
|
||||
|
||||
## 2026-01-11 Vladimir Ivanchenko
|
||||
- G4ChargeExchangeXS - removed debug printout
|
||||
|
||||
## 2025-12-30 Vladimir Ivanchenko
|
||||
- G4ChargeExchangeXS - fixed trivial Coverity warning
|
||||
|
||||
## 2025-11-24 Vladimir Ivanchenko (hadr-cross-V11-03-09)
|
||||
- G4EMDissociationCrossSection - fixed compilation warning
|
||||
|
||||
|
||||
@@ -48,8 +48,8 @@
|
||||
// where Y = KS, KL
|
||||
//
|
||||
|
||||
#ifndef G4ChargeExchangeXS_h
|
||||
#define G4ChargeExchangeXS_h
|
||||
#ifndef G4CHARGEEXCHANGEXS_HH
|
||||
#define G4CHARGEEXCHANGEXS_HH
|
||||
|
||||
#include "G4VCrossSectionDataSet.hh"
|
||||
#include "globals.hh"
|
||||
@@ -86,10 +86,12 @@ public:
|
||||
|
||||
void SetEnergyLimit(G4double val) { fEnergyLimit = val; };
|
||||
|
||||
void SetCrossSectionFactor(G4double val) { fFactor = val; };
|
||||
void SetPionCrossSectionFactor(G4double val) { fFactorPi = val; };
|
||||
|
||||
void SetKaonCrossSectionFactor(G4double val) { fFactorK = val; };
|
||||
|
||||
G4double GetCrossSectionFactor() const { return fFactor; };
|
||||
|
||||
|
||||
G4bool isPion() const { return findex >= 0; };
|
||||
|
||||
G4double SampleTforPion(const G4double etot,
|
||||
@@ -110,6 +112,8 @@ private:
|
||||
const G4ParticleDefinition* fPionSecPD[5];
|
||||
G4double fXSecPion[5] = {0.0, 0.0, 0.0, 0.0, 0.0};
|
||||
G4double fEnergyLimit{0.0};
|
||||
G4double fFactorPi{1.0};
|
||||
G4double fFactorK{1.0};
|
||||
G4double fFactor{1.0};
|
||||
G4double fMassPi;
|
||||
};
|
||||
|
||||
@@ -121,6 +121,7 @@ G4double G4ChargeExchangeXS::GetCrossSection(const G4ParticleDefinition* part,
|
||||
G4int ZZ, G4double pEtot)
|
||||
{
|
||||
G4double result = 0.0;
|
||||
fFactor = fFactorK;
|
||||
G4int pdg = part->GetPDGEncoding();
|
||||
|
||||
// Get or calculate the proton mass, particle mass, and s(Lorentz invariant)
|
||||
@@ -145,6 +146,7 @@ G4double G4ChargeExchangeXS::GetCrossSection(const G4ParticleDefinition* part,
|
||||
|
||||
// pi- + p -> n + meson (0- pi0, 1- eta, 2- eta', 3- omega, 4- f2(1270))
|
||||
if (pdg == -211) {
|
||||
fFactor = fFactorPi;
|
||||
G4double z23 = g4calc->Z23(Z);
|
||||
G4double x = lorentz_s*inv1e7;
|
||||
G4double logX = G4Log(x);
|
||||
@@ -163,6 +165,7 @@ G4double G4ChargeExchangeXS::GetCrossSection(const G4ParticleDefinition* part,
|
||||
|
||||
// pi+ + n -> p + meson (0- pi0, 1- eta, 2- eta', 3- omega, 4- f2(1270))
|
||||
else if (pdg == 211) {
|
||||
fFactor = fFactorPi;
|
||||
G4double n23 = g4calc->Z23(A - Z);
|
||||
G4double x = lorentz_s*inv1e7;
|
||||
G4double logX = G4Log(x);
|
||||
@@ -227,8 +230,7 @@ G4ChargeExchangeXS::SampleSecondaryType(const G4ParticleDefinition* part,
|
||||
GetCrossSection(part, mat, Z, etot);
|
||||
|
||||
const G4ParticleDefinition* pd = nullptr;
|
||||
G4int pdg = std::abs(part->GetPDGEncoding());
|
||||
G4cout << pdg << G4endl;
|
||||
G4int pdg = std::abs(part->GetPDGEncoding());
|
||||
// pi- + p / pi+ + n
|
||||
if (pdg == 211) {
|
||||
pd = fPionSecPD[0];
|
||||
@@ -262,7 +264,7 @@ G4ChargeExchangeXS::SampleSecondaryType(const G4ParticleDefinition* part,
|
||||
pd = G4KaonPlus::KaonPlus();
|
||||
}
|
||||
}
|
||||
if (verboseLevel > 1) {
|
||||
if (verboseLevel > 1 && nullptr != pd) {
|
||||
G4cout << "G4ChargeExchangeXS::SampleSecondaryType for "
|
||||
<< pd->GetParticleName() << " findex=" << findex
|
||||
<< G4endl;
|
||||
|
||||
Reference in New Issue
Block a user