45 modifiedOriginal = *originalIncident;
47 targetParticle = *originalTarget;
50 SlowNeutron(originalIncident,modifiedOriginal,targetParticle,targetNucleus );
51 delete originalTarget;
64 G4double p = std::sqrt( std::abs((et-amas)*(et+amas)) );
78 p = std::sqrt( std::abs((et-amas)*(et+amas)) );
88 SlowNeutron( originalIncident, modifiedOriginal, targetParticle, targetNucleus );
89 delete originalTarget;
96 G4bool incidentHasChanged =
false;
97 G4bool targetHasChanged =
false;
98 G4bool quasiElastic =
false;
103 InitialCollision(vec, vecLen, currentParticle, targetParticle,
104 incidentHasChanged, targetHasChanged);
107 originalIncident, originalTarget, modifiedOriginal,
108 targetNucleus, currentParticle, targetParticle,
109 incidentHasChanged, targetHasChanged, quasiElastic);
112 currentParticle, targetParticle,
115 delete originalTarget;
120 G4RPGNeutronInelastic::SlowNeutron(
const G4HadProjectile* originalIncident,
140 eka = 1.0 + 2.0*cost1*A + A*
A;
143 eka /= (1.0+
A)*(1.0+A);
148 G4double p = std::sqrt(std::abs(en*en-amas*amas));
149 G4double sint = std::sqrt(std::abs(1.0-cost*cost));
161 G4double pO = std::sqrt(pxO*pxO+pyO*pyO+pzO*pzO);
163 sint = 0.5*(std::sqrt(std::abs((1.0-cost)*(1.0+cost)))+std::sqrt(ptO)/pO);
165 if( pyO < 0.0 )ph = ph*1.5;
166 if( std::abs(pxO) > 0.000001 )ph = std::atan2(pyO,pxO);
169 px = cost*cosp*px - sinp*py+sint*cosp*pz;
170 py = cost*sinp*px + cosp*py+sint*sinp*pz;
171 pz = -sint*px + cost*pz;
175 if( pz < 0.0 )pz *= -1.0;
177 G4double pu = std::sqrt(px*px+py*py+pz*pz);
185 targetParticle.
SetTotalEnergy( std::sqrt( pp*pp + tarmas*tarmas ) );
201 massVec[0] = targetNucleus.
AtomicMass( A+1.0, Z );
202 massVec[1] = theAtomicMass;
204 if (Z > 1.0) massVec[2] = targetNucleus.
AtomicMass(A, Z-1.0);
206 if (Z > 1.0 && A > 1.0) massVec[3] = targetNucleus.
AtomicMass(A-1.0, Z-1.0 );
208 if (Z > 1.0 && A > 2.0 && A-2.0 > Z-1.0)
209 massVec[4] = targetNucleus.
AtomicMass( A-2.0, Z-1.0 );
211 if (Z > 2.0 && A > 3.0 && A-3.0 > Z-2.0)
212 massVec[5] = targetNucleus.
AtomicMass( A-3.0, Z-2.0 );
214 if (A > 1.0 && A-1.0 > Z) massVec[6] = targetNucleus.
AtomicMass(A-1.0, Z);
215 massVec[7] = massVec[3];
217 if (Z > 2.0 && A > 1.0) massVec[8] = targetNucleus.
AtomicMass( A-1.0,Z-2.0 );
220 targetNucleus, theAtomicMass, massVec );
226 for(
G4int i=0; i<vecLen; ++i ) {
247 G4bool& incidentHasChanged,
254 std::vector<G4int> fsTypes;
275 incidentHasChanged =
true;
277 targetHasChanged =
true;
282 targetHasChanged =
true;
283 incidentHasChanged =
true;
287 if (part2 >
neu && part2 <
xi0) targetHasChanged =
true;
304 incidentHasChanged =
true;
305 }
else if (part2 ==
neu) {
307 incidentHasChanged =
true;
308 targetHasChanged =
true;
314 }
else if (part2 >
neu && part2 <
xi0) {
315 incidentHasChanged =
true;
316 targetHasChanged =
true;
320 targetHasChanged =
true;
333 fsTypes.erase(fsTypes.begin());
334 fsTypes.erase(fsTypes.begin());
339 for(
G4int i=0; i < mult-2; ++i ) {
340 partType = fsTypes[i];
349 CheckQnums(vec, vecLen, currentParticle, targetParticle,
350 testCharge, testBaryon, testStrange);
G4double AtomicMass(const G4double A, const G4double Z) const
void SetElement(G4int anIndex, Type *anElement)
G4double EvaporationEffects(G4double kineticEnergy)
void SetMomentum(const G4ThreeVector &momentum)
void SetUpChange(G4FastVector< G4ReactionProduct, 256 > &vec, G4int &vecLen, G4ReactionProduct ¤tParticle, G4ReactionProduct &targetParticle, G4bool &incidentHasChanged)
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
void SetKineticEnergy(const G4double en)
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetSide(const G4int sid)
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 Initialize(G4int items)
G4DynamicParticle * ReturnTargetParticle() const
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
static constexpr double twopi
void SetStatusChange(G4HadFinalStateStatus aS)
G4int GetMultiplicityT1(G4double KE) const
const G4ParticleDefinition * GetDefinition() const
double A(double temperature)
const G4ParticleDefinition * GetDefinition() const
G4ParticleDefinition * particleDef[18]
G4double GetKineticEnergy() const
void SetTotalEnergy(const G4double en)
const G4LorentzVector & Get4Momentum() const
G4double GetKineticEnergy() const
void SetEnergyChange(G4double anEnergy)
G4double GetPDGMass() const
void NuclearReaction(G4FastVector< G4ReactionProduct, 4 > &vec, G4int &vecLen, const G4HadProjectile *originalIncident, const G4Nucleus &aNucleus, const G4double theAtomicMass, const G4double *massVec)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4double Cinema(G4double kineticEnergy)
std::vector< G4int > GetFSPartTypesForNN(G4int mult, G4double KE) const
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
static constexpr double GeV
G4ThreeVector GetMomentum() const
G4HadFinalState theParticleChange
static constexpr double MeV
std::vector< G4int > GetFSPartTypesForNP(G4int mult, G4double KE) const
void CheckQnums(G4FastVector< G4ReactionProduct, 256 > &vec, G4int &vecLen, G4ReactionProduct ¤tParticle, G4ReactionProduct &targetParticle, G4double Q, G4double B, G4double S)
static constexpr double pi
void AddSecondary(G4DynamicParticle *aP, G4int mod=-1)
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
G4int GetMultiplicityT0(G4double KE) const