101{
105
108
109 if(ekin <= lowestEnergyLimit ||
A < 3) {
113 }
114
116
118 G4cout <<
"G4ChargeExchange::DoIt: Incident particle plab="
119 << plab/GeV << " GeV/c "
120 << " ekin(MeV) = " << ekin/MeV << " "
122
123
125
130 <<
" PDGcode= " << projPDG <<
" on nucleus Z= " <<
Z
131 <<
" A= " <<
A <<
" N= " <<
N
133
135
139
142 lv1.boost(-bst);
143 lv0.boost(-bst);
144
145
146 G4bool theHyperon =
false;
149
150 if(theParticle == theProton) {
151 theSecondary = theNeutron;
153 } else if(theParticle == theNeutron) {
154 theSecondary = theProton;
156 } else if(theParticle == thePiPlus) {
157 theSecondary = thePiZero;
159 } else if(theParticle == thePiMinus) {
160 theSecondary = thePiZero;
162 } else if(theParticle == theKPlus) {
164 else theSecondary = theK0L;
166 } else if(theParticle == theKMinus) {
168 else theSecondary = theK0L;
170 } else if(theParticle == theK0S || theParticle == theK0L) {
172 theSecondary = theKPlus;
174 } else {
175 theSecondary = theKMinus;
177 }
178 } else if(theParticle == theANeutron) {
179 theSecondary = theAProton;
181 } else if(theParticle == theAProton) {
182 theSecondary = theANeutron;
184 } else if(theParticle == theL) {
187 if(x < 0.2) {
188 theSecondary = theS0;
189 } else if (x < 0.4) {
190 theSecondary = theSPlus;
192 } else if (x < 0.6) {
193 theSecondary = theProton;
194 theRecoil = theL;
195 theHyperon = true;
197 } else if (x < 0.8) {
198 theSecondary = theProton;
199 theRecoil = theS0;
200 theHyperon = true;
202 } else {
203 theSecondary = theNeutron;
204 theRecoil = theSPlus;
205 theHyperon = true;
207 }
208 } else {
209 if(x < 0.2) {
210 theSecondary = theS0;
211 } else if (x < 0.4) {
212 theSecondary = theSMinus;
214 } else if (x < 0.6) {
215 theSecondary = theNeutron;
216 theRecoil = theL;
218 theHyperon = true;
219 } else if (x < 0.8) {
220 theSecondary = theNeutron;
221 theRecoil = theS0;
222 theHyperon = true;
224 } else {
225 theSecondary = theProton;
226 theRecoil = theSMinus;
227 theHyperon = true;
229 }
230 }
231 }
232
233 if (
Z == 1 &&
A == 2) theDef = theD;
234 else if (
Z == 1 &&
A == 3) theDef = theT;
235 else if (
Z == 2 &&
A == 3) theDef = theHe3;
236 else if (
Z == 2 &&
A == 4) theDef = theA;
237 else {
238 theDef =
240 }
242
245 if(theRecoil) { m21 += theRecoil->
GetPDGMass(); }
246 else { theRecoil = theDef; }
247
249
250
251 if(etot < m11 + m21) {
255 }
256
258 G4double e1 = 0.5*etot*(1.0 - (m21*m21 - m11*m11)/(etot*etot));
259
260 G4double ptot = std::sqrt(e1*e1 - m11*m11);
261
264
266
268 G4cout <<
"## G4ChargeExchange t= " << t <<
" tmax= " << tmax
269 <<
" ptot= " << ptot <<
G4endl;
270 }
271
274 if(std::abs(cost) > 1.0) cost = 1.0;
275 G4double sint = std::sqrt((1.0-cost)*(1.0+cost));
276
277
278
279
280 G4ThreeVector v1(sint*std::cos(phi),sint*std::sin(phi),cost);
281 v1 *= ptot;
284
287
292
293 G4double erec = std::max(nlv0.
e() - m21, 0.0);
294
295
296
297 if(theHyperon) {
305 } else {
307 }
309}
G4GLOB_DLL std::ostream G4cout
Hep3Vector boostVector() const
HepLorentzVector & boost(double, double, double)
G4double SampleT(G4double p, G4int A)
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void SetKineticEnergy(G4double aEnergy)
void SetStatusChange(G4HadFinalStateStatus aS)
void AddSecondary(G4DynamicParticle *aP, G4int mod=-1)
void SetEnergyChange(G4double anEnergy)
void SetMomentumChange(const G4ThreeVector &aV)
void SetLocalEnergyDeposit(G4double aE)
G4double GetTotalMomentum() const
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
G4HadFinalState theParticleChange
G4double GetRecoilEnergyThreshold() const
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
static G4double GetNuclearMass(const G4double A, const G4double Z)
G4double GetPDGMass() const
G4int GetPDGEncoding() const
const G4String & GetParticleName() const
G4IonTable * GetIonTable() const
static G4ParticleTable * GetParticleTable()