77 G4cout <<
"G4LEHadronProtonElastic:ApplyYourself: incident particle: "
80 <<
", Px = " << Px/
GeV <<
" GeV/c"
81 <<
", Py = " << Py/
GeV <<
" GeV/c"
82 <<
", Pz = " << Pz/
GeV <<
" GeV/c" <<
G4endl;
84 <<
", kinetic energy = " << ek/
GeV <<
" GeV"
85 <<
", mass = " << E0/
GeV <<
" GeV"
86 <<
", charge = " << Q <<
G4endl;
87 G4cout <<
"G4LEHadronProtonElastic:ApplyYourself: material:" <<
G4endl;
101 G4cout <<
"G4LEHadronProtonElastic:ApplyYourself: total:" <<
G4endl;
103 <<
", mass = " << E0/
GeV <<
" GeV"
104 <<
", charge = " << Q <<
G4endl;
118 G4double pseudoMass = std::sqrt(totalEnergy*totalEnergy - P*P);
125 G4double p = std::sqrt(px*px + py*py + pz*pz);
130 G4cout <<
" particle 1 momentum in CM " << px/
GeV <<
" " << py/
GeV <<
" "
136 G4double pxnew = p*std::sin(theta)*std::cos(phi);
137 G4double pynew = p*std::sin(theta)*std::sin(phi);
141 if (px*px + py*py > 0)
143 G4double cost, sint, ph, cosp, sinp;
145 sint = (std::sqrt(std::fabs((1-cost)*(1+cost)))
146 + std::sqrt(px*px+py*py)/
p)/2;
148 if (
std::abs(px) > 0.000001*
GeV) ph = std::atan2(py,px);
151 px = (cost*cosp*pxnew - sinp*pynew + sint*cosp*pznew);
152 py = (cost*sinp*pxnew + cosp*pynew + sint*sinp*pznew);
153 pz = (-sint*pxnew + cost*pznew);
163 G4cout <<
" particle 1 momentum in CM " << px/
GeV
164 <<
" " << py/
GeV <<
" " << pz/
GeV <<
" " << p/
GeV
175 G4double gammaCM = E1pM2/std::sqrt(E1pM2*E1pM2 - P*P);
178 G4cout <<
" betaCM " << betaCMx <<
" " << betaCMy <<
" "
179 << betaCMz <<
" " << betaCM <<
G4endl;
196 PA[4] = std::sqrt(M1*M1 + p*p);
198 G4double BETPA = BETA[1]*PA[1] + BETA[2]*PA[2] + BETA[3]*PA[3];
199 G4double BPGAM = (BETPA * BETA[4]/(BETA[4] + 1.) - PA[4]) * BETA[4];
201 PB[1] = PA[1] + BPGAM * BETA[1];
202 PB[2] = PA[2] + BPGAM * BETA[2];
203 PB[3] = PA[3] + BPGAM * BETA[3];
204 PB[4] = (PA[4] - BETPA) * BETA[4];
215 PA[4] = std::sqrt(M2*M2 + p*p);
217 BETPA = BETA[1]*PA[1] + BETA[2]*PA[2] + BETA[3]*PA[3];
218 BPGAM = (BETPA * BETA[4]/(BETA[4] + 1.) - PA[4]) * BETA[4];
220 PB[1] = PA[1] + BPGAM * BETA[1];
221 PB[2] = PA[2] + BPGAM * BETA[2];
222 PB[3] = PA[3] + BPGAM * BETA[3];
223 PB[4] = (PA[4] - BETPA) * BETA[4];
228 G4cout <<
" particle 1 momentum in LAB "
231 G4cout <<
" particle 2 momentum in LAB "
234 G4cout <<
" TOTAL momentum in LAB "
260 G4double hEcms = std::sqrt(pCMS*pCMS+hMass*hMass);
266 G4double cosTheta = cosDipole + beta;
267 cosTheta /= 1. + cosDipole*beta;
279 G4double x, cosTheta, signX, modX, power = 1./3.;