source: trunk/source/processes/hadronic/models/low_energy/src/G4LEAntiXiMinusInelastic.cc@ 1036

Last change on this file since 1036 was 1007, checked in by garnier, 17 years ago

update to geant4.9.2

File size: 14.5 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27// $Id: G4LEAntiXiMinusInelastic.cc,v 1.11 2006/06/29 20:44:53 gunter Exp $
28// GEANT4 tag $Name: geant4-09-02 $
29//
30 // Hadronic Process: AntiXiMinus Inelastic Process
31 // J.L. Chuma, TRIUMF, 20-Feb-1997
32 // Last modified: 27-Mar-1997
33 // Modified by J.L.Chuma 30-Apr-97: added originalTarget for CalculateMomenta
34 //
35 // NOTE: The FORTRAN version of the cascade, CASAXM, simply called the
36 // routine for the XiMinus particle. Hence, the ApplyYourself function
37 // below is just a copy of the ApplyYourself from the XiMinus particle.
38
39#include "G4LEAntiXiMinusInelastic.hh"
40#include "Randomize.hh"
41
42 G4HadFinalState *
43 G4LEAntiXiMinusInelastic::ApplyYourself( const G4HadProjectile &aTrack,
44 G4Nucleus &targetNucleus )
45 {
46 const G4HadProjectile *originalIncident = &aTrack;
47 if (originalIncident->GetKineticEnergy()<= 0.1*MeV)
48 {
49 theParticleChange.SetStatusChange(isAlive);
50 theParticleChange.SetEnergyChange(aTrack.GetKineticEnergy());
51 theParticleChange.SetMomentumChange(aTrack.Get4Momentum().vect().unit());
52 return &theParticleChange;
53 }
54 //
55 // create the target particle
56 //
57 G4DynamicParticle *originalTarget = targetNucleus.ReturnTargetParticle();
58
59 if( verboseLevel > 1 )
60 {
61 const G4Material *targetMaterial = aTrack.GetMaterial();
62 G4cout << "G4LEAntiXiMinusInelastic::ApplyYourself called" << G4endl;
63 G4cout << "kinetic energy = " << originalIncident->GetKineticEnergy()/MeV << "MeV, ";
64 G4cout << "target material = " << targetMaterial->GetName() << ", ";
65 G4cout << "target particle = " << originalTarget->GetDefinition()->GetParticleName()
66 << G4endl;
67 }
68 //
69 // Fermi motion and evaporation
70 // As of Geant3, the Fermi energy calculation had not been Done
71 //
72 G4double ek = originalIncident->GetKineticEnergy()/MeV;
73 G4double amas = originalIncident->GetDefinition()->GetPDGMass()/MeV;
74 G4ReactionProduct modifiedOriginal;
75 modifiedOriginal = *originalIncident;
76
77 G4double tkin = targetNucleus.Cinema( ek );
78 ek += tkin;
79 modifiedOriginal.SetKineticEnergy( ek*MeV );
80 G4double et = ek + amas;
81 G4double p = std::sqrt( std::abs((et-amas)*(et+amas)) );
82 G4double pp = modifiedOriginal.GetMomentum().mag()/MeV;
83 if( pp > 0.0 )
84 {
85 G4ThreeVector momentum = modifiedOriginal.GetMomentum();
86 modifiedOriginal.SetMomentum( momentum * (p/pp) );
87 }
88 //
89 // calculate black track energies
90 //
91 tkin = targetNucleus.EvaporationEffects( ek );
92 ek -= tkin;
93 modifiedOriginal.SetKineticEnergy( ek*MeV );
94 et = ek + amas;
95 p = std::sqrt( std::abs((et-amas)*(et+amas)) );
96 pp = modifiedOriginal.GetMomentum().mag()/MeV;
97 if( pp > 0.0 )
98 {
99 G4ThreeVector momentum = modifiedOriginal.GetMomentum();
100 modifiedOriginal.SetMomentum( momentum * (p/pp) );
101 }
102 G4ReactionProduct currentParticle = modifiedOriginal;
103 G4ReactionProduct targetParticle;
104 targetParticle = *originalTarget;
105 currentParticle.SetSide( 1 ); // incident always goes in forward hemisphere
106 targetParticle.SetSide( -1 ); // target always goes in backward hemisphere
107 G4bool incidentHasChanged = false;
108 G4bool targetHasChanged = false;
109 G4bool quasiElastic = false;
110 G4FastVector<G4ReactionProduct,GHADLISTSIZE> vec; // vec will contain the secondary particles
111 G4int vecLen = 0;
112 vec.Initialize( 0 );
113
114 const G4double cutOff = 0.1;
115 const G4double anni = std::min( 1.3*currentParticle.GetTotalMomentum()/GeV, 0.4 );
116 if( (currentParticle.GetKineticEnergy()/MeV > cutOff) || (G4UniformRand() > anni) )
117 Cascade( vec, vecLen,
118 originalIncident, currentParticle, targetParticle,
119 incidentHasChanged, targetHasChanged, quasiElastic );
120
121 CalculateMomenta( vec, vecLen,
122 originalIncident, originalTarget, modifiedOriginal,
123 targetNucleus, currentParticle, targetParticle,
124 incidentHasChanged, targetHasChanged, quasiElastic );
125
126 SetUpChange( vec, vecLen,
127 currentParticle, targetParticle,
128 incidentHasChanged );
129
130 delete originalTarget;
131 return &theParticleChange;
132 }
133
134 void
135 G4LEAntiXiMinusInelastic::Cascade(
136 G4FastVector<G4ReactionProduct,GHADLISTSIZE> &vec,
137 G4int& vecLen,
138 const G4HadProjectile *originalIncident,
139 G4ReactionProduct &currentParticle,
140 G4ReactionProduct &targetParticle,
141 G4bool &incidentHasChanged,
142 G4bool &targetHasChanged,
143 G4bool &quasiElastic )
144 {
145 // derived from original FORTRAN code CASAXM by H. Fesefeldt (17-Jan-1989)
146 // which is just a copy of casxm (cascade for Xi-).
147 //
148 // AntiXiMinus undergoes interaction with nucleon within a nucleus. Check if it is
149 // energetically possible to produce pions/kaons. In not, assume nuclear excitation
150 // occurs and input particle is degraded in energy. No other particles are produced.
151 // If reaction is possible, find the correct number of pions/protons/neutrons
152 // produced using an interpolation to multiplicity data. Replace some pions or
153 // protons/neutrons by kaons or strange baryons according to the average
154 // multiplicity per Inelastic reaction.
155 //
156 const G4double mOriginal = originalIncident->GetDefinition()->GetPDGMass()/MeV;
157 const G4double etOriginal = originalIncident->GetTotalEnergy()/MeV;
158 const G4double targetMass = targetParticle.GetMass()/MeV;
159 G4double centerofmassEnergy = std::sqrt( mOriginal*mOriginal +
160 targetMass*targetMass +
161 2.0*targetMass*etOriginal );
162 G4double availableEnergy = centerofmassEnergy-(targetMass+mOriginal);
163 if( availableEnergy <= G4PionPlus::PionPlus()->GetPDGMass()/MeV )
164 {
165 quasiElastic = true;
166 return;
167 }
168 static G4bool first = true;
169 const G4int numMul = 1200;
170 const G4int numSec = 60;
171 static G4double protmul[numMul], protnorm[numSec]; // proton constants
172 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants
173 // np = number of pi+, nm = number of pi-, nz = number of pi0
174 G4int counter, nt=0, np=0, nm=0, nz=0;
175 G4double test;
176 const G4double c = 1.25;
177 const G4double b[] = { 0.7, 0.7 };
178 if( first ) // compute normalization constants, this will only be Done once
179 {
180 first = false;
181 G4int i;
182 for( i=0; i<numMul; ++i )protmul[i] = 0.0;
183 for( i=0; i<numSec; ++i )protnorm[i] = 0.0;
184 counter = -1;
185 for( np=0; np<(numSec/3); ++np )
186 {
187 for( nm=std::max(0,np-1); nm<=(np+1); ++nm )
188 {
189 for( nz=0; nz<numSec/3; ++nz )
190 {
191 if( ++counter < numMul )
192 {
193 nt = np+nm+nz;
194 if( nt>0 && nt<=numSec )
195 {
196 protmul[counter] = Pmltpc(np,nm,nz,nt,b[0],c);
197 protnorm[nt-1] += protmul[counter];
198 }
199 }
200 }
201 }
202 }
203 for( i=0; i<numMul; ++i )neutmul[i] = 0.0;
204 for( i=0; i<numSec; ++i )neutnorm[i] = 0.0;
205 counter = -1;
206 for( np=0; np<numSec/3; ++np )
207 {
208 for( nm=np; nm<=(np+2); ++nm )
209 {
210 for( nz=0; nz<numSec/3; ++nz )
211 {
212 if( ++counter < numMul )
213 {
214 nt = np+nm+nz;
215 if( nt>0 && nt<=numSec )
216 {
217 neutmul[counter] = Pmltpc(np,nm,nz,nt,b[1],c);
218 neutnorm[nt-1] += neutmul[counter];
219 }
220 }
221 }
222 }
223 }
224 for( i=0; i<numSec; ++i )
225 {
226 if( protnorm[i] > 0.0 )protnorm[i] = 1.0/protnorm[i];
227 if( neutnorm[i] > 0.0 )neutnorm[i] = 1.0/neutnorm[i];
228 }
229 } // end of initialization
230
231 const G4double expxu = 82.; // upper bound for arg. of exp
232 const G4double expxl = -expxu; // lower bound for arg. of exp
233 G4ParticleDefinition *aNeutron = G4Neutron::Neutron();
234 G4ParticleDefinition *aProton = G4Proton::Proton();
235 G4ParticleDefinition *aKaonMinus = G4KaonMinus::KaonMinus();
236 G4ParticleDefinition *aSigmaPlus = G4SigmaPlus::SigmaPlus();
237 G4ParticleDefinition *aXiZero = G4XiZero::XiZero();
238 //
239 // energetically possible to produce pion(s) --> inelastic scattering
240 //
241 G4double n, anpn;
242 GetNormalizationConstant( availableEnergy, n, anpn );
243 G4double ran = G4UniformRand();
244 G4double dum, excs = 0.0;
245 if( targetParticle.GetDefinition() == aProton )
246 {
247 counter = -1;
248 for( np=0; np<numSec/3 && ran>=excs; ++np )
249 {
250 for( nm=std::max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
251 {
252 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
253 {
254 if( ++counter < numMul )
255 {
256 nt = np+nm+nz;
257 if( nt>0 && nt<=numSec )
258 {
259 test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
260 dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
261 if( std::fabs(dum) < 1.0 )
262 {
263 if( test >= 1.0e-10 )excs += dum*test;
264 }
265 else
266 excs += dum*test;
267 }
268 }
269 }
270 }
271 }
272 if( ran >= excs ) // 3 previous loops continued to the end
273 {
274 quasiElastic = true;
275 return;
276 }
277 np--; nm--; nz--;
278 //
279 // number of secondary mesons determined by kno distribution
280 // check for total charge of final state mesons to determine
281 // the kind of baryons to be produced, taking into account
282 // charge and strangeness conservation
283 //
284 if( np < nm )
285 {
286 if( np+1 == nm )
287 {
288 currentParticle.SetDefinitionAndUpdateE( aXiZero );
289 incidentHasChanged = true;
290 }
291 else // charge mismatch
292 {
293 currentParticle.SetDefinitionAndUpdateE( aSigmaPlus );
294 incidentHasChanged = true;
295 //
296 // correct the strangeness by replacing a pi- by a kaon-
297 //
298 vec.Initialize( 1 );
299 G4ReactionProduct *p = new G4ReactionProduct;
300 p->SetDefinition( aKaonMinus );
301 (G4UniformRand() < 0.5) ? p->SetSide( -1 ) : p->SetSide( 1 );
302 vec.SetElement( vecLen++, p );
303 --nm;
304 }
305 }
306 else if( np == nm )
307 {
308 if( G4UniformRand() >= 0.5 )
309 {
310 currentParticle.SetDefinitionAndUpdateE( aXiZero );
311 incidentHasChanged = true;
312 targetParticle.SetDefinitionAndUpdateE( aNeutron );
313 targetHasChanged = true;
314 }
315 }
316 else
317 {
318 targetParticle.SetDefinitionAndUpdateE( aNeutron );
319 targetHasChanged = true;
320 }
321 }
322 else // target must be a neutron
323 {
324 counter = -1;
325 for( np=0; np<numSec/3 && ran>=excs; ++np )
326 {
327 for( nm=np; nm<=(np+2) && ran>=excs; ++nm )
328 {
329 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
330 {
331 if( ++counter < numMul )
332 {
333 nt = np+nm+nz;
334 if( nt>0 && nt<=numSec )
335 {
336 test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
337 dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
338 if( std::fabs(dum) < 1.0 )
339 {
340 if( test >= 1.0e-10 )excs += dum*test;
341 }
342 else
343 excs += dum*test;
344 }
345 }
346 }
347 }
348 }
349 if( ran >= excs ) // 3 previous loops continued to the end
350 {
351 quasiElastic = true;
352 return;
353 }
354 np--; nm--; nz--;
355 if( np+1 < nm )
356 {
357 if( np+2 == nm )
358 {
359 currentParticle.SetDefinitionAndUpdateE( aXiZero );
360 incidentHasChanged = true;
361 targetParticle.SetDefinitionAndUpdateE( aProton );
362 targetHasChanged = true;
363 }
364 else // charge mismatch
365 {
366 currentParticle.SetDefinitionAndUpdateE( aSigmaPlus );
367 incidentHasChanged = true;
368 targetParticle.SetDefinitionAndUpdateE( aProton );
369 targetHasChanged = true;
370 //
371 // correct the strangeness by replacing a pi- by a kaon-
372 //
373 vec.Initialize( 1 );
374 G4ReactionProduct *p = new G4ReactionProduct;
375 p->SetDefinition( aKaonMinus );
376 (G4UniformRand() < 0.5) ? p->SetSide( -1 ) : p->SetSide( 1 );
377 vec.SetElement( vecLen++, p );
378 --nm;
379 }
380 }
381 else if( np+1 == nm )
382 {
383 if( G4UniformRand() < 0.5 )
384 {
385 currentParticle.SetDefinitionAndUpdateE( aXiZero );
386 incidentHasChanged = true;
387 }
388 else
389 {
390 targetParticle.SetDefinitionAndUpdateE( aProton );
391 targetHasChanged = true;
392 }
393 }
394 }
395 SetUpPions( np, nm, nz, vec, vecLen );
396 return;
397 }
398
399 /* end of file */
400
Note: See TracBrowser for help on using the repository browser.