69 G4cout <<
"G4LEpp:ApplyYourself: incident particle: "
72 <<
", Px = " << Px/
GeV <<
" GeV/c"
73 <<
", Py = " << Py/
GeV <<
" GeV/c"
74 <<
", Pz = " << Pz/
GeV <<
" GeV/c" <<
G4endl;
76 <<
", kinetic energy = " << ek/
GeV <<
" GeV"
77 <<
", mass = " << E0/
GeV <<
" GeV"
78 <<
", charge = " << Q <<
G4endl;
90 E0 = std::sqrt(std::fabs(E02));
95 <<
", mass = " << E0/
GeV <<
" GeV"
96 <<
", charge = " << Q <<
G4endl;
100 if(cost > 1.0) { cost = 1.0; }
101 if(cost <-1.0) { cost =-1.0; }
102 G4double sint = std::sqrt((1.0 - cost)*(1.0 + cost));
112 G4double pseudoMass = std::sqrt(totalEnergy*totalEnergy - P*P);
119 G4double p = std::sqrt(px*px + py*py + pz*pz);
124 G4cout <<
" particle 1 momentum in CM " << px/
GeV
125 <<
" " << py/
GeV <<
" "
130 G4double pxnew = p*sint*std::cos(phi);
131 G4double pynew = p*sint*std::sin(phi);
135 if (px*px + py*py > 0) {
138 sint = (std::sqrt((1-cost)*(1+cost)) + std::sqrt(px*px+py*py)/
p)/2;
140 if (std::fabs(px) > 0.000001*
GeV) ph = std::atan2(py,px);
143 px = (cost*cosp*pxnew - sinp*pynew + sint*cosp*pznew);
144 py = (cost*sinp*pxnew + cosp*pynew + sint*sinp*pznew);
145 pz = (-sint*pxnew + cost*pznew);
155 G4cout <<
" particle 1 momentum in CM " << px/
GeV <<
" " << py/
GeV <<
" "
166 G4double gammaCM = E1pM2/std::sqrt(E1pM2*E1pM2 - P*P);
169 G4cout <<
" betaCM " << betaCMx <<
" " << betaCMy <<
" "
170 << betaCMz <<
" " << betaCM <<
G4endl;
187 PA[4] = std::sqrt(M1*M1 + p*p);
189 G4double BETPA = BETA[1]*PA[1] + BETA[2]*PA[2] + BETA[3]*PA[3];
190 G4double BPGAM = (BETPA * BETA[4]/(BETA[4] + 1.) - PA[4]) * BETA[4];
192 PB[1] = PA[1] + BPGAM * BETA[1];
193 PB[2] = PA[2] + BPGAM * BETA[2];
194 PB[3] = PA[3] + BPGAM * BETA[3];
195 PB[4] = (PA[4] - BETPA) * BETA[4];
206 PA[4] = std::sqrt(M2*M2 + p*p);
208 BETPA = BETA[1]*PA[1] + BETA[2]*PA[2] + BETA[3]*PA[3];
209 BPGAM = (BETPA * BETA[4]/(BETA[4] + 1.) - PA[4]) * BETA[4];
211 PB[1] = PA[1] + BPGAM * BETA[1];
212 PB[2] = PA[2] + BPGAM * BETA[2];
213 PB[3] = PA[3] + BPGAM * BETA[3];
214 PB[4] = (PA[4] - BETPA) * BETA[4];
219 G4cout <<
" particle 1 momentum in LAB "
222 G4cout <<
" particle 2 momentum in LAB "
225 G4cout <<
" TOTAL momentum in LAB "
249 G4double ek = std::sqrt(plab*plab+nMass*nMass) - nMass;
259 G4int midBin = (je1 + je2)/2;
261 if (ek <
elab[midBin]) je2 = midBin;
264 while (je2 - je1 > 1);
275 dsig =
Sig[je2][0] -
Sig[je1][0];
277 b = Sig[je1][0] - rc*elab[je1];
284 G4int midBin = (ke1 + ke2)/2;
285 dsig = Sig[je2][midBin] - Sig[je1][midBin];
287 b = Sig[je1][midBin] - rc*elab[je1];
301 while (ke2 - ke1 > 1);
303 dsig = sigint2 - sigint1;
305 b = ke1 - rc*sigint1;
309 G4double t = 0.5*plab*plab*(1 - std::cos(theta));