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

#include <G4INCLNpiToNKKbChannel.hh>

+ Inheritance diagram for G4INCL::NpiToNKKbChannel:

Public Member Functions

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

Detailed Description

Definition at line 47 of file G4INCLNpiToNKKbChannel.hh.

Constructor & Destructor Documentation

◆ NpiToNKKbChannel()

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

Definition at line 51 of file G4INCLNpiToNKKbChannel.cc.

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

◆ ~NpiToNKKbChannel()

G4INCL::NpiToNKKbChannel::~NpiToNKKbChannel ( )
virtual

Definition at line 55 of file G4INCLNpiToNKKbChannel.cc.

55{}

Member Function Documentation

◆ fillFinalState()

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

Implements G4INCL::IChannel.

Definition at line 57 of file G4INCLNpiToNKKbChannel.cc.

57 {
58
59 // p pi+ -> p K+ K0b (1/2)
60
61 // p pi0 -> p K0 K0b (1/4)
62 // p pi0 -> p K+ K- (1/4)
63 // p pi0 -> n K+ K0b (1)
64
65 // p pi- -> p K0 K- (1/2)
66 // p pi- -> n K+ K- (1)
67 // p pi- -> n K0 K0b (1)
68
69 Particle *nucleon;
70 Particle *pion;
71
72
73 if(particle1->isNucleon()){
74 nucleon = particle1;
75 pion = particle2;
76 }
77 else{
78 nucleon = particle2;
79 pion = particle1;
80 }
81
82 const G4double sqrtS = KinematicsUtils::totalEnergyInCM(nucleon, pion);
83
84 const G4int iso = ParticleTable::getIsospin(nucleon->getType()) + ParticleTable::getIsospin(pion->getType());
85 G4double rdm = Random::shoot();
86
87 ParticleType KaonType;
88
89 if(iso == 3 || iso == -3){
90 KaonType = ParticleTable::getKaonType(iso/3);
91 pion->setType(ParticleTable::getAntiKaonType(iso/3));
92 }
93 else if(pion->getType() == PiZero){
94 if(rdm*6. < 1.){
95 KaonType = ParticleTable::getKaonType(-iso);
97 }
98 else if(rdm*6. < 2.){
99 KaonType = ParticleTable::getKaonType(iso);
100 pion->setType(ParticleTable::getAntiKaonType(-iso));
101 }
102 else{
103 KaonType = ParticleTable::getKaonType(iso);
106 }
107 }
108 else{
109 if(rdm*5. < 1.){
110 KaonType = ParticleTable::getKaonType(iso);
112 }
113 else if(rdm*5. < 3.){
114 KaonType = ParticleTable::getKaonType(-iso);
117 }
118 else{
119 KaonType = ParticleTable::getKaonType(iso);
120 pion->setType(ParticleTable::getAntiKaonType(-iso));
122 }
123 }
124
125#ifdef INCLXX_IN_GEANT4_MODE
126 // Erase the parent resonance information of the nucleon and pion
127 nucleon->setParentResonancePDGCode(0);
128 nucleon->setParentResonanceID(0);
129 pion->setParentResonancePDGCode(0);
130 pion->setParentResonanceID(0);
131#endif
132
133 ParticleList list;
134 list.push_back(nucleon);
135 list.push_back(pion);
136 const ThreeVector &rcol = pion->getPosition();
137 const ThreeVector zero;
138 Particle *kaon = new Particle(KaonType,zero,rcol);
139 list.push_back(kaon);
140
141 PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
142
143 INCL_DEBUG("NpiToNKKb " << (kaon->getMomentum().theta()) * 180. / G4INCL::Math::pi << '\n');
144
145 fs->addModifiedParticle(nucleon);
146 fs->addModifiedParticle(pion);
147 fs->addCreatedParticle(kaon);
148
149 }
#define INCL_DEBUG(x)
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)
const G4double pi
ParticleType getKaonType(const G4int isosp)
Get the type of kaon.
G4int getIsospin(const ParticleType t)
Get the isospin of a particle.
ParticleType getNucleonType(const G4int isosp)
Get the type of nucleon.
ParticleType getAntiKaonType(const G4int isosp)
Get the type of antikaon.
void generateBiased(const G4double sqrtS, ParticleList &particles, const size_t index, const G4double slope)
Generate a biased event in the CM system.
G4double shoot()
G4bool nucleon(G4int ityp)

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