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

#include <G4INCLNSToNLChannel.hh>

+ Inheritance diagram for G4INCL::NSToNLChannel:

Public Member Functions

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

Constructor & Destructor Documentation

◆ NSToNLChannel()

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

Definition at line 49 of file G4INCLNSToNLChannel.cc.

50 : particle1(p1), particle2(p2)
51 {}

◆ ~NSToNLChannel()

G4INCL::NSToNLChannel::~NSToNLChannel ( )
virtual

Definition at line 53 of file G4INCLNSToNLChannel.cc.

53{}

Member Function Documentation

◆ fillFinalState()

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

Implements G4INCL::IChannel.

Definition at line 55 of file G4INCLNSToNLChannel.cc.

55 {
56
57 Particle *nucleon;
58 Particle *sigma;
59
60 if(particle1->isNucleon()){
61 nucleon = particle1;
62 sigma = particle2;
63 }
64 else{
65 nucleon = particle2;
66 sigma = particle1;
67 }
68
69 const G4double sqrtS = KinematicsUtils::totalEnergyInCM(nucleon, sigma);
70
71 const G4int iso = ParticleTable::getIsospin(nucleon->getType()) + ParticleTable::getIsospin(sigma->getType());
72// assert(iso == -1 || iso == 1);
73
75 sigma->setType(Lambda);
76
77 G4double mn=nucleon->getMass();
78 G4double my=sigma->getMass();
79
80 G4double ey=(sqrtS*sqrtS+my*my-mn*mn)/(2*sqrtS);
81 G4double en=std::sqrt(ey*ey-my*my+mn*mn);
82 nucleon->setEnergy(en);
83 sigma->setEnergy(ey);
84 G4double py=std::sqrt(ey*ey-my*my);
85
86 ThreeVector mom_hyperon = Random::normVector(py);
87
88 sigma->setMomentum(mom_hyperon);
89 nucleon->setMomentum(-mom_hyperon);
90
91 fs->addModifiedParticle(nucleon);
92 fs->addModifiedParticle(sigma);
93
94 }
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.
ThreeVector normVector(G4double norm=1.)
G4bool nucleon(G4int ityp)

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