File indexing completed on 2025-01-18 09:58:45
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
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076 #ifndef G4NUCLEI_MODEL_HH
0077 #define G4NUCLEI_MODEL_HH
0078
0079 #include <algorithm>
0080 #include <vector>
0081
0082 #include "G4InuclElementaryParticle.hh"
0083 #include "G4CascadParticle.hh"
0084 #include "G4CascadeInterpolator.hh"
0085 #include "G4CollisionOutput.hh"
0086 #include "G4LorentzConvertor.hh"
0087
0088 class G4InuclNuclei;
0089 class G4ElementaryParticleCollider;
0090
0091 class G4NucleiModel {
0092 public:
0093 G4NucleiModel();
0094 G4NucleiModel(G4int a, G4int z);
0095 explicit G4NucleiModel(G4InuclNuclei* nuclei);
0096
0097 virtual ~G4NucleiModel();
0098
0099 void setVerboseLevel(G4int verbose) { verboseLevel = verbose; }
0100
0101 void generateModel(G4InuclNuclei* nuclei);
0102 void generateModel(G4int a, G4int z);
0103
0104
0105 void reset(G4int nHitNeutrons=0, G4int nHitProtons=0,
0106 const std::vector<G4ThreeVector>* hitPoints=0);
0107
0108 void printModel() const;
0109
0110 G4double getDensity(G4int ip, G4int izone) const {
0111 return nucleon_densities[ip - 1][izone];
0112 }
0113
0114 G4double getFermiMomentum(G4int ip, G4int izone) const {
0115 return fermi_momenta[ip - 1][izone];
0116 }
0117
0118 G4double getFermiKinetic(G4int ip, G4int izone) const;
0119
0120 G4double getPotential(G4int ip, G4int izone) const {
0121 if (ip == 9 || ip < 0) return 0.0;
0122 G4int ip0 = ip < 3 ? ip - 1 : 2;
0123 if (ip > 10 && ip < 18) ip0 = 3;
0124 if (ip > 20) ip0 = 4;
0125 return izone < number_of_zones ? zone_potentials[ip0][izone] : 0.0;
0126 }
0127
0128
0129 G4double getRadiusUnits() const { return radiusUnits*CLHEP::fermi; }
0130
0131 G4double getRadius() const { return nuclei_radius; }
0132 G4double getRadius(G4int izone) const {
0133 return ( (izone<0) ? 0.
0134 : (izone<number_of_zones) ? zone_radii[izone] : nuclei_radius);
0135 }
0136 G4double getVolume(G4int izone) const {
0137 return ( (izone<0) ? 0.
0138 : (izone<number_of_zones) ? zone_volumes[izone] : nuclei_volume);
0139 }
0140
0141 G4int getNumberOfZones() const { return number_of_zones; }
0142 G4int getZone(G4double r) const {
0143 for (G4int iz=0; iz<number_of_zones; iz++) if (r<zone_radii[iz]) return iz;
0144 return number_of_zones;
0145 }
0146
0147 G4int getNumberOfNeutrons() const { return neutronNumberCurrent; }
0148 G4int getNumberOfProtons() const { return protonNumberCurrent; }
0149
0150 G4bool empty() const {
0151 return neutronNumberCurrent < 1 && protonNumberCurrent < 1;
0152 }
0153
0154 G4bool stillInside(const G4CascadParticle& cparticle) {
0155 return cparticle.getCurrentZone() < number_of_zones;
0156 }
0157
0158
0159 G4CascadParticle initializeCascad(G4InuclElementaryParticle* particle);
0160
0161 typedef std::pair<std::vector<G4CascadParticle>, std::vector<G4InuclElementaryParticle> > modelLists;
0162
0163 void initializeCascad(G4InuclNuclei* bullet, G4InuclNuclei* target,
0164 modelLists& output);
0165
0166
0167 std::pair<G4int, G4int> getTypesOfNucleonsInvolved() const {
0168 return std::pair<G4int, G4int>(current_nucl1, current_nucl2);
0169 }
0170
0171 void generateParticleFate(G4CascadParticle& cparticle,
0172 G4ElementaryParticleCollider* theEPCollider,
0173 std::vector<G4CascadParticle>& cascade);
0174
0175 G4bool forceFirst(const G4CascadParticle& cparticle) const;
0176 G4bool isProjectile(const G4CascadParticle& cparticle) const;
0177 G4bool worthToPropagate(const G4CascadParticle& cparticle) const;
0178
0179 G4InuclElementaryParticle generateNucleon(G4int type, G4int zone) const;
0180
0181 G4LorentzVector generateNucleonMomentum(G4int type, G4int zone) const;
0182
0183 G4double absorptionCrossSection(G4double e, G4int type) const;
0184 G4double totalCrossSection(G4double ke, G4int rtype) const;
0185
0186
0187 static G4bool useQuasiDeuteron(G4int ptype, G4int qdtype=0);
0188
0189 protected:
0190 G4bool passFermi(const std::vector<G4InuclElementaryParticle>& particles,
0191 G4int zone);
0192
0193 G4bool passTrailing(const G4ThreeVector& hit_position);
0194
0195 void boundaryTransition(G4CascadParticle& cparticle);
0196
0197 void choosePointAlongTraj(G4CascadParticle& cparticle);
0198
0199 G4InuclElementaryParticle generateQuasiDeuteron(G4int type1,
0200 G4int type2,
0201 G4int zone) const;
0202
0203 typedef std::pair<G4InuclElementaryParticle, G4double> partner;
0204
0205 std::vector<partner> thePartners;
0206 void generateInteractionPartners(G4CascadParticle& cparticle);
0207
0208
0209 static G4bool sortPartners(const partner& p1, const partner& p2) {
0210 return (p2.second > p1.second);
0211 }
0212
0213
0214 void fillBindingEnergies();
0215
0216 void fillZoneRadii(G4double nuclearRadius);
0217
0218 G4double fillZoneVolumes(G4double nuclearRadius);
0219
0220 void fillPotentials(G4int type, G4double tot_vol);
0221
0222 G4double zoneIntegralWoodsSaxon(G4double ur1, G4double ur2,
0223 G4double nuclearRadius) const;
0224
0225 G4double zoneIntegralGaussian(G4double ur1, G4double ur2,
0226 G4double nuclearRadius) const;
0227
0228 G4double getRatio(G4int ip) const;
0229
0230
0231 G4double getCurrentDensity(G4int ip, G4int izone) const;
0232
0233
0234
0235 G4double inverseMeanFreePath(const G4CascadParticle& cparticle,
0236 const G4InuclElementaryParticle& target,
0237 G4int zone = -1);
0238
0239
0240
0241 G4double generateInteractionLength(const G4CascadParticle& cparticle,
0242 G4double path, G4double invmfp) const;
0243
0244 private:
0245 G4int verboseLevel;
0246
0247
0248 G4LorentzConvertor dummy_convertor;
0249 G4CollisionOutput EPCoutput;
0250
0251 std::vector<G4InuclElementaryParticle> qdeutrons;
0252 std::vector<G4double> acsecs;
0253
0254 std::vector<G4ThreeVector> coordinates;
0255 std::vector<G4LorentzVector> momentums;
0256 std::vector<G4InuclElementaryParticle> raw_particles;
0257
0258 std::vector<G4ThreeVector> collisionPts;
0259
0260
0261 G4double ur[7];
0262 G4double v[6];
0263 G4double v1[6];
0264 std::vector<G4double> rod;
0265 std::vector<G4double> pf;
0266 std::vector<G4double> vz;
0267
0268
0269 std::vector<std::vector<G4double> > nucleon_densities;
0270 std::vector<std::vector<G4double> > zone_potentials;
0271 std::vector<std::vector<G4double> > fermi_momenta;
0272 std::vector<G4double> zone_radii;
0273 std::vector<G4double> zone_volumes;
0274 std::vector<G4double> binding_energies;
0275 G4double nuclei_radius;
0276 G4double nuclei_volume;
0277 G4int number_of_zones;
0278
0279 G4int A;
0280 G4int Z;
0281 G4InuclNuclei* theNucleus;
0282
0283 G4int neutronNumber;
0284 G4int protonNumber;
0285
0286 G4int neutronNumberCurrent;
0287 G4int protonNumberCurrent;
0288
0289 G4int current_nucl1;
0290 G4int current_nucl2;
0291
0292 G4CascadeInterpolator<30> gammaQDinterp;
0293
0294
0295 enum PotentialType { WoodsSaxon=0, Gaussian=1 };
0296
0297
0298 const G4double crossSectionUnits;
0299 const G4double radiusUnits;
0300 const G4double skinDepth;
0301 const G4double radiusScale;
0302 const G4double radiusScale2;
0303 const G4double radiusForSmall;
0304 const G4double radScaleAlpha;
0305 const G4double fermiMomentum;
0306 const G4double R_nucleon;
0307 const G4double gammaQDscale;
0308 const G4double potentialThickness;
0309
0310
0311 static const G4double small;
0312 static const G4double large;
0313 static const G4double piTimes4thirds;
0314
0315 static const G4double alfa3[3], alfa6[6];
0316 static const G4double pion_vp;
0317 static const G4double pion_vp_small;
0318 static const G4double kaon_vp;
0319 static const G4double hyperon_vp;
0320
0321
0322 const G4InuclElementaryParticle neutronEP;
0323 const G4InuclElementaryParticle protonEP;
0324 };
0325
0326 #endif