80 if(M0projectile < projectile->GetDefinition()->GetPDGMass())
86 G4double Mprojectile2 = M0projectile * M0projectile;
89 G4int absPDGcode=std::abs(PDGcode);
93 if( absPDGcode > 1000 )
95 ProjectileDiffCut = 1.1;
98 else if( absPDGcode == 211 || PDGcode == 111)
100 ProjectileDiffCut = 1.0;
103 else if( absPDGcode == 321 || PDGcode == -311)
105 ProjectileDiffCut = 1.1;
110 ProjectileDiffCut = 1.1;
114 ProjectileDiffCut = ProjectileDiffCut * GeV;
115 AveragePt2 = AveragePt2 * GeV*GeV;
122 if(M0target < target->GetDefinition()->GetPDGMass())
128 G4double Mtarget2 = M0target * M0target;
130 G4double NuclearNucleonDiffCut = 1.1*GeV;
132 G4double ProjectileDiffCut2 = ProjectileDiffCut * ProjectileDiffCut;
133 G4double NuclearNucleonDiffCut2 = NuclearNucleonDiffCut * NuclearNucleonDiffCut;
138 Psum=Pprojectile+Ptarget;
144 if ( Ptmp.
pz() <= 0. )
168 if(SqrtS < 2200*MeV) {
return false;}
171 PZcms2=(S*S+Mprojectile2*Mprojectile2+Mtarget2*Mtarget2-
172 2*S*Mprojectile2-2*S*Mtarget2-2*Mprojectile2*Mtarget2)/4./S;
176 PZcms = std::sqrt(PZcms2);
180 if(Pprojectile.
z() > 0.)
182 Pprojectile.
setPz( PZcms);
183 Ptarget.
setPz( -PZcms);
187 Pprojectile.
setPz(-PZcms);
188 Ptarget.
setPz( PZcms);
191 Pprojectile.
setE(std::sqrt(Mprojectile2+
192 Pprojectile.
x()*Pprojectile.
x()+
193 Pprojectile.
y()*Pprojectile.
y()+
195 Ptarget.
setE(std::sqrt( Mtarget2 +
196 Ptarget.
x()*Ptarget.
x()+
197 Ptarget.
y()*Ptarget.
y()+
220 if (whilecount++ >= 500 && (whilecount%100)==0)
224 if (whilecount > 1000 )
252 ProjMassT2=Mprojectile2+Pt2;
253 ProjMassT =std::sqrt(ProjMassT2);
255 TargMassT2=Mtarget2+Pt2;
256 TargMassT =std::sqrt(TargMassT2);
258 PZcms2=(S*S+ProjMassT2*ProjMassT2+
259 TargMassT2*TargMassT2-
260 2.*S*ProjMassT2-2.*S*TargMassT2-
261 2.*ProjMassT2*TargMassT2)/4./S;
262 if(PZcms2 < 0 ) {PZcms2=0;};
263 PZcms =std::sqrt(PZcms2);
265 G4double PMinusMin=std::sqrt(ProjMassT2+PZcms2)-PZcms;
268 PMinusNew=ChooseP(PMinusMin,PMinusMax);
269 Qminus=PMinusNew-Pprojectile.
minus();
271 G4double TPlusMin=std::sqrt(TargMassT2+PZcms2)-PZcms;
274 TPlusNew=ChooseP(TPlusMin, TPlusMax);
275 Qplus=-(TPlusNew-Ptarget.
plus());
277 Qmomentum.
setPz( (Qplus-Qminus)/2 );
278 Qmomentum.
setE( (Qplus+Qminus)/2 );
291 }
while (( (Pprojectile+Qmomentum).mag2() < Mprojectile2 ||
292 (Ptarget -Qmomentum).mag2() < Mtarget2 ) ||
293 ( (Pprojectile+Qmomentum).mag2() < ProjectileDiffCut2 &&
294 (Ptarget -Qmomentum).mag2() < NuclearNucleonDiffCut2) );
296 if((Ptarget-Qmomentum).mag2() < NuclearNucleonDiffCut2)
299 Qminus=Ptarget.
minus()-TMinusNew;
300 TPlusNew=TargMassT2/TMinusNew;
301 Qplus=Ptarget.
plus()-TPlusNew;
303 Qmomentum.
setPz( (Qplus-Qminus)/2 );
304 Qmomentum.
setE( (Qplus+Qminus)/2 );
306 else if((Pprojectile+Qmomentum).mag2() < ProjectileDiffCut2)
309 Qplus=PPlusNew-Pprojectile.
plus();
310 PMinusNew=ProjMassT2/PPlusNew;
311 Qminus=PMinusNew-Pprojectile.
minus();
313 Qmomentum.
setPz( (Qplus-Qminus)/2 );
314 Qmomentum.
setE( (Qplus+Qminus)/2 );
317 Pprojectile += Qmomentum;
318 Ptarget -= Qmomentum;
361 {
G4cout <<
" G4FTFModel::String() Error:No start parton found"<<
G4endl;
366 {
G4cout <<
" G4FTFModel::String() Error:No end parton found"<<
G4endl;
387 sqr( std::sqrt(transverseMassSquared) - std::sqrt(ptSquared) );
390 G4ThreeVector pt=GaussianPt(widthOfPtSquare,maxAvailMomentumSquared);
404 G4int Sign= isProjectile ? -1 : 1;
406 G4double endMinus = 0.5 * (tm1 + Sign*tm2);
412 Pstart.
setPz(0.5*(startPlus - startMinus));
413 Pstart.
setE(0.5*(startPlus + startMinus));
415 Pend.
setPz(0.5*(endPlus - endMinus));
416 Pend.
setE(0.5*(endPlus + endMinus));
443 if ( Pmin <= 0. || range <=0. )
445 G4cout <<
" Pmin, range : " << Pmin <<
" , " << range <<
G4endl;
446 throw G4HadronicException(__FILE__, __LINE__,
"G4QGSDiffractiveExcitation::ChooseP : Invalid arguments ");
472 Pt2 = -AveragePt2 * std::log(1. +
G4UniformRand() * (std::exp(-maxPtSquare/AveragePt2)-1.));
478 return G4ThreeVector (Pt*std::cos(phi), Pt*std::sin(phi), 0.);
CLHEP::HepLorentzVector G4LorentzVector
CLHEP::Hep3Vector G4ThreeVector
G4DLLIMPORT std::ostream G4cout
HepLorentzRotation & rotateY(double delta)
HepLorentzRotation & rotateZ(double delta)
HepLorentzRotation inverse() const
Hep3Vector boostVector() const
HepLorentzVector & transform(const HepRotation &)
G4double GetPDGMass() const
G4int GetPDGEncoding() const
void Set4Momentum(const G4LorentzVector &aMomentum)
const G4LorentzVector & Get4Momentum() const
G4QGSDiffractiveExcitation()
virtual ~G4QGSDiffractiveExcitation()
virtual G4ExcitedString * String(G4VSplitableHadron *aHadron, G4bool isProjectile) const
virtual G4bool ExciteParticipants(G4VSplitableHadron *aPartner, G4VSplitableHadron *bPartner) const
G4ParticleDefinition * GetDefinition() const
void Set4Momentum(const G4LorentzVector &a4Momentum)
virtual G4Parton * GetNextParton()=0
const G4LorentzVector & Get4Momentum() const
const G4ThreeVector & GetPosition() const