Import Geant4 10.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-12-09 12:35:28 +01:00
parent 4ec577e5c4
commit a3452e42ac
3514 changed files with 210500 additions and 89628 deletions
@@ -27,12 +27,13 @@
G4ASCCrossSection::
G4ASCCrossSection(G4int aCode1, G4int aCode2, G4double aX, G4double aY,
G4double aEta, G4double aEps)
G4double aEta, G4double aEps)
{
theCode1 = aCode1;
theCode2 = aCode2;
theX = aX;
theY = aY;
theEta = aEta;
theEps = aEps;
theCode1 = aCode1;
theCode2 = aCode2;
theX = aX;
theY = aY;
theEta = aEta;
theEps = aEps;
}
@@ -30,34 +30,35 @@
G4AnnihilationCrossSection::
G4AnnihilationCrossSection()
{
// pi+ p
theDataSets.push_back(new G4ASCCrossSection(211, 2212, 13.7, 27.8, 0.45, 0.079));
// pi+ n
theDataSets.push_back(new G4ASCCrossSection(211, 2112, 13.7, 27.8, 0.45, 0.079));
// pi- p
theDataSets.push_back(new G4ASCCrossSection(-211, 2212, 13.7, 35.9, 0.45, 0.079));
// pi- n
theDataSets.push_back(new G4ASCCrossSection(-211, 2112, 13.7, 35.9, 0.45, 0.079));
// pi0 p
theDataSets.push_back(new G4ASCCrossSection(111, 2212, 13.7, 35.9, 0.45, 0.079));
// pi0 n
theDataSets.push_back(new G4ASCCrossSection(111, 2112, 13.7, 35.9, 0.45, 0.079));
// K- p
theDataSets.push_back(new G4ASCCrossSection(-321, 2212, 12.2, 26.4, 0.50, 0.079));
// K- n
theDataSets.push_back(new G4ASCCrossSection(-321, 2112, 12.2, 26.4, 0.50, 0.079));
// K0 p
theDataSets.push_back(new G4ASCCrossSection(-311, 2212, 12.2, 26.4, 0.50, 0.079));
// K0 n
theDataSets.push_back(new G4ASCCrossSection(-311, 2112, 12.2, 26.4, 0.50, 0.079));
// p- p
theDataSets.push_back(new G4ASCCrossSection(-2212, 2212, 22.0, 98.2, 0.46, 0.079));
// p- n
theDataSets.push_back(new G4ASCCrossSection(-2212, 2112, 22.3, 92.7, 0.46, 0.079));
// n- n
theDataSets.push_back(new G4ASCCrossSection(-2112, 2112, 22.0, 98.2, 0.46, 0.079));
// n- p
theDataSets.push_back(new G4ASCCrossSection(-2112, 2212, 22.3, 92.7, 0.46, 0.079));
// gamma+n and gamma+p
theDataSets.push_back(new G4GammaAnnCrossSection);
// pi+ p
theDataSets.push_back(new G4ASCCrossSection(211, 2212, 13.7, 27.8, 0.45, 0.079));
// pi+ n
theDataSets.push_back(new G4ASCCrossSection(211, 2112, 13.7, 27.8, 0.45, 0.079));
// pi- p
theDataSets.push_back(new G4ASCCrossSection(-211, 2212, 13.7, 35.9, 0.45, 0.079));
// pi- n
theDataSets.push_back(new G4ASCCrossSection(-211, 2112, 13.7, 35.9, 0.45, 0.079));
// pi0 p
theDataSets.push_back(new G4ASCCrossSection(111, 2212, 13.7, 35.9, 0.45, 0.079));
// pi0 n
theDataSets.push_back(new G4ASCCrossSection(111, 2112, 13.7, 35.9, 0.45, 0.079));
// K- p
theDataSets.push_back(new G4ASCCrossSection(-321, 2212, 12.2, 26.4, 0.50, 0.079));
// K- n
theDataSets.push_back(new G4ASCCrossSection(-321, 2112, 12.2, 26.4, 0.50, 0.079));
// K0 p
theDataSets.push_back(new G4ASCCrossSection(-311, 2212, 12.2, 26.4, 0.50, 0.079));
// K0 n
theDataSets.push_back(new G4ASCCrossSection(-311, 2112, 12.2, 26.4, 0.50, 0.079));
// p- p
theDataSets.push_back(new G4ASCCrossSection(-2212, 2212, 22.0, 98.2, 0.46, 0.079));
// p- n
theDataSets.push_back(new G4ASCCrossSection(-2212, 2112, 22.3, 92.7, 0.46, 0.079));
// n- n
theDataSets.push_back(new G4ASCCrossSection(-2112, 2112, 22.0, 98.2, 0.46, 0.079));
// n- p
theDataSets.push_back(new G4ASCCrossSection(-2112, 2212, 22.3, 92.7, 0.46, 0.079));
// gamma+n and gamma+p
theDataSets.push_back(new G4GammaAnnCrossSection);
}
@@ -33,58 +33,56 @@
G4BaryonSplitter::
G4BaryonSplitter()
{
theBaryons.insert(new G4SPBaryon(G4Proton::Proton()));
theBaryons.insert(new G4SPBaryon(G4Neutron::Neutron()));
theBaryons.insert(new G4SPBaryon(G4AntiProton::AntiProton()));
theBaryons.insert(new G4SPBaryon(G4AntiNeutron::AntiNeutron()));
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(2224))); // D++
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(2214))); // D+
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(2114))); // D0
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(1114))); // D-
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(-2224))); // anti D++
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(-2214))); // anti D+
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(-2114))); // anti D0
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(-1114))); // anti D-
theBaryons.insert(new G4SPBaryon(G4Lambda::Lambda()));
theBaryons.insert(new G4SPBaryon(G4AntiLambda::AntiLambda()));
theBaryons.insert(new G4SPBaryon(G4SigmaPlus::SigmaPlus()));
theBaryons.insert(new G4SPBaryon(G4SigmaZero::SigmaZero()));
theBaryons.insert(new G4SPBaryon(G4SigmaMinus::SigmaMinus()));
theBaryons.insert(new G4SPBaryon(G4AntiSigmaPlus::AntiSigmaPlus()));
theBaryons.insert(new G4SPBaryon(G4AntiSigmaZero::AntiSigmaZero()));
theBaryons.insert(new G4SPBaryon(G4AntiSigmaMinus::AntiSigmaMinus()));
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(3224))); // S+*
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(3214))); // S0*
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(3114))); // S-*
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(-3224))); // anti S+*
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(-3214))); // anti S0*
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(-3114))); // anti S-*
theBaryons.insert(new G4SPBaryon(G4XiMinus::XiMinus()));
theBaryons.insert(new G4SPBaryon(G4XiZero::XiZero()));
theBaryons.insert(new G4SPBaryon(G4AntiXiMinus::AntiXiMinus()));
theBaryons.insert(new G4SPBaryon(G4AntiXiZero::AntiXiZero()));
theBaryons.insert(new G4SPBaryon(G4OmegaMinus::OmegaMinus()));
theBaryons.insert(new G4SPBaryon(G4AntiOmegaMinus::AntiOmegaMinus()));
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(3324))); // X0*
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(3314))); // X-*
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(-3324))); // anti X0*
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(-3314))); // anti X-*
theBaryons.insert(new G4SPBaryon(G4Proton::Proton()));
theBaryons.insert(new G4SPBaryon(G4Neutron::Neutron()));
theBaryons.insert(new G4SPBaryon(G4AntiProton::AntiProton()));
theBaryons.insert(new G4SPBaryon(G4AntiNeutron::AntiNeutron()));
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(2224))); // D++
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(2214))); // D+
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(2114))); // D0
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(1114))); // D-
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(-2224))); // anti D++
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(-2214))); // anti D+
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(-2114))); // anti D0
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(-1114))); // anti D-
theBaryons.insert(new G4SPBaryon(G4Lambda::Lambda()));
theBaryons.insert(new G4SPBaryon(G4AntiLambda::AntiLambda()));
theBaryons.insert(new G4SPBaryon(G4SigmaPlus::SigmaPlus()));
theBaryons.insert(new G4SPBaryon(G4SigmaZero::SigmaZero()));
theBaryons.insert(new G4SPBaryon(G4SigmaMinus::SigmaMinus()));
theBaryons.insert(new G4SPBaryon(G4AntiSigmaPlus::AntiSigmaPlus()));
theBaryons.insert(new G4SPBaryon(G4AntiSigmaZero::AntiSigmaZero()));
theBaryons.insert(new G4SPBaryon(G4AntiSigmaMinus::AntiSigmaMinus()));
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(3224))); // S+*
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(3214))); // S0*
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(3114))); // S-*
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(-3224))); // anti S+*
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(-3214))); // anti S0*
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(-3114))); // anti S-*
theBaryons.insert(new G4SPBaryon(G4XiMinus::XiMinus()));
theBaryons.insert(new G4SPBaryon(G4XiZero::XiZero()));
theBaryons.insert(new G4SPBaryon(G4AntiXiMinus::AntiXiMinus()));
theBaryons.insert(new G4SPBaryon(G4AntiXiZero::AntiXiZero()));
theBaryons.insert(new G4SPBaryon(G4OmegaMinus::OmegaMinus()));
theBaryons.insert(new G4SPBaryon(G4AntiOmegaMinus::AntiOmegaMinus()));
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(3324))); // X0*
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(3314))); // X-*
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(-3324))); // anti X0*
theBaryons.insert(new G4SPBaryon(G4ParticleTable::GetParticleTable()->FindParticle(-3314))); // anti X-*
}
G4bool G4BaryonSplitter::
SplitBarion(G4int PDGCode, G4int* q_or_qqbar, G4int* qbar_or_qq)
{
const G4SPBaryon * aBaryon = theBaryons.GetBaryon(G4ParticleTable::GetParticleTable()->FindParticle(PDGCode));
const G4SPBaryon * aBaryon = theBaryons.GetBaryon(G4ParticleTable::GetParticleTable()->FindParticle(PDGCode));
if(aBaryon==NULL)
{
return FALSE;
}
else
{
aBaryon->SampleQuarkAndDiquark(*q_or_qqbar, *qbar_or_qq);
return TRUE;
}
if(aBaryon==NULL)
{
return FALSE;
} else {
aBaryon->SampleQuarkAndDiquark(*q_or_qqbar, *qbar_or_qq);
return TRUE;
}
}
@@ -92,7 +90,7 @@ SplitBarion(G4int PDGCode, G4int* q_or_qqbar, G4int* qbar_or_qq)
const G4SPBaryon & G4BaryonSplitter::
GetSPBaryon(G4int PDGCode)
{
return *theBaryons.GetBaryon(G4ParticleTable::GetParticleTable()->FindParticle(PDGCode));
return *theBaryons.GetBaryon(G4ParticleTable::GetParticleTable()->FindParticle(PDGCode));
}
@@ -100,12 +98,12 @@ GetSPBaryon(G4int PDGCode)
G4bool G4BaryonSplitter::
FindDiquark(G4int PDGCode, G4int Quark, G4int* Diquark)
{
const G4SPBaryon * aBaryon = theBaryons.GetBaryon(G4ParticleTable::GetParticleTable()->FindParticle(PDGCode));
if(aBaryon)
{
aBaryon->FindDiquark(Quark, *Diquark);
return true;
}
return false;
const G4SPBaryon * aBaryon = theBaryons.GetBaryon(G4ParticleTable::GetParticleTable()->FindParticle(PDGCode));
if(aBaryon)
{
aBaryon->FindDiquark(Quark, *Diquark);
return true;
}
return false;
}
@@ -39,5 +39,6 @@ G4DiffractiveStringBuilder::~G4DiffractiveStringBuilder()
G4ExcitedString* G4DiffractiveStringBuilder::BuildString(G4PartonPair * aPair)
{
return new G4ExcitedString(aPair->GetParton1(), aPair->GetParton2(), aPair->GetDirection());
return new G4ExcitedString(aPair->GetParton1(), aPair->GetParton2(), aPair->GetDirection());
}
@@ -29,44 +29,45 @@
G4GammaAnnCrossSection::
G4GammaAnnCrossSection()
{
// pho0 Nucleon
theGammaNucXSections.push_back(new G4ASCCrossSection(113, 2212, 13.7, 35.9, 0.45, 0.079));
// omega0 Nucleon
theGammaNucXSections.push_back(new G4ASCCrossSection(223, 2212, 13.7, 35.9, 0.45, 0.079));
// phi0 Nucleon
theGammaNucXSections.push_back(new G4ASCCrossSection(333, 2212, 12.2, 26.4, 0.50, 0.079));
// pho0 Nucleon
theGammaNucXSections.push_back(new G4ASCCrossSection(113, 2212, 13.7, 35.9, 0.45, 0.079));
// omega0 Nucleon
theGammaNucXSections.push_back(new G4ASCCrossSection(223, 2212, 13.7, 35.9, 0.45, 0.079));
// phi0 Nucleon
theGammaNucXSections.push_back(new G4ASCCrossSection(333, 2212, 12.2, 26.4, 0.50, 0.079));
}
G4bool G4GammaAnnCrossSection::
InCharge(G4int aCode, G4int bCode)
{
G4bool result = false;
if(aCode==G4Gamma::Gamma()->GetPDGEncoding())
{
result=true;
}
else if(bCode==G4Gamma::Gamma()->GetPDGEncoding())
{
result = true;
}
return result;
G4bool result = false;
if(aCode==G4Gamma::Gamma()->GetPDGEncoding())
{
result=true;
}
else if(bCode==G4Gamma::Gamma()->GetPDGEncoding())
{
result = true;
}
return result;
}
G4double G4GammaAnnCrossSection::
GetXsec(G4double S)
{
G4double result = 0;
// ratios from Phys.Lett.B40:121-126,1972; 22% assigned to higher resonances
G4double result = 0;
// ratios from Phys.Lett.B40:121-126,1972; 22% assigned to higher resonances
typedef std::vector<G4ASCCrossSection*>::iterator iter;
iter i;
for(i=theGammaNucXSections.begin(); i!=theGammaNucXSections.end(); i++)
{
result += (*i)->GetXsec(S);
}
typedef std::vector<G4ASCCrossSection*>::iterator iter;
iter i;
for(i=theGammaNucXSections.begin(); i!=theGammaNucXSections.end(); i++)
{
result += (*i)->GetXsec(S);
}
// Account for higher resonances.
result /= 0.78;
// Account for higher resonances.
result /= 0.78;
return result;
return result;
}
@@ -39,102 +39,69 @@
G4VSplitableHadron* G4GammaParticipants::SelectInteractions(const G4ReactionProduct &thePrimary)
{
// Check reaction threshold - goes to CheckThreshold
// Check reaction threshold - goes to CheckThreshold
G4VSplitableHadron* aProjectile = new G4QGSMSplitableHadron(thePrimary, TRUE); // @@@ check the TRUE
theProjectileSplitable = new G4QGSMSplitableHadron(thePrimary, TRUE); // @@@ check the TRUE
theProjectileSplitable->SetStatus(1); // Uzhi 21.05.2015
const std::vector<G4Nucleon>& theTargetNuc = theNucleus->GetNucleons();
G4LorentzVector aPrimaryMomentum(thePrimary.GetMomentum(), thePrimary.GetTotalEnergy());
if((!(aPrimaryMomentum.e()>-1)) && (!(aPrimaryMomentum.e()<1)) )
{
throw G4HadronicException(__FILE__, __LINE__,
"G4GammaParticipants::SelectInteractions: primary nan energy.");
}
G4double S = (aPrimaryMomentum + theTargetNuc[0].Get4Momentum()).mag2();
G4double ThresholdMass = thePrimary.GetMass() + theTargetNuc[0].GetDefinition()->GetPDGMass();
ModelMode = SOFT;
if (sqr(ThresholdMass + ThresholdParameter) > S)
{
ModelMode = DIFFRACTIVE;
//throw G4HadronicException(__FILE__, __LINE__,
// "Initial energy is too low. The 4-vectors of the input are inconsistant with the particle masses.");
}
if (sqr(ThresholdMass + QGSMThreshold) > S) // thus only diffractive in cascade!
{
ModelMode = DIFFRACTIVE;
}
G4LorentzVector aPrimaryMomentum(thePrimary.GetMomentum(), thePrimary.GetTotalEnergy());
G4LorentzVector aTargetNMomentum(0.,0.,0.,938.);
if((!(aPrimaryMomentum.e()>-1)) && (!(aPrimaryMomentum.e()<1)) )
{
throw G4HadronicException(__FILE__, __LINE__,
"G4GammaParticipants::SelectInteractions: primary nan energy.");
}
G4double S = (aPrimaryMomentum + aTargetNMomentum).mag2();
G4double ThresholdMass = thePrimary.GetMass() + 938.;
ModelMode = SOFT;
if (sqr(ThresholdMass + ThresholdParameter) > S)
{
ModelMode = DIFFRACTIVE;
//throw G4HadronicException(__FILE__, __LINE__, "Initial energy is too low. The 4-vectors of the input are inconsistant with the particle masses.");
}
if (sqr(ThresholdMass + QGSMThreshold) > S) // thus only diffractive in cascade!
{
ModelMode = DIFFRACTIVE;
}
// first find the collisions HPW
std::for_each(theInteractions.begin(), theInteractions.end(), DeleteInteractionContent());
theInteractions.clear();
G4int totalCuts = 0;
// first find the collisions HPW
std::for_each(theInteractions.begin(), theInteractions.end(), DeleteInteractionContent());
theInteractions.clear();
G4int totalCuts = 0;
#ifdef debug_G4GammaParticipants
G4double eK = thePrimary.GetKineticEnergy()/GeV;
G4int nucleonCount = theTargetNuc.size(); // debug
#endif
#ifdef debug_G4GammaParticipants
G4double eK = thePrimary.GetKineticEnergy()/GeV;
G4int nucleonCount = theNucleus->GetMassNumber();
#endif
G4int theCurrent = G4int(theNucleus->GetMassNumber()*G4UniformRand());
G4int NucleonNo=0;
theNucleus->StartLoop();
G4Nucleon * pNucleon =0; // theNucleus->GetNextNucleon(); // Uzhi 27.05.2015
while( (pNucleon = theNucleus->GetNextNucleon()) ) /* Loop checking, 07.08.2015, A.Ribon */
{if(NucleonNo == theCurrent) break; NucleonNo++;}
if ( pNucleon ) {
G4QGSMSplitableHadron* aTarget = new G4QGSMSplitableHadron(*pNucleon);
pNucleon->Hit(aTarget);
if ( (0.06 > G4UniformRand() &&(ModelMode==SOFT)) || (ModelMode==DIFFRACTIVE ) )
{
/*
// diffractive interaction occurs
if(IsSingleDiffractive())
{
theSingleDiffExcitation.ExciteParticipants(aProjectile, aTarget);
}
else
{
theDiffExcitaton.ExciteParticipants(aProjectile, aTarget);
}
*/
G4InteractionContent * aInteraction = new G4InteractionContent(theProjectileSplitable);
theProjectileSplitable->SetStatus(1*theProjectileSplitable->GetStatus());
aInteraction->SetTarget(aTarget);
aInteraction->SetTargetNucleon(pNucleon);
aTarget->SetCollisionCount(0);
aTarget->SetStatus(1);
aInteraction->SetNumberOfDiffractiveCollisions(1);
aInteraction->SetNumberOfSoftCollisions(0);
aInteraction->SetStatus(1);
theInteractions.push_back(aInteraction);
totalCuts += 1;
}
else
{
// nondiffractive soft interaction occurs
aTarget->IncrementCollisionCount(1);
aTarget->SetStatus(0);
theTargets.push_back(aTarget);
theProjectileSplitable->IncrementCollisionCount(1);
theProjectileSplitable->SetStatus(0*theProjectileSplitable->GetStatus());
G4InteractionContent * aInteraction =
new G4InteractionContent(theProjectileSplitable);
aInteraction->SetTarget(aTarget);
aInteraction->SetTargetNucleon(pNucleon);
aInteraction->SetNumberOfSoftCollisions(1);
aInteraction->SetStatus(0);
theInteractions.push_back(aInteraction);
totalCuts += 1;
}
}
return theProjectileSplitable; //aProjectile;
G4int theCurrent = static_cast<G4int> (theTargetNuc.size()*G4UniformRand());
const G4Nucleon& pNucleon = theTargetNuc[theCurrent];
G4QGSMSplitableHadron* aTarget = new G4QGSMSplitableHadron(pNucleon);
theTargets.push_back(aTarget);
const_cast<G4Nucleon&>(pNucleon).Hit(aTarget);
if ( (0.06 > G4UniformRand() &&(ModelMode==SOFT)) || (ModelMode==DIFFRACTIVE ) )
{
// diffractive interaction occurs
if(IsSingleDiffractive())
{
theSingleDiffExcitation.ExciteParticipants(aProjectile, aTarget);
} else {
theDiffExcitaton.ExciteParticipants(aProjectile, aTarget);
}
G4InteractionContent * aInteraction = new G4InteractionContent(aProjectile);
aInteraction->SetTarget(aTarget);
theInteractions.push_back(aInteraction);
aInteraction->SetNumberOfDiffractiveCollisions(1);
totalCuts += 1;
} else {
// nondiffractive soft interaction occurs
aTarget->IncrementCollisionCount(1);
aProjectile->IncrementCollisionCount(1);
G4InteractionContent * aInteraction = new G4InteractionContent(aProjectile);
aInteraction->SetTarget(aTarget);
aInteraction->SetNumberOfSoftCollisions(1);
theInteractions.push_back(aInteraction);
totalCuts += 1;
}
return aProjectile;
}
@@ -28,27 +28,26 @@
G4bool G4MesonSplitter::SplitMeson(G4int PDGcode, G4int* aEnd, G4int* bEnd)
{
G4bool result = true;
G4int absPDGcode = std::abs(PDGcode);
if (absPDGcode >= 1000) return false;
if(absPDGcode == 22)
{
G4int it=1;
if(G4UniformRand()<.5) it++;
*aEnd = it;
*bEnd = -it;
}
else
{
G4int heavy = absPDGcode/100;
G4int light = (absPDGcode%100)/10;
G4int anti = 1 - 2*(std::max(heavy, light)%2);
if (PDGcode < 0 ) anti = -anti;
heavy *= anti;
light *= -anti;
if ( anti < 0) G4SwapObj(&heavy, &light);
*aEnd = heavy;
*bEnd = light;
}
return result;
G4bool result = true;
G4int absPDGcode = std::abs(PDGcode);
if (absPDGcode >= 1000) return false;
if(absPDGcode == 22)
{
G4int it=1;
if(G4UniformRand()<.5) it++;
*aEnd = it;
*bEnd = -it;
} else {
G4int heavy = absPDGcode/100;
G4int light = (absPDGcode%100)/10;
G4int anti = 1 - 2*(std::max(heavy, light)%2);
if (PDGcode < 0 ) anti = -anti;
heavy *= anti;
light *= -anti;
if ( anti < 0) G4SwapObj(&heavy, &light);
*aEnd = heavy;
*bEnd = light;
}
return result;
}
@@ -29,35 +29,35 @@
//#define DEBUG_PartonPair 1
G4PartonPair::G4PartonPair(G4Parton* P1, G4Parton* P2, G4int Type, G4int aDirection)
{
CollisionType = Type;
Parton1 = P1;
Parton2 = P2;
Direction = aDirection;
{
CollisionType = Type;
Parton1 = P1;
Parton2 = P2;
Direction = aDirection;
#ifdef DEBUG_PartonPair
G4cout << "ctor G4PartonPair - "
<< (aDirection==PROJECTILE ? "Projectile": "Target")
<< (CollisionType==SOFT ? " Soft " : " Diffractive " ) << G4endl
<< " Parton 1 name, type, spin-3, colour, 4-mom "
<< P1->GetDefinition()->GetParticleName() << ", "
<< P1->GetDefinition()->GetParticleType() << ", "
<< P1->GetSpinZ() << ", "
<< P1->GetColour() << ", "
<< P1->Get4Momentum() << " " << G4endl
<< " Parton 2 name, type, spin-3, colour, 4-mom "
<< P2->GetDefinition()->GetParticleName() << ", "
<< P2->GetDefinition()->GetParticleType() << ", "
<< P2->GetSpinZ() << ", "
<< P2->GetColour() << ", "
<< P2->Get4Momentum() << G4endl
<< " string mass, 4mom "
<< (P1->Get4Momentum()+P2->Get4Momentum()).m() << " "
<< (P1->Get4Momentum()+P2->Get4Momentum()) << G4endl;
#endif
}
#ifdef DEBUG_PartonPair
G4cout << "ctor G4PartonPair - "
<< (aDirection==PROJECTILE ? "Projectile": "Target")
<< (CollisionType==SOFT ? " Soft " : " Diffractive " ) << G4endl
<< " Parton 1 name, type, spin-3, colour, 4-mom "
<< P1->GetDefinition()->GetParticleName() << ", "
<< P1->GetDefinition()->GetParticleType() << ", "
<< P1->GetSpinZ() << ", "
<< P1->GetColour() << ", "
<< P1->Get4Momentum() << " " << G4endl
<< " Parton 2 name, type, spin-3, colour, 4-mom "
<< P2->GetDefinition()->GetParticleName() << ", "
<< P2->GetDefinition()->GetParticleType() << ", "
<< P2->GetSpinZ() << ", "
<< P2->GetColour() << ", "
<< P2->Get4Momentum() << G4endl
<< " string mass, 4mom "
<< (P1->Get4Momentum()+P2->Get4Momentum()).m() << " "
<< (P1->Get4Momentum()+P2->Get4Momentum()) << G4endl;
#endif
}
G4PartonPair::~G4PartonPair()
{
}
{
}
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4QGSDiffractiveExcitation.cc 94750 2015-12-07 08:24:29Z gcosmo $
// $Id: G4QGSDiffractiveExcitation.cc 100828 2016-11-02 15:25:59Z gcosmo $
// ------------------------------------------------------------
// GEANT 4 class implemetation file
//
@@ -60,11 +60,6 @@
#include "G4Log.hh"
#include "G4Pow.hh"
//============================================================================
//#define debugQGSdiffExictation
//============================================================================
G4QGSDiffractiveExcitation::G4QGSDiffractiveExcitation()
{
@@ -78,331 +73,356 @@ G4QGSDiffractiveExcitation::~G4QGSDiffractiveExcitation()
G4bool G4QGSDiffractiveExcitation::
ExciteParticipants(G4VSplitableHadron *projectile, G4VSplitableHadron *target) const
{
G4cout<<"G4QGSDiffractiveExcitation::ExciteParticipants"<<G4endl;
G4cout<<"Proj Targ "<<projectile->GetDefinition()->GetPDGEncoding()<<" "<<target->GetDefinition()->GetPDGEncoding()<<G4endl;
G4LorentzVector Pprojectile=projectile->Get4Momentum();
G4LorentzVector Pprojectile=projectile->Get4Momentum();
// -------------------- Projectile parameters -----------------------------------
G4bool PutOnMassShell=0;
// -------------------- Projectile parameters -----------------------------------
G4bool PutOnMassShell=0;
//G4double M0projectile=projectile->GetDefinition()->GetPDGMass(); // With de-excitation
G4double M0projectile = Pprojectile.mag(); // Without de-excitation
// G4double M0projectile=projectile->GetDefinition()->GetPDGMass(); // With de-excitation
G4double M0projectile = Pprojectile.mag(); // Without de-excitation
if(M0projectile < projectile->GetDefinition()->GetPDGMass())
{
PutOnMassShell=1;
M0projectile=projectile->GetDefinition()->GetPDGMass();
}
if(M0projectile < projectile->GetDefinition()->GetPDGMass())
{
PutOnMassShell=1;
M0projectile=projectile->GetDefinition()->GetPDGMass();
}
G4double Mprojectile2 = M0projectile * M0projectile;
G4double Mprojectile2 = M0projectile * M0projectile;
G4int PDGcode=projectile->GetDefinition()->GetPDGEncoding();
G4int absPDGcode=std::abs(PDGcode);
G4double ProjectileDiffCut;
G4double AveragePt2;
G4int PDGcode=projectile->GetDefinition()->GetPDGEncoding();
G4int absPDGcode=std::abs(PDGcode);
G4double ProjectileDiffCut;
G4double AveragePt2;
if( absPDGcode > 1000 ) //------Projectile is baryon --------
{
ProjectileDiffCut = 1.1; // GeV
AveragePt2 = 0.3; // GeV^2
}
else if( absPDGcode == 211 || PDGcode == 111) //------Projectile is Pion -----------
{
ProjectileDiffCut = 1.0; // GeV
AveragePt2 = 0.3; // GeV^2
}
else if( absPDGcode == 321 || PDGcode == -311) //------Projectile is Kaon -----------
{
ProjectileDiffCut = 1.1; // GeV
AveragePt2 = 0.3; // GeV^2
}
else //------Projectile is undefined, Nucleon assumed
{
ProjectileDiffCut = 1.1; // GeV
AveragePt2 = 0.3; // GeV^2
};
if( absPDGcode > 1000 ) //------Projectile is baryon --------
{
ProjectileDiffCut = 1.1; // GeV
AveragePt2 = 0.3; // GeV^2
}
else if( absPDGcode == 211 || PDGcode == 111) //------Projectile is Pion -----------
{
ProjectileDiffCut = 1.0; // GeV
AveragePt2 = 0.3; // GeV^2
}
else if( absPDGcode == 321 || PDGcode == -311) //------Projectile is Kaon -----------
{
ProjectileDiffCut = 1.1; // GeV
AveragePt2 = 0.3; // GeV^2
}
else //------Projectile is undefined, Nucleon assumed
{
ProjectileDiffCut = 1.1; // GeV
AveragePt2 = 0.3; // GeV^2
};
ProjectileDiffCut = ProjectileDiffCut * GeV;
AveragePt2 = AveragePt2 * GeV*GeV;
ProjectileDiffCut = ProjectileDiffCut * GeV;
AveragePt2 = AveragePt2 * GeV*GeV;
// -------------------- Target parameters ----------------------------------------------
G4LorentzVector Ptarget=target->Get4Momentum();
// -------------------- Target parameters ----------------------------------------------
G4LorentzVector Ptarget=target->Get4Momentum();
G4double M0target = Ptarget.mag();
//G4cout<<"Pr Tr 4-Mom "<<Pprojectile<<" "<<Pprojectile.mag()<<G4endl
// <<" "<<Ptarget <<" "<<Ptarget.mag() <<G4endl;
if(M0target < target->GetDefinition()->GetPDGMass())
{
PutOnMassShell=1;
M0target=target->GetDefinition()->GetPDGMass();
}
G4double M0target = Ptarget.mag();
G4double Mtarget2 = M0target * M0target; //Ptarget.mag2(); // for AA-inter.
if(M0target < target->GetDefinition()->GetPDGMass())
{
PutOnMassShell=1;
M0target=target->GetDefinition()->GetPDGMass();
}
G4double NuclearNucleonDiffCut = 1.1*GeV;
G4double Mtarget2 = M0target * M0target; //Ptarget.mag2(); // for AA-inter.
G4double ProjectileDiffCut2 = ProjectileDiffCut * ProjectileDiffCut;
G4double NuclearNucleonDiffCut2 = NuclearNucleonDiffCut * NuclearNucleonDiffCut;
G4double NuclearNucleonDiffCut = 1.1*GeV;
// Transform momenta to cms and then rotate parallel to z axis;
G4double ProjectileDiffCut2 = ProjectileDiffCut * ProjectileDiffCut;
G4double NuclearNucleonDiffCut2 = NuclearNucleonDiffCut * NuclearNucleonDiffCut;
G4LorentzVector Psum;
Psum=Pprojectile+Ptarget;
// Transform momenta to cms and then rotate parallel to z axis;
G4LorentzRotation toCms(-1*Psum.boostVector());
G4LorentzVector Psum;
Psum=Pprojectile+Ptarget;
G4LorentzVector Ptmp=toCms*Pprojectile;
G4LorentzRotation toCms(-1*Psum.boostVector());
if ( Ptmp.pz() <= 0. )
{
// "String" moving backwards in CMS, abort collision !!
//G4cout << " abort Collision!! " << G4endl;
return false;
}
G4LorentzVector Ptmp=toCms*Pprojectile;
toCms.rotateZ(-1*Ptmp.phi());
toCms.rotateY(-1*Ptmp.theta());
if ( Ptmp.pz() <= 0. )
{
// "String" moving backwards in CMS, abort collision !!
//G4cout << " abort Collision!! " << G4endl;
return false;
}
G4LorentzRotation toLab(toCms.inverse());
toCms.rotateZ(-1*Ptmp.phi());
toCms.rotateY(-1*Ptmp.theta());
Pprojectile.transform(toCms);
Ptarget.transform(toCms);
G4LorentzRotation toLab(toCms.inverse());
G4double Pt2;
G4double ProjMassT2, ProjMassT;
G4double TargMassT2, TargMassT;
G4double PZcms2, PZcms;
G4double PMinusNew, TPlusNew;
Pprojectile.transform(toCms);
Ptarget.transform(toCms);
G4double S=Psum.mag2();
G4double SqrtS=std::sqrt(S);
G4double Pt2;
G4double ProjMassT2, ProjMassT;
G4double TargMassT2, TargMassT;
G4double PZcms2, PZcms;
G4double PMinusNew, TPlusNew;
if(SqrtS < 2200*MeV) {return false;} // The model cannot work for pp-interactions
// at Plab < 1.3 GeV/c. Uzhi
G4double S=Psum.mag2();
G4double SqrtS=std::sqrt(S);
PZcms2=(S*S+Mprojectile2*Mprojectile2+Mtarget2*Mtarget2-
2*S*Mprojectile2-2*S*Mtarget2-2*Mprojectile2*Mtarget2)/4./S;
if(PZcms2 < 0)
{return false;} // It can be in an interaction with off-shell nuclear nucleon
if(SqrtS < 2200*MeV) {return false;} // The model cannot work for pp-interactions
// at Plab < 1.3 GeV/c. Uzhi
PZcms = std::sqrt(PZcms2);
PZcms2=(S*S+Mprojectile2*Mprojectile2+Mtarget2*Mtarget2-
2*S*Mprojectile2-2*S*Mtarget2-2*Mprojectile2*Mtarget2)/4./S;
if(PZcms2 < 0)
{return false;} // It can be in an interaction with off-shell nuclear nucleon
if(PutOnMassShell)
{
if(Pprojectile.z() > 0.)
{
Pprojectile.setPz( PZcms);
Ptarget.setPz( -PZcms);
} else
{
Pprojectile.setPz(-PZcms);
Ptarget.setPz( PZcms);
};
PZcms = std::sqrt(PZcms2);
Pprojectile.setE(std::sqrt(Mprojectile2+
Pprojectile.x()*Pprojectile.x()+
Pprojectile.y()*Pprojectile.y()+
PZcms2));
Ptarget.setE(std::sqrt( Mtarget2 +
Ptarget.x()*Ptarget.x()+
Ptarget.y()*Ptarget.y()+
PZcms2));
}
if(PutOnMassShell)
{
if(Pprojectile.z() > 0.)
{
Pprojectile.setPz( PZcms);
Ptarget.setPz( -PZcms);
}
else
{
Pprojectile.setPz(-PZcms);
Ptarget.setPz( PZcms);
};
G4double maxPtSquare = PZcms2;
Pprojectile.setE(std::sqrt(Mprojectile2+
Pprojectile.x()*Pprojectile.x()+
Pprojectile.y()*Pprojectile.y()+
PZcms2));
Ptarget.setE(std::sqrt( Mtarget2 +
Ptarget.x()*Ptarget.x()+
Ptarget.y()*Ptarget.y()+
PZcms2));
}
//G4cout << "Pprojectile aft boost : " << Pprojectile << G4endl;
//G4cout << "Ptarget aft boost : " << Ptarget << G4endl;
// G4cout << "cms aft boost : " << (Pprojectile+ Ptarget) << G4endl;
// G4cout << " Projectile Xplus / Xminus : " <<
// Pprojectile.plus() << " / " << Pprojectile.minus() << G4endl;
// G4cout << " Target Xplus / Xminus : " <<
// Ptarget.plus() << " / " << Ptarget.minus() << G4endl;
G4double maxPtSquare = PZcms2;
G4LorentzVector Qmomentum;
G4double Qminus, Qplus;
//G4cout << "Pprojectile aft boost : " << Pprojectile << G4endl;
//G4cout << "Ptarget aft boost : " << Ptarget << G4endl;
// G4cout << "cms aft boost : " << (Pprojectile+ Ptarget) << G4endl;
G4int whilecount=0;
do {
// Generate pt
// G4cout << " Projectile Xplus / Xminus : " <<
// Pprojectile.plus() << " / " << Pprojectile.minus() << G4endl;
// G4cout << " Target Xplus / Xminus : " <<
// Ptarget.plus() << " / " << Ptarget.minus() << G4endl;
if (whilecount++ >= 500 && (whilecount%100)==0)
//G4cout << "G4QGSDiffractiveExcitation::ExciteParticipants possibly looping"
// << ", loop count/ maxPtSquare : "
// << whilecount << " / " << maxPtSquare << G4endl;
G4LorentzVector Qmomentum;
G4double Qminus, Qplus;
if (whilecount > 1000 )
{
Qmomentum=G4LorentzVector(0.,0.,0.,0.);
return false; // Ignore this interaction
}
G4int whilecount=0;
do {
if (whilecount++ >= 500 && (whilecount%100)==0)
// G4cout << "G4QGSDiffractiveExcitation::ExciteParticipants possibly looping"
// << ", loop count/ maxPtSquare : "
// << whilecount << " / " << maxPtSquare << G4endl;
if (whilecount > 1000 )
{
Qmomentum=G4LorentzVector(0.,0.,0.,0.);
return false; // Ignore this interaction
}
Qmomentum=G4LorentzVector(GaussianPt(AveragePt2,maxPtSquare),0);
// Generate pt
Qmomentum=G4LorentzVector(GaussianPt(AveragePt2,maxPtSquare),0);
//G4cout << "generated Pt " << Qmomentum << G4endl;
//G4cout << "Pprojectile with pt : " << Pprojectile+Qmomentum << G4endl;
//G4cout << "Ptarget with pt : " << Ptarget-Qmomentum << G4endl;
Pt2=G4ThreeVector(Qmomentum.vect()).mag2();
ProjMassT2=Mprojectile2+Pt2;
ProjMassT =std::sqrt(ProjMassT2);
// Momentum transfer
/*
G4double Xmin = minmass / ( Pprojectile.e() + Ptarget.e() );
G4double Xmax=1.;
G4double Xplus =ChooseX(Xmin,Xmax);
G4double Xminus=ChooseX(Xmin,Xmax);
TargMassT2=Mtarget2+Pt2;
TargMassT =std::sqrt(TargMassT2);
//G4cout << " X-plus " << Xplus << G4endl;
//G4cout << " X-minus " << Xminus << G4endl;
PZcms2=(S*S+ProjMassT2*ProjMassT2+
TargMassT2*TargMassT2-
2.*S*ProjMassT2-2.*S*TargMassT2-
2.*ProjMassT2*TargMassT2)/4./S;
if(PZcms2 < 0 ) {PZcms2=0;};
PZcms =std::sqrt(PZcms2);
G4double pt2=G4ThreeVector(Qmomentum.vect()).mag2();
G4double Qplus =-1 * pt2 / Xminus/Ptarget.minus();
G4double Qminus= pt2 / Xplus /Pprojectile.plus();
*/
G4double PMinusMin=std::sqrt(ProjMassT2+PZcms2)-PZcms;
G4double PMinusMax=SqrtS-TargMassT;
Pt2=G4ThreeVector(Qmomentum.vect()).mag2();
ProjMassT2=Mprojectile2+Pt2;
ProjMassT =std::sqrt(ProjMassT2);
PMinusNew=ChooseP(PMinusMin,PMinusMax);
Qminus=PMinusNew-Pprojectile.minus();
TargMassT2=Mtarget2+Pt2;
TargMassT =std::sqrt(TargMassT2);
G4double TPlusMin=std::sqrt(TargMassT2+PZcms2)-PZcms;
G4double TPlusMax=SqrtS-ProjMassT;
PZcms2=(S*S+ProjMassT2*ProjMassT2+
TargMassT2*TargMassT2-
2.*S*ProjMassT2-2.*S*TargMassT2-
2.*ProjMassT2*TargMassT2)/4./S;
if(PZcms2 < 0 ) {PZcms2=0;};
PZcms =std::sqrt(PZcms2);
TPlusNew=ChooseP(TPlusMin, TPlusMax);
Qplus=-(TPlusNew-Ptarget.plus());
G4double PMinusMin=std::sqrt(ProjMassT2+PZcms2)-PZcms;
G4double PMinusMax=SqrtS-TargMassT;
Qmomentum.setPz( (Qplus-Qminus)/2 );
Qmomentum.setE( (Qplus+Qminus)/2 );
PMinusNew=ChooseP(PMinusMin,PMinusMax);
Qminus=PMinusNew-Pprojectile.minus();
//G4cout << "Qplus / Qminus " << Qplus << " / " << Qminus<<G4endl;
// G4cout << "pt2" << pt2 << G4endl;
// G4cout << "Qmomentum " << Qmomentum << G4endl;
// G4cout << " Masses (P/T) : " << (Pprojectile+Qmomentum).mag() <<
// " / " << (Ptarget-Qmomentum).mag() << G4endl;
/* // Uzhi
} while ( (Pprojectile+Qmomentum).mag2() <= Mprojectile2 ||
G4double TPlusMin=std::sqrt(TargMassT2+PZcms2)-PZcms;
G4double TPlusMax=SqrtS-ProjMassT;
TPlusNew=ChooseP(TPlusMin, TPlusMax);
Qplus=-(TPlusNew-Ptarget.plus());
Qmomentum.setPz( (Qplus-Qminus)/2 );
Qmomentum.setE( (Qplus+Qminus)/2 );
//G4cout << "Qplus / Qminus " << Qplus << " / " << Qminus<<G4endl;
//G4cout << "pt2" << pt2 << G4endl;
//G4cout << "Qmomentum " << Qmomentum << G4endl;
//G4cout << " Masses (P/T) : " << (Pprojectile+Qmomentum).mag() <<
// " / " << (Ptarget-Qmomentum).mag() << G4endl;
/*
} while ( (Pprojectile+Qmomentum).mag2() <= Mprojectile2 ||
(Ptarget-Qmomentum).mag2() <= Mtarget2 );
*/ // Uzhi *
*/
} while ( /* Loop checking, 26.10.2015, A.Ribon */
( (Pprojectile+Qmomentum).mag2() < Mprojectile2 || // No without excitation
(Ptarget -Qmomentum).mag2() < Mtarget2 ) ||
( (Pprojectile+Qmomentum).mag2() < ProjectileDiffCut2 && // No double Diffraction
(Ptarget -Qmomentum).mag2() < NuclearNucleonDiffCut2) );
if((Ptarget-Qmomentum).mag2() < NuclearNucleonDiffCut2) // Uzhi Projectile diffraction
{
G4double TMinusNew=SqrtS-PMinusNew;
Qminus=Ptarget.minus()-TMinusNew;
TPlusNew=TargMassT2/TMinusNew;
Qplus=Ptarget.plus()-TPlusNew;
} while (( (Pprojectile+Qmomentum).mag2() < Mprojectile2 || // Uzhi No without excitation
(Ptarget -Qmomentum).mag2() < Mtarget2 ) || // Uzhi
( (Pprojectile+Qmomentum).mag2() < ProjectileDiffCut2 && // Uzhi No double Diffraction
(Ptarget -Qmomentum).mag2() < NuclearNucleonDiffCut2) ); /* Loop checking, 07.08.2015, A.Ribon */
Qmomentum.setPz( (Qplus-Qminus)/2 );
Qmomentum.setE( (Qplus+Qminus)/2 );
}
else if((Pprojectile+Qmomentum).mag2() < ProjectileDiffCut2) // Uzhi Target diffraction
{
G4double PPlusNew=SqrtS-TPlusNew;
Qplus=PPlusNew-Pprojectile.plus();
PMinusNew=ProjMassT2/PPlusNew;
Qminus=PMinusNew-Pprojectile.minus();
//G4cout<<"(Ptarget-Qmomentum).mag2() < NuclearNucleonDiffCut2 "<<(Ptarget-Qmomentum).mag2() <<" "<<NuclearNucleonDiffCut2<<G4endl;
//G4cout<<"(Pprojectile+Qmomentum).mag2() < ProjectileDiffCut2 "<<(Pprojectile+Qmomentum).mag2()<<" "<< ProjectileDiffCut2<<G4endl;
if((Ptarget-Qmomentum).mag2() < NuclearNucleonDiffCut2) // Uzhi Projectile diffraction
{
G4double TMinusNew=SqrtS-PMinusNew;
Qminus=Ptarget.minus()-TMinusNew;
TPlusNew=TargMassT2/TMinusNew;
Qplus=Ptarget.plus()-TPlusNew;
Qmomentum.setPz( (Qplus-Qminus)/2 );
Qmomentum.setE( (Qplus+Qminus)/2 );
};
Qmomentum.setPz( (Qplus-Qminus)/2 );
Qmomentum.setE( (Qplus+Qminus)/2 );
}
else if((Pprojectile+Qmomentum).mag2() < ProjectileDiffCut2) // Uzhi Target diffraction
{
G4double PPlusNew=SqrtS-TPlusNew;
Qplus=PPlusNew-Pprojectile.plus();
PMinusNew=ProjMassT2/PPlusNew;
Qminus=PMinusNew-Pprojectile.minus();
Pprojectile += Qmomentum;
Ptarget -= Qmomentum;
Qmomentum.setPz( (Qplus-Qminus)/2 );
Qmomentum.setE( (Qplus+Qminus)/2 );
};
// Vova
Pprojectile += Qmomentum;
Ptarget -= Qmomentum;
/*
Pprojectile.setPz(0.);
Pprojectile.setE(SqrtS-M0target);
Ptarget.setPz(0.);
Ptarget.setE(M0target);
*/
// Transform back and update SplitableHadron Participant.
Pprojectile.transform(toLab);
Ptarget.transform(toLab);
//G4cout << "Pprojectile with Q : " << Pprojectile << G4endl;
//G4cout << "Ptarget with Q : " << Ptarget << G4endl;
//G4cout << "Projectile back: " << toLab * Pprojectile << G4endl;
//G4cout << "Target back: " << toLab * Ptarget << G4endl;
//G4cout << "Pprojectile with Q and Mass: " << Pprojectile<<" "<< Pprojectile.mag() << G4endl;
//G4cout << "Ptarget with Q and Mass: " << Ptarget <<" "<< Ptarget.mag() << G4endl;
// Transform back and update SplitableHadron Participant.
Pprojectile.transform(toLab);
Ptarget.transform(toLab);
target->Set4Momentum(Ptarget);
projectile->Set4Momentum(Pprojectile);
//G4cout << "Pprojectile with Q M: " << Pprojectile<<" "<< Pprojectile.mag() << G4endl;
//G4cout << "Ptarget with Q M: " << Ptarget <<" "<< Ptarget.mag() << G4endl;
//G4cout << "Target mass " << Ptarget.mag() << G4endl;
//G4int Uzhi; G4cin>>Uzhi;
return true;
target->Set4Momentum(Ptarget);
//G4cout << "Projectile mass " << Pprojectile.mag() << G4endl;
projectile->Set4Momentum(Pprojectile);
return true;
}
G4ExcitedString * G4QGSDiffractiveExcitation::
String(G4VSplitableHadron * hadron, G4bool isProjectile) const
{
hadron->SplitUp();
G4Parton *start= hadron->GetNextParton();
if ( start==NULL)
{ G4cout << " G4QGSDiffractiveExcitation::String() Error:No start parton found"<< G4endl;
return NULL;
}
G4Parton *end = hadron->GetNextParton();
if ( end==NULL)
{ G4cout << " G4QGSDiffractiveExcitation::String() Error:No end parton found"<< G4endl;
return NULL;
}
hadron->SplitUp();
G4Parton *start= hadron->GetNextParton();
if ( start==NULL) {
G4cout << " G4FTFModel::String() Error:No start parton found"<< G4endl;
return NULL;
}
G4Parton *end = hadron->GetNextParton();
if ( end==NULL) {
G4cout << " G4FTFModel::String() Error:No end parton found"<< G4endl;
return NULL;
}
G4ExcitedString * string;
if ( isProjectile )
{
string= new G4ExcitedString(end,start, +1);
} else {
string= new G4ExcitedString(start,end, -1);
}
G4ExcitedString * string;
if ( isProjectile ) {
string= new G4ExcitedString(end,start, +1);
} else {
string= new G4ExcitedString(start,end, -1);
}
string->SetPosition(hadron->GetPosition());
string->SetPosition(hadron->GetPosition());
// momenta of string ends
G4double ptSquared= hadron->Get4Momentum().perp2();
G4double transverseMassSquared= hadron->Get4Momentum().plus()
* hadron->Get4Momentum().minus();
// momenta of string ends
G4double ptSquared= hadron->Get4Momentum().perp2();
G4double transverseMassSquared= hadron->Get4Momentum().plus()
* hadron->Get4Momentum().minus();
G4double maxAvailMomentumSquared=
sqr( std::sqrt(transverseMassSquared) - std::sqrt(ptSquared) );
G4double maxAvailMomentumSquared=
sqr( std::sqrt(transverseMassSquared) - std::sqrt(ptSquared) );
G4double widthOfPtSquare = 0.25; // Uzhi <Pt^2>=0.25 ???
G4ThreeVector pt=GaussianPt(widthOfPtSquare,maxAvailMomentumSquared);
G4double widthOfPtSquare = 0.25; // Uzhi <Pt^2>=0.25 ??????????????????
G4ThreeVector pt=GaussianPt(widthOfPtSquare,maxAvailMomentumSquared);
G4LorentzVector Pstart(G4LorentzVector(pt,0.));
G4LorentzVector Pend;
Pend.setPx(hadron->Get4Momentum().px() - pt.x());
Pend.setPy(hadron->Get4Momentum().py() - pt.y());
G4LorentzVector Pstart(G4LorentzVector(pt,0.));
G4LorentzVector Pend;
Pend.setPx(hadron->Get4Momentum().px() - pt.x());
Pend.setPy(hadron->Get4Momentum().py() - pt.y());
G4double tm1=hadron->Get4Momentum().minus() +
( Pend.perp2()-Pstart.perp2() ) / hadron->Get4Momentum().plus();
G4double tm1=hadron->Get4Momentum().minus() +
( Pend.perp2()-Pstart.perp2() ) / hadron->Get4Momentum().plus();
G4double tm2= std::sqrt( std::max(0., sqr(tm1) -
4. * Pend.perp2() * hadron->Get4Momentum().minus()
/ hadron->Get4Momentum().plus() ));
G4double tm2= std::sqrt( std::max(0., sqr(tm1) -
4. * Pend.perp2() * hadron->Get4Momentum().minus()
/ hadron->Get4Momentum().plus() ));
G4int Sign= isProjectile ? -1 : 1;
G4int Sign= isProjectile ? -1 : 1;
G4double endMinus = 0.5 * (tm1 + Sign*tm2);
G4double startMinus= hadron->Get4Momentum().minus() - endMinus;
G4double endMinus = 0.5 * (tm1 + Sign*tm2);
G4double startMinus= hadron->Get4Momentum().minus() - endMinus;
G4double startPlus= Pstart.perp2() / startMinus;
G4double endPlus = hadron->Get4Momentum().plus() - startPlus;
G4double startPlus= Pstart.perp2() / startMinus;
G4double endPlus = hadron->Get4Momentum().plus() - startPlus;
Pstart.setPz(0.5*(startPlus - startMinus));
Pstart.setE(0.5*(startPlus + startMinus));
Pstart.setPz(0.5*(startPlus - startMinus));
Pstart.setE(0.5*(startPlus + startMinus));
Pend.setPz(0.5*(endPlus - endMinus));
Pend.setE(0.5*(endPlus + endMinus));
Pend.setPz(0.5*(endPlus - endMinus));
Pend.setE(0.5*(endPlus + endMinus));
start->Set4Momentum(Pstart);
end->Set4Momentum(Pend);
start->Set4Momentum(Pstart);
end->Set4Momentum(Pend);
#ifdef G4_FTFDEBUG
G4cout << " generated string flavors " << start->GetPDGcode() << " / " << end->GetPDGcode() << G4endl;
G4cout << " generated string momenta: quark " << start->Get4Momentum() << "mass : " <<start->Get4Momentum().mag()<< G4endl;
G4cout << " generated string momenta: Diquark " << end ->Get4Momentum() << "mass : " <<end->Get4Momentum().mag()<< G4endl;
G4cout << " sum of ends " << Pstart+Pend << G4endl;
G4cout << " Original " << hadron->Get4Momentum() << G4endl;
#endif
#ifdef debugQGSdiffExictation
G4cout << " generated string flavors " << start->GetPDGcode() << " / " << end->GetPDGcode() << G4endl;
G4cout << " generated string momenta: quark " << start->Get4Momentum() << "mass : " <<start->Get4Momentum().mag()<< G4endl;
G4cout << " generated string momenta: Diquark " << end ->Get4Momentum() << "mass : " <<end->Get4Momentum().mag()<< G4endl;
G4cout << " sum of ends " << Pstart+Pend << G4endl;
G4cout << " Original " << hadron->Get4Momentum() << G4endl;
#endif
return string;
return string;
}
@@ -410,33 +430,46 @@ String(G4VSplitableHadron * hadron, G4bool isProjectile) const
G4double G4QGSDiffractiveExcitation::ChooseP(G4double Pmin, G4double Pmax) const
{
// choose an x between Xmin and Xmax with P(x) ~ 1/x
// to be improved...
// choose an x between Xmin and Xmax with P(x) ~ 1/x
// to be improved...
G4double range=Pmax-Pmin;
G4double range=Pmax-Pmin;
if ( Pmin <= 0. || range <=0. )
{
G4cout << " Pmin, range : " << Pmin << " , " << range << G4endl;
throw G4HadronicException(__FILE__, __LINE__, "G4QGSDiffractiveExcitation::ChooseP : Invalid arguments ");
}
if ( Pmin <= 0. || range <=0. )
{
G4cout << " Pmin, range : " << Pmin << " , " << range << G4endl;
throw G4HadronicException(__FILE__, __LINE__, "G4QGSDiffractiveExcitation::ChooseP : Invalid arguments ");
}
G4double P;
P=Pmin * G4Pow::GetInstance()->powA(Pmax/Pmin,G4UniformRand());
//debug-hpw cout << "DiffractiveX "<<x<<G4endl;
return P;
G4double P;
/*
do {
x=Xmin + G4UniformRand() * range;
} while ( Xmin/x < G4UniformRand() );
*/
P=Pmin * G4Pow::GetInstance()->powA(Pmax/Pmin,G4UniformRand());
//debug-hpw cout << "DiffractiveX "<<x<<G4endl;
return P;
}
G4ThreeVector G4QGSDiffractiveExcitation::GaussianPt(G4double AveragePt2, G4double maxPtSquare) const
{ // @@ this method is used in FTFModel as well. Should go somewhere common!
G4double Pt2;
G4double Pt2;
/*
do {
pt2=widthSquare * G4Log( G4UniformRand() );
} while ( pt2 > maxPtSquare);
*/
Pt2 = -AveragePt2 * G4Log(1. + G4UniformRand() * (G4Exp(-maxPtSquare/AveragePt2)-1.));
Pt2 = -AveragePt2 * G4Log(1. + G4UniformRand() * (G4Exp(-maxPtSquare/AveragePt2)-1.));
G4double Pt=std::sqrt(Pt2);
G4double Pt=std::sqrt(Pt2);
G4double phi=G4UniformRand() * twopi;
G4double phi=G4UniformRand() * twopi;
return G4ThreeVector (Pt*std::cos(phi), Pt*std::sin(phi), 0.);
return G4ThreeVector (Pt*std::cos(phi), Pt*std::sin(phi), 0.);
}
@@ -32,3 +32,4 @@ G4QGSMParameters::G4QGSMParameters()
G4QGSMParameters::~G4QGSMParameters()
{
}
@@ -37,6 +37,7 @@
#include "G4Log.hh"
#include "G4Pow.hh"
// based on prototype by Maxim Komogorov
// Splitting into methods, and centralizing of model parameters HPW Feb 1999
// restructuring HPW Feb 1999
@@ -53,489 +54,385 @@
void G4QGSMSplitableHadron::InitParameters()
{
// changing rapidity distribution for all
alpha = -0.5; // Note that this number is still assumed in the algorithm
// needs to be generalized.
// changing rapidity distribution for projectile like
beta = 2.5;// Note that this number is still assumed in the algorithm
// needs to be generalized.
theMinPz = 0.5*G4PionMinus::PionMinus()->GetPDGMass();
// theMinPz = 0.1*G4PionMinus::PionMinus()->GetPDGMass();
// theMinPz = G4PionMinus::PionMinus()->GetPDGMass();
// as low as possible, otherwise, we have unphysical boundary conditions in the sampling.
StrangeSuppress = 0.48;
sigmaPt = 0.*GeV; // widens eta slightly, if increased to 1.7,
// but Maxim's algorithm breaks energy conservation
// to be revised.
widthOfPtSquare = 0.01*GeV*GeV;
Direction = FALSE;
minTransverseMass = 1*keV;
iP =0;// Color.begin(); // Uzhi
iAP =0;// AntiColor.begin(); // Uzhi
// changing rapidity distribution for all
alpha = -0.5; // Note that this number is still assumed in the algorithm
// needs to be generalized.
// changing rapidity distribution for projectile like
beta = 2.5;// Note that this number is still assumed in the algorithm
// needs to be generalized.
theMinPz = 0.5*G4PionMinus::PionMinus()->GetPDGMass();
//theMinPz = 0.1*G4PionMinus::PionMinus()->GetPDGMass();
//theMinPz = G4PionMinus::PionMinus()->GetPDGMass();
// as low as possible, otherwise, we have unphysical boundary conditions in the sampling.
StrangeSuppress = 0.48;
sigmaPt = 0.*GeV; // widens eta slightly, if increased to 1.7,
// but Maxim's algorithm breaks energy conservation to be revised.
widthOfPtSquare = 0.01*GeV*GeV;
Direction = FALSE;
minTransverseMass = 1*keV;
}
G4QGSMSplitableHadron::G4QGSMSplitableHadron()
{
InitParameters();
InitParameters();
}
G4QGSMSplitableHadron::G4QGSMSplitableHadron(const G4ReactionProduct & aPrimary, G4bool aDirection)
:G4VSplitableHadron(aPrimary)
: G4VSplitableHadron(aPrimary)
{
InitParameters();
Direction = aDirection;
InitParameters();
Direction = aDirection;
}
G4QGSMSplitableHadron::G4QGSMSplitableHadron(const G4ReactionProduct & aPrimary)
: G4VSplitableHadron(aPrimary)
: G4VSplitableHadron(aPrimary)
{
InitParameters();
InitParameters();
}
G4QGSMSplitableHadron::G4QGSMSplitableHadron(const G4Nucleon & aNucleon)
: G4VSplitableHadron(aNucleon)
: G4VSplitableHadron(aNucleon)
{
InitParameters();
InitParameters();
}
G4QGSMSplitableHadron::G4QGSMSplitableHadron(const G4Nucleon & aNucleon, G4bool aDirection)
: G4VSplitableHadron(aNucleon)
: G4VSplitableHadron(aNucleon)
{
InitParameters();
Direction = aDirection;
InitParameters();
Direction = aDirection;
}
G4QGSMSplitableHadron::~G4QGSMSplitableHadron()
{
/*
G4cout<<"Destructor "<<Color.size()<<" "<<AntiColor.size()<<G4endl;
for(unsigned int i=0; i<Color.size();i++) {
G4cout<<"i "<<i<<G4endl;
delete Color.operator[](i);
delete AntiColor.operator[](i);
}
G4cout<<"empty"<<G4endl;
while(!Color.empty()) {Color.pop_back();}
while(!AntiColor.empty()) {AntiColor.pop_back();}
G4cout<<"clear"<<G4endl;
Color.clear(); AntiColor.clear();
*/
}
G4QGSMSplitableHadron::~G4QGSMSplitableHadron(){}
//**************************************************************************************************************************
void G4QGSMSplitableHadron::SplitUp()
{
//G4cout<<G4endl<<"SplitUp() this "<<this<<" IsSplit() "<<IsSplit()<<G4endl;
if (IsSplit()) return;
Splitting(); // Uzhi To mark that a hadron is split
//G4cout<<"Color.size() "<<Color.size()<<G4endl;
if (Color.size()!=0) return;
//G4cout<<"GetSoftCollisionCount() "<<GetSoftCollisionCount()<<G4endl;
if (GetSoftCollisionCount() == 0) // GetSoftCollisionCount() from G4VSplitableHadron
{
DiffractiveSplitUp();
}
else
{
SoftSplitUp();
}
//G4cout<<"Color.size() "<<Color.size()<<G4endl;
if (IsSplit()) return;
Splitting();
if (Color.size()!=0) return;
if (GetSoftCollisionCount() == 0)
{
DiffractiveSplitUp();
} else {
SoftSplitUp();
}
}
void G4QGSMSplitableHadron::DiffractiveSplitUp()
{
//G4cout<<G4endl<<"G4QGSMSplitableHadron::DiffractiveSplitUp() "<<GetDefinition()->GetParticleName()<<G4endl;
//G4cout<<" GetSoftCollisionCount() "<<GetSoftCollisionCount()<<G4endl;
//G4cout<<"Mom M "<<Get4Momentum()<<" "<<Get4Momentum().mag()<<G4endl;
// take the particle definitions and get the partons HPW
G4Parton * Left = NULL;
G4Parton * Right = NULL;
GetValenceQuarkFlavors(GetDefinition(), Left, Right);
Left->SetPosition(GetPosition());
Right->SetPosition(GetPosition());
// take the particle definitions and get the partons HPW
G4Parton * Left = NULL;
G4Parton * Right = NULL;
GetValenceQuarkFlavors(GetDefinition(), Left, Right);
Left->SetPosition(GetPosition());
Right->SetPosition(GetPosition());
//G4cout<<"Partons Left Right "<<Left->GetDefinition()->GetParticleName()<<" "<<Right->GetDefinition()->GetParticleName()<<G4endl;
/*
G4LorentzVector tmp(0., 0., 0., 0.);
Left->Set4Momentum(tmp);
Right->Set4Momentum(tmp);
Color.push_back(Left);
AntiColor.push_back(Right);
*/ // Uzhi
G4LorentzVector HadronMom = Get4Momentum();
//std::cout << "DSU 1 - "<<HadronMom<<std::endl;
G4LorentzVector HadronMom = Get4Momentum();
//std::cout << "DSU 1 - "<<HadronMom<<std::endl;
// momenta of string ends
// G4double pt2 = HadronMom.perp2();
// G4double transverseMass2 = HadronMom.plus()*HadronMom.minus();
// G4double maxAvailMomentum2 = sqr(std::sqrt(transverseMass2) - std::sqrt(pt2)); // It is wrong! Uzhi
G4double maxAvailMomentum2 = sqr(HadronMom.mag()/2.); // Uzhi
//G4cout<<"Hadron M M estimated Pt "<<HadronMom.mag()<<" "<<std::sqrt(transverseMass2) - std::sqrt(pt2)<<" "<<std::sqrt(pt2)<<G4endl;
G4ThreeVector pt(minTransverseMass, minTransverseMass, 0);
//G4cout<<"maxAvailMomentum2 widthOfPtSquare "<<maxAvailMomentum2<<" "<<widthOfPtSquare<<G4endl;
if(maxAvailMomentum2/widthOfPtSquare>0.01) pt = GaussianPt(widthOfPtSquare, maxAvailMomentum2);
//std::cout << "DSU 1.1 - "<< maxAvailMomentum2<< pt <<std::endl;
// momenta of string ends
G4double pt2 = HadronMom.perp2();
G4double transverseMass2 = HadronMom.plus()*HadronMom.minus();
G4double maxAvailMomentum2 = sqr(std::sqrt(transverseMass2) - std::sqrt(pt2));
G4ThreeVector pt(minTransverseMass, minTransverseMass, 0);
if(maxAvailMomentum2/widthOfPtSquare>0.01) pt = GaussianPt(widthOfPtSquare, maxAvailMomentum2);
//std::cout << "DSU 1.1 - "<< maxAvailMomentum2<< pt <<std::endl;
G4LorentzVector LeftMom(pt, 0.);
G4LorentzVector RightMom;
RightMom.setPx(HadronMom.px() - pt.x());
RightMom.setPy(HadronMom.py() - pt.y());
//std::cout << "DSU 2 - "<<RightMom<<" "<< LeftMom <<std::endl;
G4LorentzVector LeftMom(pt, 0.);
G4LorentzVector RightMom;
RightMom.setPx(HadronMom.px() - pt.x());
RightMom.setPy(HadronMom.py() - pt.y());
//std::cout << "DSU 2 - "<<RightMom<<" "<< LeftMom <<std::endl;
G4double Local1 = HadronMom.minus() + (RightMom.perp2() - LeftMom.perp2())/HadronMom.plus();
G4double Local2 = std::sqrt(std::max(0., sqr(Local1) - 4.*RightMom.perp2()*HadronMom.minus()/HadronMom.plus()));
//std::cout << "DSU 3 - "<< Local1 <<" "<< Local2 <<std::endl;
if (Direction) Local2 = -Local2;
G4double RightMinus = 0.5*(Local1 + Local2);
G4double LeftMinus = HadronMom.minus() - RightMinus;
if (LeftMinus <= 0.0) { // Uzhi-14Apr2016
RightMinus = 0.5*(Local1 - Local2);
LeftMinus = HadronMom.minus() - RightMinus;
}
//std::cout << "DSU 4 - "<< RightMinus <<" "<< LeftMinus << " "<<HadronMom.minus() <<std::endl;
G4double Local1 = HadronMom.minus() + (RightMom.perp2() - LeftMom.perp2())/HadronMom.plus();
G4double Local2 = std::sqrt(std::max(0., sqr(Local1) - 4.*RightMom.perp2()*HadronMom.minus()/HadronMom.plus()));
//std::cout << "DSU 3 - "<< Local1 <<" "<< Local2 <<std::endl;
if (Direction) Local2 = -Local2;
G4double RightMinus = 0.5*(Local1 + Local2);
G4double LeftMinus = HadronMom.minus() - RightMinus;
//std::cout << "DSU 4 - "<< RightMinus <<" "<< LeftMinus << " "<<HadronMom.minus() <<std::endl;
G4double LeftPlus = LeftMom.perp2()/LeftMinus;
G4double RightPlus = HadronMom.plus() - LeftPlus;
//std::cout << "DSU 5 - "<< RightPlus <<" "<< LeftPlus <<std::endl;
LeftMom.setPz(0.5*(LeftPlus - LeftMinus));
LeftMom.setE (0.5*(LeftPlus + LeftMinus));
RightMom.setPz(0.5*(RightPlus - RightMinus));
RightMom.setE (0.5*(RightPlus + RightMinus));
//std::cout << "DSU 6 - "<< LeftMom <<" "<< RightMom <<std::endl;
Left->Set4Momentum(LeftMom);
Right->Set4Momentum(RightMom);
//G4cout<<"Momenta H q AntiQ"<<G4endl;
//G4cout<<Get4Momentum()<<G4endl<<Left->Get4Momentum()<<G4endl<<Right->Get4Momentum()<<G4endl;
//G4cout<<"Color AntiColor "<<Left<<" "<<Right<<G4endl;
Color.push_back(Left);
AntiColor.push_back(Right);
iP=0; iAP=0; // Vova
// Uzhi
G4double LeftPlus = LeftMom.perp2()/LeftMinus;
G4double RightPlus = HadronMom.plus() - LeftPlus;
//std::cout << "DSU 5 - "<< RightPlus <<" "<< LeftPlus <<std::endl;
LeftMom.setPz(0.5*(LeftPlus - LeftMinus));
LeftMom.setE (0.5*(LeftPlus + LeftMinus));
RightMom.setPz(0.5*(RightPlus - RightMinus));
RightMom.setE (0.5*(RightPlus + RightMinus));
//std::cout << "DSU 6 - "<< LeftMom <<" "<< RightMom <<std::endl;
Left->Set4Momentum(LeftMom);
Right->Set4Momentum(RightMom);
Color.push_back(Left);
AntiColor.push_back(Right);
}
void G4QGSMSplitableHadron::SoftSplitUp()
{
//G4cout<<"G4QGSMSplitableHadron::SoftSplitUp()"<<G4endl;
//G4cout<<" GetSoftCollisionCount() "<<GetSoftCollisionCount()<<G4endl;
//... sample transversal momenta for sea and valence quarks
/* Uzhi
G4double phi, pts;
G4double SumPy = 0.;
G4double SumPx = 0.;
G4ThreeVector Pos = GetPosition();
*/ // Uzhi
G4int nSeaPair = GetSoftCollisionCount()-1;
//... sample transversal momenta for sea and valence quarks
G4double phi, pts;
G4double SumPy = 0.;
G4double SumPx = 0.;
G4ThreeVector Pos = GetPosition();
G4int nSeaPair = GetSoftCollisionCount()-1;
G4LorentzVector tmp(0., 0., 0., 0.);
// here the condition,to ensure viability of splitting, also in cases
// where difractive excitation occured together with soft scattering.
// G4double LightConeMomentum = (Direction)? Get4Momentum().plus() : Get4Momentum().minus();
// G4double Xmin = theMinPz/LightConeMomentum;
G4double Xmin = theMinPz/( Get4Momentum().e() - GetDefinition()->GetPDGMass() );
while(Xmin>=1-(2*nSeaPair+1)*Xmin) Xmin*=0.95; /* Loop checking, 26.10.2015, A.Ribon */
G4int aSeaPair;
for (aSeaPair = 0; aSeaPair < nSeaPair; aSeaPair++)
{
// choose quark flavour, d:u:s = 1:1:(1/StrangeSuppress-2)
G4int aPDGCode = 1 + (G4int)(G4UniformRand()/StrangeSuppress);
G4int aSeaPair;
for (aSeaPair = 0; aSeaPair < nSeaPair; aSeaPair++)
{
// choose quark flavour, d:u:s = 1:1:(1/StrangeSuppress-2)
// BuildSeaQuark() determines quark spin, isospin and colour
// via parton-constructor G4Parton(aPDGCode)
G4Parton * aParton = BuildSeaQuark(false, aPDGCode, nSeaPair);
G4int aPDGCode = 1 + (G4int)(G4UniformRand()/StrangeSuppress);
G4int firstPartonColour = aParton->GetColour();
G4double firstPartonSpinZ = aParton->GetSpinZ();
// BuildSeaQuark() determines quark spin, isospin and colour
// via parton-constructor G4Parton(aPDGCode)
aParton->Set4Momentum(tmp);
Color.push_back(aParton);
G4Parton * aParton = BuildSeaQuark(false, aPDGCode, nSeaPair);
// create anti-quark
//G4cerr << "G4QGSMSplitableHadron::SoftSplitUp()" << G4endl;
aParton = BuildSeaQuark(true, aPDGCode, nSeaPair);
aParton->SetSpinZ(-firstPartonSpinZ);
aParton->SetColour(-firstPartonColour);
AntiColor.push_back(aParton);
}
//G4cerr << "Parton 1: "
// << " PDGcode: " << aPDGCode
// << " - Name: " << aParton->GetDefinition()->GetParticleName()
// << " - Type: " << aParton->GetDefinition()->GetParticleType()
// << " - Spin-3: " << aParton->GetSpinZ()
// << " - Colour: " << aParton->GetColour() << G4endl;
// Valence quark
G4Parton* pColorParton = NULL;
G4Parton* pAntiColorParton = NULL;
GetValenceQuarkFlavors(GetDefinition(), pColorParton, pAntiColorParton);
// G4int ColorEncoding = pColorParton->GetPDGcode();
// save colour a spin-3 for anti-quark
pColorParton->Set4Momentum(tmp);
pAntiColorParton->Set4Momentum(tmp);
G4int firstPartonColour = aParton->GetColour();
G4double firstPartonSpinZ = aParton->GetSpinZ();
//G4cout<<"Color AntiColor "<<pColorParton<<" "<<pAntiColorParton<<G4endl;
Color.push_back(pColorParton);
AntiColor.push_back(pAntiColorParton);
SumPx += aParton->Get4Momentum().px();
SumPy += aParton->Get4Momentum().py();
Color.push_back(aParton);
iP=0; iAP=0; // Vova
// create anti-quark
/* Uzhi
// here the condition,to ensure viability of splitting, also in cases
// where difractive excitation occured together with soft scattering.
// G4double LightConeMomentum = (Direction)? Get4Momentum().plus() : Get4Momentum().minus();
// G4double Xmin = theMinPz/LightConeMomentum;
G4double Xmin = theMinPz/( Get4Momentum().e() - GetDefinition()->GetPDGMass() );
while(Xmin>=1-(2*nSeaPair+1)*Xmin) Xmin*=0.95;
aParton = BuildSeaQuark(true, aPDGCode, nSeaPair);
aParton->SetSpinZ(-firstPartonSpinZ);
aParton->SetColour(-firstPartonColour);
G4int aSeaPair;
for (aSeaPair = 0; aSeaPair < nSeaPair; aSeaPair++)
{
// choose quark flavour, d:u:s = 1:1:(1/StrangeSuppress-2)
//G4cerr << "Parton 2: "
// << " PDGcode: " << -aPDGCode
// << " - Name: " << aParton->GetDefinition()->GetParticleName()
// << " - Type: " << aParton->GetDefinition()->GetParticleType()
// << " - Spin-3: " << aParton->GetSpinZ()
// << " - Colour: " << aParton->GetColour() << G4endl;
//G4cerr << "------------" << G4endl;
G4int aPDGCode = 1 + (G4int)(G4UniformRand()/StrangeSuppress);
SumPx += aParton->Get4Momentum().px();
SumPy += aParton->Get4Momentum().py();
AntiColor.push_back(aParton);
}
// BuildSeaQuark() determines quark spin, isospin and colour
// via parton-constructor G4Parton(aPDGCode)
// Valence quark
G4Parton* pColorParton = NULL;
G4Parton* pAntiColorParton = NULL;
GetValenceQuarkFlavors(GetDefinition(), pColorParton, pAntiColorParton);
G4int ColorEncoding = pColorParton->GetPDGcode();
G4Parton * aParton = BuildSeaQuark(false, aPDGCode, nSeaPair);
pts = sigmaPt*std::sqrt(-G4Log(G4UniformRand()));
phi = 2.*pi*G4UniformRand();
G4double Px = pts*std::cos(phi);
G4double Py = pts*std::sin(phi);
SumPx += Px;
SumPy += Py;
// G4cerr << "G4QGSMSplitableHadron::SoftSplitUp()" << G4endl;
if (ColorEncoding < 0) // use particle definition
{
G4LorentzVector ColorMom(-SumPx, -SumPy, 0, 0);
pColorParton->Set4Momentum(ColorMom);
G4LorentzVector AntiColorMom(Px, Py, 0, 0);
pAntiColorParton->Set4Momentum(AntiColorMom);
} else {
G4LorentzVector ColorMom(Px, Py, 0, 0);
pColorParton->Set4Momentum(ColorMom);
G4LorentzVector AntiColorMom(-SumPx, -SumPy, 0, 0);
pAntiColorParton->Set4Momentum(AntiColorMom);
}
Color.push_back(pColorParton);
AntiColor.push_back(pAntiColorParton);
// G4cerr << "Parton 1: "
// << " PDGcode: " << aPDGCode
// << " - Name: " << aParton->GetDefinition()->GetParticleName()
// << " - Type: " << aParton->GetDefinition()->GetParticleType()
// << " - Spin-3: " << aParton->GetSpinZ()
// << " - Colour: " << aParton->GetColour() << G4endl;
// Sample X
G4int nAttempt = 0;
G4double SumX = 0;
G4double aBeta = beta;
G4double ColorX, AntiColorX;
if (GetDefinition() == G4PionMinus::PionMinusDefinition()) aBeta = 1.;
if (GetDefinition() == G4Gamma::GammaDefinition()) aBeta = 1.;
if (GetDefinition() == G4PionPlus::PionPlusDefinition()) aBeta = 1.;
if (GetDefinition() == G4PionZero::PionZeroDefinition()) aBeta = 1.;
if (GetDefinition() == G4KaonPlus::KaonPlusDefinition()) aBeta = 0.;
if (GetDefinition() == G4KaonMinus::KaonMinusDefinition()) aBeta = 0.;
const G4int maxNumberOfAttempts = 1000;
do
{
SumX = 0;
nAttempt++;
G4int NumberOfUnsampledSeaQuarks = 2*nSeaPair;
ColorX = SampleX(Xmin, NumberOfUnsampledSeaQuarks, 2*nSeaPair, aBeta);
Color.back()->SetX(SumX = ColorX);// this is the valenz quark.
for(G4int aPair = 0; aPair < nSeaPair; aPair++)
{
NumberOfUnsampledSeaQuarks--;
ColorX = SampleX(Xmin, NumberOfUnsampledSeaQuarks, 2*nSeaPair, aBeta);
Color[aPair]->SetX(ColorX);
SumX += ColorX;
NumberOfUnsampledSeaQuarks--;
AntiColorX = SampleX(Xmin, NumberOfUnsampledSeaQuarks, 2*nSeaPair, aBeta);
AntiColor[aPair]->SetX(AntiColorX); // the 'sea' partons
SumX += AntiColorX;
if (1. - SumX <= Xmin) break;
}
} while ( (1. - SumX <= Xmin) && nAttempt < maxNumberOfAttempts ); /* Loop checking, 26.10.2015, A.Ribon */
if ( nAttempt >= maxNumberOfAttempts ) return;
// save colour a spin-3 for anti-quark
(*(AntiColor.end()-1))->SetX(1. - SumX); // the di-quark takes the rest, then go to momentum
G4double lightCone = ((!Direction) ? Get4Momentum().minus() : Get4Momentum().plus());
G4double lightCone2 = ((!Direction) ? Get4Momentum().plus() : Get4Momentum().minus());
for(aSeaPair = 0; aSeaPair < nSeaPair+1; aSeaPair++)
{
G4Parton* aParton = Color[aSeaPair];
aParton->DefineMomentumInZ(lightCone, lightCone2, Direction);
G4int firstPartonColour = aParton->GetColour();
G4double firstPartonSpinZ = aParton->GetSpinZ();
SumPx += aParton->Get4Momentum().px();
SumPy += aParton->Get4Momentum().py();
Color.push_back(aParton);
// create anti-quark
aParton = BuildSeaQuark(true, aPDGCode, nSeaPair);
aParton->SetSpinZ(-firstPartonSpinZ);
aParton->SetColour(-firstPartonColour);
// G4cerr << "Parton 2: "
// << " PDGcode: " << -aPDGCode
// << " - Name: " << aParton->GetDefinition()->GetParticleName()
// << " - Type: " << aParton->GetDefinition()->GetParticleType()
// << " - Spin-3: " << aParton->GetSpinZ()
// << " - Colour: " << aParton->GetColour() << G4endl;
// G4cerr << "------------" << G4endl;
SumPx += aParton->Get4Momentum().px();
SumPy += aParton->Get4Momentum().py();
AntiColor.push_back(aParton);
}
*/ // Uzhi
/* Uzhi
// Valence quark
G4Parton* pColorParton = NULL;
G4Parton* pAntiColorParton = NULL;
GetValenceQuarkFlavors(GetDefinition(), pColorParton, pAntiColorParton);
G4int ColorEncoding = pColorParton->GetPDGcode();
pts = sigmaPt*std::sqrt(-G4Log(G4UniformRand()));
phi = 2.*pi*G4UniformRand();
G4double Px = pts*std::cos(phi);
G4double Py = pts*std::sin(phi);
SumPx += Px;
SumPy += Py;
if (ColorEncoding < 0) // use particle definition
{
G4LorentzVector ColorMom(-SumPx, -SumPy, 0, 0);
pColorParton->Set4Momentum(ColorMom);
G4LorentzVector AntiColorMom(Px, Py, 0, 0);
pAntiColorParton->Set4Momentum(AntiColorMom);
}
else
{
G4LorentzVector ColorMom(Px, Py, 0, 0);
pColorParton->Set4Momentum(ColorMom);
G4LorentzVector AntiColorMom(-SumPx, -SumPy, 0, 0);
pAntiColorParton->Set4Momentum(AntiColorMom);
}
Color.push_back(pColorParton);
AntiColor.push_back(pAntiColorParton);
// Sample X
G4int nAttempt = 0;
G4double SumX = 0;
G4double aBeta = beta;
G4double ColorX, AntiColorX;
if (GetDefinition() == G4PionMinus::PionMinusDefinition()) aBeta = 1.;
if (GetDefinition() == G4Gamma::GammaDefinition()) aBeta = 1.;
if (GetDefinition() == G4PionPlus::PionPlusDefinition()) aBeta = 1.;
if (GetDefinition() == G4PionZero::PionZeroDefinition()) aBeta = 1.;
if (GetDefinition() == G4KaonPlus::KaonPlusDefinition()) aBeta = 0.;
if (GetDefinition() == G4KaonMinus::KaonMinusDefinition()) aBeta = 0.;
do
{
SumX = 0;
nAttempt++;
G4int NumberOfUnsampledSeaQuarks = 2*nSeaPair;
ColorX = SampleX(Xmin, NumberOfUnsampledSeaQuarks, 2*nSeaPair, aBeta);
Color.back()->SetX(SumX = ColorX);// this is the valenz quark.
for(G4int aPair = 0; aPair < nSeaPair; aPair++)
{
NumberOfUnsampledSeaQuarks--;
ColorX = SampleX(Xmin, NumberOfUnsampledSeaQuarks, 2*nSeaPair, aBeta);
Color[aPair]->SetX(ColorX);
SumX += ColorX;
NumberOfUnsampledSeaQuarks--;
AntiColorX = SampleX(Xmin, NumberOfUnsampledSeaQuarks, 2*nSeaPair, aBeta);
AntiColor[aPair]->SetX(AntiColorX); // the 'sea' partons
SumX += AntiColorX;
if (1. - SumX <= Xmin) break;
}
}
while (1. - SumX <= Xmin);
(*(AntiColor.end()-1))->SetX(1. - SumX); // the di-quark takes the rest, then go to momentum
G4double lightCone = ((!Direction) ? Get4Momentum().minus() : Get4Momentum().plus());
G4double lightCone2 = ((!Direction) ? Get4Momentum().plus() : Get4Momentum().minus());
for(aSeaPair = 0; aSeaPair < nSeaPair+1; aSeaPair++)
{
G4Parton* aParton = Color[aSeaPair];
aParton->DefineMomentumInZ(lightCone, lightCone2, Direction);
aParton = AntiColor[aSeaPair];
aParton->DefineMomentumInZ(lightCone, lightCone2, Direction);
}
*/ // Uzhi
return;
aParton = AntiColor[aSeaPair];
aParton->DefineMomentumInZ(lightCone, lightCone2, Direction);
}
return;
}
void G4QGSMSplitableHadron::GetValenceQuarkFlavors(const G4ParticleDefinition * aPart, G4Parton *& Parton1, G4Parton *& Parton2)
void G4QGSMSplitableHadron::
GetValenceQuarkFlavors(const G4ParticleDefinition * aPart, G4Parton *& Parton1, G4Parton *& Parton2)
{
// Note! convention aEnd = q or (qq)bar and bEnd = qbar or qq.
G4int aEnd;
G4int bEnd;
G4int HadronEncoding = aPart->GetPDGEncoding();
if (aPart->GetBaryonNumber() == 0)
{
theMesonSplitter.SplitMeson(HadronEncoding, &aEnd, &bEnd);
}
else
{
theBaryonSplitter.SplitBarion(HadronEncoding, &aEnd, &bEnd);
}
// Note! convention aEnd = q or (qq)bar and bEnd = qbar or qq.
G4int aEnd;
G4int bEnd;
G4int HadronEncoding = aPart->GetPDGEncoding();
if (aPart->GetBaryonNumber() == 0)
{
theMesonSplitter.SplitMeson(HadronEncoding, &aEnd, &bEnd);
} else {
theBaryonSplitter.SplitBarion(HadronEncoding, &aEnd, &bEnd);
}
Parton1 = new G4Parton(aEnd);
Parton1->SetPosition(GetPosition());
Parton1 = new G4Parton(aEnd);
Parton1->SetPosition(GetPosition());
// G4cerr << "G4QGSMSplitableHadron::GetValenceQuarkFlavors()" << G4endl;
// G4cerr << "Parton 1: "
// << " PDGcode: " << aEnd
// << " - Name: " << Parton1->GetDefinition()->GetParticleName()
// << " - Type: " << Parton1->GetDefinition()->GetParticleType()
// << " - Spin-3: " << Parton1->GetSpinZ()
// << " - Colour: " << Parton1->GetColour() << G4endl;
//G4cerr << "G4QGSMSplitableHadron::GetValenceQuarkFlavors()" << G4endl;
//G4cerr << "Parton 1: "
// << " PDGcode: " << aEnd
// << " - Name: " << Parton1->GetDefinition()->GetParticleName()
// << " - Type: " << Parton1->GetDefinition()->GetParticleType()
// << " - Spin-3: " << Parton1->GetSpinZ()
// << " - Colour: " << Parton1->GetColour() << G4endl;
Parton2 = new G4Parton(bEnd);
Parton2->SetPosition(GetPosition());
Parton2 = new G4Parton(bEnd);
Parton2->SetPosition(GetPosition());
// G4cerr << "Parton 2: "
// << " PDGcode: " << bEnd
// << " - Name: " << Parton2->GetDefinition()->GetParticleName()
// << " - Type: " << Parton2->GetDefinition()->GetParticleType()
// << " - Spin-3: " << Parton2->GetSpinZ()
// << " - Colour: " << Parton2->GetColour() << G4endl;
// G4cerr << "... now checking for color and spin conservation - yielding: " << G4endl;
//G4cerr << "Parton 2: "
// << " PDGcode: " << bEnd
// << " - Name: " << Parton2->GetDefinition()->GetParticleName()
// << " - Type: " << Parton2->GetDefinition()->GetParticleType()
// << " - Spin-3: " << Parton2->GetSpinZ()
// << " - Colour: " << Parton2->GetColour() << G4endl;
//G4cerr << "... now checking for color and spin conservation - yielding: " << G4endl;
// colour of parton 1 choosen at random by G4Parton(aEnd)
// colour of parton 2 is the opposite:
// colour of parton 1 choosen at random by G4Parton(aEnd)
// colour of parton 2 is the opposite:
Parton2->SetColour(-(Parton1->GetColour()));
Parton2->SetColour(-(Parton1->GetColour()));
// isospin-3 of both partons is handled by G4Parton(PDGCode)
// isospin-3 of both partons is handled by G4Parton(PDGCode)
// spin-3 of parton 1 and 2 choosen at random by G4Parton(aEnd)
// spin-3 of parton 2 may be constrained by spin of original particle:
// spin-3 of parton 1 and 2 choosen at random by G4Parton(aEnd)
// spin-3 of parton 2 may be constrained by spin of original particle:
if ( std::abs(Parton1->GetSpinZ() + Parton2->GetSpinZ()) > aPart->GetPDGSpin())
{
Parton2->SetSpinZ(-(Parton2->GetSpinZ()));
}
// G4cerr << "Parton 2: "
// << " PDGcode: " << bEnd
// << " - Name: " << Parton2->GetDefinition()->GetParticleName()
// << " - Type: " << Parton2->GetDefinition()->GetParticleType()
// << " - Spin-3: " << Parton2->GetSpinZ()
// << " - Colour: " << Parton2->GetColour() << G4endl;
// G4cerr << "------------" << G4endl;
if ( std::abs(Parton1->GetSpinZ() + Parton2->GetSpinZ()) > aPart->GetPDGSpin())
{
Parton2->SetSpinZ(-(Parton2->GetSpinZ()));
}
//G4cerr << "Parton 2: "
// << " PDGcode: " << bEnd
// << " - Name: " << Parton2->GetDefinition()->GetParticleName()
// << " - Type: " << Parton2->GetDefinition()->GetParticleType()
// << " - Spin-3: " << Parton2->GetSpinZ()
// << " - Colour: " << Parton2->GetColour() << G4endl;
//G4cerr << "------------" << G4endl;
}
G4ThreeVector G4QGSMSplitableHadron::GaussianPt(G4double widthSquare, G4double maxPtSquare)
{
G4double R;
const G4int maxNumberOfLoops = 1000;
G4int loopCounter = -1;
while( ((R = -widthSquare*G4Log(G4UniformRand())) > maxPtSquare) &&
++loopCounter < maxNumberOfLoops ) {;} /* Loop checking, 07.08.2015, A.Ribon */
if ( loopCounter >= maxNumberOfLoops ) {
R = 0.99*maxPtSquare; // Just an acceptable value, without any physics consideration.
}
R = std::sqrt(R);
G4double phi = twopi*G4UniformRand();
return G4ThreeVector (R*std::cos(phi), R*std::sin(phi), 0.);
G4double R;
const G4int maxNumberOfLoops = 1000;
G4int loopCounter = -1;
while ( ((R = -widthSquare*G4Log(G4UniformRand())) > maxPtSquare) && /* Loop checking, 26.10.2015, A.Ribon */
++loopCounter < maxNumberOfLoops ) {;}
if ( loopCounter >= maxNumberOfLoops ) R = 0.0;
R = std::sqrt(R);
G4double phi = twopi*G4UniformRand();
return G4ThreeVector (R*std::cos(phi), R*std::sin(phi), 0.);
}
G4Parton * G4QGSMSplitableHadron::
BuildSeaQuark(G4bool isAntiQuark, G4int aPDGCode, G4int /* nSeaPair*/)
{
if (isAntiQuark) aPDGCode*=-1;
G4Parton* result = new G4Parton(aPDGCode);
result->SetPosition(GetPosition());
G4ThreeVector aPtVector = GaussianPt(sigmaPt, DBL_MAX);
G4LorentzVector a4Momentum(aPtVector, 0);
result->Set4Momentum(a4Momentum);
return result;
if (isAntiQuark) aPDGCode*=-1;
G4Parton* result = new G4Parton(aPDGCode);
result->SetPosition(GetPosition());
G4ThreeVector aPtVector = GaussianPt(sigmaPt, DBL_MAX);
G4LorentzVector a4Momentum(aPtVector, 0);
result->Set4Momentum(a4Momentum);
return result;
}
G4double G4QGSMSplitableHadron::
SampleX(G4double anXmin, G4int nSea, G4int totalSea, G4double aBeta)
{
G4double result;
G4double x1, x2;
G4double ymax = 0;
for(G4int ii=1; ii<100; ii++)
{
G4double y = G4Pow::GetInstance()->powA(1./G4double(ii), alpha);
y *= G4Pow::GetInstance()->powN( G4Pow::GetInstance()->powA(1-anXmin-totalSea*anXmin, alpha+1) -
G4Pow::GetInstance()->powA(anXmin, alpha+1), nSea);
y *= G4Pow::GetInstance()->powA(1-anXmin-totalSea*anXmin, aBeta+1) -
G4Pow::GetInstance()->powA(anXmin, aBeta+1);
if(y>ymax) ymax = y;
}
G4double y;
G4double xMax=1-(totalSea+1)*anXmin;
if(anXmin > xMax)
{
// G4cout << "anXmin = "<<anXmin<<" nSea = "<<nSea<<" totalSea = "<< totalSea<<G4endl;
throw G4HadronicException(__FILE__, __LINE__, "G4QGSMSplitableHadron - Fatal: Cannot sample parton densities under these constraints.");
}
const G4int maxNumberOfLoops = 1000;
G4int loopCounter = 0;
do
{
x1 = G4RandFlat::shoot(anXmin, xMax);
y = G4Pow::GetInstance()->powA(x1, alpha);
y *= G4Pow::GetInstance()->powN( G4Pow::GetInstance()->powA(1-x1-totalSea*anXmin, alpha+1) -
G4Pow::GetInstance()->powA(anXmin, alpha+1), nSea);
y *= G4Pow::GetInstance()->powA(1-x1-totalSea*anXmin, aBeta+1) -
G4Pow::GetInstance()->powA(anXmin, aBeta+1);
x2 = ymax*G4UniformRand();
}
while( (x2>y) && ++loopCounter < maxNumberOfLoops ); /* Loop checking, 07.08.2015, A.Ribon */
if ( loopCounter >= maxNumberOfLoops ) {
x1 = 0.5*( anXmin + xMax ); // Just an acceptable value, without any physics consideration.
}
result = x1;
return result;
G4double result;
G4double x1, x2;
G4double ymax = 0;
for(G4int ii=1; ii<100; ii++)
{
G4double y = G4Pow::GetInstance()->powA(1./G4double(ii), alpha);
y *= G4Pow::GetInstance()->powN( G4Pow::GetInstance()->powA(1-anXmin-totalSea*anXmin, alpha+1) - G4Pow::GetInstance()->powA(anXmin, alpha+1), nSea);
y *= G4Pow::GetInstance()->powA(1-anXmin-totalSea*anXmin, aBeta+1) - G4Pow::GetInstance()->powA(anXmin, aBeta+1);
if(y>ymax) ymax = y;
}
G4double y;
G4double xMax=1-(totalSea+1)*anXmin;
if(anXmin > xMax)
{
G4cout << "anXmin = "<<anXmin<<" nSea = "<<nSea<<" totalSea = "<< totalSea<<G4endl;
throw G4HadronicException(__FILE__, __LINE__, "G4QGSMSplitableHadron - Fatal: Cannot sample parton densities under these constraints.");
}
const G4int maxNumberOfLoops = 10000;
G4int loopCounter = -1;
do
{
x1 = G4RandFlat::shoot(anXmin, xMax);
y = G4Pow::GetInstance()->powA(x1, alpha);
y *= G4Pow::GetInstance()->powN( G4Pow::GetInstance()->powA(1-x1-totalSea*anXmin, alpha+1) - G4Pow::GetInstance()->powA(anXmin, alpha+1), nSea);
y *= G4Pow::GetInstance()->powA(1-x1-totalSea*anXmin, aBeta+1) - G4Pow::GetInstance()->powA(anXmin, aBeta+1);
x2 = ymax*G4UniformRand();
} while ( (x2>y) && ++loopCounter < maxNumberOfLoops ); /* Loop checking, 26.10.2015, A.Ribon */
if ( loopCounter >= maxNumberOfLoops ) {
G4ExceptionDescription ed;
ed << " Failed sampling after maxNumberOfLoops attempts : forced exit! " << G4endl;
G4Exception( "G4QGSMSplitableHadron::SampleX ", "HAD_QGS_002", JustWarning, ed );
}
result = x1;
return result;
}
File diff suppressed because it is too large Load Diff
@@ -31,408 +31,364 @@
G4int G4SPBaryon::FindQuark(G4int diQuark) const
{
G4double sum = GetProbability(diQuark);
G4double random = G4UniformRand();
G4double running = 0;
G4int Quark(0);
typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
iter i;
for(i = thePartonInfo.begin(); i!=thePartonInfo.end(); i++)
{
if (std::abs((*i)->GetDiQuark()) == std::abs(diQuark))
{
running += (*i)->GetProbability();
if (running/sum >= random)
{
Quark = (*i)->GetQuark();
break;
}
}
}
return Quark;
G4double sum = GetProbability(diQuark);
G4double random = G4UniformRand();
G4double running = 0;
G4int Quark(0);
typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
iter i;
for(i = thePartonInfo.begin(); i!=thePartonInfo.end(); i++)
{
if (std::abs((*i)->GetDiQuark()) == std::abs(diQuark))
{
running += (*i)->GetProbability();
if (running/sum >= random)
{
Quark = (*i)->GetQuark();
break;
}
}
}
return Quark;
}
G4double G4SPBaryon::GetProbability(G4int diQuark) const
{
G4double sum = 0;
typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
iter i;
for(i = thePartonInfo.begin(); i!=thePartonInfo.end(); i++)
{
if (std::abs((*i)->GetDiQuark()) == std::abs(diQuark))
{
sum += (*i)->GetProbability();
}
}
return sum;
G4double sum = 0;
typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
iter i;
for(i = thePartonInfo.begin(); i!=thePartonInfo.end(); i++)
{
if (std::abs((*i)->GetDiQuark()) == std::abs(diQuark))
{
sum += (*i)->GetProbability();
}
}
return sum;
}
G4int G4SPBaryon::
MatchDiQuarkAndGetQuark(const G4SPBaryon & aBaryon, G4int & aDiQuark) const
G4int G4SPBaryon::MatchDiQuarkAndGetQuark(const G4SPBaryon & aBaryon, G4int & aDiQuark) const
{
G4int result=0;
typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
iter i;
G4double running = 0;
G4double total = 0;
for(i = thePartonInfo.begin(); i!=thePartonInfo.end(); i++)
{
total += aBaryon.GetProbability((*i)->GetDiQuark());
}
G4double random = G4UniformRand()*total;
for(i = thePartonInfo.begin(); i!=thePartonInfo.end(); i++)
{
running += aBaryon.GetProbability((*i)->GetDiQuark());
if(random/total<running)
{
result = (*i)->GetQuark(); // (diquark annihilated)
aDiQuark = (*i)->GetDiQuark();
break;
}
}
return result;
G4int result=0;
typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
iter i;
G4double running = 0;
G4double total = 0;
for(i = thePartonInfo.begin(); i!=thePartonInfo.end(); i++)
{
total += aBaryon.GetProbability((*i)->GetDiQuark());
}
G4double random = G4UniformRand()*total;
for(i = thePartonInfo.begin(); i!=thePartonInfo.end(); i++)
{
running += aBaryon.GetProbability((*i)->GetDiQuark());
if(random/total<running)
{
result = (*i)->GetQuark(); // (diquark annihilated)
aDiQuark = (*i)->GetDiQuark();
break;
}
}
return result;
}
void G4SPBaryon::
SampleQuarkAndDiquark(G4int & quark, G4int & diQuark) const
void G4SPBaryon::SampleQuarkAndDiquark(G4int & quark, G4int & diQuark) const
{
typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
G4double random = G4UniformRand();
G4double sum = 0;
iter i;
for(i=thePartonInfo.begin() ; i!=thePartonInfo.end(); i++)
{
sum += (*i)->GetProbability();
if (sum > random)
{
if (theDefinition->GetPDGEncoding() < 0)
{
quark = (*i)->GetDiQuark();
diQuark = (*i)->GetQuark();
}
else
{
quark = (*i)->GetQuark();
diQuark = (*i)->GetDiQuark();
}
break;
}
}
typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
G4double random = G4UniformRand();
G4double sum = 0;
iter i;
for(i=thePartonInfo.begin() ; i!=thePartonInfo.end(); i++)
{
sum += (*i)->GetProbability();
if (sum > random)
{
if (theDefinition->GetPDGEncoding() < 0)
{
quark = (*i)->GetDiQuark();
diQuark = (*i)->GetQuark();
} else {
quark = (*i)->GetQuark();
diQuark = (*i)->GetDiQuark();
}
break;
}
}
}
void G4SPBaryon::
FindDiquark(G4int quark, G4int & diQuark) const
void G4SPBaryon::FindDiquark(G4int quark, G4int & diQuark) const
{
typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
G4double sum = 0;
iter i;
for(i=thePartonInfo.begin() ; i!=thePartonInfo.end(); i++)
{
if (std::abs((*i)->GetQuark()) == std::abs(quark))
{
sum += (*i)->GetProbability();
}
}
G4double random = G4UniformRand();
G4double running = 0;
for(i=thePartonInfo.begin() ; i!=thePartonInfo.end(); i++)
{
if (std::abs((*i)->GetQuark()) == std::abs(quark))
{
running += (*i)->GetProbability();
if (running/sum >= random)
{
diQuark = (*i)->GetDiQuark();
break;
}
}
}
typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
G4double sum = 0;
iter i;
for(i=thePartonInfo.begin() ; i!=thePartonInfo.end(); i++)
{
if (std::abs((*i)->GetQuark()) == std::abs(quark))
{
sum += (*i)->GetProbability();
}
}
G4double random = G4UniformRand();
G4double running = 0;
for(i=thePartonInfo.begin() ; i!=thePartonInfo.end(); i++)
{
if (std::abs((*i)->GetQuark()) == std::abs(quark))
{
running += (*i)->GetProbability();
if (running/sum >= random)
{
diQuark = (*i)->GetDiQuark();
break;
}
}
}
}
G4SPBaryon::
G4SPBaryon(G4Proton * aProton)
G4SPBaryon::G4SPBaryon(G4Proton * aProton)
{
theDefinition = aProton; // Uzhi
thePartonInfo.push_back(new G4SPPartonInfo(2203, 1, 1./3./2.)); // uu_1, d
thePartonInfo.push_back(new G4SPPartonInfo(2103, 2, 1./6.*2.)); // ud_1, u
thePartonInfo.push_back(new G4SPPartonInfo(2101, 2, 1./2.)); // ud_0, u
theDefinition = aProton;
thePartonInfo.push_back(new G4SPPartonInfo(2203, 1, 1./3.)); // uu_1, d
thePartonInfo.push_back(new G4SPPartonInfo(2103, 2, 1./6.)); // ud_1, u
thePartonInfo.push_back(new G4SPPartonInfo(2101, 2, 1./2.)); // ud_0, u
}
G4SPBaryon::
G4SPBaryon(G4AntiProton * aAntiProton)
G4SPBaryon::G4SPBaryon(G4AntiProton * aAntiProton)
{
theDefinition = aAntiProton;
thePartonInfo.push_back(new G4SPPartonInfo(-2203, -1, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(-2103, -2, 1./6.));
thePartonInfo.push_back(new G4SPPartonInfo(-2101, -2, 1./2.));
theDefinition = aAntiProton;
thePartonInfo.push_back(new G4SPPartonInfo(-2203, -1, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(-2103, -2, 1./6.));
thePartonInfo.push_back(new G4SPPartonInfo(-2101, -2, 1./2.));
}
G4SPBaryon::
G4SPBaryon(G4Neutron * aNeutron)
G4SPBaryon::G4SPBaryon(G4Neutron * aNeutron)
{
theDefinition = aNeutron; // Uzhi
thePartonInfo.push_back(new G4SPPartonInfo(2103, 1, 1./6.*2.)); // ud_1, d
thePartonInfo.push_back(new G4SPPartonInfo(2101, 1, 1./2. )); // ud_0, d
thePartonInfo.push_back(new G4SPPartonInfo(1103, 2, 1./3./2 )); // dd_1, u
theDefinition = aNeutron;
thePartonInfo.push_back(new G4SPPartonInfo(2103, 1, 1./6.)); // ud_1, d
thePartonInfo.push_back(new G4SPPartonInfo(2101, 1, 1./2.)); // ud_0, d
thePartonInfo.push_back(new G4SPPartonInfo(1103, 2, 1./3.)); // dd_1, u
}
G4SPBaryon::
G4SPBaryon(G4AntiNeutron * aAntiNeutron)
G4SPBaryon::G4SPBaryon(G4AntiNeutron * aAntiNeutron)
{
theDefinition = aAntiNeutron;
thePartonInfo.push_back(new G4SPPartonInfo(-2103, -1, 1./6.));
thePartonInfo.push_back(new G4SPPartonInfo(-2101, -1, 1./2.));
thePartonInfo.push_back(new G4SPPartonInfo(-1103, -2, 1./3.));
theDefinition = aAntiNeutron;
thePartonInfo.push_back(new G4SPPartonInfo(-2103, -1, 1./6.));
thePartonInfo.push_back(new G4SPPartonInfo(-2101, -1, 1./2.));
thePartonInfo.push_back(new G4SPPartonInfo(-1103, -2, 1./3.));
}
G4SPBaryon::
G4SPBaryon(G4Lambda * aLambda)
G4SPBaryon::G4SPBaryon(G4Lambda * aLambda)
{
theDefinition = aLambda;
thePartonInfo.push_back(new G4SPPartonInfo(2103, 3, 1./3.)); // ud_1, s
thePartonInfo.push_back(new G4SPPartonInfo(3203, 1, 1./4.)); // su_1, d
thePartonInfo.push_back(new G4SPPartonInfo(3201, 1, 1./12.)); // su_0, d
thePartonInfo.push_back(new G4SPPartonInfo(3103, 2, 1./4.)); // sd_1, u
thePartonInfo.push_back(new G4SPPartonInfo(3101, 2, 1./12.)); // sd_0, u
theDefinition = aLambda;
thePartonInfo.push_back(new G4SPPartonInfo(2103, 3, 1./3.)); // ud_1, s
thePartonInfo.push_back(new G4SPPartonInfo(3203, 1, 1./4.)); // su_1, d
thePartonInfo.push_back(new G4SPPartonInfo(3201, 1, 1./12.)); // su_0, d
thePartonInfo.push_back(new G4SPPartonInfo(3103, 2, 1./4.)); // sd_1, u
thePartonInfo.push_back(new G4SPPartonInfo(3101, 2, 1./12.)); // sd_0, u
}
G4SPBaryon::
G4SPBaryon(G4AntiLambda * aAntiLambda)
G4SPBaryon::G4SPBaryon(G4AntiLambda * aAntiLambda)
{
theDefinition = aAntiLambda;
thePartonInfo.push_back(new G4SPPartonInfo(-2103, -3, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(-3203, -1, 1./4.));
thePartonInfo.push_back(new G4SPPartonInfo(-3201, -1, 1./12.));
thePartonInfo.push_back(new G4SPPartonInfo(-3103, -2, 1./4.));
thePartonInfo.push_back(new G4SPPartonInfo(-3101, -2, 1./12.));
theDefinition = aAntiLambda;
thePartonInfo.push_back(new G4SPPartonInfo(-2103, -3, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(-3203, -1, 1./4.));
thePartonInfo.push_back(new G4SPPartonInfo(-3201, -1, 1./12.));
thePartonInfo.push_back(new G4SPPartonInfo(-3103, -2, 1./4.));
thePartonInfo.push_back(new G4SPPartonInfo(-3101, -2, 1./12.));
}
G4SPBaryon::
G4SPBaryon(G4SigmaPlus * aSigmaPlus)
G4SPBaryon::G4SPBaryon(G4SigmaPlus * aSigmaPlus)
{
theDefinition = aSigmaPlus;
thePartonInfo.push_back(new G4SPPartonInfo(2203, 3, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(3203, 2, 1./6.));
thePartonInfo.push_back(new G4SPPartonInfo(3201, 2, 1./2.));
theDefinition = aSigmaPlus;
thePartonInfo.push_back(new G4SPPartonInfo(2203, 3, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(3203, 2, 1./6.));
thePartonInfo.push_back(new G4SPPartonInfo(3201, 2, 1./2.));
}
G4SPBaryon::
G4SPBaryon(G4AntiSigmaPlus * aAntiSigmaPlus)
G4SPBaryon::G4SPBaryon(G4AntiSigmaPlus * aAntiSigmaPlus)
{
theDefinition = aAntiSigmaPlus;
thePartonInfo.push_back(new G4SPPartonInfo(-2203, -3, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(-3203, -2, 1./6.));
thePartonInfo.push_back(new G4SPPartonInfo(-3201, -2, 1./2.));
theDefinition = aAntiSigmaPlus;
thePartonInfo.push_back(new G4SPPartonInfo(-2203, -3, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(-3203, -2, 1./6.));
thePartonInfo.push_back(new G4SPPartonInfo(-3201, -2, 1./2.));
}
G4SPBaryon::
G4SPBaryon(G4SigmaZero * aSigmaZero)
G4SPBaryon::G4SPBaryon(G4SigmaZero * aSigmaZero)
{
theDefinition = aSigmaZero;
thePartonInfo.push_back(new G4SPPartonInfo(2103, 3, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(3203, 1, 1./12.));
thePartonInfo.push_back(new G4SPPartonInfo(3201, 1, 1./4.));
thePartonInfo.push_back(new G4SPPartonInfo(3103, 2, 1./12.));
thePartonInfo.push_back(new G4SPPartonInfo(3101, 2, 1./4.));
theDefinition = aSigmaZero;
thePartonInfo.push_back(new G4SPPartonInfo(2103, 3, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(3203, 1, 1./12.));
thePartonInfo.push_back(new G4SPPartonInfo(3201, 1, 1./4.));
thePartonInfo.push_back(new G4SPPartonInfo(3103, 2, 1./12.));
thePartonInfo.push_back(new G4SPPartonInfo(3101, 2, 1./4.));
}
G4SPBaryon::
G4SPBaryon(G4AntiSigmaZero * aAntiSigmaZero)
G4SPBaryon::G4SPBaryon(G4AntiSigmaZero * aAntiSigmaZero)
{
theDefinition = aAntiSigmaZero;
thePartonInfo.push_back(new G4SPPartonInfo(-2103, -3, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(-3203, -1, 1./12.));
thePartonInfo.push_back(new G4SPPartonInfo(-3201, -1, 1./4.));
thePartonInfo.push_back(new G4SPPartonInfo(-3103, -2, 1./12.));
thePartonInfo.push_back(new G4SPPartonInfo(-3101, -2, 1./4.));
theDefinition = aAntiSigmaZero;
thePartonInfo.push_back(new G4SPPartonInfo(-2103, -3, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(-3203, -1, 1./12.));
thePartonInfo.push_back(new G4SPPartonInfo(-3201, -1, 1./4.));
thePartonInfo.push_back(new G4SPPartonInfo(-3103, -2, 1./12.));
thePartonInfo.push_back(new G4SPPartonInfo(-3101, -2, 1./4.));
}
G4SPBaryon::
G4SPBaryon(G4SigmaMinus * aSigmaMinus)
G4SPBaryon::G4SPBaryon(G4SigmaMinus * aSigmaMinus)
{
theDefinition = aSigmaMinus;
thePartonInfo.push_back(new G4SPPartonInfo(1103, 3, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(3103, 1, 1./6.));
thePartonInfo.push_back(new G4SPPartonInfo(3101, 1, 1./2.));
theDefinition = aSigmaMinus;
thePartonInfo.push_back(new G4SPPartonInfo(1103, 3, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(3103, 1, 1./6.));
thePartonInfo.push_back(new G4SPPartonInfo(3101, 1, 1./2.));
}
G4SPBaryon::
G4SPBaryon(G4AntiSigmaMinus * aAntiSigmaMinus)
G4SPBaryon::G4SPBaryon(G4AntiSigmaMinus * aAntiSigmaMinus)
{
theDefinition = aAntiSigmaMinus;
thePartonInfo.push_back(new G4SPPartonInfo(-1103, -3, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(-3103, -1, 1./6.));
thePartonInfo.push_back(new G4SPPartonInfo(-3101, -1, 1./2.));
theDefinition = aAntiSigmaMinus;
thePartonInfo.push_back(new G4SPPartonInfo(-1103, -3, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(-3103, -1, 1./6.));
thePartonInfo.push_back(new G4SPPartonInfo(-3101, -1, 1./2.));
}
G4SPBaryon::
G4SPBaryon(G4XiMinus * aXiMinus)
G4SPBaryon::G4SPBaryon(G4XiMinus * aXiMinus)
{
theDefinition = aXiMinus;
thePartonInfo.push_back(new G4SPPartonInfo(3103, 3, 1./6.));
thePartonInfo.push_back(new G4SPPartonInfo(3101, 3, 1./2.));
thePartonInfo.push_back(new G4SPPartonInfo(3303, 1, 1./3.));
theDefinition = aXiMinus;
thePartonInfo.push_back(new G4SPPartonInfo(3103, 3, 1./6.));
thePartonInfo.push_back(new G4SPPartonInfo(3101, 3, 1./2.));
thePartonInfo.push_back(new G4SPPartonInfo(3303, 1, 1./3.));
}
G4SPBaryon::
G4SPBaryon(G4AntiXiMinus * aAntiXiMinus)
G4SPBaryon::G4SPBaryon(G4AntiXiMinus * aAntiXiMinus)
{
theDefinition = aAntiXiMinus;
thePartonInfo.push_back(new G4SPPartonInfo(-3103, -3, 1./6.));
thePartonInfo.push_back(new G4SPPartonInfo(-3101, -3, 1./2.));
thePartonInfo.push_back(new G4SPPartonInfo(-3303, -1, 1./3.));
theDefinition = aAntiXiMinus;
thePartonInfo.push_back(new G4SPPartonInfo(-3103, -3, 1./6.));
thePartonInfo.push_back(new G4SPPartonInfo(-3101, -3, 1./2.));
thePartonInfo.push_back(new G4SPPartonInfo(-3303, -1, 1./3.));
}
G4SPBaryon::
G4SPBaryon(G4XiZero * aXiZero)
G4SPBaryon::G4SPBaryon(G4XiZero * aXiZero)
{
theDefinition = aXiZero;
thePartonInfo.push_back(new G4SPPartonInfo(3203, 3, 1./6.));
thePartonInfo.push_back(new G4SPPartonInfo(3201, 3, 1./2.));
thePartonInfo.push_back(new G4SPPartonInfo(3303, 2, 1./3.));
theDefinition = aXiZero;
thePartonInfo.push_back(new G4SPPartonInfo(3203, 3, 1./6.));
thePartonInfo.push_back(new G4SPPartonInfo(3201, 3, 1./2.));
thePartonInfo.push_back(new G4SPPartonInfo(3303, 2, 1./3.));
}
G4SPBaryon::
G4SPBaryon(G4AntiXiZero * aAntiXiZero)
G4SPBaryon::G4SPBaryon(G4AntiXiZero * aAntiXiZero)
{
theDefinition = aAntiXiZero;
thePartonInfo.push_back(new G4SPPartonInfo(-3203, -3, 1./6.));
thePartonInfo.push_back(new G4SPPartonInfo(-3201, -3, 1./2.));
thePartonInfo.push_back(new G4SPPartonInfo(-3303, -2, 1./3.));
theDefinition = aAntiXiZero;
thePartonInfo.push_back(new G4SPPartonInfo(-3203, -3, 1./6.));
thePartonInfo.push_back(new G4SPPartonInfo(-3201, -3, 1./2.));
thePartonInfo.push_back(new G4SPPartonInfo(-3303, -2, 1./3.));
}
G4SPBaryon::
G4SPBaryon(G4OmegaMinus * anOmegaMinus)
G4SPBaryon::G4SPBaryon(G4OmegaMinus * anOmegaMinus)
{
theDefinition = anOmegaMinus;
thePartonInfo.push_back(new G4SPPartonInfo(3303, 3, 1.));
theDefinition = anOmegaMinus;
thePartonInfo.push_back(new G4SPPartonInfo(3303, 3, 1.));
}
G4SPBaryon::
G4SPBaryon(G4AntiOmegaMinus * anAntiOmegaMinus)
G4SPBaryon::G4SPBaryon(G4AntiOmegaMinus * anAntiOmegaMinus)
{
theDefinition = anAntiOmegaMinus;
thePartonInfo.push_back(new G4SPPartonInfo(-3303, -3, 1.));
theDefinition = anAntiOmegaMinus;
thePartonInfo.push_back(new G4SPPartonInfo(-3303, -3, 1.));
}
// non static particles
G4SPBaryon::
G4SPBaryon(G4ParticleDefinition * aDefinition)
G4SPBaryon::G4SPBaryon(G4ParticleDefinition * aDefinition)
{
theDefinition = aDefinition;
if(theDefinition ==
G4ParticleTable::GetParticleTable()->FindParticle(2224))// D++
{
thePartonInfo.push_back(new G4SPPartonInfo(2203, 2, 1.));
}
else if(theDefinition ==
G4ParticleTable::GetParticleTable()->FindParticle(-2224))// anti D++
{
thePartonInfo.push_back(new G4SPPartonInfo(-2203, -2, 1.));
}
else if(theDefinition ==
G4ParticleTable::GetParticleTable()->FindParticle(2214))// D+
{
thePartonInfo.push_back(new G4SPPartonInfo(2203, 1, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(2103, 2, 2./3.));
}
else if(theDefinition ==
G4ParticleTable::GetParticleTable()->FindParticle(-2214))// anti D+
{
thePartonInfo.push_back(new G4SPPartonInfo(-2203, -1, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(-2103, -2, 2./3.));
}
else if(theDefinition ==
G4ParticleTable::GetParticleTable()->FindParticle(2114))// D0
{
thePartonInfo.push_back(new G4SPPartonInfo(2103, 1, 2./3.));
// Uzhi thePartonInfo.push_back(new G4SPPartonInfo(2103, 2, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(1103, 2, 1./3.)); // Uzhi 14.05.2014
}
else if(theDefinition ==
G4ParticleTable::GetParticleTable()->FindParticle(-2114))// anti D0
{
thePartonInfo.push_back(new G4SPPartonInfo(-2103, -1, 2./3.));
thePartonInfo.push_back(new G4SPPartonInfo(-2103, -2, 1./3.));
}
else if(theDefinition ==
G4ParticleTable::GetParticleTable()->FindParticle(1114))// D-
{
thePartonInfo.push_back(new G4SPPartonInfo(1103, 1, 1.));
}
else if(theDefinition ==
G4ParticleTable::GetParticleTable()->FindParticle(-1114))// anti D-
{
thePartonInfo.push_back(new G4SPPartonInfo(-1103, -1, 1.));
}
else if(theDefinition ==
G4ParticleTable::GetParticleTable()->FindParticle(3224))// S*+
{
thePartonInfo.push_back(new G4SPPartonInfo(2203, 3, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(3203, 2, 2./3.));
}
else if(theDefinition ==
G4ParticleTable::GetParticleTable()->FindParticle(-3224))// anti S*+
{
thePartonInfo.push_back(new G4SPPartonInfo(-2203, -3, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(-3203, -2, 2./3.));
}
else if(theDefinition ==
G4ParticleTable::GetParticleTable()->FindParticle(3214))// S*0
{
thePartonInfo.push_back(new G4SPPartonInfo(2103, 3, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(3203, 1, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(3103, 2, 1./3.));
}
else if(theDefinition ==
G4ParticleTable::GetParticleTable()->FindParticle(-3214))// anti S*0
{
thePartonInfo.push_back(new G4SPPartonInfo(-2103, -3, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(-3203, -1, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(-3103, -2, 1./3.));
}
else if(theDefinition ==
G4ParticleTable::GetParticleTable()->FindParticle(3114))// S*-
{
thePartonInfo.push_back(new G4SPPartonInfo(1103, 3, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(3103, 1, 2./3.));
}
else if(theDefinition ==
G4ParticleTable::GetParticleTable()->FindParticle(-3224))// anti S*-
{
thePartonInfo.push_back(new G4SPPartonInfo(-1103, -3, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(-3103, -1, 2./3.));
}
else if(theDefinition ==
G4ParticleTable::GetParticleTable()->FindParticle(3324))// Xi*0
{
thePartonInfo.push_back(new G4SPPartonInfo(3203, 3, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(3303, 2, 2./3.));
}
else if(theDefinition ==
G4ParticleTable::GetParticleTable()->FindParticle(-3324))// anti Xi*0
{
thePartonInfo.push_back(new G4SPPartonInfo(-3203, -3, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(-3303, -2, 2./3.));
}
else if(theDefinition ==
G4ParticleTable::GetParticleTable()->FindParticle(3314))// Xi*-
{
thePartonInfo.push_back(new G4SPPartonInfo(3103, 3, 2./3.));
thePartonInfo.push_back(new G4SPPartonInfo(3303, 1, 1./3.));
}
else if(theDefinition ==
G4ParticleTable::GetParticleTable()->FindParticle(-3314))// anti Xi*-
{
thePartonInfo.push_back(new G4SPPartonInfo(-3103, -3, 2./3.));
thePartonInfo.push_back(new G4SPPartonInfo(-3303, -1, 1./3.));
}
theDefinition = aDefinition;
if(theDefinition == G4ParticleTable::GetParticleTable()->FindParticle(2224))// D++
{
thePartonInfo.push_back(new G4SPPartonInfo(2203, 2, 1.));
}
else if(theDefinition == G4ParticleTable::GetParticleTable()->FindParticle(-2224))// anti D++
{
thePartonInfo.push_back(new G4SPPartonInfo(-2203, -2, 1.));
}
else if(theDefinition == G4ParticleTable::GetParticleTable()->FindParticle(2214))// D+
{
thePartonInfo.push_back(new G4SPPartonInfo(2203, 1, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(2103, 2, 2./3.));
}
else if(theDefinition == G4ParticleTable::GetParticleTable()->FindParticle(-2214))// anti D+
{
thePartonInfo.push_back(new G4SPPartonInfo(-2203, -1, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(-2103, -2, 2./3.));
}
else if(theDefinition == G4ParticleTable::GetParticleTable()->FindParticle(2114))// D0
{
thePartonInfo.push_back(new G4SPPartonInfo(2103, 1, 2./3.));
thePartonInfo.push_back(new G4SPPartonInfo(2103, 2, 1./3.));
}
else if(theDefinition == G4ParticleTable::GetParticleTable()->FindParticle(-2114))// anti D0
{
thePartonInfo.push_back(new G4SPPartonInfo(-2103, -1, 2./3.));
thePartonInfo.push_back(new G4SPPartonInfo(-2103, -2, 1./3.));
}
else if(theDefinition == G4ParticleTable::GetParticleTable()->FindParticle(1114))// D-
{
thePartonInfo.push_back(new G4SPPartonInfo(1103, 1, 1.));
}
else if(theDefinition == G4ParticleTable::GetParticleTable()->FindParticle(-1114))// anti D-
{
thePartonInfo.push_back(new G4SPPartonInfo(-1103, -1, 1.));
}
else if(theDefinition == G4ParticleTable::GetParticleTable()->FindParticle(3224))// S*+
{
thePartonInfo.push_back(new G4SPPartonInfo(2203, 3, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(3203, 2, 2./3.));
}
else if(theDefinition == G4ParticleTable::GetParticleTable()->FindParticle(-3224))// anti S*+
{
thePartonInfo.push_back(new G4SPPartonInfo(-2203, -3, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(-3203, -2, 2./3.));
}
else if(theDefinition == G4ParticleTable::GetParticleTable()->FindParticle(3214))// S*0
{
thePartonInfo.push_back(new G4SPPartonInfo(2103, 3, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(3203, 1, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(3103, 2, 1./3.));
}
else if(theDefinition == G4ParticleTable::GetParticleTable()->FindParticle(-3214))// anti S*0
{
thePartonInfo.push_back(new G4SPPartonInfo(-2103, -3, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(-3203, -1, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(-3103, -2, 1./3.));
}
else if(theDefinition == G4ParticleTable::GetParticleTable()->FindParticle(3114))// S*-
{
thePartonInfo.push_back(new G4SPPartonInfo(1103, 3, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(3103, 1, 2./3.));
}
else if(theDefinition == G4ParticleTable::GetParticleTable()->FindParticle(-3224))// anti S*-
{
thePartonInfo.push_back(new G4SPPartonInfo(-1103, -3, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(-3103, -1, 2./3.));
}
else if(theDefinition == G4ParticleTable::GetParticleTable()->FindParticle(3324))// Xi*0
{
thePartonInfo.push_back(new G4SPPartonInfo(3203, 3, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(3303, 2, 2./3.));
}
else if(theDefinition == G4ParticleTable::GetParticleTable()->FindParticle(-3324))// anti Xi*0
{
thePartonInfo.push_back(new G4SPPartonInfo(-3203, -3, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(-3303, -2, 2./3.));
}
else if(theDefinition == G4ParticleTable::GetParticleTable()->FindParticle(3314))// Xi*-
{
thePartonInfo.push_back(new G4SPPartonInfo(3103, 3, 2./3.));
thePartonInfo.push_back(new G4SPPartonInfo(3303, 1, 1./3.));
}
else if(theDefinition == G4ParticleTable::GetParticleTable()->FindParticle(-3314))// anti Xi*-
{
thePartonInfo.push_back(new G4SPPartonInfo(-3103, -3, 2./3.));
thePartonInfo.push_back(new G4SPPartonInfo(-3303, -1, 1./3.));
}
}
G4SPBaryon::~G4SPBaryon()
{
for(unsigned int i=0;i<thePartonInfo.size(); i++) delete thePartonInfo[i];
for(unsigned int i=0;i<thePartonInfo.size(); i++) delete thePartonInfo[i];
}
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4SingleDiffractiveExcitation.cc 94750 2015-12-07 08:24:29Z gcosmo $
// $Id: G4SingleDiffractiveExcitation.cc 100828 2016-11-02 15:25:59Z gcosmo $
// ------------------------------------------------------------
// GEANT 4 class implemetation file
//
@@ -47,13 +47,10 @@
#include "G4ExcitedString.hh"
#include "G4Log.hh"
#include "G4Pow.hh"
G4SingleDiffractiveExcitation::G4SingleDiffractiveExcitation(G4double sigmaPt, G4double minextraMass,G4double x0mass)
:
widthOfPtSquare(-2*sqr(sigmaPt)) , minExtraMass(minextraMass),
minmass(x0mass)
: widthOfPtSquare(-2*sqr(sigmaPt)) , minExtraMass(minextraMass), minmass(x0mass)
{}
G4SingleDiffractiveExcitation::~G4SingleDiffractiveExcitation()
@@ -62,212 +59,172 @@ G4SingleDiffractiveExcitation::~G4SingleDiffractiveExcitation()
G4bool G4SingleDiffractiveExcitation::
ExciteParticipants(G4VSplitableHadron *projectile, G4VSplitableHadron *target) const
{
/*
G4cout<<G4endl<<"G4SingleDiffractiveExcitation::ExciteParticipants"<<G4endl;
G4cout<<"Proj Targ "<<projectile->GetDefinition()->GetPDGEncoding()<<" "<<target->GetDefinition()->GetPDGEncoding()<<G4endl;
G4cout<<"minExtraMass "<<minExtraMass<<" minmass "<<minmass<<" widthOfPtSquare "<<widthOfPtSquare<<G4endl;
*/
G4LorentzVector Pprojectile=projectile->Get4Momentum();
G4double Mprojectile = projectile->GetDefinition()->GetPDGMass();
G4double Mprojectile2=sqr(projectile->GetDefinition()->GetPDGMass()); // + minExtraMass);
G4LorentzVector Pprojectile=projectile->Get4Momentum();
G4double Mprojectile2=sqr(projectile->GetDefinition()->GetPDGMass() + minExtraMass);
G4LorentzVector Ptarget=target->Get4Momentum();
G4double Mtarget = target->GetDefinition()->GetPDGMass();
G4double Mtarget2=sqr(target->GetDefinition()->GetPDGMass()); // + minExtraMass);
G4LorentzVector Ptarget=target->Get4Momentum();
G4double Mtarget2=sqr(target->GetDefinition()->GetPDGMass() + minExtraMass);
//G4cout << "E proj, target :" << Pprojectile.e() << ", " << Ptarget.e() << G4endl;
//G4cout<<"Pr Tr 4-Mom "<<Pprojectile<<" "<<Pprojectile.mag()<<G4endl<<" "<<Ptarget <<" "<<Ptarget.mag() <<G4endl;
G4bool KeepProjectile= G4UniformRand() > 0.5;
// Transform momenta to cms and then rotate parallel to z axis;
G4double AveragePt2=sqr(400.*MeV);
// reset the min.mass of the non diffractive particle to its value, ( minus a bit for rounding...)
if ( KeepProjectile )
{
//cout << " Projectile fix" << G4endl;
Mprojectile2 = sqr(projectile->GetDefinition()->GetPDGMass() * (1-perCent) );
} else {
//cout << " Target fix" << G4endl;
Mtarget2=sqr(target->GetDefinition()->GetPDGMass() * (1-perCent) );
}
G4LorentzVector Psum=Pprojectile+Ptarget;
G4double SqrtS=Psum.mag();
G4double S =Psum.mag2();
// Transform momenta to cms and then rotate parallel to z axis;
if(SqrtS-Mprojectile-Mtarget <= 250.0*MeV) {
return true;
/*
G4cerr<<"Projectile: "<<projectile->GetDefinition()->GetPDGEncoding()<<" "
<<Pprojectile<<" "<<Pprojectile.mag()<<G4endl;
G4cerr<<"Target: "<<target->GetDefinition()->GetPDGEncoding()<<" "
<<Ptarget<<" "<<Ptarget.mag()<<G4endl;
G4cerr<<"sqrt(S) = "<<SqrtS<<" Mp + Mt = "<<Pprojectile.mag()+Ptarget.mag()<<G4endl;
throw G4HadronicException(__FILE__, __LINE__, "The QGSM cannot work at such low energy!");
*/
}
G4LorentzVector Psum;
Psum=Pprojectile+Ptarget;
G4LorentzRotation toCms(-1*Psum.boostVector());
G4LorentzRotation toCms(-1*Psum.boostVector());
G4LorentzVector Ptmp=toCms*Pprojectile;
G4LorentzVector Ptmp=toCms*Pprojectile;
if ( Ptmp.pz() <= 0. )
{
// "String" moving backwards in CMS, abort collision !!
// G4cout << " abort Collision!! " << G4endl;
return false;
}
if ( Ptmp.pz() <= 0. )
{
// "String" moving backwards in CMS, abort collision !!
//G4cout << " abort Collision!! " << G4endl;
return false;
}
toCms.rotateZ(-1*Ptmp.phi());
toCms.rotateY(-1*Ptmp.theta());
toCms.rotateZ(-1*Ptmp.phi());
toCms.rotateY(-1*Ptmp.theta());
G4LorentzRotation toLab(toCms.inverse());
//G4cout << "Pprojectile be4 boost " << Pprojectile << G4endl;
//G4cout << "Ptarget be4 boost : " << Ptarget << G4endl;
//G4cout << "Pprojectile be4 boost " << Pprojectile << G4endl;
//G4cout << "Ptarget be4 boost : " << Ptarget << G4endl;
Pprojectile.transform(toCms);
Ptarget.transform(toCms);
//G4cout << "Pprojectile aft boost " << Pprojectile << G4endl;
//G4cout << "Ptarget aft boost : " << Ptarget << G4endl;
G4double maxPtSquare=sqr(Ptarget.pz());
G4LorentzRotation toLab(toCms.inverse());
Pprojectile.transform(toCms);
Ptarget.transform(toCms);
G4double Pt2, PZcms, PZcms2;
G4double ProjMassT2, ProjMassT;
G4double TargMassT2, TargMassT;
G4double PMinusMin, PMinusMax;
//G4double PPlusMin , PPlusMax;
G4double TPlusMin, TPlusMax;
G4double PMinusNew, PPlusNew, TPlusNew, TMinusNew;
G4LorentzVector Qmomentum;
G4int whilecount=0;
do {
// Generate pt
G4LorentzVector Qmomentum;
G4double Qminus, Qplus;
G4double maxPtSquare=sqr(Ptarget.pz());
if (whilecount++ >= 500 && (whilecount%100)==0)
//G4cout << "G4SingleDiffractiveExcitation::ExciteParticipants possibly looping"
// << ", loop count/ maxPtSquare : "
// << whilecount << " / " << maxPtSquare << G4endl;
G4bool ProjectileDiffraction= G4UniformRand() > 0.5;
if ( ProjectileDiffraction )
{ // The projectile will fragment, the target will saved.
Mprojectile2=sqr(Mprojectile + 250.*MeV );
if (whilecount > 1000 )
{
Qmomentum=G4LorentzVector(0.,0.,0.,0.);
//G4cout << "G4SingleDiffractiveExcitation::ExciteParticipants: Aborting loop!" << G4endl;
return false; // Ignore this interaction
}
Qmomentum=G4LorentzVector(GaussianPt(widthOfPtSquare,maxPtSquare),0);
} else {// The target will fragment, the projectile will saved.
Mtarget2 = sqr(Mtarget + 250.*MeV );
}
// Momentum transfer
G4double Xmin = minmass / ( Pprojectile.e() + Ptarget.e() );
G4double Xmax=1.;
G4double Xplus =ChooseX(Xmin,Xmax);
G4double Xminus=ChooseX(Xmin,Xmax);
G4int whilecount=0;
do {
whilecount++;
G4double pt2=G4ThreeVector(Qmomentum.vect()).mag2();
G4double Qplus =-1 * pt2 / Xminus/Ptarget.minus();
G4double Qminus= pt2 / Xplus /Pprojectile.plus();
if (whilecount > 1000 )
{
//G4cout<<"whilecount > 1000 "<<whilecount<<G4endl;
Qmomentum=G4LorentzVector(0.,0.,0.,0.);
return false; // Ignore this interaction
}
// Generate pt
Qmomentum=G4LorentzVector(GaussianPt(AveragePt2,maxPtSquare),0);
if ( KeepProjectile )
{
Qminus = (sqr(projectile->GetDefinition()->GetPDGMass()) + pt2 )
/ (Pprojectile.plus() + Qplus ) - Pprojectile.minus();
} else {
Qplus = Ptarget.plus() - (sqr(target->GetDefinition()->GetPDGMass()) + pt2 )
/ (Ptarget.minus() - Qminus );
}
Pt2 = G4ThreeVector( Qmomentum.vect() ).mag2();
ProjMassT2 = Mprojectile2 + Pt2;
ProjMassT = std::sqrt( ProjMassT2 );
TargMassT2 = Mtarget2 + Pt2;
TargMassT = std::sqrt( TargMassT2 );
//G4cout<<whilecount<<" "<<Pt2<<" "<<ProjMassT<<" "<<TargMassT<<" "<<SqrtS<<" "<<S<<" "<<ProjectileDiffraction<<G4endl;
Qmomentum.setPz( (Qplus-Qminus)/2 );
Qmomentum.setE( (Qplus+Qminus)/2 );
if ( SqrtS < ProjMassT + TargMassT ) continue;
//G4cout << "Qplus / Qminus " << Qplus << " / " << Qminus<<G4endl;
//G4cout << "pt2 " << pt2 << G4endl;
//G4cout << "Qmomentum " << Qmomentum << G4endl;
//G4cout << " Masses (P/T) : " << (Pprojectile+Qmomentum).mag() <<
// " / " << (Ptarget-Qmomentum).mag() << G4endl;
PZcms2 = ( S*S + ProjMassT2*ProjMassT2 + TargMassT2*TargMassT2
- 2.0*S*ProjMassT2 - 2.0*S*TargMassT2 - 2.0*ProjMassT2*TargMassT2 ) / 4.0 / S;
} while ( (Ptarget-Qmomentum).mag2() <= Mtarget2 /* Loop checking, 26.10.2015, A.Ribon */
|| (Pprojectile+Qmomentum).mag2() <= Mprojectile2
|| (Ptarget-Qmomentum).e() < 0.
|| (Pprojectile+Qmomentum).e() < 0. );
if ( PZcms2 < 0 ) continue;
//G4double Ecms=Pprojectile.e() + Ptarget.e();
PZcms = std::sqrt( PZcms2 );
Pprojectile += Qmomentum;
Ptarget -= Qmomentum;
if ( ProjectileDiffraction )
{ // The projectile will fragment, the target will saved.
PMinusMin = std::sqrt( ProjMassT2 + PZcms2 ) - PZcms;
PMinusMax = SqrtS - TargMassT;
//G4cout << "Pprojectile.e() : " << Pprojectile.e() << G4endl;
//G4cout << "Ptarget.e() : " << Ptarget.e() << G4endl;
//G4cout << "end event_______________________________________________"<<G4endl;
//G4cout << "Pprojectile with Q : " << Pprojectile << G4endl;
//G4cout << "Ptarget with Q : " << Ptarget << G4endl;
//G4cout << "Projectile back: " << toLab * Pprojectile << G4endl;
//G4cout << "Target back: " << toLab * Ptarget << G4endl;
PMinusNew = ChooseX( PMinusMin, PMinusMax );
TMinusNew = SqrtS - PMinusNew;
// Transform back and update SplitableHadron Participant.
Pprojectile.transform(toLab);
Ptarget.transform(toLab);
Qminus = Ptarget.minus() - TMinusNew;
TPlusNew = TargMassT2 / TMinusNew;
Qplus = Ptarget.plus() - TPlusNew;
//G4cout << "G4SingleDiffractiveExcitation- Target mass " << Ptarget.mag() << G4endl;
//G4cout << "G4SingleDiffractiveExcitation- Projectile mass " << Pprojectile.mag() << G4endl;
} else {// The target will fragment, the projectile will saved.
TPlusMin = std::sqrt( TargMassT2 + PZcms2 ) - PZcms;
TPlusMax = SqrtS - ProjMassT;
TPlusNew = ChooseX( TPlusMin, TPlusMax );
PPlusNew = SqrtS - TPlusNew;
target->Set4Momentum(Ptarget);
projectile->Set4Momentum(Pprojectile);
Qplus = PPlusNew - Pprojectile.plus();
PMinusNew = ProjMassT2 / PPlusNew;
Qminus = PMinusNew - Pprojectile.minus();
}
Qmomentum.setPz( (Qplus - Qminus)/2 );
Qmomentum.setE( (Qplus + Qminus)/2 );
//G4cout<<ProjectileDiffraction<<" "<<( Pprojectile + Qmomentum ).mag2()<<" "<< Mprojectile2<<G4endl;
//G4cout<<!ProjectileDiffraction<<" "<<( Ptarget + Qmomentum ).mag2()<<" "<< Mtarget2<<G4endl;
} while ( ( ProjectileDiffraction&&( Pprojectile + Qmomentum ).mag2() < Mprojectile2 ) ||
(!ProjectileDiffraction&&( Ptarget - Qmomentum ).mag2() < Mtarget2 ) ); /* Loop checking, 07.08.2015, A.Ribon */
// Repeat the sampling because there was not any excitation
Pprojectile += Qmomentum;
Ptarget -= Qmomentum;
// Transform back and update SplitableHadron Participant.
Pprojectile.transform(toLab);
Ptarget.transform(toLab);
//G4cout << "Pprojectile aft boost " << Pprojectile << G4endl;
//G4cout << "Ptarget aft boost : " << Ptarget << G4endl;
//G4cout << "G4SingleDiffractiveExcitation- Target mass " << Ptarget.mag() << G4endl;
//G4cout << "G4SingleDiffractiveExcitation- Projectile mass " << Pprojectile.mag() << G4endl;
//G4int Uzhi; G4cin>>Uzhi;
target->Set4Momentum(Ptarget);
projectile->Set4Momentum(Pprojectile);
return true;
return true;
}
// --------- private methods ----------------------
G4double G4SingleDiffractiveExcitation::ChooseX(G4double Xmin, G4double Xmax) const
{
// choose an x between Xmin and Xmax with P(x) ~ 1/x
G4double range=Xmax-Xmin;
// choose an x between Xmin and Xmax with P(x) ~ 1/x
// to be improved...
if ( Xmin <= 0. || range <=0. )
{
G4cout << " Xmin, range : " << Xmin << " , " << range << G4endl;
throw G4HadronicException(__FILE__, __LINE__, "G4SingleDiffractiveExcitation::ChooseX : Invalid arguments ");
}
G4double range=Xmax-Xmin;
G4double x = Xmin*G4Pow::GetInstance()->powA(Xmax/Xmin, G4UniformRand() );
return x;
if ( Xmin <= 0. || range <=0. )
{
G4cout << " Xmin, range : " << Xmin << " , " << range << G4endl;
throw G4HadronicException(__FILE__, __LINE__, "G4SingleDiffractiveExcitation::ChooseX : Invalid arguments ");
}
G4double x;
do {
x=Xmin + G4UniformRand() * range;
} while ( Xmin/x < G4UniformRand() ); /* Loop checking, 26.10.2015, A.Ribon */
//cout << "DiffractiveX "<<x<<G4endl;
return x;
}
G4ThreeVector G4SingleDiffractiveExcitation::GaussianPt(G4double widthSquare, G4double maxPtSquare) const
{ // @@ this method is used in FTFModel as well. Should go somewhere common!
{
// @@ this method is used in FTFModel as well. Should go somewhere common!
G4double pt2;
G4double pt2;
const G4int maxNumberOfLoops = 1000;
G4int loopCounter = 0;
do {
pt2=-widthSquare * G4Log( G4UniformRand() );
} while ( ( pt2 > maxPtSquare) && ++loopCounter < maxNumberOfLoops ); /* Loop checking, 07.08.2015, A.Ribon */
if ( loopCounter >= maxNumberOfLoops ) {
pt2 = 0.99*maxPtSquare; // Just an acceptable value, without any physics consideration.
}
const G4int maxNumberOfLoops = 1000;
G4int loopCounter = -1;
do {
pt2=widthSquare * G4Log( G4UniformRand() );
} while ( ( pt2 > maxPtSquare) && ++loopCounter < maxNumberOfLoops ); /* Loop checking, 26.10.2015, A.Ribon */
if ( loopCounter >= maxNumberOfLoops ) pt2 = 0.0;
pt2=std::sqrt(pt2);
pt2=std::sqrt(pt2);
G4double phi=G4UniformRand() * twopi;
G4double phi=G4UniformRand() * twopi;
return G4ThreeVector (pt2*std::cos(phi), pt2*std::sin(phi), 0.);
return G4ThreeVector (pt2*std::cos(phi), pt2*std::sin(phi), 0.);
}
@@ -25,6 +25,7 @@
//
#include "G4SoftStringBuilder.hh"
//#define debug_G4SoftStringBuilder
//***************************************************************************************************
G4SoftStringBuilder::G4SoftStringBuilder()
@@ -39,15 +40,17 @@ G4SoftStringBuilder::~G4SoftStringBuilder()
G4ExcitedString* G4SoftStringBuilder::BuildString(G4PartonPair * aPair)
{
#ifdef debug_G4SoftStringBuilder
G4cout << "BuildSoft " << aPair->GetParton1()->GetPDGcode() << " "
<< aPair->GetParton1()->Get4Momentum() << " "
<< aPair->GetParton1()->GetX() << " " << G4endl;
G4cout << " " << aPair->GetParton2()->GetPDGcode() << " "
#ifdef debug_G4SoftStringBuilder
G4cout << "BuildSoft " << aPair->GetParton1()->GetPDGcode() << " "
<< aPair->GetParton1()->Get4Momentum() << " "
<< aPair->GetParton1()->GetX() << " " << G4endl;
G4cout << " " << aPair->GetParton2()->GetPDGcode() << " "
<< aPair->GetParton2()->Get4Momentum() << " "
<< aPair->GetParton2()->GetX() << " " << G4endl;
#endif
return new G4ExcitedString(aPair->GetParton1(), aPair->GetParton2(), aPair->GetDirection());
#endif
return new G4ExcitedString(aPair->GetParton1(), aPair->GetParton2(), aPair->GetDirection());
}
//***********************************************************************************************