85 if(M0projectile < projectile->GetDefinition()->GetPDGMass())
91 G4double Mprojectile2 = M0projectile * M0projectile;
94 G4int absPDGcode=std::abs(PDGcode);
98 if( absPDGcode > 1000 )
100 ProjectileDiffCut = 1.1;
103 else if( absPDGcode == 211 || PDGcode == 111)
105 ProjectileDiffCut = 1.0;
108 else if( absPDGcode == 321 || PDGcode == -311)
110 ProjectileDiffCut = 1.1;
115 ProjectileDiffCut = 1.1;
119 ProjectileDiffCut = ProjectileDiffCut *
GeV;
120 AveragePt2 = AveragePt2 * GeV*
GeV;
127 if(M0target < target->GetDefinition()->GetPDGMass())
133 G4double Mtarget2 = M0target * M0target;
137 G4double ProjectileDiffCut2 = ProjectileDiffCut * ProjectileDiffCut;
138 G4double NuclearNucleonDiffCut2 = NuclearNucleonDiffCut * NuclearNucleonDiffCut;
143 Psum=Pprojectile+Ptarget;
149 if ( Ptmp.pz() <= 0. )
157 toCms.
rotateY(-1*Ptmp.theta());
173 if(SqrtS < 2200*
MeV) {
return false;}
176 PZcms2=(S*S+Mprojectile2*Mprojectile2+Mtarget2*Mtarget2-
177 2*S*Mprojectile2-2*S*Mtarget2-2*Mprojectile2*Mtarget2)/4./S;
181 PZcms = std::sqrt(PZcms2);
185 if(Pprojectile.z() > 0.)
187 Pprojectile.setPz( PZcms);
188 Ptarget.setPz( -PZcms);
192 Pprojectile.setPz(-PZcms);
193 Ptarget.setPz( PZcms);
196 Pprojectile.setE(std::sqrt(Mprojectile2+
197 Pprojectile.x()*Pprojectile.x()+
198 Pprojectile.y()*Pprojectile.y()+
200 Ptarget.setE(std::sqrt( Mtarget2 +
201 Ptarget.x()*Ptarget.x()+
202 Ptarget.y()*Ptarget.y()+
225 if (whilecount++ >= 500 && (whilecount%100)==0)
229 if (whilecount > 1000 )
257 ProjMassT2=Mprojectile2+Pt2;
258 ProjMassT =std::sqrt(ProjMassT2);
260 TargMassT2=Mtarget2+Pt2;
261 TargMassT =std::sqrt(TargMassT2);
263 PZcms2=(S*S+ProjMassT2*ProjMassT2+
264 TargMassT2*TargMassT2-
265 2.*S*ProjMassT2-2.*S*TargMassT2-
266 2.*ProjMassT2*TargMassT2)/4./S;
267 if(PZcms2 < 0 ) {PZcms2=0;};
268 PZcms =std::sqrt(PZcms2);
270 G4double PMinusMin=std::sqrt(ProjMassT2+PZcms2)-PZcms;
273 PMinusNew=
ChooseP(PMinusMin,PMinusMax);
274 Qminus=PMinusNew-Pprojectile.minus();
276 G4double TPlusMin=std::sqrt(TargMassT2+PZcms2)-PZcms;
279 TPlusNew=
ChooseP(TPlusMin, TPlusMax);
280 Qplus=-(TPlusNew-Ptarget.plus());
282 Qmomentum.
setPz( (Qplus-Qminus)/2 );
283 Qmomentum.
setE( (Qplus+Qminus)/2 );
297 ( (Pprojectile+Qmomentum).mag2() < Mprojectile2 ||
298 (Ptarget -Qmomentum).mag2() < Mtarget2 ) ||
299 ( (Pprojectile+Qmomentum).mag2() < ProjectileDiffCut2 &&
300 (Ptarget -Qmomentum).mag2() < NuclearNucleonDiffCut2) );
302 if((Ptarget-Qmomentum).mag2() < NuclearNucleonDiffCut2)
305 Qminus=Ptarget.minus()-TMinusNew;
306 TPlusNew=TargMassT2/TMinusNew;
307 Qplus=Ptarget.plus()-TPlusNew;
309 Qmomentum.
setPz( (Qplus-Qminus)/2 );
310 Qmomentum.
setE( (Qplus+Qminus)/2 );
312 else if((Pprojectile+Qmomentum).mag2() < ProjectileDiffCut2)
315 Qplus=PPlusNew-Pprojectile.plus();
316 PMinusNew=ProjMassT2/PPlusNew;
317 Qminus=PMinusNew-Pprojectile.minus();
319 Qmomentum.
setPz( (Qplus-Qminus)/2 );
320 Qmomentum.
setE( (Qplus+Qminus)/2 );
323 Pprojectile += Qmomentum;
324 Ptarget -= Qmomentum;
367 {
G4cout <<
" G4FTFModel::String() Error:No start parton found"<<
G4endl;
372 {
G4cout <<
" G4FTFModel::String() Error:No end parton found"<<
G4endl;
393 sqr( std::sqrt(transverseMassSquared) - std::sqrt(ptSquared) );
410 G4int Sign= isProjectile ? -1 : 1;
412 G4double endMinus = 0.5 * (tm1 + Sign*tm2);
418 Pstart.
setPz(0.5*(startPlus - startMinus));
419 Pstart.
setE(0.5*(startPlus + startMinus));
421 Pend.
setPz(0.5*(endPlus - endMinus));
422 Pend.
setE(0.5*(endPlus + endMinus));
449 if ( Pmin <= 0. || range <=0. )
451 G4cout <<
" Pmin, range : " << Pmin <<
" , " << range <<
G4endl;
452 throw G4HadronicException(__FILE__, __LINE__,
"G4QGSDiffractiveExcitation::ChooseP : Invalid arguments ");
484 return G4ThreeVector (Pt*std::cos(phi), Pt*std::sin(phi), 0.);
static G4Pow * GetInstance()
const G4ThreeVector & GetPosition() const
G4double ChooseP(G4double Pmin, G4double Pmax) const
const G4LorentzVector & Get4Momentum() const
CLHEP::Hep3Vector G4ThreeVector
void Set4Momentum(const G4LorentzVector &aMomentum)
G4ThreeVector GaussianPt(G4double AveragePt2, G4double maxPtSquare) const
HepLorentzVector & rotateZ(double)
G4QGSDiffractiveExcitation()
G4GLOB_DLL std::ostream G4cout
const G4LorentzVector & Get4Momentum() const
G4int GetPDGEncoding() const
virtual G4ExcitedString * String(G4VSplitableHadron *aHadron, G4bool isProjectile) const
virtual G4bool ExciteParticipants(G4VSplitableHadron *aPartner, G4VSplitableHadron *bPartner) const
virtual G4Parton * GetNextParton()=0
static const double twopi
HepLorentzRotation & transform(const HepBoost &b)
G4double G4Log(G4double x)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double GetPDGMass() const
Hep3Vector boostVector() const
cout<< "-> Edep in the target
HepLorentzVector & rotateY(double)
virtual ~G4QGSDiffractiveExcitation()
HepLorentzVector & transform(const HepRotation &)
const G4ParticleDefinition * GetDefinition() const
void Set4Momentum(const G4LorentzVector &a4Momentum)
G4double powA(G4double A, G4double y) const
CLHEP::HepLorentzVector G4LorentzVector