144 G4double centerofmassEnergy = std::sqrt( mOriginal*mOriginal +
145 targetMass*targetMass +
146 2.0*targetMass*etOriginal );
147 G4double availableEnergy = centerofmassEnergy-(targetMass+mOriginal);
154 const G4int numMul = 1200;
155 const G4int numSec = 60;
161 G4int counter, nt=0, np=0, nneg=0, nz=0;
168 for( i=0; i<numMul; ++i )protmul[i] = 0.0;
169 for( i=0; i<numSec; ++i )protnorm[i] = 0.0;
171 for( np=0; np<(numSec/3); ++np ) {
172 for( nneg=
std::max(0,np-2); nneg<=(np+1); ++nneg ) {
173 for( nz=0; nz<numSec/3; ++nz ) {
174 if( ++counter < numMul ) {
176 if( nt>0 && nt<=numSec ) {
177 protmul[counter] =
Pmltpc(np,nneg,nz,nt,b[0],c);
178 protnorm[nt-1] += protmul[counter];
184 for( i=0; i<numMul; ++i )neutmul[i] = 0.0;
185 for( i=0; i<numSec; ++i )neutnorm[i] = 0.0;
187 for( np=0; np<numSec/3; ++np ) {
188 for( nneg=
std::max(0,np-1); nneg<=(np+2); ++nneg ) {
189 for( nz=0; nz<numSec/3; ++nz ) {
190 if( ++counter < numMul ) {
192 if( nt>0 && nt<=numSec ) {
193 neutmul[counter] =
Pmltpc(np,nneg,nz,nt,b[1],c);
194 neutnorm[nt-1] += neutmul[counter];
200 for( i=0; i<numSec; ++i ) {
201 if( protnorm[i] > 0.0 )protnorm[i] = 1.0/protnorm[i];
202 if( neutnorm[i] > 0.0 )neutnorm[i] = 1.0/neutnorm[i];
223 for( np=0; np<numSec/3 && ran>=excs; ++np ) {
224 for( nneg=
std::max(0,np-2); nneg<=(np+1) && ran>=excs; ++nneg ) {
225 for( nz=0; nz<numSec/3 && ran>=excs; ++nz ) {
226 if( ++counter < numMul ) {
228 if( nt>0 && nt<=numSec ) {
230 dum = (
pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
231 if( std::fabs(dum) < 1.0 ) {
232 if( test >= 1.0
e-10 )excs += dum*
test;
251 incidentHasChanged =
true;
257 incidentHasChanged =
true;
261 incidentHasChanged =
true;
263 targetHasChanged =
true;
270 incidentHasChanged =
true;
273 targetHasChanged =
true;
276 incidentHasChanged =
true;
281 incidentHasChanged =
true;
283 targetHasChanged =
true;
290 for( np=0; np<numSec/3 && ran>=excs; ++np ) {
291 for( nneg=
std::max(0,np-1); nneg<=(np+2) && ran>=excs; ++nneg ) {
292 for( nz=0; nz<numSec/3 && ran>=excs; ++nz ) {
293 if( ++counter < numMul ) {
295 if( nt>0 && nt<=numSec ) {
297 dum = (
pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
298 if( std::fabs(dum) < 1.0 ) {
299 if( test >= 1.0
e-10 )excs += dum*
test;
318 incidentHasChanged =
true;
320 targetHasChanged =
true;
326 incidentHasChanged =
true;
329 targetHasChanged =
true;
332 incidentHasChanged =
true;
339 incidentHasChanged =
true;
343 incidentHasChanged =
true;
345 targetHasChanged =
true;
350 incidentHasChanged =
true;
G4double GetTotalEnergy() const
static G4SigmaZero * SigmaZero()
G4double Pmltpc(G4int np, G4int nm, G4int nz, G4int n, G4double b, G4double c)
static G4Proton * Proton()
static G4PionPlus * PionPlus()
void SetDefinitionAndUpdateE(const G4ParticleDefinition *aParticleDefinition)
static G4Neutron * Neutron()
static G4SigmaMinus * SigmaMinus()
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
const G4ParticleDefinition * GetDefinition() const
G4double GetPDGMass() const
const G4ParticleDefinition * GetDefinition() const
static G4SigmaPlus * SigmaPlus()
void GetNormalizationConstant(const G4double availableEnergy, G4double &n, G4double &anpn)
void SetUpPions(const G4int np, const G4int nm, const G4int nz, G4FastVector< G4ReactionProduct, 256 > &vec, G4int &vecLen)