115 #ifdef debug_G4QGSParticipants
120 const G4int maxNumberOfLoops = 1000;
121 G4int loopCounter = -1;
122 while ( (
theInteractions.size() == 0) && ++loopCounter < maxNumberOfLoops )
125 std::pair<G4double, G4double> theImpactParameter;
127 G4double impactX = theImpactParameter.first;
128 G4double impactY = theImpactParameter.second;
132 G4int nucleonCount = 0;
134 #ifdef debug_G4QGSParticipants
135 intNuclMom=aPrimaryMomentum;
147 G4double s_nucleon = (aPrimaryMomentum + nucleonMomentum).mag2();
150 G4double Probability = theProbability.GetInelasticProbability(s_nucleon, Distance2);
154 if (Probability > rndNumber)
156 #ifdef debug_G4QGSParticipants
157 G4cout <<
"DEBUG p="<< Probability<<
" r="<<rndNumber<<
" d="<<std::sqrt(Distance2)<<
G4endl;
158 G4cout <<
" qgspart+ " << aPrimaryMomentum <<
" # " << aPrimaryMomentum.mag()
160 intNuclMom += nucleonMomentum;
166 pNucleon->
Hit(aTarget);
167 if ((theProbability.GetDiffractiveProbability(s_nucleon, Distance2)/Probability >
G4UniformRand()
188 for(nCut = 0; nCut <
nCutMax; nCut++)
190 running[nCut] = theProbability.GetCutPomeronProbability(s_nucleon, Distance2, nCut + 1);
191 if(nCut!=0) running[nCut] += running[nCut-1];
194 for(nCut = 0; nCut <
nCutMax; nCut++)
196 if(running[nCut] > random)
break;
207 #ifdef debug_G4QGSParticipants
208 impactUsed=Distance2;
214 #ifdef debug_G4QGSParticipants
215 G4cout << G4endl<<
"NUCLEONCOUNT "<<nucleonCount<<
G4endl;
221 if ( loopCounter >= maxNumberOfLoops ) {
223 ed <<
" loopCounter exceeds maxNumberOfLoops : forced exit! " <<
G4endl;
227 #ifdef debug_G4QGSParticipants
229 G4cout <<
"Impact Parameter used = "<<impactUsed<<
G4endl;
G4bool ExciteParticipants(G4VSplitableHadron *aPartner, G4VSplitableHadron *bPartner) const
std::ostringstream G4ExceptionDescription
void SetMomentum(G4LorentzVector &aMomentum)
virtual G4bool StartLoop()=0
const G4double QGSMThreshold
virtual const G4LorentzVector & Get4Momentum() const
virtual const G4ThreeVector & GetPosition() const
G4bool IsSingleDiffractive()
virtual const G4ParticleDefinition * GetDefinition() const
virtual G4double GetOuterRadius()=0
const G4ParticleDefinition * GetDefinition() const
G4GLOB_DLL std::ostream G4cout
void IncrementCollisionCount(G4int aCount)
G4QGSDiffractiveExcitation theDiffExcitaton
virtual G4bool ExciteParticipants(G4VSplitableHadron *aPartner, G4VSplitableHadron *bPartner) const
G4V3DNucleus * theNucleus
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4double GetKineticEnergy() const
std::pair< G4double, G4double > ChooseImpactXandY(G4double maxImpact)
G4double GetTotalEnergy() const
void SetNumberOfDiffractiveCollisions(int)
G4double GetPDGMass() const
void SetNumberOfSoftCollisions(int)
std::vector< G4VSplitableHadron * > theTargets
static constexpr double GeV
G4ThreeVector GetMomentum() const
virtual G4Nucleon * GetNextNucleon()=0
void Hit(G4VSplitableHadron *aHit)
G4SingleDiffractiveExcitation theSingleDiffExcitation
G4double GetBindingEnergy() const
std::vector< G4InteractionContent * > theInteractions
const G4double theNucleonRadius
const G4double ThresholdParameter
G4ThreadLocal G4int G4QGSParticipants_NPart
void SetTarget(G4VSplitableHadron *aTarget)