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

#include <G4INCLEtaOrOmegaNToSKChannel.hh>

Inheritance diagram for G4INCL::EtaOrOmegaNToSKChannel:

Public Member Functions

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

Detailed Description

Definition at line 47 of file G4INCLEtaOrOmegaNToSKChannel.hh.

Constructor & Destructor Documentation

◆ EtaOrOmegaNToSKChannel()

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

Definition at line 47 of file G4INCLEtaOrOmegaNToSKChannel.cc.

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

◆ ~EtaOrOmegaNToSKChannel()

G4INCL::EtaOrOmegaNToSKChannel::~EtaOrOmegaNToSKChannel ( )
virtual

Definition at line 53 of file G4INCLEtaOrOmegaNToSKChannel.cc.

53 {
54
55 }

Member Function Documentation

◆ fillFinalState()

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

Implements G4INCL::IChannel.

Definition at line 57 of file G4INCLEtaOrOmegaNToSKChannel.cc.

57 {
58 Particle * nucleon;
59 Particle * meson;
60
61 if(particle1->isNucleon()) {
62 nucleon = particle1;
63 meson = particle2;
64 } else {
65 nucleon = particle2;
66 meson = particle1;
67 }
68
69 const G4double r2 = Random::shoot();
70
71 if (nucleon->getType() == Neutron) {
72 if (r2*3. < 2.) {
73 nucleon->setType(SigmaZero);
74 meson->setType(KZero);
75 }
76 else {
77 nucleon->setType(SigmaMinus);
78 meson->setType(KPlus);
79 }
80 }
81 else {
82 if (r2*3. < 2.) {
83 nucleon->setType(SigmaPlus);
84 meson->setType(KZero);
85 }
86 else {
87 nucleon->setType(SigmaZero);
88 meson->setType(KPlus);
89 }
90 }
91
92 G4double sh=nucleon->getEnergy()+meson->getEnergy();
93 G4double mn=nucleon->getMass();
94 G4double me=meson->getMass();
95 G4double en=(sh*sh+mn*mn-me*me)/(2*sh);
96 nucleon->setEnergy(en);
97 G4double ee=std::sqrt(en*en-mn*mn+me*me);
98 meson->setEnergy(ee);
99 G4double pn=std::sqrt(en*en-mn*mn);
100
101 ThreeVector mom_nucleon = Random::normVector(pn);
102
103 nucleon->setMomentum(mom_nucleon);
104 meson->setMomentum(-mom_nucleon);
105
106 fs->addModifiedParticle(nucleon);
107 fs->addModifiedParticle(meson);
108 }
double G4double
Definition G4Types.hh:83
ThreeVector normVector(G4double norm=1.)
G4double shoot()
G4bool nucleon(G4int ityp)

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