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;
98 E0 = std::sqrt(std::abs(E02));
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;
268 G4double t = 2.*pCMS*pCMS*(1.-cosTheta);
279 G4double x, cosTheta, signX, modX, power = 1./3.;
static G4Pow * GetInstance()
G4double powA(G4double A, G4double y) const
G4double SampleInvariantT(const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
void SetMomentum(const G4ThreeVector &momentum)
G4double GetKineticEnergy() const
CLHEP::Hep3Vector G4ThreeVector
G4double GetTotalEnergy() const
G4ParticleDefinition * GetDefinition() const
G4DynamicParticle * ReturnTargetParticle() const
const G4String & GetParticleName() const
static constexpr double twopi
G4double GetTotalMomentum() const
void SetMinEnergy(G4double anEnergy)
~G4LEHadronProtonElastic()
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
const G4ParticleDefinition * GetDefinition() const
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
G4double RandCosThetaDipPen()
static G4Proton * Proton()
const G4LorentzVector & Get4Momentum() const
G4LEHadronProtonElastic()
void SetEnergyChange(G4double anEnergy)
G4double GetPDGMass() const
static constexpr double GeV
void SetMaxEnergy(const G4double anEnergy)
G4HadFinalState theParticleChange
static constexpr double MeV
static constexpr double pi
void AddSecondary(G4DynamicParticle *aP, G4int mod=-1)
static constexpr double halfpi
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
G4double GetPDGCharge() const
void SetMomentumChange(const G4ThreeVector &aV)
G4ThreeVector GetMomentum() const
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
G4double GetTotalMomentum() const
G4double GetTotalEnergy() const