69{
77
78
79
81 if (atno2 < 1.5) {
129 }
130
131
132 if (aSecondary) {
136 }
137
138
141 G4cout <<
"G4LElastic::DoIt: Incident particle p=" << p <<
" GeV" <<
G4endl;
142
144
145
146
147
148
149
152 if (atno2 <= 62.) {
153 aa = std::pow(atno2, 1.63);
154 bb = 14.5*std::pow(atno2, 0.66);
155 cc = 1.4*std::pow(atno2, 0.33);
156 dd = 10.;
157 }
158 else {
159 aa = std::pow(atno2, 1.33);
160 bb = 60.*std::pow(atno2, 0.33);
161 cc = 0.4*std::pow(atno2, 0.40);
162 dd = 10.;
163 }
164 aa = aa/bb;
165 cc = cc/dd;
166 rr = (aa + cc)*ran;
169 G4cout << aa <<
" " << bb <<
" " << cc <<
" " << dd <<
" " << rr <<
G4endl;
170 }
174 G4cout <<
"t1,Fctcos " << t1 <<
" " << Fctcos(t1, aa, bb, cc, dd, rr) <<
176 G4cout <<
"t2,Fctcos " << t2 <<
" " << Fctcos(t2, aa, bb, cc, dd, rr) <<
178 }
183 ier1 = Rtmi(&t, t1, t2, eps, ind1,
184 aa, bb, cc, dd, rr);
187 G4cout <<
"t, Fctcos " << t <<
" " << Fctcos(t, aa, bb, cc, dd, rr) <<
189 }
190 if (ier1 != 0) t = 0.25*(3.*t1 + t2);
192 G4cout <<
"t, Fctcos " << t <<
" " << Fctcos(t, aa, bb, cc, dd, rr) <<
194 }
196 rr = 0.5*t/(p*p);
197 if (rr > 1.) rr = 0.;
201 G4double sint = std::sqrt(std::max(rr*(2. - rr), 0.));
203
205 G4cout <<
"cos(t)=" << cost <<
" std::sin(t)=" << sint <<
G4endl;
206
207
212
215
216
220 G4double p1 = (-b+std::sqrt(std::max(0.0,b*b-4.*a*c)))/(2.*a);
221 G4double px = p1*sint*std::sin(phi);
222 G4double py = p1*sint*std::cos(phi);
224
225
226 G4double etot = std::sqrt(mass1*mass1+p*p)+mass2;
227 a = etot*etot-p*p*cost*cost;
228 b = 2*p*p*(mass1*cost*cost-etot);
229 c = p*p*p*p*sint*sint;
230
231 G4double de = (-b-std::sqrt(std::max(0.0,b*b-4.*a*c)))/(2.*a);
232 G4double e1 = std::sqrt(p*p+mass1*mass1)-de;
234 p1 = std::sqrt(std::max(1.*eV*eV,p12));
235 px = p1*sint*std::sin(phi);
236 py = p1*sint*std::cos(phi);
237 pz = p1*cost;
238
240 {
241 G4cout <<
"Relevant test "<<p<<
" "<<p1<<
" "<<cost<<
" "<<de<<
G4endl;
242 G4cout <<
"p1/p = "<<p1/p<<
" "<<mass1<<
" "<<mass2<<
" "<<a<<
" "<<b<<
" "<<c<<
G4endl;
244 G4cout <<
"make p1 = "<< p12<<
" "<<e1*e1<<
" "<<mass1*mass1<<
" "<<
G4endl;
245 }
246
251 G4cout <<
"NOM SCAT " << px <<
" " << py <<
" " << pz <<
G4endl;
252 G4cout <<
"INCIDENT " << pxinc <<
" " << pyinc <<
" " << pzinc <<
G4endl;
253 }
254
255
257 Defs1(p, px, py, pz, pxinc, pyinc, pzinc, &pxnew, &pynew, &pznew);
258
263 if(p1>0)
264 {
265 pxnew = pxnew/p1;
266 pynew = pynew/p1;
267 pznew = pznew/p1;
268 }
269 else
270 {
271
272
273 pxnew = 0;
274 pynew = 0;
275 pznew = 1;
276 }
278 G4cout <<
"DoIt: returning new momentum vector" <<
G4endl;
279 G4cout <<
"DoIt: "<<pxinc <<
" " << pyinc <<
" " << pzinc <<
" "<<p<<
G4endl;
280 G4cout <<
"DoIt: "<<pxnew <<
" " << pynew <<
" " << pznew <<
" "<<p<<
G4endl;
281 }
282
283 if (aSecondary) {
285 } else {
286 try
287 {
290 }
292 {
293 std::cerr << "GHADException originating from components of G4LElastic"<<std::cout;
294 throw;
295 }
301
302 }
304}
G4DLLIMPORT std::ostream G4cout
static G4AntiLambda * AntiLambda()
static G4AntiNeutron * AntiNeutron()
static G4AntiOmegaMinus * AntiOmegaMinus()
static G4AntiProton * AntiProton()
static G4AntiSigmaMinus * AntiSigmaMinus()
static G4AntiSigmaPlus * AntiSigmaPlus()
static G4AntiXiMinus * AntiXiMinus()
static G4AntiXiZero * AntiXiZero()
void SetMomentumDirection(const G4ThreeVector &aDirection)
void SetMomentum(const G4ThreeVector &momentum)
void SetStatusChange(G4HadFinalStateStatus aS)
void AddSecondary(G4DynamicParticle *aP)
void SetEnergyChange(G4double anEnergy)
void SetMomentumChange(const G4ThreeVector &aV)
G4double GetTotalMomentum() const
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
G4HadFinalState theParticleChange
static G4KaonMinus * KaonMinus()
static G4KaonPlus * KaonPlus()
static G4KaonZeroLong * KaonZeroLong()
static G4KaonZeroShort * KaonZeroShort()
static G4Lambda * Lambda()
static G4Neutron * Neutron()
static G4OmegaMinus * OmegaMinus()
G4double GetPDGMass() const
G4ParticleDefinition * FindIon(G4int atomicNumber, G4int atomicMass, G4double excitationEnergy)
static G4ParticleTable * GetParticleTable()
static G4PionMinus * PionMinus()
static G4PionPlus * PionPlus()
static G4Proton * Proton()
static G4SigmaMinus * SigmaMinus()
static G4SigmaPlus * SigmaPlus()
static G4XiMinus * XiMinus()
static G4XiZero * XiZero()