Geant4 10.7.0
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 G4int ipi=ParticleTable::getIsospin(pion->getType());
78 ind2=ParticleTable::getIsospin(nucleon->getType());
79
80 ParticleList list;
81 list.push_back(nucleon);
82 list.push_back(pion);
83 fs->addModifiedParticle(nucleon);
84 fs->addModifiedParticle(pion);
85
86 isospinRepartition(ipi);
87
89 nucleon->setType(tn);
91 pion->setType(pionType);
92 const ThreeVector &rcolpion = pion->getPosition();
93 const ThreeVector zero;
94 for(G4int i=1; i<npion; ++i) {
95 pionType=ParticleTable::getPionType(isosp[i]);
96 Particle *newPion = new Particle(pionType,zero,rcolpion);
97 newPion->setType(pionType);
98 list.push_back(newPion);
99 fs->addCreatedParticle(newPion);
100 }
101
102 const G4double sqrtS = KinematicsUtils::totalEnergyInCM(nucleon, pion);
103 PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
104
105 }
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: