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

#include <G4INCLNNToNSKChannel.hh>

+ Inheritance diagram for G4INCL::NNToNSKChannel:

Public Member Functions

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

Constructor & Destructor Documentation

◆ NNToNSKChannel()

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

Definition at line 51 of file G4INCLNNToNSKChannel.cc.

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

◆ ~NNToNSKChannel()

G4INCL::NNToNSKChannel::~NNToNSKChannel ( )
virtual

Definition at line 55 of file G4INCLNNToNSKChannel.cc.

55{}

Member Function Documentation

◆ fillFinalState()

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

Implements G4INCL::IChannel.

Definition at line 57 of file G4INCLNNToNSKChannel.cc.

57 {
58
59
60 const G4double sqrtS = KinematicsUtils::totalEnergyInCM(particle1, particle2);
61
62 const G4int iso = ParticleTable::getIsospin(particle1->getType()) + ParticleTable::getIsospin(particle2->getType());
63
64 ParticleType KaonType;
65 const G4double rdm = Random::shoot();
66 // pp->pS+K0 (1/4)
67 // pp->pS0K+ (1/8) // HEM
68 // pp->pS0K+ (1/4) // Data
69 // pp->nS+K+ (1)
70
71 // pn->nS+K0 (1/4)
72 // pn->pS-K+ (1/4)
73 // pn->nS0K+ (5/8)
74 // pn->pS0K0 (5/8)
75
76 if(iso == 2){
77 if(rdm * 6. < 4.){
78 KaonType = KPlus;
79 particle2->setType(SigmaPlus);
80 particle1->setType(Neutron);
81 }
82 else if(rdm * 6. < 5.){
83 KaonType = KZero;
84 particle2->setType(SigmaPlus);
85 }
86 else{
87 KaonType = KPlus;
88 particle2->setType(SigmaZero);
89 }
90 }
91 else if(iso == -2){
92 if(rdm * 6. < 8.){
93 KaonType = KZero;
94 particle2->setType(SigmaMinus);
95 particle1->setType(Proton);
96 }
97 else if(rdm * 6. < 5.){
98 KaonType = KPlus;
99 particle2->setType(SigmaMinus);
100 }
101 else{
102 KaonType = KZero;
103 particle2->setType(SigmaZero);
104 }
105 }
106 else{
107 if(rdm * 14. < 2.){
108 KaonType = KZero;
109 particle2->setType(SigmaPlus);
110 particle1->setType(Neutron);
111 }
112 else if(rdm * 14. < 4.){
113 KaonType = KPlus;
114 particle2->setType(SigmaMinus);
115 particle1->setType(Proton);
116 }
117 else if(rdm * 14. < 9.){
118 KaonType = KPlus;
119 particle2->setType(SigmaZero);
120 particle1->setType(Neutron);
121 }
122 else{
123 KaonType = KZero;
124 particle2->setType(SigmaZero);
125 particle1->setType(Proton);
126 }
127 }
128
129 ParticleList list;
130 list.push_back(particle1);
131 list.push_back(particle2);
132 const ThreeVector &rcol = particle2->getPosition();
133 const ThreeVector zero;
134 Particle *kaon = new Particle(KaonType,zero,rcol);
135 list.push_back(kaon);
136
137 if(Random::shoot()<0.5) PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
138 else PhaseSpaceGenerator::generateBiased(sqrtS, list, 1, angularSlope);
139
140 fs->addModifiedParticle(particle1);
141 fs->addModifiedParticle(particle2);
142 fs->addCreatedParticle(kaon);
143
144
145 }
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: