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<running/total)
88 result = (*i)->GetQuark();
89 aDiQuark = (*i)->GetDiQuark();
99 typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
107 sum += (*i)->GetProbability();
112 quark = (*i)->GetDiQuark();
113 diQuark = (*i)->GetQuark();
117 quark = (*i)->GetQuark();
118 diQuark = (*i)->GetDiQuark();
128 typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
133 if (std::abs((*i)->GetQuark()) == std::abs(quark))
135 sum += (*i)->GetProbability();
142 if (std::abs((*i)->GetQuark()) == std::abs(quark))
144 running += (*i)->GetProbability();
145 if (running/sum >= random)
147 diQuark = (*i)->GetDiQuark();
G4int FindQuark(G4int diQuark) const
G4double total(Particle const *const p1, Particle const *const p2)
static G4ParticleTable * GetParticleTable()
G4ParticleDefinition * theDefinition
G4int MatchDiQuarkAndGetQuark(const G4SPBaryon &aBaryon, G4int &aDiQuark) const
void SampleQuarkAndDiquark(G4int &quark, G4int &diQuark) const
std::vector< G4SPPartonInfo * > thePartonInfo
void FindDiquark(G4int quark, G4int &diQuark) const
G4double G4ParticleHPJENDLHEData::G4double result
G4SPBaryon(G4Proton *aProton)
G4int GetPDGEncoding() const
G4double GetProbability(G4int diQuark) const