87 std::pair<const G4ParticleDefinition *,const G4ParticleDefinition *>
pp(proton,proton);
88 std::pair<const G4ParticleDefinition *,const G4ParticleDefinition *>
pn(proton,neutron);
89 std::pair<const G4ParticleDefinition *,const G4ParticleDefinition *> piPlusp(piPlus,proton);
90 std::pair<const G4ParticleDefinition *,const G4ParticleDefinition *> piMinusp(piMinus,proton);
91 std::pair<const G4ParticleDefinition *,const G4ParticleDefinition *> KPlusp(KPlus,proton);
92 std::pair<const G4ParticleDefinition *,const G4ParticleDefinition *> KMinusp(KMinus,proton);
93 std::pair<const G4ParticleDefinition *,const G4ParticleDefinition *>
nn(neutron,neutron);
94 std::pair<const G4ParticleDefinition *,const G4ParticleDefinition *> ppbar(proton,antiproton);
95 std::pair<const G4ParticleDefinition *,const G4ParticleDefinition *> npbar(antiproton,neutron);
97 std::vector<G4double> ppData;
98 std::vector<G4double> pPiPlusData;
99 std::vector<G4double> pPiMinusData;
100 std::vector<G4double> pKPlusData;
101 std::vector<G4double> pKMinusData;
102 std::vector<G4double> ppbarData;
103 std::vector<G4double> npbarData;
117 for (i=2; i<
nPar; i++)
131 xMap[piPlusp] = pPiPlusData;
132 xMap[piMinusp] = pPiMinusData;
133 xMap[KPlusp] = pKPlusData;
134 xMap[KMinusp] = pKMinusData;
135 xMap[ppbar] = ppbarData;
136 xMap[npbar] = npbarData;
173 if (m_max > 0. && sqrtS > (m_1 + m_2))
175 pLab = std::sqrt( (sqrtS*sqrtS - (m_1+m_2)*(m_1+m_2) ) * (sqrtS*sqrtS - (m_1-m_2)*(m_1-m_2)) ) / (2*m_max);
180 std::pair<const G4ParticleDefinition *,const G4ParticleDefinition *> trkPair(def1,def2);
182 trkPair = std::pair<const G4ParticleDefinition *,const G4ParticleDefinition *>(def2,def1);
184 std::vector<G4double>
data;
197 if (
xMap.find(trkPair) !=
xMap.end())
199 PairDoubleMap::const_iterator iter;
200 for (iter =
xMap.begin(); iter !=
xMap.end(); ++iter)
202 std::pair<const G4ParticleDefinition *,const G4ParticleDefinition *> thePair = (*iter).first;
203 if (thePair == trkPair)
205 data = (*iter).second;
214 if (pLab < pMinFit)
return 0.0;
216 G4cout <<
"WARNING! G4XPDGElastic::PDGElastic "
219 <<
" elastic cross section: momentum "
220 << pLab /
GeV <<
" GeV outside valid fit range "
221 << pMinFit /
GeV <<
"-" << pMaxFit /
GeV
236 G4cout <<
"G4XPDGElastic::CrossSection - Data not found in Map" <<
G4endl;
242 G4cout <<
"WARNING! G4XPDGElastic::PDGElastic "
244 <<
" elastic cross section: momentum "
245 << pLab <<
" GeV, negative cross section "
T max(const T t1, const T t2)
brief Return the largest of the two arguments
const G4LorentzVector & Get4Momentum() const
G4bool operator!=(const G4XPDGElastic &right) const
static const G4double _highLimit
const G4String & GetParticleName() const
static const G4double pKPlusPDGFit[7]
const G4ParticleDefinition * GetDefinition() const
static const G4double pPiMinusPDGFit[7]
static const G4double pPiPlusPDGFit[7]
static G4PionPlus * PionPlusDefinition()
static const G4double _lowLimit
virtual G4String Name() const
static const G4double npbarPDGFit[7]
G4double GetPDGMass() const
G4double G4Log(G4double x)
const XML_Char const XML_Char * data
static constexpr double millibarn
static G4Pow * GetInstance()
static G4Proton * ProtonDefinition()
G4double powA(G4double A, G4double y) const
static const G4double pKMinusPDGFit[7]
std::map< G4pDefPair, std::vector< G4double >, std::less< G4pDefPair > > xMap
static const G4double ppbarPDGFit[7]
static const G4double ppPDGFit[7]
static G4PionMinus * PionMinusDefinition()
virtual G4bool IsValid(G4double e) const
virtual G4double CrossSection(const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
static G4KaonMinus * KaonMinusDefinition()
static G4Neutron * NeutronDefinition()
G4GLOB_DLL std::ostream G4cout
static G4KaonPlus * KaonPlusDefinition()
static G4AntiProton * AntiProtonDefinition()
static constexpr double GeV
G4bool InLimits(G4double e, G4double eLow, G4double eHigh) const
G4bool operator==(const G4XPDGElastic &right) const