59 fDecayType(fgkDefaultDecayType),
60 fDecayProductsArray(0)
66 ForceDecay(fDecayType);
75 delete fDecayProductsArray;
95 particleDefinition = particleTable->
FindParticle(pdgEncoding);
97 if ( particleDefinition == 0 && warn) {
99 <<
"G4Pythia6Decayer: GetParticleDefinition: " << std::endl
100 <<
"G4ParticleTable::FindParticle() for particle with PDG = "
102 <<
" failed." << std::endl;
105 return particleDefinition;
111 G4Pythia6Decayer::CreateDynamicParticle(
const Pythia6Particle* particle)
const
117 = GetParticleDefinition(particle);
118 if ( ! particleDefinition )
return 0;
126 return dynamicParticle;
164 for (
G4int i=1; i<=5; i++ )
173 G4Pythia6Decayer::ForceParticleDecay(
G4int particle,
G4int product,
G4int mult)
187 for (
G4int channel= ifirst; channel <= ilast; channel++) {
188 if (CountProducts(channel,product) >= mult) {
198 void G4Pythia6Decayer::ForceParticleDecay(
G4int particle,
G4int* products,
211 for (
G4int channel = ifirst; channel <= ilast; channel++) {
213 for (
G4int i = 0; i < npart; i++)
214 nprod += (CountProducts(channel, products[i]) >= mult[i]);
225 void G4Pythia6Decayer::ForceHadronicD()
229 const G4int kNHadrons = 4;
231 G4int hadron[kNHadrons] = {411, 421, 431, 4112};
235 G4int iKstarbar0 = -313;
237 G4int iKMinus = -321;
239 G4int iPiMinus = -211;
241 G4int products[2] = {iKPlus, iPiMinus}, mult[2] = {1, 1};
242 ForceParticleDecay(iKstar0, products, mult, 2);
246 ForceParticleDecay(iPhi,iKPlus,2);
248 G4int decayP1[kNHadrons][3] = {
249 {iKMinus, iPiPlus, iPiPlus},
250 {iKMinus, iPiPlus, 0 },
251 {iKPlus , iKstarbar0, 0 },
254 G4int decayP2[kNHadrons][3] = {
255 {iKstarbar0, iPiPlus, 0 },
257 {iPhi , iPiPlus, 0 },
262 for (
G4int ihadron = 0; ihadron < kNHadrons; ihadron++ ) {
268 for (channel = ifirst; channel <= ilast; channel++) {
269 if ((pythia6->
GetKFDP(channel,1) == decayP1[ihadron][0] &&
270 pythia6->
GetKFDP(channel,2) == decayP1[ihadron][1] &&
271 pythia6->
GetKFDP(channel,3) == decayP1[ihadron][2] &&
272 pythia6->
GetKFDP(channel,4) == 0) ||
273 (pythia6->
GetKFDP(channel,1) == decayP2[ihadron][0] &&
274 pythia6->
GetKFDP(channel,2) == decayP2[ihadron][1] &&
275 pythia6->
GetKFDP(channel,3) == decayP2[ihadron][2] &&
276 pythia6->
GetKFDP(channel,4) == 0)) {
287 void G4Pythia6Decayer::ForceOmega()
293 G4int iLambda0 = 3122;
294 G4int iKMinus = -321;
301 for (
G4int channel = ifirst; channel <= ilast; channel++) {
302 if (pythia6->
GetKFDP(channel,1) == iLambda0 &&
303 pythia6->
GetKFDP(channel,2) == iKMinus &&
304 pythia6->
GetKFDP(channel,3) == 0)
314 void G4Pythia6Decayer::ForceDecay(
EDecayType decayType)
327 switch ( decayType ) {
332 products[2] = 100443;
336 ForceParticleDecay( 511, products, mult, 3);
337 ForceParticleDecay( 521, products, mult, 3);
338 ForceParticleDecay( 531, products, mult, 3);
339 ForceParticleDecay( 5122, products, mult, 3);
340 ForceParticleDecay( 5132, products, mult, 3);
341 ForceParticleDecay( 5232, products, mult, 3);
342 ForceParticleDecay( 5332, products, mult, 3);
343 ForceParticleDecay( 100443, 443, 1);
344 ForceParticleDecay( 443, 13, 2);
346 ForceParticleDecay( 411,13,1);
347 ForceParticleDecay( 421,13,1);
348 ForceParticleDecay( 431,13,1);
349 ForceParticleDecay( 4122,13,1);
350 ForceParticleDecay( 4132,13,1);
351 ForceParticleDecay( 4232,13,1);
352 ForceParticleDecay( 4332,13,1);
356 ForceParticleDecay( 411,13,1);
357 ForceParticleDecay( 421,13,1);
358 ForceParticleDecay( 431,13,1);
359 ForceParticleDecay( 4122,13,1);
360 ForceParticleDecay( 4132,13,1);
361 ForceParticleDecay( 4232,13,1);
362 ForceParticleDecay( 4332,13,1);
363 ForceParticleDecay( 511,13,1);
364 ForceParticleDecay( 521,13,1);
365 ForceParticleDecay( 531,13,1);
366 ForceParticleDecay( 5122,13,1);
367 ForceParticleDecay( 5132,13,1);
368 ForceParticleDecay( 5232,13,1);
369 ForceParticleDecay( 5332,13,1);
373 ForceParticleDecay( 113,13,2);
374 ForceParticleDecay( 221,13,2);
375 ForceParticleDecay( 223,13,2);
376 ForceParticleDecay( 333,13,2);
377 ForceParticleDecay( 443,13,2);
378 ForceParticleDecay(100443,13,2);
379 ForceParticleDecay( 553,13,2);
380 ForceParticleDecay(100553,13,2);
381 ForceParticleDecay(200553,13,2);
385 ForceParticleDecay( 411,11,1);
386 ForceParticleDecay( 421,11,1);
387 ForceParticleDecay( 431,11,1);
388 ForceParticleDecay( 4122,11,1);
389 ForceParticleDecay( 4132,11,1);
390 ForceParticleDecay( 4232,11,1);
391 ForceParticleDecay( 4332,11,1);
392 ForceParticleDecay( 511,11,1);
393 ForceParticleDecay( 521,11,1);
394 ForceParticleDecay( 531,11,1);
395 ForceParticleDecay( 5122,11,1);
396 ForceParticleDecay( 5132,11,1);
397 ForceParticleDecay( 5232,11,1);
398 ForceParticleDecay( 5332,11,1);
402 ForceParticleDecay( 113,11,2);
403 ForceParticleDecay( 333,11,2);
404 ForceParticleDecay( 221,11,2);
405 ForceParticleDecay( 223,11,2);
406 ForceParticleDecay( 443,11,2);
407 ForceParticleDecay(100443,11,2);
408 ForceParticleDecay( 553,11,2);
409 ForceParticleDecay(100553,11,2);
410 ForceParticleDecay(200553,11,2);
416 products[1] = 100443;
420 ForceParticleDecay( 511, products, mult, 2);
421 ForceParticleDecay( 521, products, mult, 2);
422 ForceParticleDecay( 531, products, mult, 2);
423 ForceParticleDecay( 5122, products, mult, 2);
424 ForceParticleDecay( 100443, 443, 1);
425 ForceParticleDecay( 443,13,2);
429 ForceParticleDecay( 511,100443,1);
430 ForceParticleDecay( 521,100443,1);
431 ForceParticleDecay( 531,100443,1);
432 ForceParticleDecay( 5122,100443,1);
433 ForceParticleDecay(100443,13,2);
437 ForceParticleDecay( 511,443,1);
438 ForceParticleDecay( 521,443,1);
439 ForceParticleDecay( 531,443,1);
440 ForceParticleDecay( 5122,443,1);
441 ForceParticleDecay( 443,11,2);
445 ForceParticleDecay( 511,443,1);
446 ForceParticleDecay( 521,443,1);
447 ForceParticleDecay( 531,443,1);
448 ForceParticleDecay( 5122,443,1);
452 ForceParticleDecay( 511,100443,1);
453 ForceParticleDecay( 521,100443,1);
454 ForceParticleDecay( 531,100443,1);
455 ForceParticleDecay( 5122,100443,1);
456 ForceParticleDecay(100443,11,2);
460 ForceParticleDecay(211,13,1);
464 ForceParticleDecay(321,13,1);
468 ForceParticleDecay( 24, 13,1);
472 ForceParticleDecay( 24, 4,1);
476 ForceParticleDecay( 24, 4,1);
477 ForceParticleDecay( 411,13,1);
478 ForceParticleDecay( 421,13,1);
479 ForceParticleDecay( 431,13,1);
480 ForceParticleDecay( 4122,13,1);
481 ForceParticleDecay( 4132,13,1);
482 ForceParticleDecay( 4232,13,1);
483 ForceParticleDecay( 4332,13,1);
487 ForceParticleDecay( 23, 13,2);
495 ForceParticleDecay(333,321,2);
546 p[0] = momentum.
x() /
GeV;
547 p[1] = momentum.
y() /
GeV;
548 p[2] = momentum.
z() /
GeV;
560 Decay(pdgEncoding, p);
561 G4int nofParticles = ImportParticles(fDecayProductsArray);
563 if ( fVerboseLevel > 0 ) {
573 for (
G4int i=0; i<nofParticles; i++) {
580 if ( status>0 && status<11 &&
581 std::abs(pdg)!=12 && std::abs(pdg)!=14 && std::abs(pdg)!=16 ) {
585 if ( fVerboseLevel > 0 ) {
586 G4cout <<
" " << i <<
"th particle PDG: " << pdg <<
" ";
591 = CreateDynamicParticle(particle);
593 if (dynamicParticle) {
595 if ( fVerboseLevel > 0 ) {
596 G4cout <<
" G4 particle name: "
608 if ( fVerboseLevel > 0 ) {
609 G4cout <<
"nofParticles for tracking: " << counter <<
G4endl;
612 return decayProducts;
622 if ( decayType == fDecayType )
return;
624 fDecayType = decayType;
625 ForceDecay(fDecayType);
void SetMSTJ(int i, int m)
G4ParticleDefinition * GetDefinition() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
CLHEP::Hep3Vector G4ThreeVector
static Pythia6 * Instance()
G4double GetTotalEnergy() const
const G4DynamicParticle * GetDynamicParticle() const
G4int PushProducts(G4DynamicParticle *aParticle)
int GetMDCY(int i, int j)
Structure for Pythia6 particle properties.
void Py1ent(int line, int kf, double pe, double theta, double phi)
G4int GetPDGEncoding() const
G4ParticleDefinition * GetDefinition() const
Definition of the G4Pythia6Decayer class.
const G4String & GetParticleName() const
std::vector< Pythia6Particle * > ParticleVector
int GetKFDP(int i, int j)
ParticleVector * ImportParticles()
G4GLOB_DLL std::ostream G4cout
Definition of the Pythia6 class.
static constexpr double cm
G4ThreeVector GetMomentum() const
virtual ~G4Pythia6Decayer()
static G4ParticleTable * GetParticleTable()
static constexpr double GeV
virtual G4DecayProducts * ImportDecayProducts(const G4Track &track)
void SetMDCY(int i, int j, int m)
void ForceDecayType(EDecayType decayType)
G4GLOB_DLL std::ostream G4cerr
void SetMDME(int i, int j, int m)