- Timestamp:
- Dec 22, 2010, 3:52:27 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/high_energy/src/G4HENeutronInelastic.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4HENeutronInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 // 26 // $Id: G4HENeutronInelastic.cc,v 1.17 2010/11/29 05:44:44 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 30 28 // 31 29 … … 33 31 #include "G4ios.hh" 34 32 35 //36 33 // G4 Process: Gheisha High Energy Collision model. 37 34 // This includes the high energy cascading model, the two-body-resonance model 38 // and the low energy two-body model. Not included are the low energy stuff like39 // nuclear reactions, nuclear fission without any cascading and all processes for40 // p articles at rest.35 // and the low energy two-body model. Not included are the low energy stuff 36 // like nuclear reactions, nuclear fission without any cascading and all 37 // processes for particles at rest. 41 38 // First work done by J.L.Chuma and F.W.Jones, TRIUMF, June 96. 42 39 // H. Fesefeldt, RWTH-Aachen, 23-October-1996 … … 45 42 #include "G4HENeutronInelastic.hh" 46 43 47 G4HadFinalState * G4HENeutronInelastic::48 ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus ) 49 {50 G4HEVector * pv = new G4HEVector[MAXPART]; 51 const G4HadProjectile *aParticle = &aTrack;52 // G4DynamicParticle *originalTarget = targetNucleus.ReturnTargetParticle();53 54 55 44 G4HadFinalState* 45 G4HENeutronInelastic::ApplyYourself(const G4HadProjectile& aTrack, 46 G4Nucleus& targetNucleus) 47 { 48 G4HEVector* pv = new G4HEVector[MAXPART]; 49 const G4HadProjectile* aParticle = &aTrack; 50 const G4double A = targetNucleus.GetN(); 51 const G4double Z = targetNucleus.GetZ(); 52 G4HEVector incidentParticle(aParticle); 56 53 57 G4double atomicNumber = Z; 58 G4double atomicWeight = A; 59 60 G4int incidentCode = incidentParticle.getCode(); 61 G4double incidentMass = incidentParticle.getMass(); 62 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 63 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 64 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 65 66 if(incidentKineticEnergy < 1.) 67 { 68 G4cout << "GHENeutronInelastic: incident energy < 1 GeV" << G4endl; 69 } 70 if(verboseLevel > 1) 71 { 72 G4cout << "G4HENeutronInelastic::ApplyYourself" << G4endl; 73 G4cout << "incident particle " << incidentParticle.getName() 74 << "mass " << incidentMass 75 << "kinetic energy " << incidentKineticEnergy 76 << G4endl; 77 G4cout << "target material with (A,Z) = (" 78 << atomicWeight << "," << atomicNumber << ")" << G4endl; 79 } 54 G4double atomicNumber = Z; 55 G4double atomicWeight = A; 56 57 G4int incidentCode = incidentParticle.getCode(); 58 G4double incidentMass = incidentParticle.getMass(); 59 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 60 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 61 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 62 63 if (incidentKineticEnergy < 1.) 64 G4cout << "GHENeutronInelastic: incident energy < 1 GeV" << G4endl; 80 65 81 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 82 atomicWeight, atomicNumber); 83 if(verboseLevel > 1) 84 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 66 if (verboseLevel > 1) { 67 G4cout << "G4HENeutronInelastic::ApplyYourself" << G4endl; 68 G4cout << "incident particle " << incidentParticle.getName() 69 << "mass " << incidentMass 70 << "kinetic energy " << incidentKineticEnergy 71 << G4endl; 72 G4cout << "target material with (A,Z) = (" 73 << atomicWeight << "," << atomicNumber << ")" << G4endl; 74 } 85 75 86 incidentKineticEnergy -= inelasticity; 76 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 77 atomicWeight, atomicNumber); 78 if (verboseLevel > 1) 79 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 87 80 88 G4double excitationEnergyGNP = 0.; 89 G4double excitationEnergyDTA = 0.; 90 91 G4double excitation = NuclearExcitation(incidentKineticEnergy, 92 atomicWeight, atomicNumber, 93 excitationEnergyGNP, 94 excitationEnergyDTA); 95 if(verboseLevel > 1) 96 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP 81 incidentKineticEnergy -= inelasticity; 82 83 G4double excitationEnergyGNP = 0.; 84 G4double excitationEnergyDTA = 0.; 85 86 G4double excitation = NuclearExcitation(incidentKineticEnergy, 87 atomicWeight, atomicNumber, 88 excitationEnergyGNP, 89 excitationEnergyDTA); 90 if (verboseLevel > 1) 91 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP 97 92 << excitationEnergyDTA << G4endl; 98 93 99 100 incidentKineticEnergy -= excitation; 101 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 102 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 103 *(incidentTotalEnergy+incidentMass)); 104 105 106 G4HEVector targetParticle; 107 if(G4UniformRand() < atomicNumber/atomicWeight) 108 { 109 targetParticle.setDefinition("Proton"); 110 } 111 else 112 { 113 targetParticle.setDefinition("Neutron"); 114 } 115 116 G4double targetMass = targetParticle.getMass(); 117 G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass 118 + 2.0*targetMass*incidentTotalEnergy); 119 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 120 121 // this was the meaning of inElastic in the 122 // original Gheisha stand-alone version. 123 // G4bool inElastic = InElasticCrossSectionInFirstInt 124 // (availableEnergy, incidentCode, incidentTotalMomentum); 125 // by unknown reasons, it has been replaced 126 // to the following code in Geant??? 127 G4bool inElastic = true; 128 // if (G4UniformRand() < elasticCrossSection/totalCrossSection) inElastic = false; 129 130 vecLength = 0; 131 132 if(verboseLevel > 1) 133 G4cout << "ApplyYourself: CallFirstIntInCascade for particle " 94 incidentKineticEnergy -= excitation; 95 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 96 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 97 *(incidentTotalEnergy+incidentMass)); 98 99 G4HEVector targetParticle; 100 if (G4UniformRand() < atomicNumber/atomicWeight) { 101 targetParticle.setDefinition("Proton"); 102 } else { 103 targetParticle.setDefinition("Neutron"); 104 } 105 106 G4double targetMass = targetParticle.getMass(); 107 G4double centerOfMassEnergy = std::sqrt(incidentMass*incidentMass 108 + targetMass*targetMass 109 + 2.0*targetMass*incidentTotalEnergy); 110 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 111 112 // In the original Gheisha code the inElastic flag was set as follows 113 // G4bool inElastic = InElasticCrossSectionInFirstInt 114 // (availableEnergy, incidentCode, incidentTotalMomentum); 115 // For unknown reasons, it has been replaced by the following code in Geant??? 116 // 117 G4bool inElastic = true; 118 // if (G4UniformRand() < elasticCrossSection/totalCrossSection) inElastic = false; 119 120 vecLength = 0; 121 122 if (verboseLevel > 1) 123 G4cout << "ApplyYourself: CallFirstIntInCascade for particle " 134 124 << incidentCode << G4endl; 135 125 136 126 G4bool successful = false; 137 127 138 if(inElastic || (!inElastic && atomicWeight < 1.5)) 139 { 140 FirstIntInCasNeutron(inElastic, availableEnergy, pv, vecLength, 141 incidentParticle, targetParticle, atomicWeight); 142 143 if(verboseLevel > 1) 144 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 145 146 147 if ((vecLength > 0) && (availableEnergy > 1.)) 148 StrangeParticlePairProduction( availableEnergy, centerOfMassEnergy, 149 pv, vecLength, 150 incidentParticle, targetParticle); 151 HighEnergyCascading( successful, pv, vecLength, 152 excitationEnergyGNP, excitationEnergyDTA, 153 incidentParticle, targetParticle, 154 atomicWeight, atomicNumber); 155 if (!successful) 156 HighEnergyClusterProduction( successful, pv, vecLength, 157 excitationEnergyGNP, excitationEnergyDTA, 158 incidentParticle, targetParticle, 159 atomicWeight, atomicNumber); 160 if (!successful) 161 MediumEnergyCascading( successful, pv, vecLength, 162 excitationEnergyGNP, excitationEnergyDTA, 163 incidentParticle, targetParticle, 164 atomicWeight, atomicNumber); 165 166 if (!successful) 167 MediumEnergyClusterProduction( successful, pv, vecLength, 168 excitationEnergyGNP, excitationEnergyDTA, 169 incidentParticle, targetParticle, 170 atomicWeight, atomicNumber); 171 if (!successful) 172 QuasiElasticScattering( successful, pv, vecLength, 173 excitationEnergyGNP, excitationEnergyDTA, 174 incidentParticle, targetParticle, 175 atomicWeight, atomicNumber); 176 } 177 if (!successful) 178 { 179 ElasticScattering( successful, pv, vecLength, 180 incidentParticle, 181 atomicWeight, atomicNumber); 182 } 183 184 if (!successful) 185 { 186 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" << G4endl; 187 } 188 FillParticleChange(pv, vecLength); 189 delete [] pv; 190 theParticleChange.SetStatusChange(stopAndKill); 191 return & theParticleChange; 192 } 128 FirstIntInCasNeutron(inElastic, availableEnergy, pv, vecLength, 129 incidentParticle, targetParticle, atomicWeight); 130 131 if (verboseLevel > 1) 132 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 133 134 if ((vecLength > 0) && (availableEnergy > 1.)) 135 StrangeParticlePairProduction(availableEnergy, centerOfMassEnergy, 136 pv, vecLength, 137 incidentParticle, targetParticle); 138 139 HighEnergyCascading(successful, pv, vecLength, 140 excitationEnergyGNP, excitationEnergyDTA, 141 incidentParticle, targetParticle, 142 atomicWeight, atomicNumber); 143 if (!successful) 144 HighEnergyClusterProduction(successful, pv, vecLength, 145 excitationEnergyGNP, excitationEnergyDTA, 146 incidentParticle, targetParticle, 147 atomicWeight, atomicNumber); 148 if (!successful) 149 MediumEnergyCascading(successful, pv, vecLength, 150 excitationEnergyGNP, excitationEnergyDTA, 151 incidentParticle, targetParticle, 152 atomicWeight, atomicNumber); 153 154 if (!successful) 155 MediumEnergyClusterProduction(successful, pv, vecLength, 156 excitationEnergyGNP, excitationEnergyDTA, 157 incidentParticle, targetParticle, 158 atomicWeight, atomicNumber); 159 if (!successful) 160 QuasiElasticScattering(successful, pv, vecLength, 161 excitationEnergyGNP, excitationEnergyDTA, 162 incidentParticle, targetParticle, 163 atomicWeight, atomicNumber); 164 if (!successful) 165 ElasticScattering(successful, pv, vecLength, 166 incidentParticle, 167 atomicWeight, atomicNumber); 168 169 if (!successful) 170 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" 171 << G4endl; 172 173 FillParticleChange(pv, vecLength); 174 delete [] pv; 175 theParticleChange.SetStatusChange(stopAndKill); 176 return &theParticleChange; 177 } 178 193 179 194 180 void 195 G4HENeutronInelastic::FirstIntInCasNeutron( G4bool &inElastic,196 197 198 G4int &vecLen,199 G4HEVectorincidentParticle,200 G4HEVectortargetParticle,201 181 G4HENeutronInelastic::FirstIntInCasNeutron(G4bool& inElastic, 182 const G4double availableEnergy, 183 G4HEVector pv[], 184 G4int& vecLen, 185 const G4HEVector& incidentParticle, 186 const G4HEVector& targetParticle, 187 const G4double atomicWeight) 202 188 203 189 // Neutron undergoes interaction with nucleon within a nucleus. Check if it is … … 208 194 // protons/neutrons by kaons or strange baryons according to the average 209 195 // multiplicity per inelastic reaction. 210 211 { 212 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 213 static const G4double expxl = -expxu; // lower bound for arg. of exp 214 215 static const G4double protb = 0.35; 216 static const G4double neutb = 0.35; 217 static const G4double c = 1.25; 218 219 static const G4int numMul = 1200; 220 static const G4int numSec = 60; 221 222 G4int neutronCode = Neutron.getCode(); 223 G4int protonCode = Proton.getCode(); 224 225 G4int targetCode = targetParticle.getCode(); 226 // G4double incidentMass = incidentParticle.getMass(); 227 // G4double incidentEnergy = incidentParticle.getEnergy(); 228 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 229 230 static G4bool first = true; 231 static G4double protmul[numMul], protnorm[numSec]; // proton constants 232 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 233 234 // misc. local variables 235 // np = number of pi+, nm = number of pi-, nz = number of pi0 236 237 G4int i, counter, nt, np, nm, nz; 196 { 197 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 198 static const G4double expxl = -expxu; // lower bound for arg. of exp 199 200 static const G4double protb = 0.35; 201 static const G4double neutb = 0.35; 202 static const G4double c = 1.25; 203 204 static const G4int numMul = 1200; 205 static const G4int numSec = 60; 206 207 G4int neutronCode = Neutron.getCode(); 208 G4int protonCode = Proton.getCode(); 209 210 G4int targetCode = targetParticle.getCode(); 211 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 212 213 static G4bool first = true; 214 static G4double protmul[numMul], protnorm[numSec]; // proton constants 215 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 216 217 // misc. local variables 218 // np = number of pi+, nm = number of pi-, nz = number of pi0 219 220 G4int i, counter, nt, np, nm, nz; 238 221 239 222 if( first ) 240 { 223 { // compute normalization constants, this will only be done once 241 224 first = false; 242 225 for( i=0; i<numMul; i++ )protmul[i] = 0.0;
Note: See TracChangeset
for help on using the changeset viewer.