Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4INCL::PiNToMultiPionsChannel Class Reference

#include <G4INCLPiNToMultiPionsChannel.hh>

+ Inheritance diagram for G4INCL::PiNToMultiPionsChannel:

Public Member Functions

 PiNToMultiPionsChannel (const G4int, Particle *, Particle *)
 
virtual ~PiNToMultiPionsChannel ()
 
void fillFinalState (FinalState *fs)
 
- Public Member Functions inherited from G4INCL::IChannel
 IChannel ()
 
virtual ~IChannel ()
 
FinalStategetFinalState ()
 
virtual void fillFinalState (FinalState *fs)=0
 

Detailed Description

Definition at line 47 of file G4INCLPiNToMultiPionsChannel.hh.

Constructor & Destructor Documentation

◆ PiNToMultiPionsChannel()

G4INCL::PiNToMultiPionsChannel::PiNToMultiPionsChannel ( const G4int  npi,
Particle p1,
Particle p2 
)

Definition at line 51 of file G4INCLPiNToMultiPionsChannel.cc.

52 : npion(npi),
53 ind2(0),
54 particle1(p1),
55 particle2(p2)
56 {
57 std::fill(isosp, isosp+4, 0);
58 }

◆ ~PiNToMultiPionsChannel()

G4INCL::PiNToMultiPionsChannel::~PiNToMultiPionsChannel ( )
virtual

Definition at line 60 of file G4INCLPiNToMultiPionsChannel.cc.

60 {
61
62 }

Member Function Documentation

◆ fillFinalState()

void G4INCL::PiNToMultiPionsChannel::fillFinalState ( FinalState fs)
virtual

Implements G4INCL::IChannel.

Definition at line 64 of file G4INCLPiNToMultiPionsChannel.cc.

64 {
65
66// assert(npion > 1 && npion < 5);
67
68 Particle * nucleon;
69 Particle * pion;
70 if(particle1->isNucleon()) {
71 nucleon = particle1;
72 pion = particle2;
73 } else {
74 nucleon = particle2;
75 pion = particle1;
76 }
77
78 // Erase the parent resonance information of the nucleon and pion
79 nucleon->setParentResonancePDGCode(0);
80 nucleon->setParentResonanceID(0);
81 pion->setParentResonancePDGCode(0);
82 pion->setParentResonanceID(0);
83
84 G4int ipi=ParticleTable::getIsospin(pion->getType());
85 ind2=ParticleTable::getIsospin(nucleon->getType());
86
87 ParticleList list;
88 list.push_back(nucleon);
89 list.push_back(pion);
90 fs->addModifiedParticle(nucleon);
91 fs->addModifiedParticle(pion);
92
93 isospinRepartition(ipi);
94
96 nucleon->setType(tn);
98 pion->setType(pionType);
99 const ThreeVector &rcolpion = pion->getPosition();
100 const ThreeVector zero;
101 for(G4int i=1; i<npion; ++i) {
102 pionType=ParticleTable::getPionType(isosp[i]);
103 Particle *newPion = new Particle(pionType,zero,rcolpion);
104 newPion->setType(pionType);
105 list.push_back(newPion);
106 fs->addCreatedParticle(newPion);
107 }
108
109 const G4double sqrtS = KinematicsUtils::totalEnergyInCM(nucleon, pion);
110 PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
111
112 }
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
G4bool isNucleon() const
G4double totalEnergyInCM(Particle const *const p1, Particle const *const p2)
G4int getIsospin(const ParticleType t)
Get the isospin of a particle.
ParticleType getNucleonType(const G4int isosp)
Get the type of nucleon.
ParticleType getPionType(const G4int isosp)
Get the type of pion.
void generateBiased(const G4double sqrtS, ParticleList &particles, const size_t index, const G4double slope)
Generate a biased event in the CM system.
G4bool pion(G4int ityp)
G4bool nucleon(G4int ityp)

The documentation for this class was generated from the following files: