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

#include <G4INCLNNToMultiPionsChannel.hh>

+ Inheritance diagram for G4INCL::NNToMultiPionsChannel:

Public Member Functions

 NNToMultiPionsChannel (const G4int, Particle *, Particle *)
 
virtual ~NNToMultiPionsChannel ()
 
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 G4INCLNNToMultiPionsChannel.hh.

Constructor & Destructor Documentation

◆ NNToMultiPionsChannel()

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

Definition at line 51 of file G4INCLNNToMultiPionsChannel.cc.

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

◆ ~NNToMultiPionsChannel()

G4INCL::NNToMultiPionsChannel::~NNToMultiPionsChannel ( )
virtual

Definition at line 61 of file G4INCLNNToMultiPionsChannel.cc.

61 {
62
63 }

Member Function Documentation

◆ fillFinalState()

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

Implements G4INCL::IChannel.

Definition at line 65 of file G4INCLNNToMultiPionsChannel.cc.

65 {
66// assert(npion > 0 && npion < 5);
67
68 iso1=ParticleTable::getIsospin(particle1->getType());
69 iso2=ParticleTable::getIsospin(particle2->getType());
70
71 ParticleList list;
72 list.push_back(particle1);
73 list.push_back(particle2);
74 fs->addModifiedParticle(particle1);
75 fs->addModifiedParticle(particle2);
76
77 isospinRepartition();
78
80 particle1->setType(tn1);
82 particle2->setType(tn2);
83 const ThreeVector &rcolnucleon1 = particle1->getPosition();
84 const ThreeVector &rcolnucleon2 = particle2->getPosition();
85 const ThreeVector rcol = (rcolnucleon1+rcolnucleon2)*0.5;
86 const ThreeVector zero;
87 for(G4int i=0; i<npion; ++i) {
88 const ParticleType pionType=ParticleTable::getPionType(isosp[i]);
89 Particle *pion = new Particle(pionType,zero,rcol);
90 list.push_back(pion);
91 fs->addCreatedParticle(pion);
92 }
93
94 const G4double sqrtS = KinematicsUtils::totalEnergyInCM(particle1, particle2);
95 G4int biasIndex = ((Random::shoot()<0.5) ? 0 : 1);
96 PhaseSpaceGenerator::generateBiased(sqrtS, list, biasIndex, angularSlope);
97
98 }
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
const G4INCL::ThreeVector & getPosition() const
G4INCL::ParticleType getType() const
void setType(ParticleType t)
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.
G4double shoot()
Definition: G4INCLRandom.cc:93
G4bool pion(G4int ityp)

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