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

#include <G4INCLNNToNLKChannel.hh>

+ Inheritance diagram for G4INCL::NNToNLKChannel:

Public Member Functions

 NNToNLKChannel (Particle *, Particle *)
 
virtual ~NNToNLKChannel ()
 
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 G4INCLNNToNLKChannel.hh.

Constructor & Destructor Documentation

◆ NNToNLKChannel()

G4INCL::NNToNLKChannel::NNToNLKChannel ( Particle p1,
Particle p2 
)

Definition at line 51 of file G4INCLNNToNLKChannel.cc.

52 : particle1(p1), particle2(p2)
53 {}

◆ ~NNToNLKChannel()

G4INCL::NNToNLKChannel::~NNToNLKChannel ( )
virtual

Definition at line 55 of file G4INCLNNToNLKChannel.cc.

55{}

Member Function Documentation

◆ fillFinalState()

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

Implements G4INCL::IChannel.

Definition at line 57 of file G4INCLNNToNLKChannel.cc.

57 {
58
59 const G4double sqrtS = KinematicsUtils::totalEnergyInCM(particle1, particle2);
60
61 const G4int iso = ParticleTable::getIsospin(particle1->getType()) + ParticleTable::getIsospin(particle2->getType());
62
63 ParticleType KaonType;
64 particle2->setType(Lambda);
65
66 if(iso == 2) KaonType = KPlus;
67 else if(iso == -2) KaonType = KZero;
68 else if(Random::shoot() < 0.5){
69 particle1->setType(Proton);
70 KaonType = KZero;
71 }
72 else{
73 particle1->setType(Neutron);
74 KaonType = KPlus;
75 }
76
77 ParticleList list;
78 list.push_back(particle1);
79 list.push_back(particle2);
80 const ThreeVector &rcol = particle2->getPosition();
81 const ThreeVector zero;
82 Particle *kaon = new Particle(KaonType,zero,rcol);
83 list.push_back(kaon);
84
85 if(Random::shoot()<0.5) PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
86 else PhaseSpaceGenerator::generateBiased(sqrtS, list, 1, angularSlope);
87
88 fs->addModifiedParticle(particle1);
89 fs->addModifiedParticle(particle2);
90 fs->addCreatedParticle(kaon);
91
92 }
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.
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

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