93 {
94
95 #ifdef debugFTFexcitation
97 #endif
98
99 CommonVariables common;
100
101
102 common.Pprojectile = projectile->Get4Momentum();
103 if ( common.Pprojectile.z() < 0.0 ) return false;
104 common.ProjectilePDGcode = projectile->GetDefinition()->GetPDGEncoding();
105 common.absProjectilePDGcode = std::abs( common.ProjectilePDGcode );
106 common.M0projectile = projectile->GetDefinition()->GetPDGMass();
107 G4double ProjectileRapidity = common.Pprojectile.rapidity();
108
109
110 common.Ptarget = target->Get4Momentum();
111 common.TargetPDGcode = target->GetDefinition()->GetPDGEncoding();
112 common.absTargetPDGcode = std::abs( common.TargetPDGcode );
113 common.M0target = target->GetDefinition()->GetPDGMass();
114 G4double TargetRapidity = common.Ptarget.rapidity();
115
116
118 common.S = Psum.
mag2();
119 common.SqrtS = std::sqrt( common.S );
120
121
122 G4bool toBePutOnMassShell =
true;
123 common.MminProjectile = common.BrW.GetMinimumMass( projectile->GetDefinition() );
124
125
126
127
128
129
130
131
132 common.M0projectile2 = common.M0projectile * common.M0projectile;
135 if ( common.M0projectile > common.ProjectileDiffStateMinMass ) {
136 common.ProjectileDiffStateMinMass = common.MminProjectile + 220.0*MeV;
137 common.ProjectileNonDiffStateMinMass = common.MminProjectile + 220.0*MeV;
138 if ( common.absProjectilePDGcode > 3000 ) {
139 common.ProjectileDiffStateMinMass += 140.0*MeV;
140 common.ProjectileNonDiffStateMinMass += 140.0*MeV;
141 }
142 }
143 common.MminTarget = common.BrW.GetMinimumMass( target->GetDefinition() );
144
145
146
147
148
149
150
151
152 common.M0target2 = common.M0target * common.M0target;
155 if ( common.M0target > common.TargetDiffStateMinMass ) {
156 common.TargetDiffStateMinMass = common.MminTarget + 220.0*MeV;
157 common.TargetNonDiffStateMinMass = common.MminTarget + 220.0*MeV;
158 if ( common.absTargetPDGcode > 3000 ) {
159 common.TargetDiffStateMinMass += 140.0*MeV;
160 common.TargetNonDiffStateMinMass += 140.0*MeV;
161 }
162 };
163 #ifdef debugFTFexcitation
164 G4cout <<
"Proj Targ PDGcodes " << common.ProjectilePDGcode <<
" " << common.TargetPDGcode <<
G4endl
165 <<
"Mprojectile Y " << common.Pprojectile.mag() <<
" " << ProjectileRapidity <<
G4endl
166 <<
"M0projectile Y " << common.M0projectile <<
" " << ProjectileRapidity <<
G4endl;
167 G4cout <<
"Mtarget Y " << common.Ptarget.mag() <<
" " << TargetRapidity <<
G4endl
168 <<
"M0target Y " << common.M0target <<
" " << TargetRapidity <<
G4endl;
169 G4cout <<
"Pproj " << common.Pprojectile <<
G4endl <<
"Ptarget " << common.Ptarget <<
G4endl;
170 #endif
171
172
175 if ( Ptmp.
pz() <= 0.0 )
return false;
178 common.toLab = common.toCms.inverse();
179 common.Pprojectile.
transform( common.toCms );
180 common.Ptarget.
transform( common.toCms );
181
182 G4double SumMasses = common.M0projectile + common.M0target;
183 #ifdef debugFTFexcitation
184 G4cout <<
"SqrtS " << common.SqrtS <<
G4endl <<
"M0pr M0tr SumM " << common.M0projectile
185 <<
" " << common.M0target <<
" " << SumMasses <<
G4endl;
186 #endif
187 if ( common.SqrtS < SumMasses ) return false;
188
189 common.PZcms2 = (
sqr( common.S ) +
sqr( common.M0projectile2 ) +
sqr( common.M0target2 )
190 - 2.0 * ( common.S * ( common.M0projectile2 + common.M0target2 )
191 + common.M0projectile2 * common.M0target2 ) ) / 4.0 / common.S;
192 #ifdef debugFTFexcitation
193 G4cout <<
"PZcms2 after toBePutOnMassShell " << common.PZcms2 <<
G4endl;
194 #endif
195 if ( common.PZcms2 < 0.0 ) return false;
196
197 common.PZcms = std::sqrt( common.PZcms2 );
198 if ( toBePutOnMassShell ) {
199 if ( common.Pprojectile.z() > 0.0 ) {
200 common.Pprojectile.setPz( common.PZcms );
201 common.Ptarget.setPz( -common.PZcms );
202 } else {
203 common.Pprojectile.setPz( -common.PZcms );
204 common.Ptarget.setPz( common.PZcms );
205 }
206 common.Pprojectile.setE( std::sqrt( common.M0projectile2
207 + common.Pprojectile.x() * common.Pprojectile.x()
208 + common.Pprojectile.y() * common.Pprojectile.y()
209 + common.PZcms2 ) );
210 common.Ptarget.setE( std::sqrt( common.M0target2
211 + common.Ptarget.x() * common.Ptarget.x()
212 + common.Ptarget.y() * common.Ptarget.y()
213 + common.PZcms2 ) );
214 }
215 #ifdef debugFTFexcitation
216 G4cout <<
"Start --------------------" <<
G4endl <<
"Proj M0 Mdif Mndif " << common.M0projectile
217 << " " << common.ProjectileDiffStateMinMass << " " << common.ProjectileNonDiffStateMinMass
219 << "Targ M0 Mdif Mndif " << common.M0target << " " << common.TargetDiffStateMinMass
220 <<
" " << common.TargetNonDiffStateMinMass <<
G4endl <<
"SqrtS " << common.SqrtS <<
G4endl
221 <<
"Proj CMS " << common.Pprojectile <<
G4endl <<
"Targ CMS " << common.Ptarget <<
G4endl;
222 #endif
223
224
225 ProjectileRapidity = common.Pprojectile.rapidity();
226 TargetRapidity = common.Ptarget.rapidity();
229 theParameters->
GetProcProb( 4, ProjectileRapidity - TargetRapidity );
230 common.ProbProjectileDiffraction =
231 theParameters->
GetProcProb( 2, ProjectileRapidity - TargetRapidity );
232 common.ProbTargetDiffraction =
233 theParameters->
GetProcProb( 3, ProjectileRapidity - TargetRapidity );
234 common.ProbOfDiffraction = common.ProbProjectileDiffraction + common.ProbTargetDiffraction;
235 #ifdef debugFTFexcitation
236 G4cout <<
"Proc Probs " << QeNoExc <<
" " << QeExc <<
" "
237 << common.ProbProjectileDiffraction <<
" " << common.ProbTargetDiffraction <<
G4endl
238 <<
"ProjectileRapidity " << ProjectileRapidity <<
G4endl;
239 #endif
240
241 if ( QeNoExc + QeExc + common.ProbProjectileDiffraction + common.ProbTargetDiffraction > 1.0 ) {
242 QeNoExc = 1.0 - QeExc - common.ProbProjectileDiffraction - common.ProbTargetDiffraction;
243 }
244 if ( QeExc + QeNoExc != 0.0 ) {
245 common.ProbExc = QeExc / ( QeExc + QeNoExc );
246 }
247 if ( 1.0 - QeExc - QeNoExc > 0.0 ) {
248 common.ProbProjectileDiffraction /= ( 1.0 - QeExc - QeNoExc );
249 common.ProbTargetDiffraction /= ( 1.0 - QeExc - QeNoExc );
250 }
251 #ifdef debugFTFexcitation
252 G4cout <<
"Proc Probs " << QeNoExc <<
" " << QeExc <<
" "
253 << common.ProbProjectileDiffraction <<
" " << common.ProbTargetDiffraction <<
G4endl
254 <<
"ProjectileRapidity " << ProjectileRapidity <<
G4endl;
255 #endif
256
257
258 G4int returnCode = 1;
260 returnCode = ExciteParticipants_doChargeExchange( projectile, target, theParameters,
261 theElastic, common );
262 }
263
264 G4bool returnResult =
false;
265 if ( returnCode == 0 ) {
266 returnResult = true;
267 } else if ( returnCode == 1 ) {
268
269 common.ProbOfDiffraction = common.ProbProjectileDiffraction + common.ProbTargetDiffraction;
270 #ifdef debugFTFexcitation
272 << "Proj M0 MdMin MndMin " << common.M0projectile << " "
273 << common.ProjectileDiffStateMinMass << " " << common.ProjectileNonDiffStateMinMass
275 << "Targ M0 MdMin MndMin " << common.M0target << " " << common.TargetDiffStateMinMass
276 <<
" " << common.TargetNonDiffStateMinMass <<
G4endl <<
"SqrtS " << common.SqrtS
278 << "Prob: ProjDiff TargDiff + Sum " << common.ProbProjectileDiffraction << " "
279 << common.ProbTargetDiffraction <<
" " << common.ProbOfDiffraction <<
G4endl;
280 #endif
281 if ( common.ProbOfDiffraction != 0.0 ) {
282 common.ProbProjectileDiffraction /= common.ProbOfDiffraction;
283 } else {
284 common.ProbProjectileDiffraction = 0.0;
285 }
286 #ifdef debugFTFexcitation
287 G4cout <<
"Prob: ProjDiff TargDiff + Sum " << common.ProbProjectileDiffraction <<
" "
288 << common.ProbTargetDiffraction <<
" " << common.ProbOfDiffraction <<
G4endl;
289 #endif
290 common.ProjectileDiffStateMinMass2 =
sqr( common.ProjectileDiffStateMinMass );
291 common.ProjectileNonDiffStateMinMass2 =
sqr( common.ProjectileNonDiffStateMinMass );
292 common.TargetDiffStateMinMass2 =
sqr( common.TargetDiffStateMinMass );
293 common.TargetNonDiffStateMinMass2 =
sqr( common.TargetNonDiffStateMinMass );
294
296
297 returnResult = ExciteParticipants_doDiffraction( projectile, target, theParameters, common );
298
299 if ( returnResult ) isDiffractive = true;
300
301 } else {
302
303 returnResult = ExciteParticipants_doNonDiffraction( projectile, target, theParameters, common );
304
305 }
306 if ( returnResult ) {
307 common.Pprojectile += common.Qmomentum;
308 common.Ptarget -= common.Qmomentum;
309
310 common.Pprojectile.transform( common.toLab );
311 common.Ptarget.transform( common.toLab );
312 #ifdef debugFTFexcitation
313 G4cout <<
"Mproj " << common.Pprojectile.mag() <<
G4endl <<
"Mtarg " << common.Ptarget.mag()
315 #endif
316 projectile->Set4Momentum( common.Pprojectile );
317 target->Set4Momentum( common.Ptarget );
318 projectile->IncrementCollisionCount( 1 );
319 target->IncrementCollisionCount( 1 );
320 }
321 }
322
323 return returnResult;
324}
HepLorentzVector & rotateZ(double)
HepLorentzVector & rotateY(double)
HepLorentzVector & transform(const HepRotation &)
G4double GetProjMinNonDiffMass()
G4double GetTarMinNonDiffMass()
G4double GetProcProb(const G4int ProcN, const G4double y)