154 G4double centerofmassEnergy = std::sqrt( mOriginal*mOriginal +
155 targetMass*targetMass +
156 2.0*targetMass*etOriginal );
157 G4double availableEnergy = centerofmassEnergy-(targetMass+mOriginal);
160 const G4int numMul = 1200;
161 const G4int numSec = 60;
165 G4int nt(0), np(0), nneg(0), nz(0);
172 for( i=0; i<numMul; ++i )protmul[i] = 0.0;
173 for( i=0; i<numSec; ++i )protnorm[i] = 0.0;
175 for( np=0; np<(numSec/3); ++np )
177 for( nneg=
std::max(0,np-1); nneg<=(np+1); ++nneg )
179 for( nz=0; nz<numSec/3; ++nz )
181 if( ++counter < numMul )
184 if( (nt>0) && (nt<=numSec) )
186 protmul[counter] =
Pmltpc(np,nneg,nz,nt,b[0],c);
187 protnorm[nt-1] += protmul[counter];
193 for( i=0; i<numMul; ++i )neutmul[i] = 0.0;
194 for( i=0; i<numSec; ++i )neutnorm[i] = 0.0;
196 for( np=0; np<numSec/3; ++np )
198 for( nneg=np; nneg<=(np+2); ++nneg )
200 for( nz=0; nz<numSec/3; ++nz )
202 if( ++counter < numMul )
205 if( (nt>0) && (nt<=numSec) )
207 neutmul[counter] =
Pmltpc(np,nneg,nz,nt,b[1],c);
208 neutnorm[nt-1] += neutmul[counter];
214 for( i=0; i<numSec; ++i )
216 if( protnorm[i] > 0.0 )protnorm[i] = 1.0/protnorm[i];
217 if( neutnorm[i] > 0.0 )neutnorm[i] = 1.0/neutnorm[i];
235 const G4double cech[] = {1.,1.,1.,0.70,0.60,0.55,0.35,0.25,0.18,0.15};
239 np = nneg = nz = nt = 0;
241 const G4double cnk0[] = {0.17,0.18,0.17,0.24,0.26,0.20,0.22,0.21,0.34,0.45,
242 0.58,0.55,0.36,0.29,0.29,0.32,0.32,0.33,0.33,0.33};
249 incidentHasChanged =
true;
251 targetHasChanged =
true;
263 incidentHasChanged =
true;
264 targetHasChanged =
true;
267 else if( ran < 0.50 )
274 incidentHasChanged =
true;
275 targetHasChanged =
true;
277 else if( ran < 0.75 )
284 incidentHasChanged =
true;
285 targetHasChanged =
true;
294 incidentHasChanged =
true;
295 targetHasChanged =
true;
301 if( availableEnergy < aPiPlus->GetPDGMass() )
313 for( np=0; np<numSec/3 && ran>=excs; ++np )
315 for( nneg=
std::max(0,np-1); nneg<=(np+1) && ran>=excs; ++nneg )
317 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
319 if( ++counter < numMul )
325 dum = (
pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
326 if( std::fabs(dum) < 1.0 )
328 if( test >= 1.0
e-10 )excs += dum*
test;
349 incidentHasChanged =
true;
350 targetHasChanged =
true;
353 else if( np == nneg+1 )
356 targetHasChanged =
true;
361 incidentHasChanged =
true;
367 for( np=0; np<numSec/3 && ran>=excs; ++np )
369 for( nneg=np; nneg<=(np+2) && ran>=excs; ++nneg )
371 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
373 if( ++counter < numMul )
376 if( (nt>=1) && (nt<=numSec) )
379 dum = (
pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
380 if( std::fabs(dum) < 1.0 )
382 if( test >= 1.0
e-10 )excs += dum*
test;
402 targetHasChanged =
true;
407 incidentHasChanged =
true;
410 else if( np != nneg )
413 incidentHasChanged =
true;
430 incidentHasChanged =
true;
431 targetHasChanged =
true;
437 incidentHasChanged =
true;
438 targetHasChanged =
true;
441 else if( ran < 0.84 )
447 incidentHasChanged =
true;
448 targetHasChanged =
true;
454 incidentHasChanged =
true;
455 targetHasChanged =
true;
464 incidentHasChanged =
true;
465 targetHasChanged =
true;
471 incidentHasChanged =
true;
472 targetHasChanged =
true;
484 incidentHasChanged =
true;
485 targetHasChanged =
true;
487 else if( ran < 0.78 )
491 incidentHasChanged =
true;
492 targetHasChanged =
true;
494 else if( ran < 0.89 )
498 incidentHasChanged =
true;
499 targetHasChanged =
true;
505 incidentHasChanged =
true;
506 targetHasChanged =
true;
515 incidentHasChanged =
true;
522 targetHasChanged =
true;
G4double GetTotalEnergy() const
static G4KaonZeroLong * KaonZeroLong()
static G4SigmaZero * SigmaZero()
static G4KaonMinus * KaonMinus()
G4double Pmltpc(G4int np, G4int nm, G4int nz, G4int n, G4double b, G4double c)
static G4KaonZeroShort * KaonZeroShort()
static G4Proton * Proton()
static G4PionPlus * PionPlus()
void SetDefinitionAndUpdateE(const G4ParticleDefinition *aParticleDefinition)
static G4Neutron * Neutron()
static G4PionZero * PionZero()
G4double GetTotalMomentum() const
static G4SigmaMinus * SigmaMinus()
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
const G4ParticleDefinition * GetDefinition() const
G4double GetPDGMass() const
static G4PionMinus * PionMinus()
const G4ParticleDefinition * GetDefinition() const
static G4SigmaPlus * SigmaPlus()
void GetNormalizationConstant(const G4double availableEnergy, G4double &n, G4double &anpn)
static G4Lambda * Lambda()
void SetUpPions(const G4int np, const G4int nm, const G4int nz, G4FastVector< G4ReactionProduct, 256 > &vec, G4int &vecLen)