84 if(M0projectile < projectile->GetDefinition()->GetPDGMass())
90 G4double Mprojectile2 = M0projectile * M0projectile;
93 G4int absPDGcode=std::abs(PDGcode);
97 if( absPDGcode > 1000 )
99 ProjectileDiffCut = 1.1;
102 else if( absPDGcode == 211 || PDGcode == 111)
104 ProjectileDiffCut = 1.0;
107 else if( absPDGcode == 321 || PDGcode == -311)
109 ProjectileDiffCut = 1.1;
114 ProjectileDiffCut = 1.1;
118 ProjectileDiffCut = ProjectileDiffCut *
GeV;
119 AveragePt2 = AveragePt2 * GeV*
GeV;
126 if(M0target < target->GetDefinition()->GetPDGMass())
132 G4double Mtarget2 = M0target * M0target;
136 G4double ProjectileDiffCut2 = ProjectileDiffCut * ProjectileDiffCut;
137 G4double NuclearNucleonDiffCut2 = NuclearNucleonDiffCut * NuclearNucleonDiffCut;
142 Psum=Pprojectile+Ptarget;
148 if ( Ptmp.pz() <= 0. )
156 toCms.
rotateY(-1*Ptmp.theta());
172 if(SqrtS < 2200*
MeV) {
return false;}
175 PZcms2=(S*S+Mprojectile2*Mprojectile2+Mtarget2*Mtarget2-
176 2*S*Mprojectile2-2*S*Mtarget2-2*Mprojectile2*Mtarget2)/4./S;
180 PZcms = std::sqrt(PZcms2);
184 if(Pprojectile.z() > 0.)
186 Pprojectile.setPz( PZcms);
187 Ptarget.setPz( -PZcms);
190 Pprojectile.setPz(-PZcms);
191 Ptarget.setPz( PZcms);
194 Pprojectile.setE(std::sqrt(Mprojectile2+
195 Pprojectile.x()*Pprojectile.x()+
196 Pprojectile.y()*Pprojectile.y()+
198 Ptarget.setE(std::sqrt( Mtarget2 +
199 Ptarget.x()*Ptarget.x()+
200 Ptarget.y()*Ptarget.y()+
221 if (whilecount++ >= 500 && (whilecount%100)==0)
226 if (whilecount > 1000 )
254 ProjMassT2=Mprojectile2+Pt2;
255 ProjMassT =std::sqrt(ProjMassT2);
257 TargMassT2=Mtarget2+Pt2;
258 TargMassT =std::sqrt(TargMassT2);
260 PZcms2=(S*S+ProjMassT2*ProjMassT2+
261 TargMassT2*TargMassT2-
262 2.*S*ProjMassT2-2.*S*TargMassT2-
263 2.*ProjMassT2*TargMassT2)/4./S;
264 if(PZcms2 < 0 ) {PZcms2=0;};
265 PZcms =std::sqrt(PZcms2);
267 G4double PMinusMin=std::sqrt(ProjMassT2+PZcms2)-PZcms;
270 PMinusNew=ChooseP(PMinusMin,PMinusMax);
271 Qminus=PMinusNew-Pprojectile.minus();
273 G4double TPlusMin=std::sqrt(TargMassT2+PZcms2)-PZcms;
276 TPlusNew=ChooseP(TPlusMin, TPlusMax);
277 Qplus=-(TPlusNew-Ptarget.plus());
279 Qmomentum.
setPz( (Qplus-Qminus)/2 );
280 Qmomentum.
setE( (Qplus+Qminus)/2 );
292 ( (Pprojectile+Qmomentum).mag2() < Mprojectile2 ||
293 (Ptarget -Qmomentum).mag2() < Mtarget2 ) ||
294 ( (Pprojectile+Qmomentum).mag2() < ProjectileDiffCut2 &&
295 (Ptarget -Qmomentum).mag2() < NuclearNucleonDiffCut2) );
297 if((Ptarget-Qmomentum).mag2() < NuclearNucleonDiffCut2)
300 Qminus=Ptarget.minus()-TMinusNew;
301 TPlusNew=TargMassT2/TMinusNew;
302 Qplus=Ptarget.plus()-TPlusNew;
304 Qmomentum.
setPz( (Qplus-Qminus)/2 );
305 Qmomentum.
setE( (Qplus+Qminus)/2 );
307 else if((Pprojectile+Qmomentum).mag2() < ProjectileDiffCut2)
310 Qplus=PPlusNew-Pprojectile.plus();
311 PMinusNew=ProjMassT2/PPlusNew;
312 Qminus=PMinusNew-Pprojectile.minus();
314 Qmomentum.
setPz( (Qplus-Qminus)/2 );
315 Qmomentum.
setE( (Qplus+Qminus)/2 );
318 Pprojectile += Qmomentum;
319 Ptarget -= Qmomentum;
359 G4cout <<
" G4FTFModel::String() Error:No start parton found"<<
G4endl;
364 G4cout <<
" G4FTFModel::String() Error:No end parton found"<<
G4endl;
369 if ( isProjectile ) {
383 sqr( std::sqrt(transverseMassSquared) - std::sqrt(ptSquared) );
386 G4ThreeVector pt=GaussianPt(widthOfPtSquare,maxAvailMomentumSquared);
400 G4int Sign= isProjectile ? -1 : 1;
402 G4double endMinus = 0.5 * (tm1 + Sign*tm2);
408 Pstart.
setPz(0.5*(startPlus - startMinus));
409 Pstart.
setE(0.5*(startPlus + startMinus));
411 Pend.
setPz(0.5*(endPlus - endMinus));
412 Pend.
setE(0.5*(endPlus + endMinus));
438 if ( Pmin <= 0. || range <=0. )
440 G4cout <<
" Pmin, range : " << Pmin <<
" , " << range <<
G4endl;
441 throw G4HadronicException(__FILE__, __LINE__,
"G4QGSDiffractiveExcitation::ChooseP : Invalid arguments ");
473 return G4ThreeVector (Pt*std::cos(phi), Pt*std::sin(phi), 0.);
static G4Pow * GetInstance()
G4double powA(G4double A, G4double y) const
Hep3Vector boostVector() const
virtual G4ExcitedString * String(G4VSplitableHadron *aHadron, G4bool isProjectile) const
CLHEP::Hep3Vector G4ThreeVector
const G4LorentzVector & Get4Momentum() const
void Set4Momentum(const G4LorentzVector &aMomentum)
G4int GetPDGEncoding() const
HepLorentzVector & rotateZ(double)
static constexpr double twopi
G4QGSDiffractiveExcitation()
const G4ParticleDefinition * GetDefinition() const
G4GLOB_DLL std::ostream G4cout
const G4ParticleDefinition const G4Material *G4double range
virtual G4Parton * GetNextParton()=0
HepLorentzRotation & transform(const HepBoost &b)
virtual G4bool ExciteParticipants(G4VSplitableHadron *aPartner, G4VSplitableHadron *bPartner) const
const G4LorentzVector & Get4Momentum() const
G4double G4Log(G4double x)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double GetPDGMass() const
T max(const T t1, const T t2)
brief Return the largest of the two arguments
HepLorentzVector & rotateY(double)
static constexpr double GeV
const G4ThreeVector & GetPosition() const
virtual ~G4QGSDiffractiveExcitation()
static constexpr double MeV
HepLorentzVector & transform(const HepRotation &)
void Set4Momentum(const G4LorentzVector &a4Momentum)
CLHEP::HepLorentzVector G4LorentzVector