58 {
61
62
63
64
67
70
71
78 G4double y = 1.0 - ranres * (1.0 - z);
82
83
86 if(pl > 800.0) {
88 apt = (800.0/pl)*(800.0/pl);
89 G4double cpt = std::max(6.23 * std::exp(-1.79*x), 0.3);
91 G4double aaa = (1 + apt) * (1 - std::exp(-btmax))/b;
93
94 if(argu >= 8) {
95 argu = 0.0;
96 } else {
97 argu = std::exp(-4.0 * argu);
98 }
99
100 G4double aac = cpt * (1.0 - argu)/alphac;
103 z = std::exp(-4.0 * psq *alphac);
104 iexpi = 1;
105 y = 1.0 - ranres*(1.0 - z);
106 T = std::log(y)/alphac;
107 }
108 }
109 }
110
112 if(std::abs(ctet) > 1.0) ctet =
Math::sign(ctet);
113 G4double stet = std::sqrt(1.0 - ctet*ctet);
115
119
122
123 if(xx >= (zz * 1.0e-8)) {
128 ez[0] = p.getX() / pnorm;
129 ez[1] = p.getY() / pnorm;
130 ez[2] = p.getZ() / pnorm;
131
132
133 ex[0] = p.getY() / yn;
134 ex[1] = -p.getX() / yn;
135 ex[2] = 0.0;
136
137 ey[0] = p.getX() * p.getZ() / zn;
138 ey[1] = p.getY() * p.getZ() / zn;
139 ey[2] = -xx/zn;
140
141 G4double pX = (ex[0]*cfi*stet + ey[0]*sfi*stet + ez[0]*ctet) * pnorm;
142 G4double pY = (ex[1]*cfi*stet + ey[1]*sfi*stet + ez[1]*ctet) * pnorm;
143 G4double pZ = (ex[2]*cfi*stet + ey[2]*sfi*stet + ez[2]*ctet) * pnorm;
144
145 ThreeVector p1momentum = ThreeVector(pX, pY, pZ);
148 } else {
153
154 ThreeVector p1momentum(pX, pY, pZ);
157 }
158
159
160
164 apt = 1.0;
165 if(pl > 800.0) {
166 apt = std::pow(800.0/pl, 2);
167 }
168 if(iexpi == 1 || rndm > 1.0/(1.0 + apt)) {
171 }
172 }
173
174
175
176
177 FinalState *fs = new FinalState();
178 fs->addModifiedParticle(particle1);
179 fs->addModifiedParticle(particle2);
180
181 return fs;
182
183 }
static G4double calculateNNDiffCrossSection(G4double energyCM, G4int iso)
Calculate the slope of the NN DDXS.
static G4double squareTotalEnergyInCM(Particle const *const p1, Particle const *const p2)
static G4double momentumInLab(Particle const *const p1, Particle const *const p2)
gives the momentum in the lab frame of two particles.
static G4int getIsospin(const ParticleType t)
Get the isospin of a particle.
static const G4double effectiveNucleonMass
const G4INCL::ThreeVector & getMomentum() const
virtual void setMomentum(const G4INCL::ThreeVector &momentum)
G4INCL::ParticleType getType() const
void setType(ParticleType t)