Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4INCLNpiToSK2piChannel.cc
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26// INCL++ intra-nuclear cascade model
27// Alain Boudard, CEA-Saclay, France
28// Joseph Cugnon, University of Liege, Belgium
29// Jean-Christophe David, CEA-Saclay, France
30// Pekka Kaitaniemi, CEA-Saclay, France, and Helsinki Institute of Physics, Finland
31// Sylvie Leray, CEA-Saclay, France
32// Davide Mancusi, CEA-Saclay, France
33//
34#define INCLXX_IN_GEANT4_MODE 1
35
36#include "globals.hh"
37
41#include "G4INCLRandom.hh"
42#include "G4INCLGlobals.hh"
43#include "G4INCLLogger.hh"
44#include <algorithm>
46
47namespace G4INCL {
48
49 const G4double NpiToSK2piChannel::angularSlope = 6.; // What is the exact effect? Sould be check
50
52 : particle1(p1), particle2(p2)
53 {}
54
56
58
59
60 // p pi+ -> S+ K+ pi+ pi- (1)
61 // p pi+ -> S+ K+ pi0 pi0 (1/4)
62 // p pi+ -> S0 K+ pi+ pi0 (1/2)
63 // p pi+ -> S- K+ pi+ pi+ (1/4)
64 // p pi+ -> S+ K0 pi+ pi0 (1)
65 // p pi+ -> S0 K0 pi+ pi+ (1/4)
66 //
67 // p pi0 -> S+ K+ pi0 pi- (1/2)
68 // p pi0 -> S0 K+ pi+ pi- (1/2)
69 // p pi0 -> S0 K+ pi0 pi0 (1/4)
70 // p pi0 -> S- K+ pi+ pi0 (1/4)
71 // p pi0 -> S+ K0 pi+ pi- (1)
72 // p pi0 -> S+ K0 pi0 pi0 (1/4)
73 // p pi0 -> S0 K0 pi+ pi0 (1/4)
74 // p pi0 -> S- K0 pi+ pi+ (1/2)
75 //
76 // p pi- -> S+ K+ pi- pi- (1/4)
77 // p pi- -> S0 K+ pi0 pi- (1/2)
78 // p pi- -> S- K+ pi+ pi- (1/4)
79 // p pi- -> S- K+ pi0 pi0 (1/4)
80 // p pi- -> S+ K0 pi0 pi- (1/2)
81 // p pi- -> S0 K0 pi+ pi- (1)
82 // p pi- -> S0 K0 pi0 pi0 (1/2)
83 // p pi- -> S- K0 pi+ pi0 (1/2)
84
85 Particle *nucleon;
86 Particle *pion;
87
88
89 if(particle1->isNucleon()){
90 nucleon = particle1;
91 pion = particle2;
92 }
93 else{
94 nucleon = particle2;
95 pion = particle1;
96 }
97
98 const G4double sqrtS = KinematicsUtils::totalEnergyInCM(nucleon, pion);
99
100 const G4int iso = ParticleTable::getIsospin(nucleon->getType()) + ParticleTable::getIsospin(pion->getType());
101 G4double rdm = Random::shoot();
102
103 ParticleType KaonType;
104 ParticleType PionType;
105
106 if(iso == 3 || iso == -3){
107 if(rdm*13. < 4.){
108 KaonType = ParticleTable::getKaonType(iso/3);
109 PionType = ParticleTable::getPionType(-2*iso/3);
110 nucleon->setType(ParticleTable::getSigmaType(2*iso/3));
111 }
112 else if(rdm*13. < 5.){
113 KaonType = ParticleTable::getKaonType(iso/3);
114 PionType = PiZero;
115 pion->setType(PiZero);
116 nucleon->setType(ParticleTable::getSigmaType(2*iso/3));
117 }
118 else if(rdm*13. < 7.){
119 KaonType = ParticleTable::getKaonType(iso/3);
120 PionType = PiZero;
121 nucleon->setType(SigmaZero);
122 }
123 else if(rdm*13. < 8.){
124 KaonType = ParticleTable::getKaonType(iso/3);
125 PionType = ParticleTable::getPionType(2*iso/3);
126 nucleon->setType(ParticleTable::getSigmaType(-2*iso/3));
127 }
128 else if(rdm*13. < 12.){
129 KaonType = ParticleTable::getKaonType(-iso/3);
130 PionType = PiZero;
131 nucleon->setType(ParticleTable::getSigmaType(2*iso/3));
132 }
133 else{
134 KaonType = ParticleTable::getKaonType(-iso/3);
135 PionType = ParticleTable::getPionType(2*iso/3);
136 nucleon->setType(SigmaZero);
137 }
138 }
139 else if(pion->getType() == PiZero){
140 if(rdm*14. < 2.){
141 KaonType = ParticleTable::getKaonType(iso);
142 PionType = ParticleTable::getPionType(-2*iso);
143 nucleon->setType(ParticleTable::getSigmaType(2*iso));
144 }
145 else if(rdm*14. < 4.){
146 KaonType = ParticleTable::getKaonType(iso);
147 PionType = ParticleTable::getPionType(-2*iso);
148 nucleon->setType(SigmaZero);
149 pion->setType(ParticleTable::getPionType(2*iso));
150 }
151 else if(rdm*14. < 5.){
152 KaonType = ParticleTable::getKaonType(iso);
153 PionType = PiZero;
154 nucleon->setType(SigmaZero);
155 }
156 else if(rdm*14. < 6.){
157 KaonType = ParticleTable::getKaonType(iso);
158 PionType = ParticleTable::getPionType(2*iso);
159 nucleon->setType(ParticleTable::getSigmaType(-2*iso));
160 }
161 else if(rdm*14. < 10.){
162 KaonType = ParticleTable::getKaonType(-iso);
163 PionType = ParticleTable::getPionType(-2*iso);
164 nucleon->setType(ParticleTable::getSigmaType(2*iso));
165 pion->setType(ParticleTable::getPionType(2*iso));
166 }
167 else if(rdm*14. < 11.){
168 KaonType = ParticleTable::getKaonType(-iso);
169 PionType = PiZero;
170 nucleon->setType(ParticleTable::getSigmaType(2*iso));
171 }
172 else if(rdm*14. < 12.){
173 KaonType = ParticleTable::getKaonType(-iso);
174 PionType = ParticleTable::getPionType(2*iso);
175 nucleon->setType(SigmaZero);
176 }
177 else{
178 KaonType = ParticleTable::getKaonType(-iso);
179 PionType = ParticleTable::getPionType(2*iso);
180 nucleon->setType(ParticleTable::getSigmaType(-2*iso));
181 pion->setType(ParticleTable::getPionType(2*iso));
182 }
183 }
184 else{
185 if(rdm*15. < 1.){
186 KaonType = ParticleTable::getKaonType(-iso);
187 PionType = ParticleTable::getPionType(2*iso);
188 nucleon->setType(ParticleTable::getSigmaType(-2*iso));
189 }
190 else if(rdm*15. < 3.){
191 KaonType = ParticleTable::getKaonType(-iso);
192 PionType = PiZero;
193 nucleon->setType(SigmaZero);
194 }
195 else if(rdm*15. < 4.){
196 KaonType = ParticleTable::getKaonType(-iso);
197 PionType = ParticleTable::getPionType(-2*iso);
198 nucleon->setType(ParticleTable::getSigmaType(2*iso));
199 }
200 else if(rdm*15. < 5.){
201 KaonType = ParticleTable::getKaonType(-iso);
202 PionType = PiZero;
203 nucleon->setType(ParticleTable::getSigmaType(2*iso));
204 pion->setType(PiZero);
205 }
206 else if(rdm*15. < 7.){
207 KaonType = ParticleTable::getKaonType(iso);
208 PionType = PiZero;
209 nucleon->setType(ParticleTable::getSigmaType(-2*iso));
210 }
211 else if(rdm*15. < 11.){
212 KaonType = ParticleTable::getKaonType(iso);
213 PionType = ParticleTable::getPionType(-2*iso);
214 nucleon->setType(SigmaZero);
215 }
216 else if(rdm*15. < 13.){
217 KaonType = ParticleTable::getKaonType(iso);
218 PionType = PiZero;
219 nucleon->setType(SigmaZero);
220 pion->setType(PiZero);
221 }
222 else{
223 KaonType = ParticleTable::getKaonType(iso);
224 PionType = ParticleTable::getPionType(-2*iso);
225 nucleon->setType(ParticleTable::getSigmaType(2*iso));
226 pion->setType(PiZero);
227 }
228 }
229
230 ParticleList list;
231 list.push_back(nucleon);
232 list.push_back(pion);
233 const ThreeVector &rcol1 = nucleon->getPosition();
234 const ThreeVector &rcol2 = pion->getPosition();
235 const ThreeVector zero;
236 Particle *kaon = new Particle(KaonType,zero,rcol1);
237 Particle *pion2 = new Particle(PionType,zero,rcol2);
238 list.push_back(kaon);
239 list.push_back(pion2);
240
241 PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
242
243 INCL_DEBUG("NpiToSK2pi " << (kaon->getMomentum().theta()) * 180. / G4INCL::Math::pi << '\n');
244
245 fs->addModifiedParticle(nucleon);
246 fs->addModifiedParticle(pion);
247 fs->addCreatedParticle(kaon);
248 fs->addCreatedParticle(pion2);
249
250 }
251}
#define INCL_DEBUG(x)
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
void addModifiedParticle(Particle *p)
void addCreatedParticle(Particle *p)
NpiToSK2piChannel(Particle *, Particle *)
void fillFinalState(FinalState *fs)
const G4INCL::ThreeVector & getMomentum() const
G4bool isNucleon() const
G4double theta() const
G4double totalEnergyInCM(Particle const *const p1, Particle const *const p2)
const G4double pi
ParticleType getKaonType(const G4int isosp)
Get the type of kaon.
ParticleType getSigmaType(const G4int isosp)
Get the type of sigma.
G4int getIsospin(const ParticleType t)
Get the isospin of a particle.
ParticleType getPionType(const G4int isosp)
Get the type of pion.
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