38 typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
40 for(i = thePartonInfo.begin(); i!=thePartonInfo.end(); i++)
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;
60 for(i = thePartonInfo.begin(); i!=thePartonInfo.end(); i++)
62 if (std::abs((*i)->GetDiQuark()) == std::abs(diQuark))
64 sum += (*i)->GetProbability();
74 typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
78 for(i = thePartonInfo.begin(); i!=thePartonInfo.end(); i++)
83 for(i = thePartonInfo.begin(); i!=thePartonInfo.end(); i++)
86 if(random/total<running)
88 result = (*i)->GetQuark();
89 aDiQuark = (*i)->GetDiQuark();
99 typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
103 for(i=thePartonInfo.begin() ; i!=thePartonInfo.end(); i++)
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;
129 for(i=thePartonInfo.begin() ; i!=thePartonInfo.end(); i++)
131 if (std::abs((*i)->GetQuark()) == std::abs(quark))
133 sum += (*i)->GetProbability();
138 for(i=thePartonInfo.begin() ; i!=thePartonInfo.end(); i++)
140 if (std::abs((*i)->GetQuark()) == std::abs(quark))
142 running += (*i)->GetProbability();
143 if (running/sum >= random)
145 diQuark = (*i)->GetDiQuark();
156 theDefinition = aProton;
165 theDefinition = aAntiProton;
174 theDefinition = aNeutron;
183 theDefinition = aAntiNeutron;
192 theDefinition = aLambda;
203 theDefinition = aAntiLambda;
214 theDefinition = aSigmaPlus;
223 theDefinition = aAntiSigmaPlus;
232 theDefinition = aSigmaZero;
243 theDefinition = aAntiSigmaZero;
254 theDefinition = aSigmaMinus;
263 theDefinition = aAntiSigmaMinus;
272 theDefinition = aXiMinus;
281 theDefinition = aAntiXiMinus;
290 theDefinition = aXiZero;
299 theDefinition = aAntiXiZero;
308 theDefinition = anOmegaMinus;
316 theDefinition = anAntiOmegaMinus;
324 theDefinition = aDefinition;
330 else if(theDefinition ==
335 else if(theDefinition ==
341 else if(theDefinition ==
347 else if(theDefinition ==
353 else if(theDefinition ==
359 else if(theDefinition ==
364 else if(theDefinition ==
369 else if(theDefinition ==
375 else if(theDefinition ==
381 else if(theDefinition ==
388 else if(theDefinition ==
395 else if(theDefinition ==
401 else if(theDefinition ==
407 else if(theDefinition ==
413 else if(theDefinition ==
419 else if(theDefinition ==
425 else if(theDefinition ==
435 for(
unsigned int i=0;i<thePartonInfo.size(); i++)
delete thePartonInfo[i];
G4int MatchDiQuarkAndGetQuark(const G4SPBaryon &aBaryon, G4int &aDiQuark) const
void SampleQuarkAndDiquark(G4int &quark, G4int &diQuark) const
void FindDiquark(G4int quark, G4int &diQuark) const
G4double G4NeutronHPJENDLHEData::G4double result
G4int GetPDGEncoding() const
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()