38 typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
44 running += (*i)->GetProbability();
45 if (running/sum >= random)
47 Quark = (*i)->GetQuark();
59 typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
65 sum += (*i)->GetProbability();
76 typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
88 if (random<running/total)
90 result = (*i)->GetQuark();
91 aDiQuark = (*i)->GetDiQuark();
102 typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
110 sum += (*i)->GetProbability();
115 quark = (*i)->GetDiQuark();
116 diQuark = (*i)->GetQuark();
120 quark = (*i)->GetQuark();
121 diQuark = (*i)->GetDiQuark();
132 typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
139 sum += (*i)->GetProbability();
147 running += (*i)->GetProbability();
148 if (running/sum >= random)
150 diQuark = (*i)->GetDiQuark();