84{
88
89
93
94
99 {
101
102 }
104 {
106 }
107
108
112
113 #ifdef debug_QGS
115 #endif
116 #ifdef debug_G4QGSParticipants
119 #endif
120
122 {
123
124 std::pair<G4double, G4double> theImpactParameter;
126 G4double impactX = theImpactParameter.first;
127 G4double impactY = theImpactParameter.second;
128
129
131 G4int nucleonCount = 0;
133 #ifdef debug_G4QGSParticipants
134 intNuclMom=aPrimaryMomentum;
135 #endif
137 {
139 {
140 break;
141 }
142 nucleonCount++;
143
146 G4double s_nucleon = (aPrimaryMomentum + nucleonMomentum).mag2();
149 G4double Probability = theProbability.GetInelasticProbability(s_nucleon, Distance2);
150
152
153 if (Probability > rndNumber)
154 {
155 #ifdef debug_G4QGSParticipants
156 G4cout <<
"DEBUG p="<< Probability<<
" r="<<rndNumber<<
" d="<<std::sqrt(Distance2)<<
G4endl;
157 G4cout <<
" qgspart+ " << aPrimaryMomentum <<
" # " << aPrimaryMomentum.mag()
159 intNuclMom += nucleonMomentum;
160 #endif
165 pNucleon->
Hit(aTarget);
166 if ((theProbability.GetDiffractiveProbability(s_nucleon, Distance2)/Probability >
G4UniformRand()
168 {
169
171 {
173 }
174 else
175 {
177 }
182 totalCuts += 1;
183 }
184 else
185 {
186
187
190 running[0] = 0;
191 for(nCut = 0; nCut <
nCutMax; nCut++)
192 {
193 running[nCut] = theProbability.GetCutPomeronProbability(s_nucleon, Distance2, nCut + 1);
194 if(nCut!=0) running[nCut] += running[nCut-1];
195 }
197 for(nCut = 0; nCut <
nCutMax; nCut++)
198 {
199 if(running[nCut] > random) break;
200 }
201 delete [] running;
202 nCut = 0;
209 totalCuts += nCut+1;
210 #ifdef debug_G4QGSParticipants
211 impactUsed=Distance2;
212 #endif
213 }
214 }
215 }
216 #ifdef debug_G4QGSParticipants
219 #endif
220 }
221 #ifdef debug_G4QGSParticipants
223 G4cout <<
"Impact Parameter used = "<<impactUsed<<
G4endl;
224 #endif
225 return aProjectile;
226}
G4int G4QGSParticipants_NPart
void SetNumberOfDiffractiveCollisions(int)
void SetNumberOfSoftCollisions(int)
void SetTarget(G4VSplitableHadron *aTarget)
void SetMomentum(G4LorentzVector &aMomentum)
virtual const G4LorentzVector & Get4Momentum() const
void Hit(G4VSplitableHadron *aHit)
virtual const G4ThreeVector & GetPosition() const
G4double GetBindingEnergy() const
virtual G4ParticleDefinition * GetDefinition() const
G4double GetPDGMass() const
virtual G4bool ExciteParticipants(G4VSplitableHadron *aPartner, G4VSplitableHadron *bPartner) const
G4SingleDiffractiveExcitation theSingleDiffExcitation
G4bool IsSingleDiffractive()
G4double GetKineticEnergy() const
G4double GetTotalEnergy() const
G4ThreeVector GetMomentum() const
G4ParticleDefinition * GetDefinition() const
G4bool ExciteParticipants(G4VSplitableHadron *aPartner, G4VSplitableHadron *bPartner) const
virtual G4double GetOuterRadius()=0
virtual G4Nucleon * GetNextNucleon()=0
virtual G4bool StartLoop()=0
std::pair< G4double, G4double > ChooseImpactXandY(G4double maxImpact)
void IncrementCollisionCount(G4int aCount)