Import Geant4 10.5.0.beta source tree
This commit is contained in:
@@ -31,77 +31,106 @@
|
||||
|
||||
// Class G4GammaParticipants
|
||||
|
||||
// J.P. Wellisch, April 2002
|
||||
// new participants class for gamma nuclear, with this design more can come with
|
||||
// cross-section based, and quasi-eiconal model based modelling
|
||||
//
|
||||
// 20110805 M. Kelsey -- Follow change to G4V3DNucleus::GetNucleons()
|
||||
//#define debugGammaParticipants
|
||||
|
||||
G4VSplitableHadron* G4GammaParticipants::SelectInteractions(const G4ReactionProduct &thePrimary)
|
||||
{
|
||||
// Check reaction threshold - goes to CheckThreshold
|
||||
G4VSplitableHadron* aProjectile = new G4QGSMSplitableHadron(thePrimary, TRUE); // @@@ check the TRUE
|
||||
// Check reaction threshold - goes to CheckThreshold
|
||||
|
||||
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;
|
||||
}
|
||||
theProjectileSplitable = new G4QGSMSplitableHadron(thePrimary, TRUE);
|
||||
theProjectileSplitable->SetStatus(1);
|
||||
|
||||
// first find the collisions HPW
|
||||
std::for_each(theInteractions.begin(), theInteractions.end(), DeleteInteractionContent());
|
||||
theInteractions.clear();
|
||||
G4int totalCuts = 0;
|
||||
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;
|
||||
|
||||
#ifdef debug_G4GammaParticipants
|
||||
G4double eK = thePrimary.GetKineticEnergy()/GeV;
|
||||
G4int nucleonCount = theTargetNuc.size(); // debug
|
||||
#endif
|
||||
#ifdef debugGammaParticipants
|
||||
G4cout <<G4endl<< "Gamma Participants - SelectInteractions " << G4endl;
|
||||
G4cout << "Energy and Nucleus Mass N "<<thePrimary.GetTotalEnergy()<<" "<<theNucleus->GetMassNumber()<<G4endl;
|
||||
G4cout << "SqrtS ThresholdMass ModelMode " <<std::sqrt(S)<<" "<<ThresholdMass<<" "<<ModelMode<< G4endl;
|
||||
G4cout << "ThresholdParameter QGSMThreshold "<<ThresholdParameter<<" "<<QGSMThreshold<<G4endl;
|
||||
#endif
|
||||
|
||||
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;
|
||||
|
||||
if (sqr(ThresholdMass + ThresholdParameter) > S)
|
||||
{
|
||||
ModelMode = DIFFRACTIVE;
|
||||
}
|
||||
|
||||
if (sqr(ThresholdMass + QGSMThreshold) > S)
|
||||
{
|
||||
ModelMode = DIFFRACTIVE;
|
||||
}
|
||||
|
||||
#ifdef debugGammaParticipants
|
||||
G4cout << "Interaction type (ModelMode) 0 - SOFT, 1 - DIFFRACTIVE: "<<ModelMode<< G4endl;
|
||||
#endif
|
||||
|
||||
std::for_each(theInteractions.begin(), theInteractions.end(), DeleteInteractionContent());
|
||||
theInteractions.clear();
|
||||
G4int totalCuts = 0;
|
||||
|
||||
// #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;
|
||||
|
||||
while( (pNucleon = theNucleus->GetNextNucleon()) ) {if(NucleonNo == theCurrent) break; NucleonNo++;}
|
||||
|
||||
if ( pNucleon ) {
|
||||
|
||||
G4QGSMSplitableHadron* aTarget = new G4QGSMSplitableHadron(*pNucleon);
|
||||
pNucleon->Hit(aTarget);
|
||||
|
||||
if( (0.06 > G4UniformRand() &&(ModelMode==SOFT)) || (ModelMode==DIFFRACTIVE ) ) // (false) //
|
||||
{ // Diffractive interaction
|
||||
G4InteractionContent * aInteraction = new G4InteractionContent(theProjectileSplitable);
|
||||
theProjectileSplitable->SetStatus(1*theProjectileSplitable->GetStatus());
|
||||
|
||||
aInteraction->SetTarget(aTarget);
|
||||
aInteraction->SetTargetNucleon(pNucleon);
|
||||
aTarget->SetCollisionCount(0);
|
||||
aTarget->SetStatus(1); // Mark that is Diffr. interaction
|
||||
|
||||
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); // Mark that is non-Diffr. interaction
|
||||
theInteractions.push_back(aInteraction);
|
||||
totalCuts += 1;
|
||||
}
|
||||
}
|
||||
return theProjectileSplitable;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,26 +28,27 @@
|
||||
|
||||
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) // For gamma -> 4 (u ubar) + 1 (d dbar)
|
||||
{
|
||||
G4int it=1;
|
||||
if(G4UniformRand()<0.8) it++; // Uzhi Oct. 2016 0.5 -> 0.8
|
||||
*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;
|
||||
}
|
||||
|
||||
|
||||
+246
-311
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4QGSDiffractiveExcitation.cc 106980 2017-10-31 09:02:49Z gcosmo $
|
||||
// $Id: G4QGSDiffractiveExcitation.cc 107867 2017-12-07 14:44:07Z gcosmo $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implemetation file
|
||||
//
|
||||
@@ -60,6 +60,11 @@
|
||||
#include "G4Log.hh"
|
||||
#include "G4Pow.hh"
|
||||
|
||||
//============================================================================
|
||||
|
||||
//#define debugDoubleDiffraction
|
||||
|
||||
//============================================================================
|
||||
|
||||
G4QGSDiffractiveExcitation::G4QGSDiffractiveExcitation()
|
||||
{
|
||||
@@ -71,358 +76,301 @@ G4QGSDiffractiveExcitation::~G4QGSDiffractiveExcitation()
|
||||
|
||||
|
||||
G4bool G4QGSDiffractiveExcitation::
|
||||
ExciteParticipants(G4VSplitableHadron *projectile, G4VSplitableHadron *target) const
|
||||
ExciteParticipants(G4VSplitableHadron *projectile, G4VSplitableHadron *target, G4bool ) const // Uzhi Oct. 2016 , G4bool ProjectileDiffraction
|
||||
{
|
||||
G4LorentzVector Pprojectile=projectile->Get4Momentum();
|
||||
#ifdef debugDoubleDiffraction
|
||||
G4cout<<G4endl<<"G4QGSDiffractiveExcitation::ExciteParticipants - Double diffraction."<<G4endl;
|
||||
G4cout<<"Proj Targ "<<projectile->GetDefinition()->GetParticleName()<<" "<<target->GetDefinition()->GetParticleName()<<G4endl;
|
||||
G4cout<<"Proj 4 Mom "<<projectile->Get4Momentum()<<" "<<projectile->Get4Momentum().mag()<<G4endl;
|
||||
G4cout<<"Targ 4 Mom "<<target->Get4Momentum() <<" "<<target->Get4Momentum().mag() <<G4endl;
|
||||
#endif
|
||||
|
||||
// -------------------- Projectile parameters -----------------------------------
|
||||
G4bool PutOnMassShell=0;
|
||||
|
||||
//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();
|
||||
}
|
||||
G4LorentzVector Pprojectile=projectile->Get4Momentum();
|
||||
|
||||
G4double Mprojectile2 = M0projectile * M0projectile;
|
||||
// -------------------- Projectile parameters -----------------------------------
|
||||
G4bool PutOnMassShell=0;
|
||||
|
||||
G4int PDGcode=projectile->GetDefinition()->GetPDGEncoding();
|
||||
G4int absPDGcode=std::abs(PDGcode);
|
||||
G4double ProjectileDiffCut;
|
||||
G4double AveragePt2;
|
||||
G4double M0projectile = Pprojectile.mag(); // Without de-excitation
|
||||
|
||||
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(M0projectile < projectile->GetDefinition()->GetPDGMass())
|
||||
{
|
||||
PutOnMassShell=1;
|
||||
M0projectile=projectile->GetDefinition()->GetPDGMass();
|
||||
}
|
||||
|
||||
ProjectileDiffCut = ProjectileDiffCut * GeV;
|
||||
AveragePt2 = AveragePt2 * GeV*GeV;
|
||||
// -------------------- Target parameters ----------------------------------------------
|
||||
G4LorentzVector Ptarget=target->Get4Momentum();
|
||||
|
||||
// -------------------- Target parameters ----------------------------------------------
|
||||
G4LorentzVector Ptarget=target->Get4Momentum();
|
||||
G4double M0target = Ptarget.mag();
|
||||
|
||||
G4double M0target = Ptarget.mag();
|
||||
if(M0target < target->GetDefinition()->GetPDGMass())
|
||||
{
|
||||
PutOnMassShell=1;
|
||||
M0target=target->GetDefinition()->GetPDGMass();
|
||||
}
|
||||
|
||||
if(M0target < target->GetDefinition()->GetPDGMass())
|
||||
{
|
||||
PutOnMassShell=1;
|
||||
M0target=target->GetDefinition()->GetPDGMass();
|
||||
}
|
||||
G4LorentzVector Psum=Pprojectile+Ptarget;
|
||||
G4double S=Psum.mag2();
|
||||
G4double SqrtS=std::sqrt(S);
|
||||
|
||||
G4double Mtarget2 = M0target * M0target; //Ptarget.mag2(); // for AA-inter.
|
||||
if(SqrtS < M0projectile + M0target) {return false;} // The model cannot work for pp-interactions
|
||||
// at Plab < 1.3 GeV/c. Uzhi
|
||||
|
||||
G4double NuclearNucleonDiffCut = 1.1*GeV;
|
||||
G4double Mprojectile2 = M0projectile * M0projectile;
|
||||
G4double Mtarget2 = M0target * M0target; //Ptarget.mag2(); // for AA-inter.
|
||||
|
||||
G4double ProjectileDiffCut2 = ProjectileDiffCut * ProjectileDiffCut;
|
||||
G4double NuclearNucleonDiffCut2 = NuclearNucleonDiffCut * NuclearNucleonDiffCut;
|
||||
// Transform momenta to cms and then rotate parallel to z axis;
|
||||
|
||||
// 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 PZcms2=(S*S+Mprojectile2*Mprojectile2+Mtarget2*Mtarget2-
|
||||
2*S*Mprojectile2-2*S*Mtarget2-2*Mprojectile2*Mtarget2)/4./S;
|
||||
|
||||
Pprojectile.transform(toCms);
|
||||
Ptarget.transform(toCms);
|
||||
if(PZcms2 < 0) {return false;} // It can be in an interaction with off-shell nuclear nucleon
|
||||
|
||||
G4double Pt2;
|
||||
G4double ProjMassT2, ProjMassT;
|
||||
G4double TargMassT2, TargMassT;
|
||||
G4double PZcms2, PZcms;
|
||||
G4double PMinusNew, TPlusNew;
|
||||
G4double PZcms = std::sqrt(PZcms2);
|
||||
|
||||
G4double S=Psum.mag2();
|
||||
G4double SqrtS=std::sqrt(S);
|
||||
if(PutOnMassShell)
|
||||
{
|
||||
if(Pprojectile.z() > 0.)
|
||||
{
|
||||
Pprojectile.setPz( PZcms);
|
||||
Ptarget.setPz( -PZcms);
|
||||
}
|
||||
else
|
||||
{
|
||||
Pprojectile.setPz(-PZcms);
|
||||
Ptarget.setPz( PZcms);
|
||||
};
|
||||
|
||||
if(SqrtS < 2200*MeV) {return false;} // The model cannot work for pp-interactions
|
||||
// at Plab < 1.3 GeV/c. Uzhi
|
||||
Pprojectile.setE(std::sqrt(Mprojectile2+sqr(Pprojectile.x())+sqr(Pprojectile.y())+PZcms2));
|
||||
Ptarget.setE( std::sqrt( Mtarget2+sqr( Ptarget.x())+sqr( Ptarget.y())+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
|
||||
G4double maxPtSquare = PZcms2;
|
||||
|
||||
PZcms = std::sqrt(PZcms2);
|
||||
#ifdef debugDoubleDiffraction
|
||||
G4cout << "Pprojectile after boost to CMS: " << Pprojectile <<" "<<Pprojectile.mag()<<G4endl;
|
||||
G4cout << "Ptarget after boost to CMS: " << Ptarget <<" "<<Ptarget.mag() <<G4endl;
|
||||
#endif
|
||||
|
||||
if(PutOnMassShell)
|
||||
{
|
||||
if(Pprojectile.z() > 0.)
|
||||
{
|
||||
Pprojectile.setPz( PZcms);
|
||||
Ptarget.setPz( -PZcms);
|
||||
} else
|
||||
{
|
||||
Pprojectile.setPz(-PZcms);
|
||||
Ptarget.setPz( PZcms);
|
||||
};
|
||||
G4int PrPDGcode=projectile->GetDefinition()->GetPDGEncoding();
|
||||
G4int absPrPDGcode=std::abs(PrPDGcode);
|
||||
G4double MinPrDiffMass(0.);
|
||||
G4double AveragePt2(0.);
|
||||
|
||||
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(M0projectile <= projectile->GetDefinition()->GetPDGMass())
|
||||
{ // Normal projectile
|
||||
if( absPrPDGcode > 1000 ) //------Projectile is baryon --------
|
||||
{
|
||||
MinPrDiffMass = 1.16; // GeV
|
||||
AveragePt2 = 0.3; // GeV^2
|
||||
}
|
||||
else if( absPrPDGcode == 211 || PrPDGcode == 111) //------Projectile is Pion -----------
|
||||
{
|
||||
MinPrDiffMass = 1.0; // GeV
|
||||
AveragePt2 = 0.3; // GeV^2
|
||||
}
|
||||
else if( absPrPDGcode == 321 || absPrPDGcode == 130 || absPrPDGcode == 310) //-Projectile is Kaon-
|
||||
{
|
||||
MinPrDiffMass = 1.1; // GeV
|
||||
AveragePt2 = 0.3; // GeV^2
|
||||
}
|
||||
else //------Projectile is undefined, Nucleon assumed
|
||||
{
|
||||
MinPrDiffMass = 1.16; // GeV
|
||||
AveragePt2 = 0.3; // GeV^2
|
||||
}
|
||||
}
|
||||
else
|
||||
{ // Excited projectile
|
||||
MinPrDiffMass = M0projectile + 220.0*MeV;
|
||||
AveragePt2 = 0.3;
|
||||
}
|
||||
|
||||
G4double maxPtSquare = PZcms2;
|
||||
MinPrDiffMass = MinPrDiffMass * GeV;
|
||||
AveragePt2 = AveragePt2 * GeV*GeV;
|
||||
//---------------------------------------------
|
||||
G4double MinTrDiffMass = 1.16*GeV;
|
||||
|
||||
//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;
|
||||
if(SqrtS < MinPrDiffMass + MinTrDiffMass) {return false;} // The model cannot work at low energy
|
||||
|
||||
G4LorentzVector Qmomentum;
|
||||
G4double Qminus, Qplus;
|
||||
G4double MinPrDiffMass2 = MinPrDiffMass * MinPrDiffMass;
|
||||
G4double MinTrDiffMass2 = MinTrDiffMass * MinTrDiffMass;
|
||||
|
||||
G4int whilecount=0;
|
||||
do {
|
||||
// Generate pt
|
||||
G4double Pt2;
|
||||
G4double ProjMassT2, ProjMassT;
|
||||
G4double TargMassT2, TargMassT;
|
||||
G4double PMinusNew, TPlusNew;
|
||||
|
||||
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=MinPrDiffMass2+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=MinTrDiffMass2+Pt2;
|
||||
TargMassT =std::sqrt(TargMassT2);
|
||||
|
||||
//G4cout << " X-plus " << Xplus << G4endl;
|
||||
//G4cout << " X-minus " << Xminus << G4endl;
|
||||
if(SqrtS < ProjMassT + TargMassT) continue;
|
||||
|
||||
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();
|
||||
} while ( (Pprojectile+Qmomentum).mag2() < MinPrDiffMass2 || // Uzhi No without excitation
|
||||
(Ptarget -Qmomentum).mag2() < MinTrDiffMass2 );
|
||||
|
||||
G4double TPlusMin=std::sqrt(TargMassT2+PZcms2)-PZcms;
|
||||
G4double TPlusMax=SqrtS-ProjMassT;
|
||||
Pprojectile += Qmomentum;
|
||||
Ptarget -= Qmomentum;
|
||||
|
||||
TPlusNew=ChooseP(TPlusMin, TPlusMax);
|
||||
Qplus=-(TPlusNew-Ptarget.plus());
|
||||
// Transform back and update SplitableHadron Participant.
|
||||
Pprojectile.transform(toLab);
|
||||
Ptarget.transform(toLab);
|
||||
|
||||
Qmomentum.setPz( (Qplus-Qminus)/2 );
|
||||
Qmomentum.setE( (Qplus+Qminus)/2 );
|
||||
#ifdef debugDoubleDiffraction
|
||||
G4cout << "Pprojectile after boost to Lab: " << Pprojectile <<" "<<Pprojectile.mag()<<G4endl;
|
||||
G4cout << "Ptarget after boost to Lab: " << Ptarget <<" "<<Ptarget.mag() <<G4endl;
|
||||
#endif
|
||||
|
||||
//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 );
|
||||
*/
|
||||
} 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) );
|
||||
target->Set4Momentum(Ptarget);
|
||||
projectile->Set4Momentum(Pprojectile);
|
||||
|
||||
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 );
|
||||
}
|
||||
else if((Pprojectile+Qmomentum).mag2() < ProjectileDiffCut2) // Uzhi Target diffraction
|
||||
{
|
||||
G4double PPlusNew=SqrtS-TPlusNew;
|
||||
Qplus=PPlusNew-Pprojectile.plus();
|
||||
PMinusNew=ProjMassT2/PPlusNew;
|
||||
Qminus=PMinusNew-Pprojectile.minus();
|
||||
|
||||
Qmomentum.setPz( (Qplus-Qminus)/2 );
|
||||
Qmomentum.setE( (Qplus+Qminus)/2 );
|
||||
};
|
||||
|
||||
Pprojectile += Qmomentum;
|
||||
Ptarget -= Qmomentum;
|
||||
|
||||
// Vova
|
||||
|
||||
/*
|
||||
Pprojectile.setPz(0.);
|
||||
Pprojectile.setE(SqrtS-M0target);
|
||||
Ptarget.setPz(0.);
|
||||
Ptarget.setE(M0target);
|
||||
*/
|
||||
|
||||
//G4cout << "Pprojectile with Q : " << Pprojectile << G4endl;
|
||||
//G4cout << "Ptarget with Q : " << Ptarget << G4endl;
|
||||
//G4cout << "Projectile back: " << toLab * Pprojectile << G4endl;
|
||||
//G4cout << "Target back: " << toLab * Ptarget << G4endl;
|
||||
|
||||
// Transform back and update SplitableHadron Participant.
|
||||
Pprojectile.transform(toLab);
|
||||
Ptarget.transform(toLab);
|
||||
|
||||
//G4cout << "Pprojectile with Q M: " << Pprojectile<<" "<< Pprojectile.mag() << G4endl;
|
||||
//G4cout << "Ptarget with Q M: " << Ptarget <<" "<< Ptarget.mag() << G4endl;
|
||||
//G4cout << "Target mass " << Ptarget.mag() << G4endl;
|
||||
|
||||
target->Set4Momentum(Ptarget);
|
||||
|
||||
//G4cout << "Projectile mass " << Pprojectile.mag() << G4endl;
|
||||
|
||||
projectile->Set4Momentum(Pprojectile);
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
G4ExcitedString * G4QGSDiffractiveExcitation::
|
||||
String(G4VSplitableHadron * hadron, G4bool isProjectile) const
|
||||
{
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
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
|
||||
/* // Uzhi 2016
|
||||
G4double ptSquared= hadron->Get4Momentum().perp2();
|
||||
G4double transverseMassSquared= hadron->Get4Momentum().plus()
|
||||
* hadron->Get4Momentum().minus();
|
||||
|
||||
G4double maxAvailMomentumSquared=
|
||||
sqr( std::sqrt(transverseMassSquared) - std::sqrt(ptSquared) );
|
||||
|
||||
G4double widthOfPtSquare = 0.25; // Uzhi <Pt^2>=0.25 ???
|
||||
G4ThreeVector pt=GaussianPt(widthOfPtSquare,maxAvailMomentumSquared);
|
||||
G4double maxAvailMomentumSquared=
|
||||
sqr( std::sqrt(transverseMassSquared) - std::sqrt(ptSquared) );
|
||||
*/
|
||||
G4double maxAvailMomentumSquared=sqr(hadron->Get4Momentum().mag()/2.); // Uzhi 2016
|
||||
|
||||
G4LorentzVector Pstart(G4LorentzVector(pt,0.));
|
||||
G4LorentzVector Pend;
|
||||
Pend.setPx(hadron->Get4Momentum().px() - pt.x());
|
||||
Pend.setPy(hadron->Get4Momentum().py() - pt.y());
|
||||
G4double widthOfPtSquare = 0.5*sqr(GeV); //0.25; // Uzhi 2016 // Uzhi <Pt^2>=0.25 ??????????????????
|
||||
G4ThreeVector pt=GaussianPt(widthOfPtSquare,maxAvailMomentumSquared);
|
||||
|
||||
G4double tm1=hadron->Get4Momentum().minus() +
|
||||
( Pend.perp2()-Pstart.perp2() ) / hadron->Get4Momentum().plus();
|
||||
G4LorentzVector Pstart(G4LorentzVector(pt,0.));
|
||||
G4LorentzVector Pend;
|
||||
Pend.setPx(hadron->Get4Momentum().px() - pt.x());
|
||||
Pend.setPy(hadron->Get4Momentum().py() - pt.y());
|
||||
|
||||
G4double tm2= std::sqrt( std::max(0., sqr(tm1) -
|
||||
4. * Pend.perp2() * hadron->Get4Momentum().minus()
|
||||
/ hadron->Get4Momentum().plus() ));
|
||||
G4double tm1=hadron->Get4Momentum().minus() +
|
||||
( Pend.perp2()-Pstart.perp2() ) / hadron->Get4Momentum().plus();
|
||||
|
||||
G4int Sign= isProjectile ? -1 : 1;
|
||||
G4double tm2= std::sqrt( std::max(0., sqr(tm1) -
|
||||
4. * Pend.perp2() * hadron->Get4Momentum().minus()
|
||||
/ hadron->Get4Momentum().plus() ));
|
||||
|
||||
G4double endMinus = 0.5 * (tm1 + Sign*tm2);
|
||||
G4double startMinus= hadron->Get4Momentum().minus() - endMinus;
|
||||
G4int Sign= isProjectile ? -1 : 1;
|
||||
|
||||
G4double startPlus= Pstart.perp2() / startMinus;
|
||||
G4double endPlus = hadron->Get4Momentum().plus() - startPlus;
|
||||
G4double endMinus = 0.5 * (tm1 + Sign*tm2);
|
||||
G4double startMinus= hadron->Get4Momentum().minus() - endMinus;
|
||||
|
||||
Pstart.setPz(0.5*(startPlus - startMinus));
|
||||
Pstart.setE(0.5*(startPlus + startMinus));
|
||||
G4double startPlus= Pstart.perp2() / startMinus;
|
||||
G4double endPlus = hadron->Get4Momentum().plus() - startPlus;
|
||||
|
||||
Pend.setPz(0.5*(endPlus - endMinus));
|
||||
Pend.setE(0.5*(endPlus + endMinus));
|
||||
Pstart.setPz(0.5*(startPlus - startMinus));
|
||||
Pstart.setE(0.5*(startPlus + startMinus));
|
||||
|
||||
start->Set4Momentum(Pstart);
|
||||
end->Set4Momentum(Pend);
|
||||
Pend.setPz(0.5*(endPlus - endMinus));
|
||||
Pend.setE(0.5*(endPlus + endMinus));
|
||||
|
||||
#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
|
||||
start->Set4Momentum(Pstart);
|
||||
end->Set4Momentum(Pend);
|
||||
|
||||
return string;
|
||||
#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;
|
||||
}
|
||||
|
||||
|
||||
@@ -430,46 +378,33 @@ 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;
|
||||
/*
|
||||
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;
|
||||
G4double P;
|
||||
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;
|
||||
/*
|
||||
do {
|
||||
pt2=widthSquare * G4Log( G4UniformRand() );
|
||||
} while ( pt2 > maxPtSquare);
|
||||
*/
|
||||
G4double Pt2;
|
||||
|
||||
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.);
|
||||
}
|
||||
|
||||
|
||||
+403
-292
@@ -37,7 +37,6 @@
|
||||
#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
|
||||
@@ -54,385 +53,497 @@
|
||||
|
||||
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;
|
||||
// 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.5*sqr(GeV); // 0.01*GeV*GeV; // Uzhi Apr. 2016
|
||||
Direction = FALSE;
|
||||
minTransverseMass = 1*keV;
|
||||
iP =0;// Color.begin();
|
||||
iAP =0;// AntiColor.begin();
|
||||
}
|
||||
|
||||
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(){}
|
||||
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();
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
//**************************************************************************************************************************
|
||||
|
||||
void G4QGSMSplitableHadron::SplitUp()
|
||||
{
|
||||
if (IsSplit()) return;
|
||||
Splitting();
|
||||
if (Color.size()!=0) return;
|
||||
if (GetSoftCollisionCount() == 0)
|
||||
{
|
||||
DiffractiveSplitUp();
|
||||
} else {
|
||||
SoftSplitUp();
|
||||
}
|
||||
//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;
|
||||
}
|
||||
|
||||
void G4QGSMSplitableHadron::DiffractiveSplitUp()
|
||||
{
|
||||
// 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<<G4endl<<"G4QGSMSplitableHadron::DiffractiveSplitUp() "<<GetDefinition()->GetParticleName()<<G4endl;
|
||||
G4cout<<" GetSoftCollisionCount() "<<GetSoftCollisionCount()<<G4endl;
|
||||
G4cout<<"Mom M "<<Get4Momentum()<<" "<<Get4Momentum().mag()<<G4endl;
|
||||
G4cout<<"Direction "<<Direction<<"---"<<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());
|
||||
|
||||
G4LorentzVector HadronMom = Get4Momentum();
|
||||
//std::cout << "DSU 1 - "<<HadronMom<<std::endl;
|
||||
//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;
|
||||
|
||||
// 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;
|
||||
// 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;
|
||||
|
||||
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;
|
||||
//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;
|
||||
//
|
||||
if(LeftMinus <= 0.) { // Uzhi
|
||||
RightMinus = 0.5*(Local1 - Local2); // Uzhi
|
||||
LeftMinus = HadronMom.minus() - RightMinus; // Uzhi
|
||||
} // Uzhi
|
||||
//
|
||||
//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;
|
||||
|
||||
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()
|
||||
{
|
||||
//... sample transversal momenta for sea and valence quarks
|
||||
G4double phi, pts;
|
||||
G4double SumPy = 0.;
|
||||
G4double SumPx = 0.;
|
||||
G4ThreeVector Pos = GetPosition();
|
||||
G4int nSeaPair = GetSoftCollisionCount()-1;
|
||||
/*
|
||||
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;
|
||||
|
||||
// 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 */
|
||||
G4LorentzVector tmp(0., 0., 0., 0.);
|
||||
|
||||
G4int aSeaPair;
|
||||
for (aSeaPair = 0; aSeaPair < nSeaPair; aSeaPair++)
|
||||
{
|
||||
// choose quark flavour, d:u:s = 1:1:(1/StrangeSuppress-2)
|
||||
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 aPDGCode = 1 + (G4int)(G4UniformRand()/StrangeSuppress);
|
||||
// BuildSeaQuark() determines quark spin, isospin and colour
|
||||
// via parton-constructor G4Parton(aPDGCode)
|
||||
G4Parton * aParton = BuildSeaQuark(false, aPDGCode, nSeaPair);
|
||||
|
||||
// BuildSeaQuark() determines quark spin, isospin and colour
|
||||
// via parton-constructor G4Parton(aPDGCode)
|
||||
G4int firstPartonColour = aParton->GetColour();
|
||||
G4double firstPartonSpinZ = aParton->GetSpinZ();
|
||||
|
||||
G4Parton * aParton = BuildSeaQuark(false, aPDGCode, nSeaPair);
|
||||
aParton->Set4Momentum(tmp);
|
||||
Color.push_back(aParton);
|
||||
|
||||
//G4cerr << "G4QGSMSplitableHadron::SoftSplitUp()" << G4endl;
|
||||
// create anti-quark
|
||||
|
||||
//G4cerr << "Parton 1: "
|
||||
// << " PDGcode: " << aPDGCode
|
||||
// << " - Name: " << aParton->GetDefinition()->GetParticleName()
|
||||
// << " - Type: " << aParton->GetDefinition()->GetParticleType()
|
||||
// << " - Spin-3: " << aParton->GetSpinZ()
|
||||
// << " - Colour: " << aParton->GetColour() << G4endl;
|
||||
aParton = BuildSeaQuark(true, aPDGCode, nSeaPair);
|
||||
aParton->SetSpinZ(-firstPartonSpinZ);
|
||||
aParton->SetColour(-firstPartonColour);
|
||||
AntiColor.push_back(aParton);
|
||||
}
|
||||
|
||||
// save colour a spin-3 for anti-quark
|
||||
// Valence quark
|
||||
G4Parton* pColorParton = NULL;
|
||||
G4Parton* pAntiColorParton = NULL;
|
||||
GetValenceQuarkFlavors(GetDefinition(), pColorParton, pAntiColorParton);
|
||||
// G4int ColorEncoding = pColorParton->GetPDGcode();
|
||||
|
||||
G4int firstPartonColour = aParton->GetColour();
|
||||
G4double firstPartonSpinZ = aParton->GetSpinZ();
|
||||
pColorParton->Set4Momentum(tmp);
|
||||
pAntiColorParton->Set4Momentum(tmp);
|
||||
|
||||
SumPx += aParton->Get4Momentum().px();
|
||||
SumPy += aParton->Get4Momentum().py();
|
||||
Color.push_back(aParton);
|
||||
//G4cout<<"Color AntiColor "<<pColorParton<<" "<<pAntiColorParton<<G4endl;
|
||||
Color.push_back(pColorParton);
|
||||
AntiColor.push_back(pAntiColorParton);
|
||||
|
||||
// create anti-quark
|
||||
iP=0; iAP=0;
|
||||
|
||||
aParton = BuildSeaQuark(true, aPDGCode, nSeaPair);
|
||||
aParton->SetSpinZ(-firstPartonSpinZ);
|
||||
aParton->SetColour(-firstPartonColour);
|
||||
/* 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;
|
||||
|
||||
//G4cerr << "Parton 2: "
|
||||
// << " PDGcode: " << -aPDGCode
|
||||
// << " - Name: " << aParton->GetDefinition()->GetParticleName()
|
||||
// << " - Type: " << aParton->GetDefinition()->GetParticleType()
|
||||
// << " - Spin-3: " << aParton->GetSpinZ()
|
||||
// << " - Colour: " << aParton->GetColour() << G4endl;
|
||||
//G4cerr << "------------" << G4endl;
|
||||
G4int aSeaPair;
|
||||
for (aSeaPair = 0; aSeaPair < nSeaPair; aSeaPair++)
|
||||
{
|
||||
// choose quark flavour, d:u:s = 1:1:(1/StrangeSuppress-2)
|
||||
|
||||
SumPx += aParton->Get4Momentum().px();
|
||||
SumPy += aParton->Get4Momentum().py();
|
||||
AntiColor.push_back(aParton);
|
||||
}
|
||||
G4int aPDGCode = 1 + (G4int)(G4UniformRand()/StrangeSuppress);
|
||||
|
||||
// Valence quark
|
||||
G4Parton* pColorParton = NULL;
|
||||
G4Parton* pAntiColorParton = NULL;
|
||||
GetValenceQuarkFlavors(GetDefinition(), pColorParton, pAntiColorParton);
|
||||
G4int ColorEncoding = pColorParton->GetPDGcode();
|
||||
// BuildSeaQuark() determines quark spin, isospin and colour
|
||||
// via parton-constructor G4Parton(aPDGCode)
|
||||
|
||||
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;
|
||||
G4Parton * aParton = BuildSeaQuark(false, aPDGCode, nSeaPair);
|
||||
|
||||
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 << "G4QGSMSplitableHadron::SoftSplitUp()" << 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;
|
||||
// G4cerr << "Parton 1: "
|
||||
// << " PDGcode: " << aPDGCode
|
||||
// << " - Name: " << aParton->GetDefinition()->GetParticleName()
|
||||
// << " - Type: " << aParton->GetDefinition()->GetParticleType()
|
||||
// << " - Spin-3: " << aParton->GetSpinZ()
|
||||
// << " - Colour: " << aParton->GetColour() << G4endl;
|
||||
|
||||
(*(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);
|
||||
// save colour a spin-3 for anti-quark
|
||||
|
||||
aParton = AntiColor[aSeaPair];
|
||||
aParton->DefineMomentumInZ(lightCone, lightCone2, Direction);
|
||||
}
|
||||
return;
|
||||
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;
|
||||
}
|
||||
|
||||
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()));
|
||||
}
|
||||
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;
|
||||
|
||||
//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) && /* 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.);
|
||||
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.);
|
||||
}
|
||||
|
||||
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 = 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;
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,438 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4QuarkExchange.cc 99348 2016-09-19 08:39:04Z vuzhinsk $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implemetation file
|
||||
//
|
||||
// ---------------- G4QuarkExchange --------------
|
||||
// by V. Uzhinsky, October 2016.
|
||||
// QuarkExchange is used by strings models.
|
||||
// Take a projectile and a target.
|
||||
//Simulate Q exchange with excitation of projectile or target.
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#include "G4QuarkExchange.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4PhysicalConstants.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4LorentzRotation.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4VSplitableHadron.hh"
|
||||
#include "G4ExcitedString.hh"
|
||||
|
||||
#include "G4Log.hh"
|
||||
#include "G4Pow.hh"
|
||||
|
||||
//#define debugQuarkExchange
|
||||
|
||||
G4QuarkExchange::G4QuarkExchange(){}
|
||||
|
||||
G4QuarkExchange::~G4QuarkExchange(){}
|
||||
|
||||
G4bool G4QuarkExchange::
|
||||
ExciteParticipants(G4VSplitableHadron *projectile, G4VSplitableHadron *target) const
|
||||
{
|
||||
#ifdef debugQuarkExchange
|
||||
G4cout<<G4endl<<"G4QuarkExchange::ExciteParticipants"<<G4endl;
|
||||
#endif
|
||||
|
||||
G4LorentzVector Pprojectile = projectile->Get4Momentum();
|
||||
G4double Mprojectile = projectile->GetDefinition()->GetPDGMass();
|
||||
G4double Mprojectile2 = sqr(Mprojectile);
|
||||
|
||||
G4LorentzVector Ptarget = target->Get4Momentum();
|
||||
G4double Mtarget = target->GetDefinition()->GetPDGMass();
|
||||
G4double Mtarget2 = sqr(Mtarget);
|
||||
|
||||
#ifdef debugQuarkExchange
|
||||
G4cout<<"Proj Targ "<<projectile->GetDefinition()->GetPDGEncoding()<<" "<<target->GetDefinition()->GetPDGEncoding()<<G4endl;
|
||||
G4cout<<"Proj. 4-Mom "<<Pprojectile<<" "<<Pprojectile.mag()<<G4endl
|
||||
<<"Targ. 4-Mom "<<Ptarget <<" "<<Ptarget.mag() <<G4endl;
|
||||
#endif
|
||||
|
||||
G4LorentzVector Psum=Pprojectile+Ptarget;
|
||||
G4double SqrtS=Psum.mag();
|
||||
G4double S =Psum.mag2();
|
||||
|
||||
#ifdef debugQuarkExchange
|
||||
G4cout<<"SS Mpr Mtr SqrtS-Mprojectile-Mtarget "<<SqrtS<<" "<<Mprojectile<<" "<<Mtarget
|
||||
<<" "<<SqrtS-Mprojectile-Mtarget<<G4endl;
|
||||
#endif
|
||||
if(SqrtS-Mprojectile-Mtarget <= 250.0*MeV) {
|
||||
#ifdef debugQuarkExchange
|
||||
G4cerr<<"Energy is too small for quark exchange!"<<G4endl;
|
||||
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;
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
G4LorentzRotation toCms(-1*Psum.boostVector());
|
||||
|
||||
G4LorentzVector Ptmp=toCms*Pprojectile;
|
||||
|
||||
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());
|
||||
|
||||
G4LorentzRotation toLab(toCms.inverse());
|
||||
|
||||
Pprojectile.transform(toCms);
|
||||
Ptarget.transform(toCms);
|
||||
|
||||
#ifdef debugQuarkExchange
|
||||
G4cout << "Pprojectile in CMS " << Pprojectile << G4endl;
|
||||
G4cout << "Ptarget in CMS " << Ptarget << G4endl;
|
||||
#endif
|
||||
G4double maxPtSquare=sqr(Ptarget.pz());
|
||||
|
||||
// G4double ProjectileMinDiffrMass(0.), TargetMinDiffrMass(0.);
|
||||
G4double ProjectileMinDiffrMass = Pprojectile.mag()/GeV;
|
||||
G4double TargetMinDiffrMass = Ptarget.mag()/GeV;
|
||||
|
||||
G4double AveragePt2(0.);
|
||||
|
||||
G4int PDGcode=projectile->GetDefinition()->GetPDGEncoding();
|
||||
G4int absPDGcode=std::abs(PDGcode);
|
||||
|
||||
G4bool ProjectileDiffraction = true;
|
||||
|
||||
if( absPDGcode > 1000 ) { ProjectileDiffraction = G4UniformRand() <= 0.5; }
|
||||
if( (absPDGcode == 211) || (absPDGcode == 111) ) { ProjectileDiffraction = G4UniformRand() <= 0.66; }
|
||||
if( (absPDGcode == 321) || (absPDGcode == 311) ||
|
||||
( PDGcode == 130) || ( PDGcode == 310) ) { ProjectileDiffraction = G4UniformRand() <= 0.5; } // Uzhi ???
|
||||
|
||||
if ( ProjectileDiffraction ) {
|
||||
if( absPDGcode > 1000 ) //------Projectile is baryon --------
|
||||
{
|
||||
ProjectileMinDiffrMass = 1.16; // GeV
|
||||
AveragePt2 = 0.3; // GeV^2
|
||||
}
|
||||
else if( absPDGcode == 211 || absPDGcode == 111) //------Projectile is Pion -----------
|
||||
{
|
||||
ProjectileMinDiffrMass = 1.0; // GeV
|
||||
AveragePt2 = 0.3; // GeV^2
|
||||
}
|
||||
else if( absPDGcode == 321 || absPDGcode == 130 || absPDGcode == 310) //Projectile is Kaon
|
||||
{
|
||||
ProjectileMinDiffrMass = 1.1; // GeV
|
||||
AveragePt2 = 0.3; // GeV^2
|
||||
}
|
||||
else if( absPDGcode == 22) //------Projectile is Gamma -----------
|
||||
{
|
||||
ProjectileMinDiffrMass = 0.25; // GeV
|
||||
AveragePt2 = 0.36; // GeV^2
|
||||
}
|
||||
else //------Projectile is undefined, Nucleon assumed
|
||||
{
|
||||
ProjectileMinDiffrMass = 1.1; // GeV
|
||||
AveragePt2 = 0.3; // GeV^2
|
||||
};
|
||||
|
||||
ProjectileMinDiffrMass = ProjectileMinDiffrMass * GeV;
|
||||
Mprojectile2=sqr(ProjectileMinDiffrMass);
|
||||
|
||||
if(G4UniformRand() <= 0.5) TargetMinDiffrMass += 0.22;
|
||||
TargetMinDiffrMass *= GeV;
|
||||
Mtarget2 = sqr( TargetMinDiffrMass) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(G4UniformRand() <= 0.5) ProjectileMinDiffrMass += 0.22;
|
||||
ProjectileMinDiffrMass *=GeV;
|
||||
Mprojectile2=sqr(ProjectileMinDiffrMass);
|
||||
|
||||
TargetMinDiffrMass = 1.16*GeV; // For target nucleon
|
||||
Mtarget2 = sqr( TargetMinDiffrMass) ;
|
||||
AveragePt2 = 0.3; // GeV^2
|
||||
} // end of if ( ProjectileDiffraction )
|
||||
|
||||
AveragePt2 = AveragePt2 * GeV*GeV; // Uzhi 6 Oct. 2016
|
||||
|
||||
if( SqrtS - (ProjectileMinDiffrMass+TargetMinDiffrMass) < 220* MeV ) return false; // Uzhi Dec. 2017
|
||||
//-----------------------
|
||||
G4double Pt2, PZcms, PZcms2;
|
||||
G4double ProjMassT2, ProjMassT;
|
||||
G4double TargMassT2, TargMassT;
|
||||
G4double PMinusMin, PMinusMax, sqrtPMinusMin, sqrtPMinusMax;
|
||||
//G4double PPlusMin , PPlusMax;
|
||||
G4double TPlusMin, TPlusMax, sqrtTPlusMin, sqrtTPlusMax;
|
||||
G4double PMinusNew, PPlusNew, TPlusNew(0.), TMinusNew;
|
||||
|
||||
G4LorentzVector Qmomentum;
|
||||
G4double Qminus, Qplus;
|
||||
|
||||
G4double x(0.), y(0.);
|
||||
G4int whilecount=0;
|
||||
do {
|
||||
whilecount++;
|
||||
|
||||
if (whilecount > 1000 )
|
||||
{
|
||||
Qmomentum=G4LorentzVector(0.,0.,0.,0.);
|
||||
return false; // Ignore this interaction
|
||||
}
|
||||
|
||||
// Generate pt
|
||||
Qmomentum=G4LorentzVector(GaussianPt(AveragePt2,maxPtSquare),0);
|
||||
|
||||
Pt2 = G4ThreeVector( Qmomentum.vect() ).mag2();
|
||||
ProjMassT2 = Mprojectile2 + Pt2;
|
||||
ProjMassT = std::sqrt( ProjMassT2 );
|
||||
TargMassT2 = Mtarget2 + Pt2;
|
||||
TargMassT = std::sqrt( TargMassT2 );
|
||||
|
||||
#ifdef debugQuarkExchange
|
||||
G4cout<<"whilecount Pt2 ProjMassT TargMassT SqrtS S ProjectileDiffraction"<<G4endl;
|
||||
G4cout<<whilecount<<" "<<Pt2<<" "<<ProjMassT<<" "<<TargMassT<<" "<<SqrtS<<" "<<S<<" "<<ProjectileDiffraction<<G4endl;
|
||||
#endif
|
||||
|
||||
if ( SqrtS < ProjMassT + TargMassT + 220.0*MeV ) continue;
|
||||
|
||||
PZcms2 = ( S*S + ProjMassT2*ProjMassT2 + TargMassT2*TargMassT2
|
||||
- 2.0*S*ProjMassT2 - 2.0*S*TargMassT2 - 2.0*ProjMassT2*TargMassT2 ) / 4.0 / S;
|
||||
|
||||
if ( PZcms2 < 0 ) continue;
|
||||
|
||||
PZcms = std::sqrt( PZcms2 );
|
||||
|
||||
if ( ProjectileDiffraction )
|
||||
{// The projectile will fragment, the target will saved.
|
||||
PMinusMin = std::sqrt( ProjMassT2 + PZcms2 ) - PZcms;
|
||||
PMinusMax = SqrtS - TargMassT;
|
||||
sqrtPMinusMin = std::sqrt(PMinusMin); sqrtPMinusMax = std::sqrt(PMinusMax);
|
||||
//===========
|
||||
|
||||
if( absPDGcode > 1000 )
|
||||
{
|
||||
/* // Uzhi Dec. 2017
|
||||
while(true)
|
||||
{
|
||||
x=PMinusMax-(PMinusMax-PMinusMin)*G4UniformRand();
|
||||
y=G4UniformRand();
|
||||
|
||||
if( y < G4Pow::GetInstance()->powA(1.0-x/PMinusMax,3.) ) break;
|
||||
//if( y < G4Pow::GetInstance()->powA(x/PMinusMax,3.) ) break; // Uzhi
|
||||
}
|
||||
*/ // Uzhi Dec. 2017
|
||||
PMinusNew = PMinusMax * (1.0 - (1.0 - PMinusMin/PMinusMax)
|
||||
* G4Pow::GetInstance()->powA(G4UniformRand(),0.3333) ); // Uzhi Dec. 2017
|
||||
|
||||
} else if( (absPDGcode == 211) || (absPDGcode == 111) )
|
||||
{
|
||||
while(true)
|
||||
{
|
||||
x=sqrtPMinusMax-(sqrtPMinusMax-sqrtPMinusMin)*G4UniformRand();
|
||||
y=G4UniformRand();
|
||||
if( y < 1.0-0.7 * x/sqrtPMinusMax ) break; // 0.7 for Pi Uzhi
|
||||
}
|
||||
PMinusNew = sqr(x);
|
||||
} else if( (absPDGcode == 321) || (absPDGcode == 311) ||
|
||||
( PDGcode == 130) || ( PDGcode == 310) )
|
||||
{ // For K-mesons it must be found !!! Uzhi
|
||||
while(true)
|
||||
{
|
||||
x=sqrtPMinusMax-(sqrtPMinusMax-sqrtPMinusMin)*G4UniformRand();
|
||||
y=G4UniformRand();
|
||||
if( y < 1.0-0.7 * x/sqrtPMinusMax ) break;
|
||||
}
|
||||
PMinusNew = sqr(x);
|
||||
} else
|
||||
{
|
||||
/* // Uzhi Dec. 2017
|
||||
while(true)
|
||||
{
|
||||
x=PMinusMax-(PMinusMax-PMinusMin)*G4UniformRand();
|
||||
y=G4UniformRand();
|
||||
if( y < G4Pow::GetInstance()->powA(1.0-x/PMinusMax,3.) ) break;
|
||||
}
|
||||
*/ // Uzhi Dec. 2017
|
||||
PMinusNew = PMinusMax * (1.0 - (1.0 - PMinusMin/PMinusMax)
|
||||
* G4Pow::GetInstance()->powA(G4UniformRand(),0.3333) ); // Uzhi Dec. 2017
|
||||
|
||||
};
|
||||
|
||||
TMinusNew = SqrtS - PMinusNew;
|
||||
|
||||
Qminus = Ptarget.minus() - TMinusNew;
|
||||
TPlusNew = TargMassT2 / TMinusNew;
|
||||
Qplus = Ptarget.plus() - TPlusNew;
|
||||
|
||||
} else
|
||||
//-------------------------------------------------------------------------------
|
||||
{// The target will fragment, the projectile will saved.
|
||||
TPlusMin = std::sqrt( TargMassT2 + PZcms2 ) - PZcms;
|
||||
TPlusMax = SqrtS - ProjMassT;
|
||||
sqrtTPlusMin = std::sqrt(TPlusMin); sqrtTPlusMax = std::sqrt(TPlusMax);
|
||||
|
||||
if( absPDGcode > 1000 )
|
||||
{
|
||||
/* // Uzhi Dec. 2017
|
||||
while(true)
|
||||
{
|
||||
x=TPlusMax-(TPlusMax-TPlusMin)*G4UniformRand();
|
||||
y=G4UniformRand();
|
||||
if( y < G4Pow::GetInstance()->powA(1.0-x/TPlusMax,3.) ) break;
|
||||
//if( y < G4Pow::GetInstance()->powA(x/TPlusMax,3.) ) break; // Uzhi
|
||||
}
|
||||
*/ // Uzhi Dec. 2017
|
||||
TPlusNew = TPlusMax * (1.0 - (1.0 - TPlusMin/TPlusMax)
|
||||
* G4Pow::GetInstance()->powA(G4UniformRand(),0.3333) ); // Uzhi Dec. 2017
|
||||
|
||||
|
||||
} else if( (absPDGcode == 211) || (absPDGcode == 111) )
|
||||
{
|
||||
while(true)
|
||||
{
|
||||
x=sqrtTPlusMax-(sqrtTPlusMax-sqrtTPlusMin)*G4UniformRand();
|
||||
y=G4UniformRand();
|
||||
if( y < 1.0-0.7 * x/sqrtTPlusMax ) break; // 0.7 for Pi Uzhi
|
||||
}
|
||||
TPlusNew = sqr(x);
|
||||
} else if( (absPDGcode == 321) || (absPDGcode == 311) ||
|
||||
( PDGcode == 130) || ( PDGcode == 310) )
|
||||
{ // For K-mesons it must be found !!! Uzhi
|
||||
while(true)
|
||||
{
|
||||
x=sqrtTPlusMax-(sqrtTPlusMax-sqrtTPlusMin)*G4UniformRand();
|
||||
y=G4UniformRand();
|
||||
if( y < 1.0-0.7 * x/sqrtTPlusMax ) break;
|
||||
}
|
||||
} else
|
||||
{
|
||||
/* // Uzhi Dec. 2017
|
||||
while(true)
|
||||
{
|
||||
x=TPlusMax-(TPlusMax-TPlusMin)*G4UniformRand();
|
||||
y=G4UniformRand();
|
||||
if( y < G4Pow::GetInstance()->powA(1.0-x/TPlusMax,3.) ) break;
|
||||
}
|
||||
TPlusNew = sqr(x);
|
||||
*/ // Uzhi Dec. 2017
|
||||
TPlusNew = TPlusMax * (1.0 - (1.0 - TPlusMin/TPlusMax)
|
||||
* G4Pow::GetInstance()->powA(G4UniformRand(),0.3333) ); // Uzhi Dec. 2017
|
||||
};
|
||||
|
||||
PPlusNew = SqrtS - TPlusNew;
|
||||
|
||||
Qplus = PPlusNew - Pprojectile.plus();
|
||||
PMinusNew = ProjMassT2 / PPlusNew;
|
||||
Qminus = PMinusNew - Pprojectile.minus();
|
||||
}
|
||||
|
||||
|
||||
Qmomentum.setPz( (Qplus - Qminus)/2 );
|
||||
Qmomentum.setE( (Qplus + Qminus)/2 );
|
||||
|
||||
#ifdef debugQuarkExchange
|
||||
G4cout<<"ProjectileDiffraction (Pprojectile + Qmomentum).mag2() Mprojectile2"<<G4endl;
|
||||
G4cout<<ProjectileDiffraction<<" "<<( Pprojectile + Qmomentum ).mag2()<<" "<< Mprojectile2<<G4endl;
|
||||
G4cout<<"TargetDiffraction (Ptarget - Qmomentum).mag2() Mtarget2"<<G4endl;
|
||||
G4cout<<!ProjectileDiffraction<<" "<<( Ptarget - Qmomentum ).mag2()<<" "<< Mtarget2<<G4endl;
|
||||
#endif
|
||||
|
||||
} while ( ( ProjectileDiffraction&&( Pprojectile + Qmomentum ).mag2() < Mprojectile2 ) ||
|
||||
(!ProjectileDiffraction&&( Ptarget - Qmomentum ).mag2() < Mtarget2 ) );
|
||||
// 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);
|
||||
|
||||
#ifdef debugQuarkExchange
|
||||
G4cout << "Pprojectile in Lab. " << Pprojectile << G4endl;
|
||||
G4cout << "Ptarget in Lab. " << Ptarget << G4endl;
|
||||
G4cout << "G4QuarkExchange: Projectile mass " << Pprojectile.mag() << G4endl;
|
||||
G4cout << "G4QuarkExchange: Target mass " << Ptarget.mag() << G4endl;
|
||||
#endif
|
||||
|
||||
target->Set4Momentum(Ptarget);
|
||||
projectile->Set4Momentum(Pprojectile);
|
||||
|
||||
//=================================== Quark exchange ================================
|
||||
projectile->SplitUp();
|
||||
target->SplitUp();
|
||||
|
||||
G4Parton* PrQuark = projectile->GetNextParton();
|
||||
G4Parton* TrQuark = target->GetNextParton();
|
||||
|
||||
//G4cout<<"Pr quark "<<PrQuark->GetDefinition()->GetParticleName()<<G4endl;
|
||||
//G4cout<<"Tr quark "<<TrQuark->GetDefinition()->GetParticleName()<<G4endl;
|
||||
|
||||
|
||||
G4ParticleDefinition * Tmp = PrQuark->GetDefinition();
|
||||
PrQuark->SetDefinition(TrQuark->GetDefinition());
|
||||
TrQuark->SetDefinition(Tmp);
|
||||
|
||||
//============================================
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// --------- private methods ----------------------
|
||||
|
||||
G4ThreeVector G4QuarkExchange::GaussianPt(G4double widthSquare, G4double maxPtSquare) const
|
||||
{ // @@ this method is used in FTFModel as well. Should go somewhere common!
|
||||
|
||||
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.
|
||||
}
|
||||
|
||||
pt2=std::sqrt(pt2);
|
||||
|
||||
G4double phi=G4UniformRand() * twopi;
|
||||
|
||||
return G4ThreeVector (pt2*std::cos(phi), pt2*std::sin(phi), 0.);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,422 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Reggeons.cc 99348 2016-09-19 08:39:04Z vuzhinsk $
|
||||
//
|
||||
|
||||
#include "G4Reggeons.hh"
|
||||
#include "G4PhysicalConstants.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4Pow.hh"
|
||||
#include "G4Exp.hh"
|
||||
#include "G4Log.hh"
|
||||
|
||||
|
||||
G4Reggeons::G4Reggeons(const G4ParticleDefinition * particle)
|
||||
{
|
||||
// KP Orig
|
||||
Alpha_pomeron = 1.12; //0.9808;
|
||||
Alphaprime_pomeron = 0.22/GeV/GeV; //0.25/GeV/GeV;
|
||||
S0_pomeron = 1.0*GeV*GeV; //2.7*GeV*GeV;
|
||||
|
||||
Alpha_pomeronHard = 1.47;
|
||||
Gamma_pomeronHard = 0.0/GeV/GeV;
|
||||
|
||||
G4int PDGcode = particle->GetPDGEncoding();
|
||||
G4int absPDGcode = std::abs(PDGcode);
|
||||
|
||||
//-------------------------------------------------------
|
||||
// KP Orig
|
||||
G4double C_pomeron_NN = 1.5;
|
||||
G4double C_pomeron_N = std::sqrt(C_pomeron_NN);
|
||||
|
||||
G4double Gamma_pomeron_NN = 2.14/GeV/GeV; //(2.6+3.96)
|
||||
G4double Gamma_pomeron_N = std::sqrt(Gamma_pomeron_NN);
|
||||
G4double Gamma_pomeron_Pr(0.), Gamma_pomeron_Tr(0.);
|
||||
|
||||
G4double Rsquare_pomeron_NN = 3.30/GeV/GeV; //3.56
|
||||
G4double Rsquare_pomeron_N = Rsquare_pomeron_NN/2.;
|
||||
G4double Rsquare_pomeron_Pr(0.), Rsquare_pomeron_Tr(0.);
|
||||
//-------------------------------------------------------
|
||||
|
||||
if( absPDGcode > 1000 ) { // Projectile is baryon or anti_baryon --------
|
||||
Cpr_pomeron = C_pomeron_N; // Shower enhancement coefficient for projectile
|
||||
Ctr_pomeron = C_pomeron_N; // Shower enhancement coefficient for target
|
||||
C_pomeron = Cpr_pomeron*Ctr_pomeron;
|
||||
|
||||
Gamma_pomeron_Pr = Gamma_pomeron_N; // vertex constant for projectile
|
||||
Gamma_pomeron_Tr = Gamma_pomeron_N; // vertex constant for target
|
||||
Gamma_pomeron = Gamma_pomeron_Pr * Gamma_pomeron_Tr;
|
||||
|
||||
Rsquare_pomeron_Pr = Rsquare_pomeron_N; // R^2 of pomeron-projectile interaction
|
||||
Rsquare_pomeron_Tr = Rsquare_pomeron_N; // R^2 of pomeron-target interaction
|
||||
Rsquare_pomeron = Rsquare_pomeron_Pr + Rsquare_pomeron_Tr;
|
||||
|
||||
Freggeon_Alpha = 0.7; // Intersept of f-trajectory
|
||||
Freggeon_Alphaprime = 0.8/GeV/GeV; // Slope of f-trajectory
|
||||
Freggeon_Gamma = sqr(2.871)/GeV/GeV; // Vertex constant of f-meson - nucleon interactions
|
||||
Freggeon_Rsquare = 2*0.916/GeV/GeV; // R^2 of f-meson - nucleon interactions
|
||||
Freggeon_C = 1.0; // Shower enhancement coefficient
|
||||
FParity = +1; // Parity of the trajectory
|
||||
|
||||
Wreggeon_Alpha = 0.4; // Intersept of omega-trajectory (w)
|
||||
Wreggeon_Alphaprime = 0.9/GeV/GeV; // Slope of w-trajectory
|
||||
Wreggeon_Gamma = sqr(2.241)/GeV/GeV; // Vertex constant of w-meson - nucleon interactions
|
||||
Wreggeon_Rsquare = 2*0.945/GeV/GeV *0.5; // R^2 of w-meson - nucleon interactions
|
||||
Wreggeon_C = 1.0; // Shower enhancement coefficient
|
||||
if(PDGcode > 0) WParity = -1; // Parity +1 for Pbar P, and -1 for PP interactions
|
||||
if(PDGcode < 0) WParity = +1;
|
||||
}
|
||||
else if ( absPDGcode == 211 || PDGcode == 111 ) { // Projectile is Pion
|
||||
Cpr_pomeron = 1.352;
|
||||
Ctr_pomeron = C_pomeron_N;
|
||||
C_pomeron = Cpr_pomeron*Ctr_pomeron;
|
||||
// KP
|
||||
Gamma_pomeron_Pr = 0.89/GeV; // 0.85 -> 0.89 // Uzhi
|
||||
Gamma_pomeron_Tr = Gamma_pomeron_N;
|
||||
Gamma_pomeron = Gamma_pomeron_Pr * Gamma_pomeron_Tr;
|
||||
|
||||
Rsquare_pomeron_Pr = 0.5/GeV/GeV;
|
||||
Rsquare_pomeron_Tr = Rsquare_pomeron_N;
|
||||
Rsquare_pomeron = Rsquare_pomeron_Pr + Rsquare_pomeron_Tr;
|
||||
|
||||
Freggeon_Alpha = 0.7;
|
||||
Freggeon_Gamma = 3.524/GeV/GeV;
|
||||
Freggeon_Rsquare = 1.0/GeV/GeV;
|
||||
Freggeon_Alphaprime = 0.8/GeV/GeV;
|
||||
Freggeon_C = 1.0;
|
||||
FParity = +1;
|
||||
|
||||
Wreggeon_Alpha = 0.5;
|
||||
Wreggeon_Gamma = 0.56/GeV/GeV; // 1.12 -> 0.56 Uzhi
|
||||
Wreggeon_Rsquare = 9.19/GeV/GeV;
|
||||
Wreggeon_Alphaprime = 0.9/GeV/GeV;
|
||||
Wreggeon_C = 1.0;
|
||||
if(PDGcode > 0) WParity = -1;
|
||||
if(PDGcode < 0) WParity = +1;
|
||||
}
|
||||
else if ( absPDGcode == 321 || absPDGcode == 311 ||
|
||||
PDGcode == 130 || PDGcode == 310 ) { // Projectile is Kaon
|
||||
|
||||
Cpr_pomeron = 1.522;
|
||||
Ctr_pomeron = C_pomeron_N;
|
||||
C_pomeron = Cpr_pomeron*Ctr_pomeron;
|
||||
|
||||
Gamma_pomeron_Pr = 1.312/GeV;
|
||||
Gamma_pomeron_Tr = Gamma_pomeron_N;
|
||||
Gamma_pomeron = Gamma_pomeron_Pr * Gamma_pomeron_Tr;
|
||||
|
||||
Rsquare_pomeron_Pr = 0.31/GeV/GeV;
|
||||
Rsquare_pomeron_Tr = Rsquare_pomeron_N;
|
||||
Rsquare_pomeron = Rsquare_pomeron_Pr + Rsquare_pomeron_Tr;
|
||||
|
||||
Freggeon_Alpha = 0.0;
|
||||
Freggeon_Gamma = 0.0/GeV/GeV;
|
||||
Freggeon_Rsquare = 1.0/GeV/GeV;
|
||||
Freggeon_Alphaprime = 0.0/GeV/GeV;
|
||||
Freggeon_C = 1.0;
|
||||
FParity = +1;
|
||||
|
||||
Wreggeon_Alpha = 0.0;
|
||||
Wreggeon_Gamma = 0.0/GeV/GeV;
|
||||
Wreggeon_Rsquare = 1.0/GeV/GeV;
|
||||
Wreggeon_Alphaprime = 0.0/GeV/GeV;
|
||||
Wreggeon_C = 1.0;
|
||||
WParity = -1;
|
||||
}
|
||||
else if ( absPDGcode == 22 ) { // Projectile is Gamma
|
||||
|
||||
Cpr_pomeron = 1.437;
|
||||
Ctr_pomeron = C_pomeron_N;
|
||||
C_pomeron = Cpr_pomeron*Ctr_pomeron;
|
||||
|
||||
Gamma_pomeron_Pr = 1.415/GeV/GeV;
|
||||
Gamma_pomeron_Tr = Gamma_pomeron_N;
|
||||
Gamma_pomeron = Gamma_pomeron_Pr * Gamma_pomeron_Tr;
|
||||
|
||||
Rsquare_pomeron_Pr = 0.51/GeV/GeV;
|
||||
Rsquare_pomeron_Tr = Rsquare_pomeron_N;
|
||||
Rsquare_pomeron = Rsquare_pomeron_Pr + Rsquare_pomeron_Tr;
|
||||
|
||||
Freggeon_Alpha = 0.0;
|
||||
Freggeon_Gamma = 0.0/GeV/GeV;
|
||||
Freggeon_Rsquare = 1.0/GeV/GeV;
|
||||
Freggeon_Alphaprime = 0.0/GeV/GeV;
|
||||
Freggeon_C = 1.0;
|
||||
FParity = +1;
|
||||
|
||||
Wreggeon_Alpha = 0.0;
|
||||
Wreggeon_Gamma = 0.0/GeV/GeV;
|
||||
Wreggeon_Rsquare = 1.0/GeV/GeV;
|
||||
Wreggeon_Alphaprime = 0.0/GeV/GeV;
|
||||
Wreggeon_C = 1.0;
|
||||
WParity = -1;
|
||||
}
|
||||
else { // Projectile is undefined, Nucleon assumed
|
||||
Cpr_pomeron = C_pomeron_N;
|
||||
Ctr_pomeron = C_pomeron_N;
|
||||
C_pomeron = Cpr_pomeron*Ctr_pomeron;
|
||||
|
||||
Gamma_pomeron_Pr = Gamma_pomeron_N;
|
||||
Gamma_pomeron_Tr = Gamma_pomeron_N;
|
||||
Gamma_pomeron = Gamma_pomeron_Pr * Gamma_pomeron_Tr;
|
||||
|
||||
Rsquare_pomeron_Pr = Rsquare_pomeron_N;
|
||||
Rsquare_pomeron_Tr = Rsquare_pomeron_N;
|
||||
Rsquare_pomeron = Rsquare_pomeron_Pr + Rsquare_pomeron_Tr;
|
||||
|
||||
Freggeon_Alpha = 0.723;
|
||||
Freggeon_Gamma = 8.801/GeV/GeV;
|
||||
Freggeon_Rsquare = 0.396/GeV/GeV;
|
||||
Freggeon_Alphaprime = 1.324/GeV/GeV;
|
||||
Freggeon_C = 1.0;
|
||||
FParity = +1;
|
||||
|
||||
Wreggeon_Alpha = 0.353;
|
||||
Wreggeon_Gamma = 8.516/GeV/GeV;
|
||||
Wreggeon_Rsquare = 24.40/GeV/GeV;
|
||||
Wreggeon_Alphaprime = 1.5/GeV/GeV;
|
||||
Wreggeon_C = 1.0;
|
||||
WParity = -1;
|
||||
}
|
||||
/*
|
||||
G4cout<<G4endl<<"Reggeon's parameters for Particle "<<particle->GetParticleName()<<" "<<PDGcode<<G4endl<<G4endl;
|
||||
G4cout<<"Alpha_pomeron "<<Alpha_pomeron;
|
||||
G4cout<<" Alphaprime_pomeron "<<Alphaprime_pomeron*GeV*GeV;
|
||||
G4cout<<" S0_pomeron "<<S0_pomeron/GeV/GeV<<G4endl;
|
||||
G4cout<<"Gamma_pomeron "<<Gamma_pomeron*GeV*GeV;
|
||||
G4cout<<" Rsquare_pomeron "<<Rsquare_pomeron*GeV*GeV;
|
||||
G4cout<<" C_pomeron "<<C_pomeron<<G4endl<<G4endl;
|
||||
*/
|
||||
}
|
||||
|
||||
G4double G4Reggeons::Get_Cprojectile() {return Cpr_pomeron;}
|
||||
|
||||
G4double G4Reggeons::Get_Ctarget() {return Ctr_pomeron;}
|
||||
|
||||
G4Reggeons::~G4Reggeons() {}
|
||||
|
||||
void G4Reggeons::SetS(G4double S) {Sint = S;}
|
||||
|
||||
void G4Reggeons::CalculateXs()
|
||||
{
|
||||
Xtotal =0.; XtotalP=0.; XtotalR=0.;
|
||||
Xelastic=0.; Xpr_Diff=0.; Xtr_Diff=0.; XDDiff=0.; G4double XDiff=0.;
|
||||
Xinel =0.; Xnd=0.; XndP=0.; XndR=0.;
|
||||
|
||||
G4double AmplitudeP(0.), AmplitudeR(0.);
|
||||
|
||||
G4double B_max = 10.*fermi;
|
||||
G4double dB = B_max/10000.;
|
||||
|
||||
G4double B =-dB/2.;
|
||||
|
||||
G4double chiP(0.), chiR(0.), chiRin(0.); // chiPin Pomeron inelastic phase is a data member
|
||||
chiPin=0.;
|
||||
for(G4int i=0; i<10000;i++)
|
||||
{
|
||||
B += dB;
|
||||
|
||||
chiP = Chi_pomeron(1.,B); chiR = Chi_reggeon(1.,B);
|
||||
chiPin = Chi_pomeron(2.,B); chiRin = Chi_reggeon(2.,B);
|
||||
|
||||
AmplitudeP = (1.0/C_pomeron)*(1.0 - G4Exp(-chiP))*G4Exp(-chiR);
|
||||
AmplitudeR = (1.0 - G4Exp(-chiR));
|
||||
|
||||
Xtotal += 2 * (AmplitudeP + AmplitudeR) * B * dB;
|
||||
XtotalP += 2 * (AmplitudeP + 0. ) * B * dB;
|
||||
XtotalR += 2 * (0. + AmplitudeR) * B * dB;
|
||||
|
||||
Xelastic += sqr(AmplitudeP + AmplitudeR) * B * dB;
|
||||
Xpr_Diff += (Cpr_pomeron - 1.0) * sqr(AmplitudeP) * B * dB;
|
||||
Xtr_Diff += (Ctr_pomeron - 1.0) * sqr(AmplitudeP) * B * dB;
|
||||
XDiff += (Cpr_pomeron - 1.0) * (Ctr_pomeron - 1.0) * sqr(AmplitudeP) * B * dB;
|
||||
|
||||
// ----------------------------------
|
||||
AmplitudeP = (1.0/C_pomeron)*(1.0 - G4Exp(-chiPin))*G4Exp(-chiRin);
|
||||
AmplitudeR = (1.0 - G4Exp(-chiRin));
|
||||
|
||||
Xnd += (AmplitudeP + AmplitudeR) * B * dB;
|
||||
XndP += (AmplitudeP + 0. ) * B * dB;
|
||||
XndR += (0. + AmplitudeR) * B * dB;
|
||||
}
|
||||
|
||||
Xtotal *=twopi; XtotalP *=twopi; XtotalR *=twopi;
|
||||
Xelastic *=twopi; Xpr_Diff *=twopi; Xtr_Diff *=twopi; XDiff *=twopi;
|
||||
Xinel = Xtotal - Xelastic;
|
||||
(void)Xinel; // To avoid compiler warning "variable not used"
|
||||
|
||||
Xnd *=twopi; XndP *=twopi; XndR *=twopi;
|
||||
XDDiff = XDiff-Xpr_Diff-Xtr_Diff;
|
||||
|
||||
/*
|
||||
G4cout<<"Total totalP totalR "<<Xtotal/millibarn <<" "<<XtotalP/millibarn <<" "<<XtotalR/millibarn<<" mb"<<G4endl;
|
||||
G4cout<<"Elastic "<<Xelastic/millibarn <<G4endl;
|
||||
G4cout<<"PrDiff TrDiff W_Diff "<<Xpr_Diff/millibarn<<" "<<Xtr_Diff/millibarn<<" "<<XDiff/millibarn<<G4endl;
|
||||
G4cout<<"Inelastic "<<Xinel/millibarn <<G4endl;
|
||||
G4cout<<"NonDiff Pom & Reg "<<Xnd/millibarn <<" "<<XndP/millibarn <<" "<<XndR/millibarn <<G4endl;
|
||||
*/
|
||||
}
|
||||
|
||||
G4double G4Reggeons::Chi_pomeron(G4double Mult, G4double B)
|
||||
{
|
||||
G4double R2 = Rsquare_pomeron + Alphaprime_pomeron * G4Log(Sint/S0_pomeron);
|
||||
G4double Eikonal = Mult * C_pomeron * Gamma_pomeron/R2 *
|
||||
G4Pow::GetInstance()->powA(Sint/S0_pomeron, Alpha_pomeron -1.) *
|
||||
G4Exp(-sqr(B)/4.0/R2/hbarc_squared);
|
||||
return Eikonal;
|
||||
}
|
||||
|
||||
G4double G4Reggeons::Chi_reggeon(G4double Mult, G4double B)
|
||||
{
|
||||
G4double R2F = Freggeon_Rsquare + Freggeon_Alphaprime * G4Log(Sint/S0_pomeron);
|
||||
G4double R2W = Wreggeon_Rsquare + Wreggeon_Alphaprime * G4Log(Sint/S0_pomeron);
|
||||
|
||||
G4double Eikonal = Mult * FParity * Freggeon_C * Freggeon_Gamma/R2F *
|
||||
G4Pow::GetInstance()->powA(Sint/S0_pomeron, Freggeon_Alpha -1.) *
|
||||
G4Exp(-sqr(B)/4.0/R2F/hbarc_squared);
|
||||
|
||||
Eikonal+= Mult * WParity * Wreggeon_C * Wreggeon_Gamma/R2W *
|
||||
G4Pow::GetInstance()->powA(Sint/S0_pomeron, Wreggeon_Alpha -1.) *
|
||||
G4Exp(-sqr(B)/4.0/R2W/hbarc_squared);
|
||||
return Eikonal;
|
||||
}
|
||||
|
||||
G4double G4Reggeons::GetTotalX() { return Xtotal; }
|
||||
G4double G4Reggeons::GetTotalXp() { return XtotalP; }
|
||||
G4double G4Reggeons::GetTotalXr() { return XtotalR; }
|
||||
|
||||
G4double G4Reggeons::GetElasticX(){ return Xelastic; }
|
||||
G4double G4Reggeons::GetPrDiffX() { return Xpr_Diff; }
|
||||
G4double G4Reggeons::GetTrDiffX() { return Xtr_Diff; }
|
||||
G4double G4Reggeons::GetDDiffX() { return XDDiff; }
|
||||
|
||||
G4double G4Reggeons::GetInelX() { return Xinel; }
|
||||
|
||||
G4double G4Reggeons::GetND_X() { return Xnd; }
|
||||
G4double G4Reggeons::GetNDp_X() { return XndP; }
|
||||
G4double G4Reggeons::GetNDr_X() { return XndR; }
|
||||
|
||||
//----------------------------------------------------------------------------------------------
|
||||
void G4Reggeons::GetProbabilities(G4double B, G4int Mode,
|
||||
G4double & Pint,
|
||||
G4double & Pprd, G4double & Ptrd, G4double & Pdd,
|
||||
G4double & Pnd, G4double & Pnvr)
|
||||
{
|
||||
// Puprose of the method is a calculation of inelastic interaction probability (Pint),
|
||||
// probability of projectile diffraction (Pprd),
|
||||
// probability of target diffraction (Ptrd),
|
||||
// probability of double diffraction (Pdd ),
|
||||
// probability of non-diffractive inter. (Pnd ),
|
||||
// probability of quark-exc. inter. (Pnvr),
|
||||
// number of cutted pomerons (NcutPomerons).
|
||||
// The input parameters are B - impact parameter, and Mode = All/WITHOUT_R/NON_DIFF
|
||||
//
|
||||
if( B > 2.* fermi ) { Pint=0.; Pprd=0.; Ptrd=0.; Pdd=0.; Pnd=0.; Pnvr=0.; return;}
|
||||
// At large B for hN collisions it is better to return zero inter. probability
|
||||
|
||||
G4double chiP = Chi_pomeron(1.,B); G4double chiR = Chi_reggeon(1.,B);
|
||||
chiPin = Chi_pomeron(2.,B); G4double chiRin = Chi_reggeon(2.,B);
|
||||
//chiPin is data member of the class
|
||||
|
||||
G4double Exp_ChiR = G4Exp(-chiR);
|
||||
|
||||
G4double AmplitudeP = (1.0/C_pomeron)*(1.0 - G4Exp(-chiP))*Exp_ChiR;
|
||||
G4double AmplitudeR = (1.0 - Exp_ChiR);
|
||||
|
||||
G4double AmplitudeP2, Apr_Diff, Atr_Diff, ADiff;
|
||||
|
||||
//Aelastic = sqr(AmplitudeP + AmplitudeR);
|
||||
AmplitudeP2 = sqr(AmplitudeP);
|
||||
Apr_Diff = (Cpr_pomeron - 1.0) * AmplitudeP2;
|
||||
Atr_Diff = (Ctr_pomeron - 1.0) * AmplitudeP2;
|
||||
ADiff = (Cpr_pomeron - 1.0) * (Ctr_pomeron - 1.0) * AmplitudeP2;
|
||||
|
||||
// ----------------------------------
|
||||
Exp_ChiR = G4Exp(-chiRin);
|
||||
AmplitudeP = (1.0/C_pomeron)*(1.0 - G4Exp(-chiPin))*Exp_ChiR;
|
||||
AmplitudeR = (1.0 - Exp_ChiR);
|
||||
|
||||
G4double And, AndP, AndR;
|
||||
|
||||
And = (AmplitudeP + AmplitudeR);
|
||||
AndP = (AmplitudeP + 0. );
|
||||
AndR = (0. + AmplitudeR);
|
||||
|
||||
// ----------------------------------
|
||||
if( Mode == ALL)
|
||||
{
|
||||
Pint = Apr_Diff + Atr_Diff + ADiff + And;
|
||||
Pprd = Apr_Diff/Pint; // Probability of projectile diffraction
|
||||
Ptrd = Atr_Diff/Pint; // Probability of target diffraction
|
||||
Pdd = ADiff /Pint; // Probability of double diffraction
|
||||
Pnd = AndP /Pint; // Probability of non-diffractive inelastic
|
||||
// interaction
|
||||
Pnvr = AndR /Pint; // Probability of non-vacuum reggeon (nvr)
|
||||
// inelastic interaction
|
||||
}
|
||||
else if( Mode == WITHOUT_R)
|
||||
{
|
||||
Pint = Apr_Diff + Atr_Diff + ADiff + AndP;
|
||||
Pprd = Apr_Diff/Pint;
|
||||
Ptrd = Atr_Diff/Pint;
|
||||
Pdd = ADiff /Pint;
|
||||
Pnd = AndP /Pint;
|
||||
Pnvr = 0.;
|
||||
}
|
||||
else
|
||||
{// Mode == NON_DIFF (of projectile)
|
||||
Pint = Atr_Diff + AndP;
|
||||
Pprd = 0.;
|
||||
Ptrd = Atr_Diff/Pint;
|
||||
Pdd = 0.;
|
||||
Pnd = AndP /Pint;
|
||||
Pnvr = 0.;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
G4int G4Reggeons::ncPomerons() // Non-complite Poisson distribution
|
||||
{
|
||||
if( chiPin < 0.001 ) return 0; // At small average multiplicity of cutted pomerons
|
||||
// it is better to return 0 to avoid problems with
|
||||
// calculation exactness.
|
||||
G4double ksi = G4UniformRand() * (1.0-G4Exp(-chiPin)) * G4Exp(chiPin);
|
||||
G4double Term = chiPin;
|
||||
G4double Sum = Term;
|
||||
G4int nCuts = 1;
|
||||
|
||||
while( Sum < ksi)
|
||||
{
|
||||
nCuts++;
|
||||
Term *= chiPin/(G4double) nCuts;
|
||||
Sum += Term;
|
||||
}
|
||||
|
||||
return nCuts;
|
||||
}
|
||||
|
||||
@@ -31,364 +31,411 @@
|
||||
|
||||
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; 17 Sept.
|
||||
for(i = thePartonInfo.begin(); i!=thePartonInfo.end(); i++)
|
||||
{
|
||||
running += aBaryon.GetProbability((*i)->GetDiQuark());
|
||||
if(random<running/total) // if(random/total<running) 17 Sept.
|
||||
{
|
||||
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;
|
||||
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
|
||||
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
|
||||
//
|
||||
}
|
||||
|
||||
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;
|
||||
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
|
||||
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
|
||||
}
|
||||
|
||||
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.));
|
||||
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.));
|
||||
}
|
||||
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.));
|
||||
}
|
||||
}
|
||||
|
||||
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];
|
||||
}
|
||||
|
||||
|
||||
+213
-130
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SingleDiffractiveExcitation.cc 106980 2017-10-31 09:02:49Z gcosmo $
|
||||
// $Id: G4SingleDiffractiveExcitation.cc 108191 2018-01-18 16:10:21Z gcosmo $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implemetation file
|
||||
//
|
||||
@@ -47,184 +47,267 @@
|
||||
#include "G4ExcitedString.hh"
|
||||
|
||||
#include "G4Log.hh"
|
||||
#include "G4Pow.hh"
|
||||
|
||||
//#define debugSingleDiffraction
|
||||
|
||||
G4SingleDiffractiveExcitation::G4SingleDiffractiveExcitation(G4double sigmaPt, G4double minextraMass,G4double x0mass)
|
||||
: widthOfPtSquare(-2*sqr(sigmaPt)) , minExtraMass(minextraMass), minmass(x0mass)
|
||||
{}
|
||||
G4SingleDiffractiveExcitation::G4SingleDiffractiveExcitation(){}
|
||||
|
||||
G4SingleDiffractiveExcitation::~G4SingleDiffractiveExcitation()
|
||||
{}
|
||||
G4SingleDiffractiveExcitation::~G4SingleDiffractiveExcitation(){}
|
||||
|
||||
G4bool G4SingleDiffractiveExcitation::
|
||||
ExciteParticipants(G4VSplitableHadron *projectile, G4VSplitableHadron *target) const
|
||||
ExciteParticipants(G4VSplitableHadron *projectile, G4VSplitableHadron *target, G4bool ProjectileDiffraction) const
|
||||
{
|
||||
G4LorentzVector Pprojectile=projectile->Get4Momentum();
|
||||
G4double Mprojectile2=sqr(projectile->GetDefinition()->GetPDGMass() + minExtraMass);
|
||||
#ifdef debugSingleDiffraction
|
||||
G4cout<<G4endl<<"G4SingleDiffractiveExcitation::ExciteParticipants"<<G4endl;
|
||||
#endif
|
||||
|
||||
G4LorentzVector Ptarget=target->Get4Momentum();
|
||||
G4double Mtarget2=sqr(target->GetDefinition()->GetPDGMass() + minExtraMass);
|
||||
//G4cout << "E proj, target :" << Pprojectile.e() << ", " << Ptarget.e() << G4endl;
|
||||
G4LorentzVector Pprojectile=projectile->Get4Momentum();
|
||||
G4double Mprojectile = projectile->GetDefinition()->GetPDGMass();
|
||||
G4double Mprojectile2=sqr(projectile->GetDefinition()->GetPDGMass());
|
||||
|
||||
G4bool KeepProjectile= G4UniformRand() > 0.5;
|
||||
G4LorentzVector Ptarget=target->Get4Momentum();
|
||||
G4double Mtarget = target->GetDefinition()->GetPDGMass();
|
||||
G4double Mtarget2=sqr(target->GetDefinition()->GetPDGMass());
|
||||
|
||||
// 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) );
|
||||
}
|
||||
#ifdef debugSingleDiffraction
|
||||
G4cout<<"Proj Targ "<<projectile->GetDefinition()->GetPDGEncoding()<<" "<<target->GetDefinition()->GetPDGEncoding()<<G4endl;
|
||||
G4cout<<"Pr Tr 4-Mom "<<Pprojectile<<" "<<Pprojectile.mag()<<G4endl
|
||||
<<" "<<Ptarget <<" "<<Ptarget.mag() <<G4endl;
|
||||
#endif
|
||||
|
||||
// Transform momenta to cms and then rotate parallel to z axis;
|
||||
G4LorentzVector Psum=Pprojectile+Ptarget;
|
||||
G4double SqrtS=Psum.mag();
|
||||
G4double S =Psum.mag2();
|
||||
|
||||
G4LorentzVector Psum;
|
||||
Psum=Pprojectile+Ptarget;
|
||||
#ifdef debugSingleDiffraction
|
||||
G4cout<<"SqrtS-Mprojectile-Mtarget "<<SqrtS<<" "<<Mprojectile<<" "<<Mtarget
|
||||
<<" "<<SqrtS-Mprojectile-Mtarget<<G4endl;
|
||||
#endif
|
||||
if(SqrtS-Mprojectile-Mtarget <= 250.0*MeV) {
|
||||
#ifdef debugSingleDiffraction
|
||||
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;
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
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());
|
||||
|
||||
//G4cout << "Pprojectile be4 boost " << Pprojectile << G4endl;
|
||||
//G4cout << "Ptarget be4 boost : " << Ptarget << G4endl;
|
||||
G4LorentzRotation toLab(toCms.inverse());
|
||||
|
||||
G4LorentzRotation toLab(toCms.inverse());
|
||||
Pprojectile.transform(toCms);
|
||||
Ptarget.transform(toCms);
|
||||
#ifdef debugSingleDiffraction
|
||||
G4cout << "Pprojectile in CMS " << Pprojectile << G4endl;
|
||||
G4cout << "Ptarget in CMS " << Ptarget << G4endl;
|
||||
#endif
|
||||
G4double maxPtSquare=sqr(Ptarget.pz());
|
||||
|
||||
Pprojectile.transform(toCms);
|
||||
Ptarget.transform(toCms);
|
||||
//----------------------- Uzhi Oct. 2016 Start
|
||||
G4double ProjectileMinDiffrMass(0.), TargetMinDiffrMass(0.);
|
||||
G4double AveragePt2(0.);
|
||||
G4int absPDGcode=std::abs(projectile->GetDefinition()->GetPDGEncoding());
|
||||
|
||||
G4LorentzVector Qmomentum;
|
||||
G4int whilecount=0;
|
||||
do {
|
||||
// Generate pt
|
||||
if ( ProjectileDiffraction ) {
|
||||
if( absPDGcode > 1000 ) //------Projectile is baryon --------
|
||||
{
|
||||
ProjectileMinDiffrMass = 1.16; // GeV
|
||||
AveragePt2 = 0.3; // GeV^2
|
||||
}
|
||||
else if( absPDGcode == 211 || absPDGcode == 111) //------Projectile is Pion -----------
|
||||
{
|
||||
ProjectileMinDiffrMass = 1.0; // GeV
|
||||
AveragePt2 = 0.3; // GeV^2
|
||||
}
|
||||
else if( absPDGcode == 321 || absPDGcode == 130 || absPDGcode == 310) //Projectile is Kaon
|
||||
{
|
||||
ProjectileMinDiffrMass = 1.1; // GeV
|
||||
AveragePt2 = 0.3; // GeV^2
|
||||
}
|
||||
else if( absPDGcode == 22) //------Projectile is Gamma -----------
|
||||
{
|
||||
ProjectileMinDiffrMass = 0.25; // GeV
|
||||
AveragePt2 = 0.36; // GeV^2
|
||||
}
|
||||
else //------Projectile is undefined, Nucleon assumed
|
||||
{
|
||||
ProjectileMinDiffrMass = 1.1; // GeV
|
||||
AveragePt2 = 0.3; // GeV^2
|
||||
};
|
||||
|
||||
G4double maxPtSquare=sqr(Ptarget.pz());
|
||||
if (whilecount++ >= 500 && (whilecount%100)==0)
|
||||
//G4cout << "G4SingleDiffractiveExcitation::ExciteParticipants possibly looping"
|
||||
// << ", loop count/ maxPtSquare : "
|
||||
// << whilecount << " / " << maxPtSquare << G4endl;
|
||||
ProjectileMinDiffrMass = ProjectileMinDiffrMass * GeV;
|
||||
Mprojectile2=sqr(ProjectileMinDiffrMass);
|
||||
}
|
||||
else
|
||||
{
|
||||
TargetMinDiffrMass = 1.16*GeV; // For target nucleon
|
||||
Mtarget2 = sqr( TargetMinDiffrMass) ;
|
||||
AveragePt2 = 0.3; // GeV^2
|
||||
} // end of if ( ProjectileDiffraction )
|
||||
|
||||
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);
|
||||
AveragePt2 = AveragePt2 * GeV*GeV; // Uzhi 6 Oct. 2016
|
||||
//----------------------- Uzhi Oct. 2016 End
|
||||
|
||||
// Momentum transfer
|
||||
G4double Xmin = minmass / ( Pprojectile.e() + Ptarget.e() );
|
||||
G4double Xmax=1.;
|
||||
G4double Xplus =ChooseX(Xmin,Xmax);
|
||||
G4double Xminus=ChooseX(Xmin,Xmax);
|
||||
G4double Pt2, PZcms, PZcms2;
|
||||
G4double ProjMassT2, ProjMassT;
|
||||
G4double TargMassT2, TargMassT;
|
||||
G4double PMinusMin, PMinusMax;
|
||||
//G4double PPlusMin , PPlusMax;
|
||||
G4double TPlusMin, TPlusMax;
|
||||
G4double PMinusNew, PPlusNew, TPlusNew, TMinusNew;
|
||||
|
||||
G4double pt2=G4ThreeVector(Qmomentum.vect()).mag2();
|
||||
G4double Qplus =-1 * pt2 / Xminus/Ptarget.minus();
|
||||
G4double Qminus= pt2 / Xplus /Pprojectile.plus();
|
||||
G4LorentzVector Qmomentum;
|
||||
G4double Qminus, Qplus;
|
||||
|
||||
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 );
|
||||
}
|
||||
G4int whilecount=0;
|
||||
do {
|
||||
whilecount++;
|
||||
|
||||
Qmomentum.setPz( (Qplus-Qminus)/2 );
|
||||
Qmomentum.setE( (Qplus+Qminus)/2 );
|
||||
if (whilecount > 1000 )
|
||||
{
|
||||
Qmomentum=G4LorentzVector(0.,0.,0.,0.);
|
||||
return false; // Ignore this interaction
|
||||
}
|
||||
|
||||
// Generate pt
|
||||
Qmomentum=G4LorentzVector(GaussianPt(AveragePt2,maxPtSquare),0);
|
||||
|
||||
//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;
|
||||
Pt2 = G4ThreeVector( Qmomentum.vect() ).mag2();
|
||||
|
||||
} while ( (Ptarget-Qmomentum).mag2() <= Mtarget2 /* Loop checking, 26.10.2015, A.Ribon */
|
||||
|| (Pprojectile+Qmomentum).mag2() <= Mprojectile2
|
||||
|| (Ptarget-Qmomentum).e() < 0.
|
||||
|| (Pprojectile+Qmomentum).e() < 0. );
|
||||
ProjMassT2 = Mprojectile2 + Pt2;
|
||||
ProjMassT = std::sqrt( ProjMassT2 );
|
||||
TargMassT2 = Mtarget2 + Pt2;
|
||||
TargMassT = std::sqrt( TargMassT2 );
|
||||
|
||||
//G4double Ecms=Pprojectile.e() + Ptarget.e();
|
||||
#ifdef debugSingleDiffraction
|
||||
G4cout<<whilecount<<" "<<Pt2<<" "<<ProjMassT<<" "<<TargMassT<<" "<<SqrtS<<" "<<S<<" "<<ProjectileDiffraction<<G4endl;
|
||||
#endif
|
||||
if ( SqrtS < ProjMassT + TargMassT ) continue;
|
||||
|
||||
Pprojectile += Qmomentum;
|
||||
Ptarget -= Qmomentum;
|
||||
PZcms2 = ( S*S + ProjMassT2*ProjMassT2 + TargMassT2*TargMassT2
|
||||
- 2.0*S*ProjMassT2 - 2.0*S*TargMassT2 - 2.0*ProjMassT2*TargMassT2 ) / 4.0 / S;
|
||||
|
||||
//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;
|
||||
if ( PZcms2 < 0 ) continue;
|
||||
|
||||
// Transform back and update SplitableHadron Participant.
|
||||
Pprojectile.transform(toLab);
|
||||
Ptarget.transform(toLab);
|
||||
PZcms = std::sqrt( PZcms2 );
|
||||
|
||||
//G4cout << "G4SingleDiffractiveExcitation- Target mass " << Ptarget.mag() << G4endl;
|
||||
//G4cout << "G4SingleDiffractiveExcitation- Projectile mass " << Pprojectile.mag() << G4endl;
|
||||
if ( ProjectileDiffraction )
|
||||
{ // The projectile will fragment, the target will saved.
|
||||
PMinusMin = std::sqrt( ProjMassT2 + PZcms2 ) - PZcms;
|
||||
PMinusMax = SqrtS - TargMassT;
|
||||
|
||||
target->Set4Momentum(Ptarget);
|
||||
projectile->Set4Momentum(Pprojectile);
|
||||
PMinusNew = ChooseX( PMinusMin, PMinusMax );
|
||||
TMinusNew = SqrtS - PMinusNew;
|
||||
|
||||
return true;
|
||||
Qminus = Ptarget.minus() - TMinusNew;
|
||||
TPlusNew = TargMassT2 / TMinusNew;
|
||||
Qplus = Ptarget.plus() - TPlusNew;
|
||||
|
||||
} else {// The target will fragment, the projectile will saved.
|
||||
TPlusMin = std::sqrt( TargMassT2 + PZcms2 ) - PZcms;
|
||||
TPlusMax = SqrtS - ProjMassT;
|
||||
|
||||
TPlusNew = ChooseX( TPlusMin, TPlusMax ); // TPlusMax; //
|
||||
PPlusNew = SqrtS - TPlusNew;
|
||||
|
||||
Qplus = PPlusNew - Pprojectile.plus();
|
||||
PMinusNew = ProjMassT2 / PPlusNew;
|
||||
Qminus = PMinusNew - Pprojectile.minus();
|
||||
}
|
||||
|
||||
|
||||
Qmomentum.setPz( (Qplus - Qminus)/2 );
|
||||
Qmomentum.setE( (Qplus + Qminus)/2 );
|
||||
|
||||
#ifdef debugSingleDiffraction
|
||||
G4cout<<ProjectileDiffraction<<" "<<( Pprojectile + Qmomentum ).mag2()<<" "<< Mprojectile2<<G4endl;
|
||||
G4cout<<!ProjectileDiffraction<<" "<<( Ptarget - Qmomentum ).mag2()<<" "<< Mtarget2<<G4endl;
|
||||
#endif
|
||||
|
||||
} while ( ( ProjectileDiffraction&&( Pprojectile + Qmomentum ).mag2() < Mprojectile2 ) ||
|
||||
(!ProjectileDiffraction&&( Ptarget - Qmomentum ).mag2() < Mtarget2 ) );
|
||||
// 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);
|
||||
|
||||
#ifdef debugSingleDiffraction
|
||||
G4cout << "Pprojectile in Lab. " << Pprojectile << G4endl;
|
||||
G4cout << "Ptarget in Lab. " << Ptarget << G4endl;
|
||||
G4cout << "G4SingleDiffractiveExcitation- Projectile mass " << Pprojectile.mag() << G4endl;
|
||||
G4cout << "G4SingleDiffractiveExcitation- Target mass " << Ptarget.mag() << G4endl;
|
||||
#endif
|
||||
|
||||
//G4int Uzhi; G4cin>>Uzhi;
|
||||
|
||||
target->Set4Momentum(Ptarget);
|
||||
projectile->Set4Momentum(Pprojectile);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// --------- private methods ----------------------
|
||||
|
||||
G4double G4SingleDiffractiveExcitation::ChooseX(G4double Xmin, G4double Xmax) 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
|
||||
G4double range=Xmax-Xmin;
|
||||
|
||||
G4double range=Xmax-Xmin;
|
||||
if ( Xmin <= 0. || range <=0. )
|
||||
{
|
||||
G4cout << " Xmin, range : " << Xmin << " , " << range << G4endl;
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4SingleDiffractiveExcitation::ChooseX : Invalid arguments ");
|
||||
}
|
||||
|
||||
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;
|
||||
G4double x = Xmin*G4Pow::GetInstance()->powA(Xmax/Xmin, G4UniformRand() );
|
||||
// G4double x = 1.0/sqr(1.0/std::sqrt(Xmin) - G4UniformRand() * (1.0/std::sqrt(Xmin) - 1.0/std::sqrt(Xmax)));
|
||||
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 = -1;
|
||||
do {
|
||||
pt2=widthSquare * G4Log( G4UniformRand() );
|
||||
} while ( ( pt2 > maxPtSquare) && ++loopCounter < maxNumberOfLoops ); /* Loop checking, 26.10.2015, A.Ribon */
|
||||
if ( loopCounter >= maxNumberOfLoops ) pt2 = 0.0;
|
||||
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.
|
||||
}
|
||||
|
||||
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.);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user