Import Geant4 8.3.0 source tree
This commit is contained in:
@@ -26,12 +26,35 @@
|
||||
#include "G4PartonPair.hh"
|
||||
#include "G4HadronicException.hh"
|
||||
|
||||
//#define DEBUG_PartonPair 1
|
||||
|
||||
G4PartonPair::G4PartonPair(G4Parton* P1, G4Parton* P2, G4int Type, G4int 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
|
||||
}
|
||||
|
||||
G4PartonPair::G4PartonPair(const G4PartonPair &)
|
||||
|
||||
@@ -310,16 +310,17 @@ void G4QGSMSplitableHadron::SoftSplitUp()
|
||||
/// and here is the bug ;-) @@@@@@@@@@@@@
|
||||
if(getenv("debug_QGSMSplitableHadron") )G4cout << "particle energy at split = "<<Get4Momentum().t()<<G4endl;
|
||||
G4double lightCone = ((!Direction) ? Get4Momentum().minus() : Get4Momentum().plus());
|
||||
// lightCone -= 0.5*Get4Momentum().m();
|
||||
G4double lightCone2 = ((!Direction) ? Get4Momentum().plus() : Get4Momentum().minus());
|
||||
// lightCone -= 0.5*Get4Momentum().m();
|
||||
// hpw testing @@@@@ lightCone = 2.*Get4Momentum().t();
|
||||
if(getenv("debug_QGSMSplitableHadron") )G4cout << "Light cone = "<<lightCone<<G4endl;
|
||||
for(aSeaPair = 0; aSeaPair < nSeaPair+1; aSeaPair++)
|
||||
{
|
||||
G4Parton* aParton = Color[aSeaPair];
|
||||
aParton->DefineMomentumInZ(lightCone, Direction);
|
||||
aParton->DefineMomentumInZ(lightCone, lightCone2, Direction);
|
||||
|
||||
aParton = AntiColor[aSeaPair];
|
||||
aParton->DefineMomentumInZ(lightCone, Direction);
|
||||
aParton->DefineMomentumInZ(lightCone, lightCone2, Direction);
|
||||
}
|
||||
//--DEBUG-- cout <<G4endl<<"XSAMPLE "<<HPWtest<<G4endl;
|
||||
return;
|
||||
@@ -415,7 +416,7 @@ SampleX(G4double anXmin, G4int nSea, G4int totalSea, G4double aBeta)
|
||||
G4double result;
|
||||
G4double x1, x2;
|
||||
G4double ymax = 0;
|
||||
for(G4int ii=0; ii<100; ii++)
|
||||
for(G4int ii=1; ii<100; ii++)
|
||||
{
|
||||
G4double y = std::pow(1./G4double(ii), alpha);
|
||||
y *= std::pow( std::pow(1-anXmin-totalSea*anXmin, alpha+1) - std::pow(anXmin, alpha+1), nSea);
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
// Promoting model parameters from local variables class properties
|
||||
G4int G4QGSParticipants_NPart = 0;
|
||||
|
||||
G4QGSParticipants::G4QGSParticipants() : theDiffExcitaton(0.7*GeV, 250*MeV, 250*MeV),
|
||||
G4QGSParticipants::G4QGSParticipants() : theDiffExcitaton(), //0.7*GeV, 250*MeV, 250*MeV),
|
||||
nCutMax(7),ThersholdParameter(0.45*GeV),
|
||||
QGSMThershold(3*GeV),theNucleonRadius(1.5*fermi)
|
||||
|
||||
@@ -85,6 +85,8 @@ G4VSplitableHadron* G4QGSParticipants::SelectInteractions(const G4ReactionProduc
|
||||
theNucleus->StartLoop();
|
||||
G4Nucleon * pNucleon = theNucleus->GetNextNucleon();
|
||||
G4LorentzVector aPrimaryMomentum(thePrimary.GetMomentum(), thePrimary.GetTotalEnergy());
|
||||
//--DEBUG--G4cout << " qgspart- " << aPrimaryMomentum << " # " << aPrimaryMomentum.mag()
|
||||
//--DEBUG-- << pNucleon->Get4Momentum() << " # " << (pNucleon->Get4Momentum()).mag()<< G4endl;
|
||||
G4double s = (aPrimaryMomentum + pNucleon->Get4Momentum()).mag2();
|
||||
G4double ThresholdMass = thePrimary.GetMass() + pNucleon->GetDefinition()->GetPDGMass();
|
||||
ModelMode = SOFT;
|
||||
@@ -106,7 +108,9 @@ G4VSplitableHadron* G4QGSParticipants::SelectInteractions(const G4ReactionProduc
|
||||
#ifdef debug_QGS
|
||||
G4double eK = thePrimary.GetKineticEnergy()/GeV;
|
||||
#endif
|
||||
|
||||
#ifdef debug_G4QGSParticipants
|
||||
G4LorentzVector intNuclMom;
|
||||
#endif
|
||||
while(theInteractions.size() == 0)
|
||||
{
|
||||
// choose random impact parameter HPW
|
||||
@@ -119,6 +123,9 @@ G4VSplitableHadron* G4QGSParticipants::SelectInteractions(const G4ReactionProduc
|
||||
theNucleus->StartLoop();
|
||||
G4int nucleonCount = 0; // debug
|
||||
G4QGSParticipants_NPart = 0;
|
||||
#ifdef debug_G4QGSParticipants
|
||||
intNuclMom=aPrimaryMomentum;
|
||||
#endif
|
||||
while( (pNucleon = theNucleus->GetNextNucleon()) )
|
||||
{
|
||||
if(totalCuts>1.5*thePrimary.GetKineticEnergy()/GeV)
|
||||
@@ -137,7 +144,13 @@ G4VSplitableHadron* G4QGSParticipants::SelectInteractions(const G4ReactionProduc
|
||||
if (Probability > rndNumber)
|
||||
{
|
||||
//--DEBUG-- cout << "DEBUG p="<< Probability<<" r="<<rndNumber<<" d="<<std::sqrt(Distance2)<<G4endl;
|
||||
G4QGSMSplitableHadron* aTarget = new G4QGSMSplitableHadron(*pNucleon);
|
||||
//--DEBUG-- G4cout << " qgspart+ " << aPrimaryMomentum << " # " << aPrimaryMomentum.mag()
|
||||
//--DEBUG-- << pNucleon->Get4Momentum() << " # " << (pNucleon->Get4Momentum()).mag()<< G4endl;
|
||||
|
||||
#ifdef debug_G4QGSParticipants
|
||||
intNuclMom += pNucleon->Get4Momentum();
|
||||
#endif
|
||||
G4QGSMSplitableHadron* aTarget = new G4QGSMSplitableHadron(*pNucleon);
|
||||
G4QGSParticipants_NPart ++;
|
||||
theTargets.push_back(aTarget);
|
||||
pNucleon->Hit(aTarget);
|
||||
@@ -189,7 +202,8 @@ G4VSplitableHadron* G4QGSParticipants::SelectInteractions(const G4ReactionProduc
|
||||
}
|
||||
}
|
||||
}
|
||||
//--DEBUG-- cout << G4endl<<"NUCLEONCOUNT "<<nucleonCount<<G4endl;
|
||||
//--DEBUG-- g4cout << G4endl<<"NUCLEONCOUNT "<<nucleonCount<<G4endl;
|
||||
//--DEBUG-- G4cout << " Interact 4-Vect " << intNuclMom << G4endl;
|
||||
}
|
||||
//--DEBUG-- cout << G4endl<<"CUTDEBUG "<< totalCuts <<G4endl;
|
||||
//--DEBUG-- cout << "Impact Parameter used = "<<impactUsed<<G4endl;
|
||||
@@ -212,6 +226,14 @@ void G4QGSParticipants::PerformDiffractiveCollisions()
|
||||
aPartonPair = new G4PartonPair(aParton, aProjectile->GetNextAntiParton(),
|
||||
G4PartonPair::DIFFRACTIVE,
|
||||
G4PartonPair::PROJECTILE);
|
||||
#ifdef debug_G4QGSPart_PDiffColl
|
||||
G4cout << "DiffPair Pro " << aPartonPair->GetParton1()->GetPDGcode() << " "
|
||||
<< aPartonPair->GetParton1()->Get4Momentum() << " "
|
||||
<< aPartonPair->GetParton1()->GetX() << " " << G4endl;
|
||||
G4cout << " " << aPartonPair->GetParton2()->GetPDGcode() << " "
|
||||
<< aPartonPair->GetParton2()->Get4Momentum() << " "
|
||||
<< aPartonPair->GetParton2()->GetX() << " " << G4endl;
|
||||
#endif
|
||||
thePartonPairs.push_back(aPartonPair);
|
||||
}
|
||||
// then target HPW
|
||||
@@ -222,6 +244,14 @@ void G4QGSParticipants::PerformDiffractiveCollisions()
|
||||
aPartonPair = new G4PartonPair(aParton, aTarget->GetNextAntiParton(),
|
||||
G4PartonPair::DIFFRACTIVE,
|
||||
G4PartonPair::TARGET);
|
||||
#ifdef debug_G4QGSPart_PDiffColl
|
||||
G4cout << "DiffPair Tgt " << aPartonPair->GetParton1()->GetPDGcode() << " "
|
||||
<< aPartonPair->GetParton1()->Get4Momentum() << " "
|
||||
<< aPartonPair->GetParton1()->GetX() << " " << G4endl;
|
||||
G4cout << " " << aPartonPair->GetParton2()->GetPDGcode() << " "
|
||||
<< aPartonPair->GetParton2()->Get4Momentum() << " "
|
||||
<< aPartonPair->GetParton2()->GetX() << " " << G4endl;
|
||||
#endif
|
||||
thePartonPairs.push_back(aPartonPair);
|
||||
}
|
||||
}
|
||||
@@ -230,6 +260,7 @@ void G4QGSParticipants::PerformDiffractiveCollisions()
|
||||
void G4QGSParticipants::PerformSoftCollisions()
|
||||
{
|
||||
std::vector<G4InteractionContent*>::iterator i;
|
||||
G4LorentzVector str4Mom;
|
||||
for(i = theInteractions.begin(); i != theInteractions.end(); i++)
|
||||
{
|
||||
G4InteractionContent* anIniteraction = *i;
|
||||
@@ -242,9 +273,33 @@ void G4QGSParticipants::PerformSoftCollisions()
|
||||
{
|
||||
aPair = new G4PartonPair(pTarget->GetNextParton(), pProjectile->GetNextAntiParton(),
|
||||
G4PartonPair::SOFT, G4PartonPair::TARGET);
|
||||
#ifdef debug_G4QGSPart_PSoftColl
|
||||
G4cout << "SoftPair " << aPair->GetParton1()->GetPDGcode() << " "
|
||||
<< aPair->GetParton1()->Get4Momentum() << " "
|
||||
<< aPair->GetParton1()->GetX() << " " << G4endl;
|
||||
G4cout << " " << aPair->GetParton2()->GetPDGcode() << " "
|
||||
<< aPair->GetParton2()->Get4Momentum() << " "
|
||||
<< aPair->GetParton2()->GetX() << " " << G4endl;
|
||||
#endif
|
||||
#ifdef debug_G4QGSParticipants
|
||||
str4Mom += aPair->GetParton1()->Get4Momentum();
|
||||
str4Mom += aPair->GetParton2()->Get4Momentum();
|
||||
#endif
|
||||
thePartonPairs.push_back(aPair);
|
||||
aPair = new G4PartonPair(pProjectile->GetNextParton(), pTarget->GetNextAntiParton(),
|
||||
G4PartonPair::SOFT, G4PartonPair::PROJECTILE);
|
||||
#ifdef debug_G4QGSPart_PSoftColl
|
||||
G4cout << "SoftPair " << aPair->GetParton1()->GetPDGcode() << " "
|
||||
<< aPair->GetParton1()->Get4Momentum() << " "
|
||||
<< aPair->GetParton1()->GetX() << " " << G4endl;
|
||||
G4cout << " " << aPair->GetParton2()->GetPDGcode() << " "
|
||||
<< aPair->GetParton2()->Get4Momentum() << " "
|
||||
<< aPair->GetParton2()->GetX() << " " << G4endl;
|
||||
#endif
|
||||
#ifdef debug_G4QGSParticipants
|
||||
str4Mom += aPair->GetParton1()->Get4Momentum();
|
||||
str4Mom += aPair->GetParton2()->Get4Momentum();
|
||||
#endif
|
||||
thePartonPairs.push_back(aPair);
|
||||
}
|
||||
delete *i;
|
||||
@@ -252,4 +307,7 @@ void G4QGSParticipants::PerformSoftCollisions()
|
||||
i--;
|
||||
}
|
||||
}
|
||||
#ifdef debug_G4QGSPart_PSoftColl
|
||||
G4cout << " string 4 mom " << str4Mom << G4endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -43,6 +43,14 @@ 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() << " "
|
||||
<< aPair->GetParton2()->Get4Momentum() << " "
|
||||
<< aPair->GetParton2()->GetX() << " " << G4endl;
|
||||
#endif
|
||||
return new G4ExcitedString(aPair->GetParton1(), aPair->GetParton2(), aPair->GetDirection());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user