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

#include <G4INCLNSToNSChannel.hh>

+ Inheritance diagram for G4INCL::NSToNSChannel:

Public Member Functions

 NSToNSChannel (Particle *, Particle *)
 
virtual ~NSToNSChannel ()
 
void fillFinalState (FinalState *fs)
 
- Public Member Functions inherited from G4INCL::IChannel
 IChannel ()
 
virtual ~IChannel ()
 
FinalStategetFinalState ()
 

Detailed Description

Definition at line 47 of file G4INCLNSToNSChannel.hh.

Constructor & Destructor Documentation

◆ NSToNSChannel()

G4INCL::NSToNSChannel::NSToNSChannel ( Particle * p1,
Particle * p2 )

Definition at line 49 of file G4INCLNSToNSChannel.cc.

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

◆ ~NSToNSChannel()

G4INCL::NSToNSChannel::~NSToNSChannel ( )
virtual

Definition at line 53 of file G4INCLNSToNSChannel.cc.

53{}

Member Function Documentation

◆ fillFinalState()

void G4INCL::NSToNSChannel::fillFinalState ( FinalState * fs)
virtual

Implements G4INCL::IChannel.

Definition at line 55 of file G4INCLNSToNSChannel.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 const G4int iso = ParticleTable::getIsospin(nucleon->getType()) + ParticleTable::getIsospin(sigma->getType());
71// assert(iso == -1 || iso == 1);
72
73 if(sigma->getType() == SigmaZero){
75 sigma->setType(ParticleTable::getSigmaType(2*iso));
76 }
77 else{
79 sigma->setType(SigmaZero);
80 }
81
82 G4double mn=nucleon->getMass();
83 G4double my=sigma->getMass();
84
85 G4double ey=(sqrtS*sqrtS+my*my-mn*mn)/(2*sqrtS);
86 G4double en=std::sqrt(ey*ey-my*my+mn*mn);
87 nucleon->setEnergy(en);
88 sigma->setEnergy(ey);
89 G4double py=std::sqrt(ey*ey-my*my);
90
91 ThreeVector mom_hyperon = Random::normVector(py);
92
93 sigma->setMomentum(mom_hyperon);
94 nucleon->setMomentum(-mom_hyperon);
95
96 sigma->adjustEnergyFromMomentum();
97 nucleon->adjustEnergyFromMomentum();
98
99 fs->addModifiedParticle(nucleon);
100 fs->addModifiedParticle(sigma);
101
102 }
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.)
G4bool nucleon(G4int ityp)

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