Geant4 Cross Reference |
1 // 1 2 // ******************************************* 3 // * License and Disclaimer 4 // * 5 // * The Geant4 software is copyright of th 6 // * the Geant4 Collaboration. It is provided 7 // * conditions of the Geant4 Software License 8 // * LICENSE and available at http://cern.ch/ 9 // * include a list of copyright holders. 10 // * 11 // * Neither the authors of this software syst 12 // * institutes,nor the agencies providing fin 13 // * work make any representation or warran 14 // * regarding this software system or assum 15 // * use. Please see the license in the file 16 // * for the full disclaimer and the limitatio 17 // * 18 // * This code implementation is the result 19 // * technical work of the GEANT4 collaboratio 20 // * By using, copying, modifying or distri 21 // * any work based on the software) you ag 22 // * use in resulting scientific publicati 23 // * acceptance of all terms of the Geant4 Sof 24 // ******************************************* 25 // 26 // 27 // 28 // G4 Model: Low Energy Fission 29 // F.W. Jones, TRIUMF, 03-DEC-96 30 // 31 // This is a prototype of a low-energy fission 32 // Currently it is based on the GHEISHA routin 33 // and conforms fairly closely to the original 34 // Note: energy is in MeV and momentum is in M 35 // 36 // use -scheme for elastic scattering: HPW, 20 37 // the code comes mostly from the old Low-ener 38 // 39 // 25-JUN-98 FWJ: replaced missing Initialize 40 41 #include <iostream> 42 43 #include "G4LFission.hh" 44 #include "globals.hh" 45 #include "G4Exp.hh" 46 #include "G4Log.hh" 47 #include "G4Pow.hh" 48 #include "G4PhysicalConstants.hh" 49 #include "G4SystemOfUnits.hh" 50 #include "Randomize.hh" 51 #include "G4PhysicsModelCatalog.hh" 52 53 G4LFission::G4LFission(const G4String& name) 54 : G4HadronicInteraction(name), secID(-1) 55 { 56 init(); 57 SetMinEnergy(0.0*GeV); 58 SetMaxEnergy(DBL_MAX); 59 G4PhysicsModelCatalog::GetModelID( "model_" 60 } 61 62 63 G4LFission::~G4LFission() 64 { 65 theParticleChange.Clear(); 66 } 67 68 69 void G4LFission::ModelDescription(std::ostream 70 { 71 outFile << "G4LFission is one of the Low Ene 72 << "(LEP) models used to implement n 73 << "nuclei. It is a re-engineered v 74 << "of H. Fesefeldt which emits neut 75 << "nuclear fragments. The model is 76 << "neutron energies.\n"; 77 } 78 79 void G4LFission::init() 80 { 81 G4int i; 82 G4double xx = 1. - 0.5; 83 G4double xxx = std::sqrt(2.29*xx); 84 spneut[0] = G4Exp(-xx/0.965)*(G4Exp(xxx) - 85 for (i = 2; i <= 10; i++) { 86 xx = i*1. - 0.5; 87 xxx = std::sqrt(2.29*xx); 88 spneut[i-1] = spneut[i-2] + G4Exp(-xx/0. 89 } 90 for (i = 1; i <= 10; i++) { 91 spneut[i-1] = spneut[i-1]/spneut[9]; 92 if (verboseLevel > 1) G4cout << "G4LFiss 93 " spneut=" << spneut[i-1] << G4endl; 94 } 95 } 96 97 98 G4HadFinalState* G4LFission::ApplyYourself(con 99 G4N 100 { 101 theParticleChange.Clear(); 102 const G4HadProjectile* aParticle = &aTrack; 103 104 G4double N = targetNucleus.GetA_asInt(); 105 G4double Z = targetNucleus.GetZ_asInt(); 106 theParticleChange.SetStatusChange(stopAndKil 107 108 G4double P = aParticle->GetTotalMomentum()/M 109 G4double Px = aParticle->Get4Momentum().vect 110 G4double Py = aParticle->Get4Momentum().vect 111 G4double Pz = aParticle->Get4Momentum().vect 112 G4double E = aParticle->GetTotalEnergy()/MeV 113 G4double E0 = aParticle->GetDefinition()->Ge 114 G4double Q = aParticle->GetDefinition()->Get 115 if (verboseLevel > 1) { 116 G4cout << "G4LFission:ApplyYourself: inc 117 G4cout << "P " << P << " MeV/c" << 118 G4cout << "Px " << Px << " MeV/c" << 119 G4cout << "Py " << Py << " MeV/c" << 120 G4cout << "Pz " << Pz << " MeV/c" << 121 G4cout << "E " << E << " MeV" << G4 122 G4cout << "mass " << E0 << " MeV" << G 123 G4cout << "charge " << Q << G4endl; 124 } 125 // GHEISHA ADD operation to get total energy 126 if (verboseLevel > 1) { 127 G4cout << "G4LFission:ApplyYourself: mat 128 G4cout << "A " << N << G4endl; 129 G4cout << "Z " << Z << G4endl; 130 G4cout << "atomic mass " << 131 Atomas(N, Z) << "MeV" << G4endl; 132 } 133 E = E + Atomas(N, Z); 134 G4double E02 = E*E - P*P; 135 E0 = std::sqrt(std::abs(E02)); 136 if (E02 < 0) E0 = -E0; 137 Q = Q + Z; 138 if (verboseLevel > 1) { 139 G4cout << "G4LFission:ApplyYourself: tot 140 G4cout << "E " << E << " MeV" << G4 141 G4cout << "mass " << E0 << " MeV" << G 142 G4cout << "charge " << Q << G4endl; 143 } 144 Px = -Px; 145 Py = -Py; 146 Pz = -Pz; 147 148 G4double e1 = aParticle->GetKineticEnergy()/ 149 if (e1 < 1.) e1 = 1.; 150 151 // Average number of neutrons 152 G4double avern = 2.569 + 0.559*G4Log(e1); 153 G4bool photofission = 0; // For now 154 // Take the following value if photofission is 155 if (!photofission) avern = 2.569 + 0.900*G4 156 157 // Average number of gammas 158 G4double averg = 9.500 + 0.600*G4Log(e1); 159 160 G4double ran = G4RandGauss::shoot(); 161 // Number of neutrons 162 G4int nn = static_cast<G4int>(avern + ran*1 163 ran = G4RandGauss::shoot(); 164 // Number of gammas 165 G4int ng = static_cast<G4int>(averg + ran*3 166 if (nn < 1) nn = 1; 167 if (ng < 1) ng = 1; 168 G4double exn = 0.; 169 G4double exg = 0.; 170 171 // Make secondary neutrons and distribute kine 172 G4DynamicParticle* aNeutron; 173 G4int i; 174 for (i = 1; i <= nn; i++) { 175 ran = G4UniformRand(); 176 G4int j; 177 for (j = 1; j <= 10; j++) { 178 if (ran < spneut[j-1]) goto label12; 179 } 180 j = 10; 181 label12: 182 ran = G4UniformRand(); 183 G4double ekin = (j - 1)*1. + ran; 184 exn = exn + ekin; 185 aNeutron = new G4DynamicParticle(G4Neutr 186 G4Parti 187 ekin*Me 188 theParticleChange.AddSecondary(aNeutron, 189 } 190 191 // Make secondary gammas and distribute kineti 192 G4DynamicParticle* aGamma; 193 for (i = 1; i <= ng; i++) { 194 ran = G4UniformRand(); 195 G4double ekin = -0.87*G4Log(ran); 196 exg = exg + ekin; 197 aGamma = new G4DynamicParticle(G4Gamma:: 198 G4Particl 199 ekin*MeV) 200 theParticleChange.AddSecondary(aGamma, s 201 } 202 203 // Distribute momentum vectors and do Lorentz 204 205 G4HadSecondary* theSecondary; 206 207 for (i = 1; i <= nn + ng; i++) { 208 G4double ran1 = G4UniformRand(); 209 G4double ran2 = G4UniformRand(); 210 G4double cost = -1. + 2.*ran1; 211 G4double sint = std::sqrt(std::abs(1. - 212 G4double phi = ran2*twopi; 213 // G4cout << ran1 << " " << ran2 << 214 // G4cout << cost << " " << sint << 215 theSecondary = theParticleChange.GetSeco 216 G4double pp = theSecondary->GetParticle( 217 G4double px = pp*sint*std::sin(phi); 218 G4double py = pp*sint*std::cos(phi); 219 G4double pz = pp*cost; 220 // G4cout << pp << G4endl; 221 // G4cout << px << " " << py << " " 222 G4double e = theSecondary->GetParticle() 223 G4double e0 = theSecondary->GetParticle( 224 225 G4double a = px*Px + py*Py + pz*Pz; 226 a = (a/(E + E0) - e)/E0; 227 228 px = px + a*Px; 229 py = py + a*Py; 230 pz = pz + a*Pz; 231 G4double p2 = px*px + py*py + pz*pz; 232 pp = std::sqrt(p2); 233 e = std::sqrt(e0*e0 + p2); 234 G4double ekin = e - theSecondary->GetPar 235 theSecondary->GetParticle()->SetMomentum 236 237 238 theSecondary->GetParticle()->SetKineticE 239 } 240 241 return &theParticleChange; 242 } 243 244 // Computes atomic mass in MeV (translation of 245 // Not optimized: conforms closely to original 246 247 G4double G4LFission::Atomas(const G4double A, 248 { 249 G4double rmel = G4Electron::ElectronDefiniti 250 G4double rmp = G4Proton::ProtonDefinition() 251 G4double rmn = G4Neutron::NeutronDefinition 252 G4double rmd = G4Deuteron::DeuteronDefiniti 253 G4double rma = G4Alpha::AlphaDefinition()-> 254 255 G4int ia = static_cast<G4int>(A + 0.5); 256 if (ia < 1) return 0; 257 G4int iz = static_cast<G4int>(Z + 0.5); 258 if (iz < 0) return 0; 259 if (iz > ia) return 0; 260 261 if (ia == 1) { 262 if (iz == 0) return rmn; //neut 263 if (iz == 1) return rmp + rmel; //Hydr 264 } 265 else if (ia == 2 && iz == 1) { 266 return rmd; //Deut 267 } 268 else if (ia == 4 && iz == 2) { 269 return rma; //Alph 270 } 271 272 G4Pow* Pow=G4Pow::GetInstance(); 273 G4double mass = (A - Z)*rmn + Z*rmp + Z*rmel 274 + 17.23*Pow->A23(A) 275 + 93.15*(A/2. - Z)*(A/2. - Z 276 + 0.6984523*Z*Z/Pow->A13(A); 277 G4int ipp = (ia - iz)%2; 278 G4int izz = iz%2; 279 if (ipp == izz) mass = mass + (ipp + izz -1) 280 281 return mass; 282 } 283 284 const std::pair<G4double, G4double> G4LFission 285 { 286 // max energy non-conservation is mass of he 287 return std::pair<G4double, G4double>(10.0*pe 288 } 289