- Timestamp:
- Dec 22, 2010, 3:52:27 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/high_energy/src/G4HEKaonMinusInelastic.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4HEKaonMinusInelastic.cc,v 1.14 2008/03/17 20:49:17 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 // 26 // $Id: G4HEKaonMinusInelastic.cc,v 1.16 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 arethe low energy stuff35 // and the low energy two-body model. Not included is the low energy stuff 39 36 // like nuclear reactions, nuclear fission without any cascading and all 40 37 // processes for particles at rest. … … 45 42 #include "G4HEKaonMinusInelastic.hh" 46 43 47 G4HadFinalState * G4HEKaonMinusInelastic::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 G4HEKaonMinusInelastic::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 << "GHEKaonMinusInelastic: incident energy < 1 GeV" << G4endl; 69 } 70 if(verboseLevel > 1) 71 { 72 G4cout << "G4HEKaonMinusInelastic::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 } 80 81 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 82 atomicWeight, atomicNumber); 83 if(verboseLevel > 1) 84 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 85 86 incidentKineticEnergy -= inelasticity; 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 << "GHEKaonMinusInelastic: incident energy < 1 GeV" << G4endl; 65 66 if (verboseLevel > 1) { 67 G4cout << "G4HEKaonMinusInelastic::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 } 75 76 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 77 atomicWeight, atomicNumber); 78 if (verboseLevel > 1) 79 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 80 81 incidentKineticEnergy -= inelasticity; 87 82 88 89 90 91 G4double excitation= NuclearExcitation(incidentKineticEnergy,92 93 94 95 if(verboseLevel > 1)96 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 131 vecLength = 0; 132 133 if(verboseLevel > 1) 134 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 G4bool inElastic = true; 113 114 vecLength = 0; 115 116 if (verboseLevel > 1) 117 G4cout << "ApplyYourself: CallFirstIntInCascade for particle " 135 118 << incidentCode << G4endl; 136 119 137 120 G4bool successful = false; 138 121 139 if(inElastic || (!inElastic && atomicWeight < 1.5)) 140 { 141 FirstIntInCasKaonMinus(inElastic, availableEnergy, pv, vecLength, 142 incidentParticle, targetParticle); 143 144 if(verboseLevel > 1) 145 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 146 147 148 if ((vecLength > 0) && (availableEnergy > 1.)) 149 StrangeParticlePairProduction( availableEnergy, centerOfMassEnergy, 150 pv, vecLength, 151 incidentParticle, targetParticle); 152 HighEnergyCascading( successful, pv, vecLength, 153 excitationEnergyGNP, excitationEnergyDTA, 154 incidentParticle, targetParticle, 155 atomicWeight, atomicNumber); 156 if (!successful) 157 HighEnergyClusterProduction( successful, pv, vecLength, 158 excitationEnergyGNP, excitationEnergyDTA, 159 incidentParticle, targetParticle, 160 atomicWeight, atomicNumber); 161 if (!successful) 162 MediumEnergyCascading( successful, pv, vecLength, 163 excitationEnergyGNP, excitationEnergyDTA, 164 incidentParticle, targetParticle, 165 atomicWeight, atomicNumber); 166 167 if (!successful) 168 MediumEnergyClusterProduction( successful, pv, vecLength, 169 excitationEnergyGNP, excitationEnergyDTA, 170 incidentParticle, targetParticle, 171 atomicWeight, atomicNumber); 172 if (!successful) 173 QuasiElasticScattering( successful, pv, vecLength, 174 excitationEnergyGNP, excitationEnergyDTA, 175 incidentParticle, targetParticle, 176 atomicWeight, atomicNumber); 177 } 178 if (!successful) 179 { 180 ElasticScattering( successful, pv, vecLength, 181 incidentParticle, 182 atomicWeight, atomicNumber); 183 } 184 185 if (!successful) 186 { 187 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" << G4endl; 188 } 189 FillParticleChange(pv, vecLength); 190 delete [] pv; 191 theParticleChange.SetStatusChange(stopAndKill); 192 return & theParticleChange; 193 } 122 FirstIntInCasKaonMinus(inElastic, availableEnergy, pv, vecLength, 123 incidentParticle, targetParticle); 124 125 if (verboseLevel > 1) 126 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 127 128 if ((vecLength > 0) && (availableEnergy > 1.)) 129 StrangeParticlePairProduction(availableEnergy, centerOfMassEnergy, 130 pv, vecLength, 131 incidentParticle, targetParticle); 132 133 HighEnergyCascading(successful, pv, vecLength, 134 excitationEnergyGNP, excitationEnergyDTA, 135 incidentParticle, targetParticle, 136 atomicWeight, atomicNumber); 137 if (!successful) 138 HighEnergyClusterProduction(successful, pv, vecLength, 139 excitationEnergyGNP, excitationEnergyDTA, 140 incidentParticle, targetParticle, 141 atomicWeight, atomicNumber); 142 if (!successful) 143 MediumEnergyCascading(successful, pv, vecLength, 144 excitationEnergyGNP, excitationEnergyDTA, 145 incidentParticle, targetParticle, 146 atomicWeight, atomicNumber); 147 148 if (!successful) 149 MediumEnergyClusterProduction(successful, pv, vecLength, 150 excitationEnergyGNP, excitationEnergyDTA, 151 incidentParticle, targetParticle, 152 atomicWeight, atomicNumber); 153 if (!successful) 154 QuasiElasticScattering(successful, pv, vecLength, 155 excitationEnergyGNP, excitationEnergyDTA, 156 incidentParticle, targetParticle, 157 atomicWeight, atomicNumber); 158 if (!successful) 159 ElasticScattering(successful, pv, vecLength, 160 incidentParticle, 161 atomicWeight, atomicNumber); 162 if (!successful) 163 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" 164 << G4endl; 165 166 FillParticleChange(pv, vecLength); 167 delete [] pv; 168 theParticleChange.SetStatusChange(stopAndKill); 169 return &theParticleChange; 170 } 171 194 172 195 173 void 196 G4HEKaonMinusInelastic::FirstIntInCasKaonMinus( G4bool &inElastic,197 198 199 G4int &vecLen,200 G4HEVectorincidentParticle,201 G4HEVectortargetParticle)174 G4HEKaonMinusInelastic::FirstIntInCasKaonMinus(G4bool& inElastic, 175 const G4double availableEnergy, 176 G4HEVector pv[], 177 G4int& vecLen, 178 const G4HEVector& incidentParticle, 179 const G4HEVector& targetParticle) 202 180 203 181 // Kaon- undergoes interaction with nucleon within a nucleus. Check if it is … … 208 186 // protons/neutrons by kaons or strange baryons according to the average 209 187 // 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.7; 216 static const G4double neutb = 0.7; 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 G4int kaonMinusCode = KaonMinus.getCode(); 225 G4int kaonZeroCode = KaonZero.getCode(); 226 G4int antiKaonZeroCode = AntiKaonZero.getCode(); 227 228 G4int targetCode = targetParticle.getCode(); 229 // G4double incidentMass = incidentParticle.getMass(); 230 // G4double incidentEnergy = incidentParticle.getEnergy(); 231 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 232 233 static G4bool first = true; 234 static G4double protmul[numMul], protnorm[numSec]; // proton constants 235 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 236 237 // misc. local variables 238 // np = number of pi+, nm = number of pi-, nz = number of pi0 239 240 G4int i, counter, nt, np, nm, nz; 188 { 189 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 190 static const G4double expxl = -expxu; // lower bound for arg. of exp 191 192 static const G4double protb = 0.7; 193 static const G4double neutb = 0.7; 194 static const G4double c = 1.25; 195 196 static const G4int numMul = 1200; 197 static const G4int numSec = 60; 198 199 G4int neutronCode = Neutron.getCode(); 200 G4int protonCode = Proton.getCode(); 201 G4int kaonMinusCode = KaonMinus.getCode(); 202 G4int kaonZeroCode = KaonZero.getCode(); 203 G4int antiKaonZeroCode = AntiKaonZero.getCode(); 204 205 G4int targetCode = targetParticle.getCode(); 206 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 207 208 static G4bool first = true; 209 static G4double protmul[numMul], protnorm[numSec]; // proton constants 210 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 211 212 // misc. local variables 213 // np = number of pi+, nm = number of pi-, nz = number of pi0 214 215 G4int i, counter, nt, np, nm, nz; 241 216 242 217 if( first ) 243 { 218 { // compute normalization constants, this will only be done once 244 219 first = false; 245 220 for( i=0; i<numMul; i++ )protmul[i] = 0.0;
Note: See TracChangeset
for help on using the changeset viewer.