73 G4cout <<
"G4LEpp:ApplyYourself: incident particle: "
75 G4cout <<
"P = " << P/GeV <<
" GeV/c"
76 <<
", Px = " << Px/GeV <<
" GeV/c"
77 <<
", Py = " << Py/GeV <<
" GeV/c"
78 <<
", Pz = " << Pz/GeV <<
" GeV/c" <<
G4endl;
79 G4cout <<
"E = " << E/GeV <<
" GeV"
80 <<
", kinetic energy = " << ek/GeV <<
" GeV"
81 <<
", mass = " << E0/GeV <<
" GeV"
82 <<
", charge = " << Q <<
G4endl;
94 E0 = std::sqrt(std::fabs(E02));
98 G4cout <<
"E = " << E/GeV <<
" GeV"
99 <<
", mass = " << E0/GeV <<
" GeV"
100 <<
", charge = " << Q <<
G4endl;
104 if(cost > 1.0) { cost = 1.0; }
105 if(cost <-1.0) { cost =-1.0; }
106 G4double sint = std::sqrt((1.0 - cost)*(1.0 + cost));
116 G4double pseudoMass = std::sqrt(totalEnergy*totalEnergy - P*P);
123 G4double p = std::sqrt(px*px + py*py + pz*pz);
126 G4cout <<
" E1, M1 (GeV) " << E1/GeV <<
" " << M1/GeV <<
G4endl;
127 G4cout <<
" E2, M2 (GeV) " << E2/GeV <<
" " << M2/GeV <<
G4endl;
128 G4cout <<
" particle 1 momentum in CM " << px/GeV
129 <<
" " << py/GeV <<
" "
130 << pz/GeV <<
" " << p/GeV <<
G4endl;
134 G4double pxnew = p*sint*std::cos(phi);
135 G4double pynew = p*sint*std::sin(phi);
139 if (px*px + py*py > 0) {
142 sint = (std::sqrt((1-cost)*(1+cost)) + std::sqrt(px*px+py*py)/p)/2;
143 py < 0 ? ph = 3*halfpi : ph = halfpi;
144 if (std::fabs(px) > 0.000001*GeV) ph = std::atan2(py,px);
147 px = (cost*cosp*pxnew - sinp*pynew + sint*cosp*pznew);
148 py = (cost*sinp*pxnew + cosp*pynew + sint*sinp*pznew);
149 pz = (-sint*pxnew + cost*pznew);
159 G4cout <<
" particle 1 momentum in CM " << px/GeV <<
" " << py/GeV <<
" "
160 << pz/GeV <<
" " << p/GeV <<
G4endl;
170 G4double gammaCM = E1pM2/std::sqrt(E1pM2*E1pM2 - P*P);
173 G4cout <<
" betaCM " << betaCMx <<
" " << betaCMy <<
" "
174 << betaCMz <<
" " << betaCM <<
G4endl;
191 PA[4] = std::sqrt(M1*M1 + p*p);
193 G4double BETPA = BETA[1]*PA[1] + BETA[2]*PA[2] + BETA[3]*PA[3];
194 G4double BPGAM = (BETPA * BETA[4]/(BETA[4] + 1.) - PA[4]) * BETA[4];
196 PB[1] = PA[1] + BPGAM * BETA[1];
197 PB[2] = PA[2] + BPGAM * BETA[2];
198 PB[3] = PA[3] + BPGAM * BETA[3];
199 PB[4] = (PA[4] - BETPA) * BETA[4];
210 PA[4] = std::sqrt(M2*M2 + p*p);
212 BETPA = BETA[1]*PA[1] + BETA[2]*PA[2] + BETA[3]*PA[3];
213 BPGAM = (BETPA * BETA[4]/(BETA[4] + 1.) - PA[4]) * BETA[4];
215 PB[1] = PA[1] + BPGAM * BETA[1];
216 PB[2] = PA[2] + BPGAM * BETA[2];
217 PB[3] = PA[3] + BPGAM * BETA[3];
218 PB[4] = (PA[4] - BETPA) * BETA[4];
223 G4cout <<
" particle 1 momentum in LAB "
226 G4cout <<
" particle 2 momentum in LAB "
229 G4cout <<
" TOTAL momentum in LAB "
253 G4double ek = std::sqrt(plab*plab+nMass*nMass) - nMass;
258 G4int je2 = NENERGY - 1;
263 G4int midBin = (je1 + je2)/2;
265 if (ek < elab[midBin]) je2 = midBin;
268 while (je2 - je1 > 1);
270 G4double delab = elab[je2] - elab[je1];
276 G4int ke2 = NANGLE - 1;
279 dsig = Sig[je2][0] - Sig[je1][0];
281 b = Sig[je1][0] - rc*elab[je1];
288 G4int midBin = (ke1 + ke2)/2;
289 dsig = Sig[je2][midBin] - Sig[je1][midBin];
291 b = Sig[je1][midBin] - rc*elab[je1];
305 while (ke2 - ke1 > 1);
307 dsig = sigint2 - sigint1;
309 b = ke1 - rc*sigint1;
312 G4double theta = (0.5 + kint)*pi/180.;
313 G4double t = 0.5*plab*plab*(1 - std::cos(theta));
const G4ThreeVector & GetMomentumDirection() const
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
G4double GetTotalEnergy() const
void SetMomentum(const G4ThreeVector &momentum)
G4ThreeVector GetMomentum() const
G4double GetTotalMomentum() const
G4double GetPDGMass() const
G4double GetPDGCharge() const
const G4String & GetParticleName() const