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();
73 typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
85 if(random/total<running)
87 result = (*i)->GetQuark();
88 aDiQuark = (*i)->GetDiQuark();
97 typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
103 sum += (*i)->GetProbability();
108 quark = (*i)->GetDiQuark();
109 diQuark = (*i)->GetQuark();
111 quark = (*i)->GetQuark();
112 diQuark = (*i)->GetDiQuark();
121 typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
126 if (std::abs((*i)->GetQuark()) == std::abs(quark))
128 sum += (*i)->GetProbability();
135 if (std::abs((*i)->GetQuark()) == std::abs(quark))
137 running += (*i)->GetProbability();
138 if (running/sum >= random)
140 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()