59 G4bool ProjectileDiffraction )
const
61 #ifdef debugSingleDiffraction
73 #ifdef debugSingleDiffraction
76 <<
" "<<Ptarget <<
" "<<Ptarget.
mag() <<
G4endl;
83 #ifdef debugSingleDiffraction
84 G4cout<<
"SqrtS-Mprojectile-Mtarget "<<SqrtS<<
" "<<Mprojectile<<
" "<<Mtarget
85 <<
" "<<SqrtS-Mprojectile-Mtarget<<
G4endl;
87 if (SqrtS-Mprojectile-Mtarget <= 250.0*MeV) {
88 #ifdef debugSingleDiffraction
90 <<Pprojectile<<
" "<<Pprojectile.
mag()<<
G4endl;
102 if ( Ptmp.
pz() <= 0. )
116 #ifdef debugSingleDiffraction
117 G4cout <<
"Pprojectile in CMS " << Pprojectile <<
G4endl;
122 G4double ProjectileMinDiffrMass(0.), TargetMinDiffrMass(0.);
126 if ( ProjectileDiffraction ) {
127 if ( absPDGcode > 1000 )
129 if ( absPDGcode > 4000 && absPDGcode < 6000 )
136 ProjectileMinDiffrMass = 1.16;
140 else if( absPDGcode == 211 || absPDGcode == 111)
142 ProjectileMinDiffrMass = 1.0;
145 else if( absPDGcode == 321 || absPDGcode == 130 || absPDGcode == 310)
147 ProjectileMinDiffrMass = 1.1;
150 else if( absPDGcode == 22)
152 ProjectileMinDiffrMass = 0.25;
155 else if( absPDGcode > 400 && absPDGcode < 600)
162 ProjectileMinDiffrMass = 1.1;
166 ProjectileMinDiffrMass = ProjectileMinDiffrMass * GeV;
167 Mprojectile2=
sqr(ProjectileMinDiffrMass);
171 TargetMinDiffrMass = 1.16*GeV;
172 Mtarget2 =
sqr( TargetMinDiffrMass) ;
176 AveragePt2 = AveragePt2 * GeV*GeV;
183 G4double PMinusNew, PPlusNew, TPlusNew, TMinusNew;
192 if (whilecount > 1000 )
203 ProjMassT2 = Mprojectile2 + Pt2;
204 ProjMassT = std::sqrt( ProjMassT2 );
205 TargMassT2 = Mtarget2 + Pt2;
206 TargMassT = std::sqrt( TargMassT2 );
208 #ifdef debugSingleDiffraction
209 G4cout<<whilecount<<
" "<<Pt2<<
" "<<ProjMassT<<
" "<<TargMassT<<
" "<<SqrtS<<
" "<<
S<<
" "<<ProjectileDiffraction<<
G4endl;
211 if ( SqrtS < ProjMassT + TargMassT )
continue;
213 PZcms2 = (
S*
S + ProjMassT2*ProjMassT2 + TargMassT2*TargMassT2
214 - 2.0*
S*ProjMassT2 - 2.0*
S*TargMassT2 - 2.0*ProjMassT2*TargMassT2 ) / 4.0 /
S;
216 if ( PZcms2 < 0 )
continue;
218 PZcms = std::sqrt( PZcms2 );
220 if ( ProjectileDiffraction )
222 PMinusMin = std::sqrt( ProjMassT2 + PZcms2 ) - PZcms;
223 PMinusMax = SqrtS - TargMassT;
225 PMinusNew = ChooseX( PMinusMin, PMinusMax );
226 TMinusNew = SqrtS - PMinusNew;
228 Qminus = Ptarget.
minus() - TMinusNew;
229 TPlusNew = TargMassT2 / TMinusNew;
230 Qplus = Ptarget.
plus() - TPlusNew;
233 TPlusMin = std::sqrt( TargMassT2 + PZcms2 ) - PZcms;
234 TPlusMax = SqrtS - ProjMassT;
236 TPlusNew = ChooseX( TPlusMin, TPlusMax );
237 PPlusNew = SqrtS - TPlusNew;
239 Qplus = PPlusNew - Pprojectile.
plus();
240 PMinusNew = ProjMassT2 / PPlusNew;
241 Qminus = PMinusNew - Pprojectile.
minus();
244 Qmomentum.
setPz( (Qplus - Qminus)/2 );
245 Qmomentum.
setE( (Qplus + Qminus)/2 );
247 #ifdef debugSingleDiffraction
248 G4cout<<ProjectileDiffraction<<
" "<<( Pprojectile + Qmomentum ).mag2()<<
" "<< Mprojectile2<<
G4endl;
249 G4cout<<!ProjectileDiffraction<<
" "<<( Ptarget - Qmomentum ).mag2()<<
" "<< Mtarget2<<
G4endl;
252 }
while ( ( ProjectileDiffraction&&( Pprojectile + Qmomentum ).mag2() < Mprojectile2 ) ||
253 (!ProjectileDiffraction&&( Ptarget - Qmomentum ).mag2() < Mtarget2 ) );
256 Pprojectile += Qmomentum;
258 Ptarget -= Qmomentum;
264 #ifdef debugSingleDiffraction
265 G4cout <<
"Pprojectile in Lab. " << Pprojectile <<
G4endl;
267 G4cout <<
"G4SingleDiffractiveExcitation- Projectile mass " << Pprojectile.
mag() <<
G4endl;
268 G4cout <<
"G4SingleDiffractiveExcitation- Target mass " << Ptarget.
mag() <<
G4endl;
G4double GetPDGMass() const
G4int GetPDGEncoding() const