77 G4cout <<
"G4LEHadronProtonElastic:ApplyYourself: incident particle: "
79 G4cout <<
"P = " << P/GeV <<
" GeV/c"
80 <<
", Px = " << Px/GeV <<
" GeV/c"
81 <<
", Py = " << Py/GeV <<
" GeV/c"
82 <<
", Pz = " << Pz/GeV <<
" GeV/c" <<
G4endl;
83 G4cout <<
"E = " << E/GeV <<
" GeV"
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;
102 G4cout <<
"E = " << E/GeV <<
" GeV"
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);
128 G4cout <<
" E1, M1 (GeV) " << E1/GeV <<
" " << M1/GeV <<
G4endl;
129 G4cout <<
" E2, M2 (GeV) " << E2/GeV <<
" " << M2/GeV <<
G4endl;
130 G4cout <<
" particle 1 momentum in CM " << px/GeV <<
" " << py/GeV <<
" "
131 << pz/GeV <<
" " << p/GeV <<
G4endl;
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;
147 py < 0 ? ph = 3*halfpi : ph = halfpi;
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.;
double A(double temperature)
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
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
void AddSecondary(G4DynamicParticle *aP, G4int mod=-1)
void SetEnergyChange(G4double anEnergy)
void SetMomentumChange(const G4ThreeVector &aV)
G4double GetTotalMomentum() const
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
G4double GetTotalEnergy() const
G4HadFinalState theParticleChange
void SetMinEnergy(G4double anEnergy)
void SetMaxEnergy(const G4double anEnergy)
G4double RandCosThetaDipPen()
G4double SampleInvariantT(const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
G4LEHadronProtonElastic()
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
~G4LEHadronProtonElastic()
G4DynamicParticle * ReturnTargetParticle() const
G4double GetPDGMass() const
G4double GetPDGCharge() const
const G4String & GetParticleName() const
static G4Pow * GetInstance()
G4double powA(G4double A, G4double y) const
static G4Proton * Proton()