47 G4cout <<
"G4RPGLambdaInelastic::ApplyYourself called" <<
G4endl;
49 G4cout <<
"target material = " << targetMaterial->
GetName() <<
", ";
60 modifiedOriginal = *originalIncident;
66 G4double p = std::sqrt( std::abs((et-amas)*(et+amas)) );
80 p = std::sqrt( std::abs((et-amas)*(et+amas)) );
90 targetParticle = *originalTarget;
93 G4bool incidentHasChanged =
false;
94 G4bool targetHasChanged =
false;
95 G4bool quasiElastic =
false;
102 Cascade( vec, vecLen,
103 originalIncident, currentParticle, targetParticle,
104 incidentHasChanged, targetHasChanged, quasiElastic );
107 originalIncident, originalTarget, modifiedOriginal,
108 targetNucleus, currentParticle, targetParticle,
109 incidentHasChanged, targetHasChanged, quasiElastic );
112 currentParticle, targetParticle,
113 incidentHasChanged );
115 delete originalTarget;
120void G4RPGLambdaInelastic::Cascade(
126 G4bool &incidentHasChanged,
143 G4double centerofmassEnergy = std::sqrt( mOriginal*mOriginal +
144 targetMass*targetMass +
145 2.0*targetMass*etOriginal );
146 G4double availableEnergy = centerofmassEnergy-(targetMass+mOriginal);
153 const G4int numMul = 1200;
154 const G4int numSec = 60;
160 G4int counter, nt=0, np=0, nneg=0, nz=0;
163 const G4double b[] = { 0.70, 0.35 };
167 for( i=0; i<numMul; ++i )protmul[i] = 0.0;
168 for( i=0; i<numSec; ++i )protnorm[i] = 0.0;
170 for( np=0; np<(numSec/3); ++np ) {
171 for( nneg=std::max(0,np-2); nneg<=(np+1); ++nneg ) {
172 for( nz=0; nz<numSec/3; ++nz ) {
173 if( ++counter < numMul ) {
175 if( nt>0 && nt<=numSec ) {
176 protmul[counter] =
Pmltpc(np,nneg,nz,nt,b[0],c);
177 protnorm[nt-1] += protmul[counter];
183 for( i=0; i<numMul; ++i )neutmul[i] = 0.0;
184 for( i=0; i<numSec; ++i )neutnorm[i] = 0.0;
186 for( np=0; np<numSec/3; ++np ) {
187 for( nneg=std::max(0,np-1); nneg<=(np+2); ++nneg ) {
188 for( nz=0; nz<numSec/3; ++nz ) {
189 if( ++counter < numMul ) {
191 if( nt>0 && nt<=numSec ) {
192 neutmul[counter] =
Pmltpc(np,nneg,nz,nt,b[1],c);
193 neutnorm[nt-1] += neutmul[counter];
199 for( i=0; i<numSec; ++i ) {
200 if( protnorm[i] > 0.0 )protnorm[i] = 1.0/protnorm[i];
201 if( neutnorm[i] > 0.0 )neutnorm[i] = 1.0/neutnorm[i];
222 for( np=0; np<numSec/3 && ran>=excs; ++np ) {
223 for( nneg=std::max(0,np-2); nneg<=(np+1) && ran>=excs; ++nneg ) {
224 for( nz=0; nz<numSec/3 && ran>=excs; ++nz ) {
225 if( ++counter < numMul ) {
227 if( nt>0 && nt<=numSec ) {
228 test =
G4Exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
229 dum = (
pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
230 if( std::fabs(dum) < 1.0 ) {
231 if( test >= 1.0e-10 )excs += dum*test;
246 G4int ncht = std::max( 1, np-nneg );
250 incidentHasChanged =
true;
256 incidentHasChanged =
true;
260 incidentHasChanged =
true;
262 targetHasChanged =
true;
269 incidentHasChanged =
true;
272 targetHasChanged =
true;
275 incidentHasChanged =
true;
280 incidentHasChanged =
true;
282 targetHasChanged =
true;
289 for( np=0; np<numSec/3 && ran>=excs; ++np ) {
290 for( nneg=std::max(0,np-1); nneg<=(np+2) && ran>=excs; ++nneg ) {
291 for( nz=0; nz<numSec/3 && ran>=excs; ++nz ) {
292 if( ++counter < numMul ) {
294 if( nt>0 && nt<=numSec ) {
295 test =
G4Exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
296 dum = (
pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
297 if( std::fabs(dum) < 1.0 ) {
298 if( test >= 1.0e-10 )excs += dum*test;
313 G4int ncht = std::max( 1, np-nneg+3 );
317 incidentHasChanged =
true;
319 targetHasChanged =
true;
325 incidentHasChanged =
true;
328 targetHasChanged =
true;
331 incidentHasChanged =
true;
338 incidentHasChanged =
true;
342 incidentHasChanged =
true;
344 targetHasChanged =
true;
349 incidentHasChanged =
true;
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4GLOB_DLL std::ostream G4cout
G4ParticleDefinition * GetDefinition() const
void Initialize(G4int items)
const G4Material * GetMaterial() const
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
G4double GetTotalEnergy() const
G4HadFinalState theParticleChange
const G4String & GetName() const
static G4Neutron * Neutron()
G4double EvaporationEffects(G4double kineticEnergy)
G4double Cinema(G4double kineticEnergy)
G4DynamicParticle * ReturnTargetParticle() const
G4double GetPDGMass() const
const G4String & GetParticleName() const
static G4PionPlus * PionPlus()
static G4Proton * Proton()
void SetUpPions(const G4int np, const G4int nm, const G4int nz, G4FastVector< G4ReactionProduct, 256 > &vec, G4int &vecLen)
void GetNormalizationConstant(const G4double availableEnergy, G4double &n, G4double &anpn)
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)
void SetUpChange(G4FastVector< G4ReactionProduct, 256 > &vec, G4int &vecLen, G4ReactionProduct ¤tParticle, G4ReactionProduct &targetParticle, G4bool &incidentHasChanged)
G4double Pmltpc(G4int np, G4int nm, G4int nz, G4int n, G4double b, G4double c)
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
void SetMomentum(const G4double x, const G4double y, const G4double z)
G4double GetKineticEnergy() const
const G4ParticleDefinition * GetDefinition() const
G4ThreeVector GetMomentum() const
void SetSide(const G4int sid)
void SetDefinitionAndUpdateE(const G4ParticleDefinition *aParticleDefinition)
void SetKineticEnergy(const G4double en)
static G4SigmaMinus * SigmaMinus()
static G4SigmaPlus * SigmaPlus()
static G4SigmaZero * SigmaZero()