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

#include <G4INCLNLToNSChannel.hh>

+ Inheritance diagram for G4INCL::NLToNSChannel:

Public Member Functions

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

Constructor & Destructor Documentation

◆ NLToNSChannel()

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

Definition at line 49 of file G4INCLNLToNSChannel.cc.

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

◆ ~NLToNSChannel()

G4INCL::NLToNSChannel::~NLToNSChannel ( )
virtual

Definition at line 53 of file G4INCLNLToNSChannel.cc.

53{}

Member Function Documentation

◆ fillFinalState()

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

Implements G4INCL::IChannel.

Definition at line 55 of file G4INCLNLToNSChannel.cc.

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

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