47 #include <CLHEP/Vector/LorentzVector.h>
59 fDecayType(fgkDefaultDecayType),
60 fDecayProductsArray(0)
96 particleDefinition = particleTable->
FindParticle(pdgEncoding);
98 if ( particleDefinition == 0 && warn) {
100 <<
"G4Pythia6Decayer: GetParticleDefinition: " << std::endl
101 <<
"G4ParticleTable::FindParticle() for particle with PDG = "
103 <<
" failed." << std::endl;
106 return particleDefinition;
119 if ( ! particleDefinition )
return 0;
127 return dynamicParticle;
165 for (
G4int i=1; i<=5; i++ )
188 for (
G4int channel= ifirst; channel <= ilast; channel++) {
212 for (
G4int channel = ifirst; channel <= ilast; channel++) {
214 for (
G4int i = 0; i < npart; i++)
230 const G4int kNHadrons = 4;
232 G4int hadron[kNHadrons] = {411, 421, 431, 4112};
236 G4int iKstarbar0 = -313;
238 G4int iKMinus = -321;
240 G4int iPiMinus = -211;
242 G4int products[2] = {iKPlus, iPiMinus}, mult[2] = {1, 1};
249 G4int decayP1[kNHadrons][3] = {
250 {iKMinus, iPiPlus, iPiPlus},
251 {iKMinus, iPiPlus, 0 },
252 {iKPlus , iKstarbar0, 0 },
255 G4int decayP2[kNHadrons][3] = {
256 {iKstarbar0, iPiPlus, 0 },
258 {iPhi , iPiPlus, 0 },
263 for (
G4int ihadron = 0; ihadron < kNHadrons; ihadron++ ) {
269 for (channel = ifirst; channel <= ilast; channel++) {
270 if ((pythia6->
GetKFDP(channel,1) == decayP1[ihadron][0] &&
271 pythia6->
GetKFDP(channel,2) == decayP1[ihadron][1] &&
272 pythia6->
GetKFDP(channel,3) == decayP1[ihadron][2] &&
273 pythia6->
GetKFDP(channel,4) == 0) ||
274 (pythia6->
GetKFDP(channel,1) == decayP2[ihadron][0] &&
275 pythia6->
GetKFDP(channel,2) == decayP2[ihadron][1] &&
276 pythia6->
GetKFDP(channel,3) == decayP2[ihadron][2] &&
277 pythia6->
GetKFDP(channel,4) == 0)) {
294 G4int iLambda0 = 3122;
295 G4int iKMinus = -321;
302 for (
G4int channel = ifirst; channel <= ilast; channel++) {
303 if (pythia6->
GetKFDP(channel,1) == iLambda0 &&
304 pythia6->
GetKFDP(channel,2) == iKMinus &&
305 pythia6->
GetKFDP(channel,3) == 0)
328 switch ( decayType ) {
333 products[2] = 100443;
417 products[1] = 100443;
546 CLHEP::HepLorentzVector p;
547 p[0] = momentum.x() /
GeV;
548 p[1] = momentum.y() /
GeV;
549 p[2] = momentum.z() /
GeV;
561 Decay(pdgEncoding, p);
574 for (
G4int i=0; i<nofParticles; i++) {
581 if ( status>0 && status<11 &&
582 std::abs(pdg)!=12 && std::abs(pdg)!=14 && std::abs(pdg)!=16 ) {
587 G4cout <<
" " << i <<
"th particle PDG: " << pdg <<
" ";
594 if (dynamicParticle) {
597 G4cout <<
" G4 particle name: "
610 G4cout <<
"nofParticles for tracking: " << counter <<
G4endl;
613 return decayProducts;
void SetMSTJ(int i, int m)
G4ParticleDefinition * GetDefinition() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
CLHEP::Hep3Vector G4ThreeVector
static Pythia6 * Instance()
G4double GetTotalEnergy() const
void Decay(G4int pdg, const CLHEP::HepLorentzVector &p)
const G4DynamicParticle * GetDynamicParticle() const
G4int PushProducts(G4DynamicParticle *aParticle)
int GetMDCY(int i, int j)
static const EDecayType fgkDefaultDecayType
default decay type
G4int ImportParticles(ParticleVector *particles)
Structure for Pythia6 particle properties.
void Py1ent(int line, int kf, double pe, double theta, double phi)
G4int GetPDGEncoding() const
G4ParticleDefinition * GetDefinition() const
ParticleVector * fDecayProductsArray
array of decay products
Definition of the G4Pythia6Decayer class.
const G4String & GetParticleName() const
std::vector< Pythia6Particle * > ParticleVector
int GetKFDP(int i, int j)
ParticleVector * ImportParticles()
G4int CountProducts(G4int channel, G4int particle)
EDecayType fDecayType
selected decay type
G4GLOB_DLL std::ostream G4cout
The C++ interface class to Pythia6.
Definition of the Pythia6 class.
G4ThreeVector GetParticleMomentum(const Pythia6Particle *particle) const
void ForceDecay(EDecayType decayType)
G4ParticleDefinition * GetParticleDefinition(const Pythia6Particle *p, G4bool warn=true) const
void ForceParticleDecay(G4int particle, G4int product, G4int mult)
G4ThreeVector GetMomentum() const
virtual ~G4Pythia6Decayer()
static G4ParticleTable * GetParticleTable()
G4DynamicParticle * CreateDynamicParticle(const Pythia6Particle *p) const
virtual G4DecayProducts * ImportDecayProducts(const G4Track &track)
G4int fVerboseLevel
verbose level
EDecayType
Enum of decay mode types.
void SetMDCY(int i, int j, int m)
void ForceDecayType(EDecayType decayType)
G4ThreeVector GetParticlePosition(const Pythia6Particle *particle) const
void SetMDME(int i, int j, int m)