Function that decays the RHadron; returns products in G4 format.
190 Pythia8::ParticleData& pdt =
m_pythia->particleData;
197 int idRHad =
event[iRNow].id();
198 double mRHad =
event[iRNow].m();
206 int id1 = idPair.first;
207 int id2 = idPair.second;
211 int idRSb =
m_pythia->settings.mode(
"RHadrons:idSbottom");
212 int idRSt =
m_pythia->settings.mode(
"RHadrons:idStop");
213 int idRGo =
m_pythia->settings.mode(
"RHadrons:idGluino");
214 int idLight = (abs(idRHad) - 1000000) / 10;
215 int idSq = (idLight < 100) ? idLight/10 : idLight/100;
216 int idRSq = (idSq == 6) ? idRSt : idRSb;
219 idRSq = idRSq * std::copysign(1, idRHad);
221 int idRBef = isTriplet ? idRSq : idRGo;
224 double mRBef = pdt.mSel(idRBef);
227 double fracR = mRBef / mRHad;
231 G4cout <<
"Needed more than 10 attempts with constituent " << idRBef <<
" mass (" << mRBef <<
" above R-Hadron " << idRHad <<
" mass " << mRHad << G4endl;
233 G4cout <<
"Pythia8ForDecays::Py1ent ERROR Failed >100 times. Constituent " << idRBef <<
" mass (" << mRBef <<
" above R-Hadron " << idRHad <<
" mass " << mRHad << G4endl;
236 mRBef = pdt.mSel(idRBef);
237 fracR = mRBef / mRHad;
243 const int col = (pdt.colType(idRBef) != 0) ?
event.nextColTag() : 0;
244 int tmpSparticleColor = id1>0 ?
col : 0;
245 int tmpSparticleAnticolor = id1>0 ? 0 :
col;
251 iR0 =
event.append( id1, 106, iRNow, 0, 0, 0, tmpSparticleColor, tmpSparticleAnticolor, fracR *
event[iRNow].
p(), fracR * mRHad, 0.);
253 iR2 =
event.append(
id2, 106, iRNow, 0, 0, 0, tmpSparticleAnticolor, tmpSparticleColor, (1. - fracR) *
event[iRNow].p(), (1. - fracR) * mRHad, 0.);
257 double mOffsetCloudRH = 0.2;
258 double m1Eff = pdt.constituentMass(id1) + mOffsetCloudRH;
259 double m2Eff = pdt.constituentMass(
id2) + mOffsetCloudRH;
260 double frac1 = (1. - fracR) * m1Eff / ( m1Eff + m2Eff);
261 double frac2 = (1. - fracR) * m2Eff / ( m1Eff + m2Eff);
264 int col1 =
event.nextColTag();
265 int col2 =
event.nextColTag();
268 iR0 =
event.append( idRBef, 106, iRNow, 0, 0, 0, col2, col1, fracR *
event[iRNow].
p(), fracR * mRHad, 0.);
269 event.append( id1, 106, iRNow, 0, 0, 0, col1, 0, frac1 *
event[iRNow].
p(), frac1 * mRHad, 0.);
270 iR2 =
event.append(
id2, 106, iRNow, 0, 0, 0, 0, col2, frac2 *
event[iRNow].
p(), frac2 * mRHad, 0.);
274 event[iRNow].statusNeg();
275 event[iRNow].daughters( iR0, iR2);
288 if (
m_pythia->event[
i].status()<0 )
continue;
293 if (!particleDefinition){
294 G4cout <<
"I don't know a definition for pdgid "<<
m_pythia->event[
i].id()<<
"! Skipping it..." << G4endl;
298 G4DynamicParticle* dynamicParticle =
new G4DynamicParticle(particleDefinition,
momentum);