40 #include <Geant4/G4DecayProducts.hh>
41 #include <Geant4/G4DynamicParticle.hh>
42 #include <Geant4/G4ParticleDefinition.hh>
43 #include <Geant4/G4ParticleTable.hh>
44 #include <Geant4/G4String.hh>
45 #include <Geant4/G4SystemOfUnits.hh>
46 #include <Geant4/G4Track.hh>
47 #include <Geant4/G4VExtDecayer.hh>
63 , fDecayType(fgkDefaultDecayType)
64 , fDecayProductsArray(0)
98 particleDefinition = particleTable->
FindParticle(pdgEncoding);
100 if (particleDefinition == 0 && warn)
103 <<
"G4Pythia6Decayer: GetParticleDefinition: " << std::endl
104 <<
"G4ParticleTable::FindParticle() for particle with PDG = "
106 <<
" failed." << std::endl;
109 return particleDefinition;
121 if (!particleDefinition)
return 0;
128 return dynamicParticle;
164 for (
G4int i = 1; i <= 5; i++)
186 for (
G4int channel = ifirst; channel <= ilast; channel++)
190 pythia6->
SetMDME(channel, 1, 1);
194 pythia6->
SetMDME(channel, 1, 0);
214 for (
G4int channel = ifirst; channel <= ilast; channel++)
220 pythia6->
SetMDME(channel, 1, 1);
223 pythia6->
SetMDME(channel, 1, 0);
234 const G4int kNHadrons = 4;
236 G4int hadron[kNHadrons] = {411, 421, 431, 4112};
240 G4int iKstarbar0 = -313;
242 G4int iKMinus = -321;
244 G4int iPiMinus = -211;
246 G4int products[2] = {iKPlus, iPiMinus}, mult[2] = {1, 1};
253 G4int decayP1[kNHadrons][3] = {
254 {iKMinus, iPiPlus, iPiPlus},
255 {iKMinus, iPiPlus, 0},
256 {iKPlus, iKstarbar0, 0},
258 G4int decayP2[kNHadrons][3] = {
259 {iKstarbar0, iPiPlus, 0},
265 for (
G4int ihadron = 0; ihadron < kNHadrons; ihadron++)
272 for (channel = ifirst; channel <= ilast; channel++)
274 if ((pythia6->
GetKFDP(channel, 1) == decayP1[ihadron][0] &&
275 pythia6->
GetKFDP(channel, 2) == decayP1[ihadron][1] &&
276 pythia6->
GetKFDP(channel, 3) == decayP1[ihadron][2] &&
277 pythia6->
GetKFDP(channel, 4) == 0) ||
278 (pythia6->
GetKFDP(channel, 1) == decayP2[ihadron][0] &&
279 pythia6->
GetKFDP(channel, 2) == decayP2[ihadron][1] &&
280 pythia6->
GetKFDP(channel, 3) == decayP2[ihadron][2] &&
281 pythia6->
GetKFDP(channel, 4) == 0))
283 pythia6->
SetMDME(channel, 1, 1);
287 pythia6->
SetMDME(channel, 1, 0);
301 G4int iLambda0 = 3122;
302 G4int iKMinus = -321;
309 for (
G4int channel = ifirst; channel <= ilast; channel++)
311 if (pythia6->
GetKFDP(channel, 1) == iLambda0 &&
312 pythia6->
GetKFDP(channel, 2) == iKMinus &&
313 pythia6->
GetKFDP(channel, 3) == 0)
314 pythia6->
SetMDME(channel, 1, 1);
316 pythia6->
SetMDME(channel, 1, 0);
341 products[2] = 100443;
425 products[1] = 100443;
558 p[0] = momentum.
x() /
GeV;
559 p[1] = momentum.
y() /
GeV;
560 p[2] = momentum.
z() /
GeV;
572 Decay(pdgEncoding, p);
577 std::cout <<
"nofParticles: " << nofParticles << std::endl;
585 for (
G4int i = 0; i < nofParticles; i++)
592 if (status > 0 && status < 11 &&
600 std::cout <<
" " << i <<
"th particle PDG: " << pdg <<
" ";
610 std::cout <<
" G4 particle name: "
624 std::cout <<
"nofParticles for tracking: " << counter << std::endl;
627 return decayProducts;