56{
57
58
59
60
61
62
63
64
65
66
73
74 targetMass = targetParticle.
GetMass()/GeV;
76
79
80 G4double cmEnergy = std::sqrt( currentMass*currentMass +
81 targetMass*targetMass +
82 2.0*targetMass*etCurrent );
83
84 if (cmEnergy < 0.01) {
86
87 } else {
88
89
90 G4double pf = targetMass*pCurrent/cmEnergy;
91
92
93
94
96
99
100
101
102 pseudoParticle[0].
SetMass( targetMass*GeV );
104 pseudoParticle[0].
SetMomentum( 0.0, 0.0, pOriginal*GeV );
105
107 pseudoParticle[1].
SetMass( mOriginal*GeV );
109
110 } else {
111 pseudoParticle[0].
SetMass( currentMass*GeV );
113 pseudoParticle[0].
SetMomentum( 0.0, 0.0, pCurrent*GeV );
114
116 pseudoParticle[1].
SetMass( targetMass*GeV );
118 }
119
120
121
122 pseudoParticle[2] = pseudoParticle[0] + pseudoParticle[1];
123 pseudoParticle[0].
Lorentz( pseudoParticle[0], pseudoParticle[2] );
124 pseudoParticle[1].Lorentz( pseudoParticle[1], pseudoParticle[2] );
125
126
127
128 currentParticle.
SetTotalEnergy( std::sqrt(pf*pf+currentMass*currentMass)*GeV );
129 targetParticle.
SetTotalEnergy( std::sqrt(pf*pf+targetMass*targetMass)*GeV );
130
131
132
133
137 G4double b = std::max( cb, b1+b2*std::log(pOriginal) );
138
139
140
141
142 G4double btrang = b * 4.0 * pf * pseudoParticle[0].GetMomentum().mag()/GeV;
143 G4double exindt = std::exp(-btrang) - 1.0;
145 costheta = std::max(-1., std::min(1., costheta) );
146 G4double sintheta = std::sqrt((1.0-costheta)*(1.0+costheta));
148
149
150
151
154
155 currentParticle.
SetMomentum( -pf*sintheta*std::cos(phi)*GeV,
156 -pf*sintheta*std::sin(phi)*GeV,
157 -pf*costheta*GeV );
158 } else {
159
160 currentParticle.
SetMomentum( pf*sintheta*std::cos(phi)*GeV,
161 pf*sintheta*std::sin(phi)*GeV,
162 pf*costheta*GeV );
163 }
165
166
167
168
169 currentParticle.
Lorentz( currentParticle, pseudoParticle[1] );
170 targetParticle.
Lorentz( targetParticle, pseudoParticle[1] );
171
172
173
174 Defs1( modifiedOriginal, currentParticle, targetParticle, vec, vecLen );
175
176
177
179 if( atomicWeight >= 1.5 )
180 {
181 const G4double cfa = 0.025*((atomicWeight-1.)/120.)*std::exp(-(atomicWeight-1.)/120.);
183 if( pp1 >= 1.0 )
184 {
186 ekin = std::max( 0.0001*GeV, ekin );
190 }
192 if( pp1 >= 1.0 )
193 {
195 ekin = std::max( 0.0001*GeV, ekin );
199 }
200 }
201 }
202
203
204
205
206 std::pair<G4int, G4int> finalStateNucleons =
208 G4int protonsInFinalState = finalStateNucleons.first;
209 G4int neutronsInFinalState = finalStateNucleons.second;
210
211 G4int PinNucleus = std::max(0,
213 G4int NinNucleus = std::max(0,
215
216 if( atomicWeight >= 1.5 )
217 {
218
219
220
221
222
223
224
226 G4int npnb=0, ndta=0;
227
232
233
234
235 if( epnb >= pnCutOff )
236 {
238 if( npnb > atomicWeight )npnb =
G4int(atomicWeight);
239 if( (epnb > pnCutOff) && (npnb <= 0) )npnb = 1;
240 npnb = std::min( npnb, 127-vecLen );
241 }
242 if( edta >= dtaCutOff )
243 {
244 ndta =
G4int(2.0 * std::log(atomicWeight));
245 ndta = std::min( ndta, 127-vecLen );
246 }
247
248 if (npnb == 0 && ndta == 0) npnb = 1;
249
251 PinNucleus, NinNucleus, targetNucleus,
252 vec, vecLen);
253 }
254
255
256
257
258 if( (atomicWeight >= 1.5) && (atomicWeight <= 230.0) && (ekOriginal <= 0.2) )
260 else
261 currentParticle.
SetTOF( 1.0 );
262
263 return true;
264}
G4long G4Poisson(G4double mean)
G4double GetPNBlackTrackEnergy() const
G4double GetDTABlackTrackEnergy() const
G4double GetPDGMass() const
const G4String & GetParticleSubType() const
std::pair< G4int, G4int > GetFinalStateNucleons(const G4DynamicParticle *originalTarget, const G4FastVector< G4ReactionProduct, 256 > &vec, const G4int &vecLen)
void AddBlackTrackParticles(const G4double, const G4int, const G4double, const G4int, const G4ReactionProduct &, G4int, G4int, const G4Nucleus &, G4FastVector< G4ReactionProduct, 256 > &, G4int &)
void Defs1(const G4ReactionProduct &modifiedOriginal, G4ReactionProduct ¤tParticle, G4ReactionProduct &targetParticle, G4FastVector< G4ReactionProduct, 256 > &vec, G4int &vecLen)
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetTotalEnergy(const G4double en)
G4double GetTotalMomentum() const
G4double GetKineticEnergy() const
G4double GetTotalEnergy() const
G4ThreeVector GetMomentum() const
void Lorentz(const G4ReactionProduct &p1, const G4ReactionProduct &p2)
void SetKineticEnergy(const G4double en)
G4ParticleDefinition * GetDefinition() const
void SetTOF(const G4double t)
void SetMass(const G4double mas)