51void G4QGSMSplitableHadron::InitParameters()
63 StrangeSuppress = 0.48;
67 widthOfPtSquare = 0.01*GeV*GeV;
69 minTransverseMass = 1*keV;
81 Direction = aDirection;
101 Direction = aDirection;
114 if (Color.size()!=0)
return;
117 DiffractiveSplitUp();
125void G4QGSMSplitableHadron::DiffractiveSplitUp()
140 G4double maxAvailMomentum2 =
sqr(std::sqrt(transverseMass2) - std::sqrt(pt2));
142 if(maxAvailMomentum2/widthOfPtSquare>0.01) pt = GaussianPt(widthOfPtSquare, maxAvailMomentum2);
147 RightMom.
setPx(HadronMom.
px() - pt.x());
148 RightMom.
setPy(HadronMom.
py() - pt.y());
154 if (Direction) Local2 = -Local2;
155 G4double RightMinus = 0.5*(Local1 + Local2);
159 G4double LeftPlus = LeftMom.perp2()/LeftMinus;
162 LeftMom.setPz(0.5*(LeftPlus - LeftMinus));
163 LeftMom.setE (0.5*(LeftPlus + LeftMinus));
164 RightMom.
setPz(0.5*(RightPlus - RightMinus));
165 RightMom.
setE (0.5*(RightPlus + RightMinus));
169 Color.push_back(Left);
170 AntiColor.push_back(Right);
174void G4QGSMSplitableHadron::SoftSplitUp()
188 while(Xmin>=1-(2*nSeaPair+1)*Xmin) Xmin*=0.95;
191 for (aSeaPair = 0; aSeaPair < nSeaPair; aSeaPair++)
200 G4Parton * aParton = BuildSeaQuark(
false, aPDGCode, nSeaPair);
218 Color.push_back(aParton);
222 aParton = BuildSeaQuark(
true, aPDGCode, nSeaPair);
223 aParton->
SetSpinZ(-firstPartonSpinZ);
236 AntiColor.push_back(aParton);
241 GetValenceQuarkFlavors(
GetDefinition(), pColorParton, pAntiColorParton);
251 if (ColorEncoding < 0)
265 Color.push_back(pColorParton);
266 AntiColor.push_back(pAntiColorParton);
283 G4int NumberOfUnsampledSeaQuarks = 2*nSeaPair;
284 ColorX = SampleX(Xmin, NumberOfUnsampledSeaQuarks, 2*nSeaPair, aBeta);
285 Color.back()->SetX(SumX = ColorX);
286 for(
G4int aPair = 0; aPair < nSeaPair; aPair++)
288 NumberOfUnsampledSeaQuarks--;
289 ColorX = SampleX(Xmin, NumberOfUnsampledSeaQuarks, 2*nSeaPair, aBeta);
290 Color[aPair]->SetX(ColorX);
292 NumberOfUnsampledSeaQuarks--;
293 AntiColorX = SampleX(Xmin, NumberOfUnsampledSeaQuarks, 2*nSeaPair, aBeta);
294 AntiColor[aPair]->SetX(AntiColorX);
296 if (1. - SumX <= Xmin)
break;
299 while (1. - SumX <= Xmin);
301 (*(AntiColor.end()-1))->SetX(1. - SumX);
304 for(aSeaPair = 0; aSeaPair < nSeaPair+1; aSeaPair++)
306 G4Parton* aParton = Color[aSeaPair];
309 aParton = AntiColor[aSeaPair];
323 theMesonSplitter.
SplitMeson(HadronEncoding, &aEnd, &bEnd);
327 theBaryonSplitter.
SplitBarion(HadronEncoding, &aEnd, &bEnd);
381 while((R = -widthSquare*std::log(
G4UniformRand())) > maxPtSquare) {;}
390 if (isAntiQuark) aPDGCode*=-1;
405 for(
G4int ii=1; ii<100; ii++)
408 y *= std::pow( std::pow(1-anXmin-totalSea*anXmin, alpha+1) - std::pow(anXmin, alpha+1), nSea);
409 y *= std::pow(1-anXmin-totalSea*anXmin, aBeta+1) - std::pow(anXmin, aBeta+1);
413 G4double xMax=1-(totalSea+1)*anXmin;
416 G4cout <<
"anXmin = "<<anXmin<<
" nSea = "<<nSea<<
" totalSea = "<< totalSea<<
G4endl;
417 throw G4HadronicException(__FILE__, __LINE__,
"G4QGSMSplitableHadron - Fatal: Cannot sample parton densities under these constraints.");
422 y = std::pow(x1, alpha);
423 y *= std::pow( std::pow(1-x1-totalSea*anXmin, alpha+1) - std::pow(anXmin, alpha+1), nSea);
424 y *= std::pow(1-x1-totalSea*anXmin, aBeta+1) - std::pow(anXmin, aBeta+1);
CLHEP::Hep3Vector G4ThreeVector
G4DLLIMPORT std::ostream G4cout
G4bool SplitBarion(G4int PDGCode, G4int *q_or_qqbar, G4int *qbar_or_qq)
static G4Gamma * GammaDefinition()
static G4KaonMinus * KaonMinusDefinition()
static G4KaonPlus * KaonPlusDefinition()
G4bool SplitMeson(G4int PDGcode, G4int *aEnd, G4int *bEnd)
G4double GetPDGMass() const
G4int GetPDGEncoding() const
G4int GetBaryonNumber() const
G4double GetPDGSpin() const
void SetSpinZ(G4double aSpinZ)
void Set4Momentum(const G4LorentzVector &aMomentum)
void DefineMomentumInZ(G4double aLightConeMomentum, G4bool aDirection)
void SetPosition(const G4ThreeVector &aPosition)
void SetColour(G4int aColour)
const G4LorentzVector & Get4Momentum() const
static G4PionMinus * PionMinus()
static G4PionMinus * PionMinusDefinition()
static G4PionPlus * PionPlusDefinition()
static G4PionZero * PionZeroDefinition()
virtual ~G4QGSMSplitableHadron()
G4ParticleDefinition * GetDefinition() const
const G4LorentzVector & Get4Momentum() const
const G4ThreeVector & GetPosition() const
G4int GetSoftCollisionCount()