File indexing completed on 2025-01-18 09:58:27
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 #define INCLXX_IN_GEANT4_MODE 1
0035
0036 #include "globals.hh"
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049 #ifndef G4INCLINUCLEARPOTENTIAL_HH
0050 #define G4INCLINUCLEARPOTENTIAL_HH 1
0051
0052 #include "G4INCLParticle.hh"
0053 #include "G4INCLRandom.hh"
0054 #include "G4INCLDeuteronDensity.hh"
0055 #include <map>
0056
0057
0058 namespace G4INCL {
0059
0060 namespace NuclearPotential {
0061 class INuclearPotential {
0062 public:
0063 INuclearPotential(const G4int A, const G4int Z, const G4bool pionPot) :
0064 theA(A),
0065 theZ(Z),
0066 pionPotential(pionPot)
0067 {
0068 if(pionPotential) {
0069 const G4double ZOverA = ((G4double) theZ) / ((G4double) theA);
0070
0071 const G4double r = 1.12*Math::pow13((G4double)theA);
0072
0073 const G4double xsi = 1. - 2.*ZOverA;
0074 const G4double vc = 1.25*PhysicalConstants::eSquared*theZ/r;
0075 vPiPlus = vPionDefault + 71.*xsi - vc;
0076 vPiZero = vPionDefault;
0077 vPiMinus = vPionDefault - 71.*xsi + vc;
0078 vKPlus = vKPlusDefault;
0079 vKZero = vKPlusDefault + 10.;
0080 vKMinus = vKMinusDefault;
0081 vKZeroBar = vKMinusDefault - 10.;
0082 } else {
0083 vPiPlus = 0.0;
0084 vPiZero = 0.0;
0085 vPiMinus = 0.0;
0086 vKPlus = 0.0;
0087 vKZero = 0.0;
0088 vKMinus = 0.0;
0089 vKZeroBar = 0.0;
0090 }
0091 }
0092
0093 virtual ~INuclearPotential() {}
0094
0095
0096 G4bool hasPionPotential() const { return pionPotential; }
0097
0098 virtual G4double computePotentialEnergy(const Particle * const p) const = 0;
0099
0100
0101
0102
0103
0104
0105 inline G4double getFermiEnergy(const Particle * const p) const {
0106 std::map<ParticleType, G4double>::const_iterator i = fermiEnergy.find(p->getType());
0107
0108 return i->second;
0109 }
0110
0111
0112
0113
0114
0115
0116 inline G4double getFermiEnergy(const ParticleType t) const {
0117 std::map<ParticleType, G4double>::const_iterator i = fermiEnergy.find(t);
0118
0119 return i->second;
0120 }
0121
0122
0123
0124
0125
0126
0127 inline G4double getSeparationEnergy(const Particle * const p) const {
0128 std::map<ParticleType, G4double>::const_iterator i = separationEnergy.find(p->getType());
0129
0130 return i->second;
0131 }
0132
0133
0134
0135
0136
0137
0138 inline G4double getSeparationEnergy(const ParticleType t) const {
0139 std::map<ParticleType, G4double>::const_iterator i = separationEnergy.find(t);
0140
0141 return i->second;
0142 }
0143
0144
0145
0146
0147
0148
0149 inline G4double getFermiMomentum(const Particle * const p) const {
0150 if(p->isDelta()) {
0151 const G4double Tf = getFermiEnergy(p), mass = p->getMass();
0152 return std::sqrt(Tf*(Tf+2.*mass));
0153 } else {
0154 std::map<ParticleType, G4double>::const_iterator i = fermiMomentum.find(p->getType());
0155
0156 return i->second;
0157 }
0158 }
0159
0160
0161
0162
0163
0164
0165 inline G4double getFermiMomentum(const ParticleType t) const {
0166
0167 std::map<ParticleType, G4double>::const_iterator i = fermiMomentum.find(t);
0168 return i->second;
0169 }
0170
0171 protected:
0172
0173 G4double computePionPotentialEnergy(const Particle * const p) const {
0174
0175 if(pionPotential && !p->isOutOfWell()) {
0176 switch( p->getType() ) {
0177 case PiPlus:
0178 return vPiPlus;
0179 break;
0180 case PiZero:
0181 return vPiZero;
0182 break;
0183 case PiMinus:
0184 return vPiMinus;
0185 break;
0186 default:
0187 return 0.0;
0188 break;
0189 }
0190 }
0191 else
0192 return 0.0;
0193 }
0194
0195 protected:
0196
0197 G4double computeKaonPotentialEnergy(const Particle * const p) const {
0198
0199 if(pionPotential && !p->isOutOfWell()) {
0200 switch( p->getType() ) {
0201 case KPlus:
0202 return vKPlus;
0203 break;
0204 case KZero:
0205 return vKZero;
0206 break;
0207 case KZeroBar:
0208 return vKZeroBar;
0209 break;
0210 case KShort:
0211 case KLong:
0212 return 0.0;
0213 break;
0214 case KMinus:
0215 return vKMinus;
0216 break;
0217 default:
0218 return 0.0;
0219 break;
0220 }
0221 }
0222 else
0223 return 0.0;
0224 }
0225
0226 protected:
0227
0228 G4double computePionResonancePotentialEnergy(const Particle * const p) const {
0229
0230 if(pionPotential && !p->isOutOfWell()) {
0231 switch( p->getType() ) {
0232 case Eta:
0233
0234
0235 return 0.0;
0236 break;
0237 case Omega:
0238 return 15.0;
0239 break;
0240 case EtaPrime:
0241 return 37.0;
0242 break;
0243 case Photon:
0244 return 0.0;
0245 break;
0246 default:
0247 return 0.0;
0248 break;
0249 }
0250 }
0251 else
0252 return 0.0;
0253 }
0254
0255 protected:
0256
0257 const G4int theA;
0258
0259 const G4int theZ;
0260 private:
0261 const G4bool pionPotential;
0262 G4double vPiPlus, vPiZero, vPiMinus;
0263 static const G4double vPionDefault;
0264 G4double vKPlus, vKZero, vKZeroBar, vKMinus;
0265 static const G4double vKPlusDefault;
0266 static const G4double vKMinusDefault;
0267 protected:
0268
0269 std::map<ParticleType,G4double> fermiEnergy;
0270
0271 std::map<ParticleType,G4double> fermiMomentum;
0272
0273 std::map<ParticleType,G4double> separationEnergy;
0274
0275 };
0276
0277
0278
0279
0280
0281
0282
0283
0284
0285
0286
0287
0288
0289
0290
0291 INuclearPotential const *createPotential(const PotentialType type, const G4int theA, const G4int theZ, const G4bool pionPotential);
0292
0293
0294 void clearCache();
0295
0296 }
0297
0298 }
0299
0300 #endif