98{
102
105
106 if(ekin <= lowestEnergyLimit || A < 3) {
110 }
111
113
115 G4cout <<
"G4ChargeExchange::DoIt: Incident particle plab="
116 << plab/GeV << " GeV/c "
117 << " ekin(MeV) = " << ekin/MeV << " "
119
120
122
127 << " PDGcode= " << projPDG << " on nucleus Z= " << Z
128 <<
" A= " <<
A <<
" N= " << N
130
132
136
139 lv1.boost(-bst);
140 lv0.boost(-bst);
141
142
143 G4bool theHyperon =
false;
146
147 if(theParticle == theProton) {
148 theSecondary = theNeutron;
149 Z++;
150 } else if(theParticle == theNeutron) {
151 theSecondary = theProton;
152 Z--;
153 } else if(theParticle == thePiPlus) {
154 theSecondary = thePiZero;
155 Z++;
156 } else if(theParticle == thePiMinus) {
157 theSecondary = thePiZero;
158 Z--;
159 } else if(theParticle == theKPlus) {
161 else theSecondary = theK0L;
162 Z++;
163 } else if(theParticle == theKMinus) {
165 else theSecondary = theK0L;
166 Z--;
167 } else if(theParticle == theK0S || theParticle == theK0L) {
169 theSecondary = theKPlus;
170 Z--;
171 } else {
172 theSecondary = theKMinus;
173 Z++;
174 }
175 } else if(theParticle == theANeutron) {
176 theSecondary = theAProton;
177 Z++;
178 } else if(theParticle == theAProton) {
179 theSecondary = theANeutron;
180 Z--;
181 } else if(theParticle == theL) {
184 if(x < 0.2) {
185 theSecondary = theS0;
186 } else if (x < 0.4) {
187 theSecondary = theSPlus;
188 Z--;
189 } else if (x < 0.6) {
190 theSecondary = theProton;
191 theRecoil = theL;
192 theHyperon = true;
194 } else if (x < 0.8) {
195 theSecondary = theProton;
196 theRecoil = theS0;
197 theHyperon = true;
199 } else {
200 theSecondary = theNeutron;
201 theRecoil = theSPlus;
202 theHyperon = true;
204 }
205 } else {
206 if(x < 0.2) {
207 theSecondary = theS0;
208 } else if (x < 0.4) {
209 theSecondary = theSMinus;
210 Z++;
211 } else if (x < 0.6) {
212 theSecondary = theNeutron;
213 theRecoil = theL;
215 theHyperon = true;
216 } else if (x < 0.8) {
217 theSecondary = theNeutron;
218 theRecoil = theS0;
219 theHyperon = true;
221 } else {
222 theSecondary = theProton;
223 theRecoil = theSMinus;
224 theHyperon = true;
226 }
227 }
228 }
229
230 if (Z == 1 && A == 2) theDef = theD;
231 else if (Z == 1 && A == 3) theDef = theT;
232 else if (Z == 2 && A == 3) theDef = theHe3;
233 else if (Z == 2 && A == 4) theDef = theA;
234 else {
235 theDef =
237 }
239
242 if(theRecoil) { m21 += theRecoil->
GetPDGMass(); }
243 else { theRecoil = theDef; }
244
246
247
248 if(etot < m11 + m21) {
252 }
253
255 G4double e1 = 0.5*etot*(1.0 - (m21*m21 - m11*m11)/(etot*etot));
256
257 G4double ptot = std::sqrt(e1*e1 - m11*m11);
258
261
263
265 G4cout <<
"## G4ChargeExchange t= " << t <<
" tmax= " << tmax
266 <<
" ptot= " << ptot <<
G4endl;
267 }
268
271 if(std::abs(cost) > 1.0) cost = 1.0;
272 G4double sint = std::sqrt((1.0-cost)*(1.0+cost));
273
274
275
276
277 G4ThreeVector v1(sint*std::cos(phi),sint*std::sin(phi),cost);
278 v1 *= ptot;
281
284
289
290 G4double erec = std::max(nlv0.
e() - m21, 0.0);
291
292
293
294 if(theHyperon) {
302 } else {
304 }
306}
double A(double temperature)
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()