48 G4cout <<
"G4RPGAntiNeutronInelastic::ApplyYourself called" <<
G4endl;
50 G4cout <<
"target material = " << targetMaterial->
GetName() <<
", ";
61 modifiedOriginal = *originalIncident;
67 G4double p = std::sqrt( std::abs((et-amas)*(et+amas)) );
81 p = std::sqrt( std::abs((et-amas)*(et+amas)) );
91 targetParticle = *originalTarget;
94 G4bool incidentHasChanged =
false;
95 G4bool targetHasChanged =
false;
96 G4bool quasiElastic =
false;
107 originalIncident, currentParticle, targetParticle,
108 incidentHasChanged, targetHasChanged, quasiElastic );
113 originalIncident, originalTarget, modifiedOriginal,
114 targetNucleus, currentParticle, targetParticle,
115 incidentHasChanged, targetHasChanged, quasiElastic );
118 currentParticle, targetParticle,
119 incidentHasChanged );
121 delete originalTarget;
132 G4bool &incidentHasChanged,
149 G4double centerofmassEnergy = std::sqrt( mOriginal*mOriginal +
150 targetMass*targetMass +
151 2.0*targetMass*etOriginal );
152 G4double availableEnergy = centerofmassEnergy-(targetMass+mOriginal);
155 const G4int numMul = 1200;
156 const G4int numMulA = 400;
157 const G4int numSec = 60;
164 G4int counter, nt=0, np=0, nneg=0, nz=0;
167 const G4double b[] = { 0.70, 0.70 };
171 for (i = 0; i < numMul; ++i) protmul[i] = 0.0;
172 for (i = 0; i < numSec; ++i) protnorm[i] = 0.0;
174 for (np = 0; np < (numSec/3); ++np) {
175 for (nneg =
std::max(0,np-2); nneg <= np; ++nneg) {
176 for (nz = 0; nz < numSec/3; ++nz) {
177 if (++counter < numMul) {
179 if (nt > 0 && nt <= numSec) {
180 protmul[counter] =
Pmltpc(np,nneg,nz,nt,b[0],c);
181 protnorm[nt-1] += protmul[counter];
188 for( i=0; i<numMul; ++i )neutmul[i] = 0.0;
189 for( i=0; i<numSec; ++i )neutnorm[i] = 0.0;
191 for (np = 0; np < numSec/3; ++np) {
192 for (nneg=
std::max(0,np-1); nneg<=(np+1); ++nneg ) {
193 for (nz=0; nz<numSec/3; ++nz ) {
194 if (++counter < numMul ) {
196 if ((nt>0) && (nt<=numSec) ) {
197 neutmul[counter] =
Pmltpc(np,nneg,nz,nt,b[1],c);
198 neutnorm[nt-1] += neutmul[counter];
205 for (i=0; i<numSec; ++i ) {
206 if (protnorm[i] > 0.0 )protnorm[i] = 1.0/protnorm[i];
207 if (neutnorm[i] > 0.0 )neutnorm[i] = 1.0/neutnorm[i];
212 for( i=0; i<numMulA; ++i )protmulA[i] = 0.0;
213 for( i=0; i<numSec; ++i )protnormA[i] = 0.0;
216 for (np=1; np<(numSec/3); ++np ) {
218 for (nz=0; nz<numSec/3; ++nz ) {
219 if (++counter < numMulA ) {
221 if (nt>1 && nt<=numSec ) {
222 protmulA[counter] =
Pmltpc(np,nneg,nz,nt,b[0],c);
223 protnormA[nt-1] += protmulA[counter];
229 for( i=0; i<numMulA; ++i )neutmulA[i] = 0.0;
230 for( i=0; i<numSec; ++i )neutnormA[i] = 0.0;
232 for (np=0; np<numSec/3; ++np ) {
234 for (nz=0; nz<numSec/3; ++nz) {
235 if (++counter < numMulA ) {
237 if (nt>1 && nt<=numSec ) {
238 neutmulA[counter] =
Pmltpc(np,nneg,nz,nt,b[1],c);
239 neutnormA[nt-1] += neutmulA[counter];
245 for (i=0; i<numSec; ++i ) {
246 if( protnormA[i] > 0.0 )protnormA[i] = 1.0/protnormA[i];
247 if( neutnormA[i] > 0.0 )neutnormA[i] = 1.0/neutnormA[i];
261 const G4double anhl[] = {1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,0.97,0.88,
262 0.85,0.81,0.75,0.64,0.64,0.55,0.55,0.45,0.47,0.40,
263 0.39,0.36,0.33,0.10,0.01};
265 if( iplab > 9 )iplab =
G4int( (pOriginal/
GeV- 1.0)*5.0 ) + 10;
266 if( iplab > 14 )iplab =
G4int( pOriginal/
GeV- 2.0 ) + 15;
267 if( iplab > 22 )iplab =
G4int( (pOriginal/
GeV-10.0)/10.0 ) + 23;
268 if( iplab > 24 )iplab = 24;
271 if( availableEnergy <= aPiPlus->GetPDGMass()/
MeV )
277 const G4double supp[] = {0.,0.4,0.55,0.65,0.75,0.82,0.86,0.90,0.94,0.98};
307 else if( ran < wp/wt )
322 for( np=0; np<numSec/3 && ran>=excs; ++np )
324 for( nneg=
std::max(0,np-2); nneg<=np && ran>=excs; ++nneg )
326 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
328 if( ++counter < numMul )
334 dum = (
pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
335 if( std::fabs(dum) < 1.0 )
337 if( test >= 1.0
e-10 )excs += dum*test;
356 for( np=0; np<numSec/3 && ran>=excs; ++np )
358 for( nneg=
std::max(0,np-1); nneg<=(np+1) && ran>=excs; ++nneg )
360 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
362 if( ++counter < numMul )
365 if( (nt>=1) && (nt<=numSec) )
368 dum = (
pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
369 if( std::fabs(dum) < 1.0 )
371 if( test >= 1.0
e-10 )excs += dum*test;
396 incidentHasChanged =
true;
401 targetHasChanged =
true;
407 incidentHasChanged =
true;
408 targetHasChanged =
true;
423 incidentHasChanged =
true;
424 targetHasChanged =
true;
429 incidentHasChanged =
true;
433 targetHasChanged =
true;
438 if (centerofmassEnergy <= 2*aPiPlus->GetPDGMass()/
MeV ) {
452 for (np=1; (np<numSec/3) && (ran>=excs); ++np ) {
454 for (nz=0; (nz<numSec/3) && (ran>=excs); ++nz ) {
455 if (++counter < numMulA) {
457 if (nt>1 && nt<=numSec ) {
459 dum = (
pi/anpn)*nt*protmulA[counter]*protnormA[nt-1]/(2.0*n*n);
460 if (std::fabs(dum) < 1.0 ) {
461 if (test >= 1.0
e-10) excs += dum*test;
471 for (np=0; (np<numSec/3) && (ran>=excs); ++np ) {
473 for (nz=0; (nz<numSec/3) && (ran>=excs); ++nz ) {
474 if (++counter < numMulA ) {
476 if ((nt>1) && (nt<=numSec) ) {
478 dum = (
pi/anpn)*nt*neutmulA[counter]*neutnormA[nt-1]/(2.0*n*n);
479 if (std::fabs(dum) < 1.0 ) {
480 if( test >= 1.0
e-10 )excs += dum*test;
495 currentParticle.
SetMass( 0.0 );
501 ed <<
" While count exceeded " <<
G4endl;
502 while(np+nneg+nz<3) {
void Initialize(G4int items)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
T max(const T t1, const T t2)
brief Return the largest of the two arguments
void SetUpChange(G4FastVector< G4ReactionProduct, 256 > &vec, G4int &vecLen, G4ReactionProduct ¤tParticle, G4ReactionProduct &targetParticle, G4bool &incidentHasChanged)
std::ostringstream G4ExceptionDescription
static constexpr double MeV
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
G4double Cinema(G4double kineticEnergy)
void SetMomentum(const G4double x, const G4double y, const G4double z)
void Cascade(G4FastVector< G4ReactionProduct, GHADLISTSIZE > &vec, G4int &vecLen, const G4HadProjectile *originalIncident, G4ReactionProduct ¤tParticle, G4ReactionProduct &targetParticle, G4bool &incidentHasChanged, G4bool &targetHasChanged, G4bool &quasiElastic)
static G4AntiProton * AntiProton()
void SetDefinitionAndUpdateE(const G4ParticleDefinition *aParticleDefinition)
const G4String & GetParticleName() const
static G4PionPlus * PionPlus()
void GetNormalizationConstant(const G4double availableEnergy, G4double &n, G4double &anpn)
G4double GetTotalMomentum() const
const G4ParticleDefinition * GetDefinition() const
static G4Proton * Proton()
G4double GetTotalEnergy() const
void CalculateMomenta(G4FastVector< G4ReactionProduct, 256 > &vec, G4int &vecLen, const G4HadProjectile *originalIncident, const G4DynamicParticle *originalTarget, G4ReactionProduct &modifiedOriginal, G4Nucleus &targetNucleus, G4ReactionProduct ¤tParticle, G4ReactionProduct &targetParticle, G4bool &incidentHasChanged, G4bool &targetHasChanged, G4bool quasiElastic)
G4double GetPDGMass() const
G4DynamicParticle * ReturnTargetParticle() const
void SetMass(const G4double mas)
const G4String & GetName() const
G4double Pmltpc(G4int np, G4int nm, G4int nz, G4int n, G4double b, G4double c)
void SetKineticEnergy(const G4double en)
G4double GetKineticEnergy() const
G4ParticleDefinition * GetDefinition() const
const G4Material * GetMaterial() const
G4double GetTotalMomentum() const
void SetUpPions(const G4int np, const G4int nm, const G4int nz, G4FastVector< G4ReactionProduct, 256 > &vec, G4int &vecLen)
G4ThreeVector GetMomentum() const
void SetSide(const G4int sid)
G4double GetKineticEnergy() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
const G4ParticleDefinition * GetDefinition() const
static G4Neutron * Neutron()
G4GLOB_DLL std::ostream G4cout
static constexpr double pi
G4double EvaporationEffects(G4double kineticEnergy)
static constexpr double GeV
G4HadFinalState theParticleChange
T min(const T t1, const T t2)
brief Return the smallest of the two arguments