198 G4int* mult, G4int npart)
204 G4int kc = pythia6->
Pycomp(particle);
206 G4int ifirst = pythia6->
GetMDCY(kc,2);
207 G4int ilast = ifirst+pythia6->
GetMDCY(kc,3)-1;
210 for (G4int channel = ifirst; channel <= ilast; channel++) {
212 for (G4int i = 0; i < npart; i++)
228 const G4int kNHadrons = 4;
230 G4int hadron[kNHadrons] = {411, 421, 431, 4112};
234 G4int iKstarbar0 = -313;
236 G4int iKMinus = -321;
238 G4int iPiMinus = -211;
240 G4int products[2] = {iKPlus, iPiMinus}, mult[2] = {1, 1};
247 G4int decayP1[kNHadrons][3] = {
248 {iKMinus, iPiPlus, iPiPlus},
249 {iKMinus, iPiPlus, 0 },
250 {iKPlus , iKstarbar0, 0 },
253 G4int decayP2[kNHadrons][3] = {
254 {iKstarbar0, iPiPlus, 0 },
256 {iPhi , iPiPlus, 0 },
261 for ( G4int ihadron = 0; ihadron < kNHadrons; ihadron++ ) {
262 G4int kc = pythia6->
Pycomp(hadron[ihadron]);
264 G4int ifirst = pythia6->
GetMDCY(kc,2);
265 G4int ilast = ifirst + pythia6->
GetMDCY(kc,3)-1;
267 for (channel = ifirst; channel <= ilast; channel++) {
268 if ((pythia6->
GetKFDP(channel,1) == decayP1[ihadron][0] &&
269 pythia6->
GetKFDP(channel,2) == decayP1[ihadron][1] &&
270 pythia6->
GetKFDP(channel,3) == decayP1[ihadron][2] &&
271 pythia6->
GetKFDP(channel,4) == 0) ||
272 (pythia6->
GetKFDP(channel,1) == decayP2[ihadron][0] &&
273 pythia6->
GetKFDP(channel,2) == decayP2[ihadron][1] &&
274 pythia6->
GetKFDP(channel,3) == decayP2[ihadron][2] &&
275 pythia6->
GetKFDP(channel,4) == 0)) {
326 switch ( decayType ) {
331 products[2] = 100443;
415 products[1] = 100443;
542 G4ThreeVector momentum = track.GetMomentum();
543 G4double etot = track.GetDynamicParticle()->GetTotalEnergy();;
545 p[0] = momentum.x() / GeV;
546 p[1] = momentum.y() / GeV;
547 p[2] = momentum.z() / GeV;
555 G4int pdgEncoding = particleDef->GetPDGEncoding();
559 Decay(pdgEncoding, p);
563 G4cout <<
"nofParticles: " << nofParticles << G4endl;
572 for (G4int i=0; i<nofParticles; i++) {
577 G4int status = particle->
fKS;
578 G4int pdg = particle->
fKF;
579 if ( status>0 && status<11 &&
580 std::abs(pdg)!=12 && std::abs(pdg)!=14 && std::abs(pdg)!=16 ) {
585 G4cout <<
" " << i <<
"th particle PDG: " << pdg <<
" ";
592 if (dynamicParticle) {
595 G4cout <<
" G4 particle name: "
596 << dynamicParticle->GetDefinition()->GetParticleName()
601 decayProducts->PushProducts(dynamicParticle);
608 G4cout <<
"nofParticles for tracking: " << counter << G4endl;
611 return decayProducts;
Structure for Pythia6 particle properties.