38 typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
42 if (std::abs((*i)->GetDiQuark()) == std::abs(diQuark))
44 running += (*i)->GetProbability();
45 if (running/sum >= random)
47 Quark = (*i)->GetQuark();
58 typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
62 if (std::abs((*i)->GetDiQuark()) == std::abs(diQuark))
64 sum += (*i)->GetProbability();
74 typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
86 if(random/total<running)
88 result = (*i)->GetQuark();
89 aDiQuark = (*i)->GetDiQuark();
99 typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
105 sum += (*i)->GetProbability();
110 quark = (*i)->GetDiQuark();
111 diQuark = (*i)->GetQuark();
115 quark = (*i)->GetQuark();
116 diQuark = (*i)->GetDiQuark();
126 typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
131 if (std::abs((*i)->GetQuark()) == std::abs(quark))
133 sum += (*i)->GetProbability();
140 if (std::abs((*i)->GetQuark()) == std::abs(quark))
142 running += (*i)->GetProbability();
143 if (running/sum >= random)
145 diQuark = (*i)->GetDiQuark();
G4int MatchDiQuarkAndGetQuark(const G4SPBaryon &aBaryon, G4int &aDiQuark) const
void SampleQuarkAndDiquark(G4int &quark, G4int &diQuark) const
void FindDiquark(G4int quark, G4int &diQuark) const
std::vector< G4SPPartonInfo * > thePartonInfo
G4int GetPDGEncoding() const
G4ParticleDefinition * theDefinition
G4int FindQuark(G4int diQuark) const
G4double GetProbability(G4int diQuark) const
G4SPBaryon(G4Proton *aProton)
G4double total(Particle const *const p1, Particle const *const p2)
static G4ParticleTable * GetParticleTable()