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

#include <G4INCLNNToNSK2piChannel.hh>

+ Inheritance diagram for G4INCL::NNToNSK2piChannel:

Public Member Functions

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

Constructor & Destructor Documentation

◆ NNToNSK2piChannel()

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

Definition at line 51 of file G4INCLNNToNSK2piChannel.cc.

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

◆ ~NNToNSK2piChannel()

G4INCL::NNToNSK2piChannel::~NNToNSK2piChannel ( )
virtual

Definition at line 55 of file G4INCLNNToNSK2piChannel.cc.

55{}

Member Function Documentation

◆ fillFinalState()

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

Implements G4INCL::IChannel.

Definition at line 57 of file G4INCLNNToNSK2piChannel.cc.

57 {
58
59 /* Equipartition in all channel with factor N(pi)!
60 */
61
62 const G4double sqrtS = KinematicsUtils::totalEnergyInCM(particle1, particle2);
63
64 const G4int iso = ParticleTable::getIsospin(particle1->getType()) + ParticleTable::getIsospin(particle2->getType());
65
66 ParticleType KaonType;
67 ParticleType Pion1Type;
68 ParticleType Pion2Type;
69
70 G4double rdm = Random::shoot();
71
72 if(iso == 2){
73 if(rdm*20. < 1.){
74 particle1->setType(Neutron);
75 particle2->setType(SigmaPlus);
76 KaonType = KZero;
77 Pion1Type = PiZero;
78 Pion2Type = PiPlus;
79 }
80 else if(rdm*20. < 3.){
81 particle1->setType(Neutron);
82 particle2->setType(SigmaZero);
83 KaonType = KZero;
84 Pion1Type = PiPlus;
85 Pion2Type = PiPlus;
86 }
87 else if(rdm*20. < 4.){
88 particle1->setType(Neutron);
89 particle2->setType(SigmaPlus);
90 KaonType = KPlus;
91 Pion1Type = PiMinus;
92 Pion2Type = PiPlus;
93 }
94 else if(rdm*20. < 6.){
95 particle1->setType(Neutron);
96 particle2->setType(SigmaPlus);
97 KaonType = KPlus;
98 Pion1Type = PiZero;
99 Pion2Type = PiZero;
100 }
101 else if(rdm*20. < 7.){
102 particle1->setType(Neutron);
103 particle2->setType(SigmaZero);
104 KaonType = KPlus;
105 Pion1Type = PiZero;
106 Pion2Type = PiPlus;
107 }
108 else if(rdm*20. < 9.){
109 particle1->setType(Neutron);
110 particle2->setType(SigmaMinus);
111 KaonType = KPlus;
112 Pion1Type = PiPlus;
113 Pion2Type = PiPlus;
114 }
115 else if(rdm*20. < 10.){
116 particle1->setType(Proton);
117 particle2->setType(SigmaPlus);
118 KaonType = KZero;
119 Pion1Type = PiMinus;
120 Pion2Type = PiPlus;
121 }
122 else if(rdm*20. < 12.){
123 particle1->setType(Proton);
124 particle2->setType(SigmaPlus);
125 KaonType = KZero;
126 Pion1Type = PiZero;
127 Pion2Type = PiZero;
128 }
129 else if(rdm*20. < 13.){
130 particle1->setType(Proton);
131 particle2->setType(SigmaZero);
132 KaonType = KZero;
133 Pion1Type = PiZero;
134 Pion2Type = PiPlus;
135 }
136 else if(rdm*20. < 15.){
137 particle1->setType(Proton);
138 particle2->setType(SigmaMinus);
139 KaonType = KZero;
140 Pion1Type = PiPlus;
141 Pion2Type = PiPlus;
142 }
143 else if(rdm*20. < 16.){
144 particle1->setType(Proton);
145 particle2->setType(SigmaPlus);
146 KaonType = KPlus;
147 Pion1Type = PiMinus;
148 Pion2Type = PiZero;
149 }
150 else if(rdm*20. < 17.){
151 particle1->setType(Proton);
152 particle2->setType(SigmaZero);
153 KaonType = KPlus;
154 Pion1Type = PiMinus;
155 Pion2Type = PiPlus;
156 }
157 else if(rdm*20. < 19.){
158 particle1->setType(Proton);
159 particle2->setType(SigmaZero);
160 KaonType = KPlus;
161 Pion1Type = PiZero;
162 Pion2Type = PiZero;
163 }
164 else{
165 particle1->setType(Proton);
166 particle2->setType(SigmaMinus);
167 KaonType = KPlus;
168 Pion1Type = PiZero;
169 Pion2Type = PiPlus;
170 }
171
172
173 }if(iso == -2){
174 if(rdm*20. < 1.){
175 particle1->setType(Neutron);
176 particle2->setType(SigmaPlus);
177 KaonType = KZero;
178 Pion1Type = PiMinus;
179 Pion2Type = PiZero;
180 }
181 else if(rdm*20. < 2.){
182 particle1->setType(Neutron);
183 particle2->setType(SigmaZero);
184 KaonType = KZero;
185 Pion1Type = PiMinus;
186 Pion2Type = PiPlus;
187 }
188 else if(rdm*20. < 4.){
189 particle1->setType(Neutron);
190 particle2->setType(SigmaZero);
191 KaonType = KZero;
192 Pion1Type = PiZero;
193 Pion2Type = PiZero;
194 }
195 else if(rdm*20. < 5.){
196 particle1->setType(Neutron);
197 particle2->setType(SigmaMinus);
198 KaonType = KZero;
199 Pion1Type = PiZero;
200 Pion2Type = PiPlus;
201 }
202 else if(rdm*20. < 7.){
203 particle1->setType(Neutron);
204 particle2->setType(SigmaPlus);
205 KaonType = KPlus;
206 Pion1Type = PiMinus;
207 Pion2Type = PiMinus;
208 }
209 else if(rdm*20. < 8.){
210 particle1->setType(Neutron);
211 particle2->setType(SigmaZero);
212 KaonType = KPlus;
213 Pion1Type = PiMinus;
214 Pion2Type = PiZero;
215 }
216 else if(rdm*20. < 9.){
217 particle1->setType(Neutron);
218 particle2->setType(SigmaMinus);
219 KaonType = KPlus;
220 Pion1Type = PiMinus;
221 Pion2Type = PiPlus;
222 }
223 else if(rdm*20. < 11.){
224 particle1->setType(Neutron);
225 particle2->setType(SigmaMinus);
226 KaonType = KPlus;
227 Pion1Type = PiZero;
228 Pion2Type = PiZero;
229 }
230 else if(rdm*20. < 13.){
231 particle1->setType(Proton);
232 particle2->setType(SigmaPlus);
233 KaonType = KZero;
234 Pion1Type = PiMinus;
235 Pion2Type = PiMinus;
236 }
237 else if(rdm*20. < 14.){
238 particle1->setType(Proton);
239 particle2->setType(SigmaZero);
240 KaonType = KZero;
241 Pion1Type = PiMinus;
242 Pion2Type = PiZero;
243 }
244 else if(rdm*20. < 15.){
245 particle1->setType(Proton);
246 particle2->setType(SigmaMinus);
247 KaonType = KZero;
248 Pion1Type = PiMinus;
249 Pion2Type = PiPlus;
250 }
251 else if(rdm*20. < 17.){
252 particle1->setType(Proton);
253 particle2->setType(SigmaMinus);
254 KaonType = KZero;
255 Pion1Type = PiZero;
256 Pion2Type = PiZero;
257 }
258 else if(rdm*20. < 19.){
259 particle1->setType(Proton);
260 particle2->setType(SigmaZero);
261 KaonType = KPlus;
262 Pion1Type = PiMinus;
263 Pion2Type = PiMinus;
264 }
265 else{
266 particle1->setType(Proton);
267 particle2->setType(SigmaMinus);
268 KaonType = KPlus;
269 Pion1Type = PiMinus;
270 Pion2Type = PiZero;
271 }
272
273 }
274 else{
275 if(rdm*22. < 1.){
276 particle1->setType(Neutron);
277 particle2->setType(SigmaPlus);
278 KaonType = KZero;
279 Pion1Type = PiMinus;
280 Pion2Type = PiPlus;
281 }
282 else if(rdm*22. < 3.){
283 particle1->setType(Neutron);
284 particle2->setType(SigmaPlus);
285 KaonType = KZero;
286 Pion1Type = PiZero;
287 Pion2Type = PiZero;
288 }
289 else if(rdm*22. < 4.){
290 particle1->setType(Neutron);
291 particle2->setType(SigmaZero);
292 KaonType = KZero;
293 Pion1Type = PiZero;
294 Pion2Type = PiPlus;
295 }
296 else if(rdm*22. < 6.){
297 particle1->setType(Neutron);
298 particle2->setType(SigmaMinus);
299 KaonType = KZero;
300 Pion1Type = PiPlus;
301 Pion2Type = PiPlus;
302 }
303 else if(rdm*22. < 7.){
304 particle1->setType(Neutron);
305 particle2->setType(SigmaPlus);
306 KaonType = KPlus;
307 Pion1Type = PiMinus;
308 Pion2Type = PiZero;
309 }
310 else if(rdm*22. < 8.){
311 particle1->setType(Neutron);
312 particle2->setType(SigmaZero);
313 KaonType = KPlus;
314 Pion1Type = PiMinus;
315 Pion2Type = PiPlus;
316 }
317 else if(rdm*22. < 10.){
318 particle1->setType(Neutron);
319 particle2->setType(SigmaZero);
320 KaonType = KPlus;
321 Pion1Type = PiZero;
322 Pion2Type = PiZero;
323 }
324 else if(rdm*22. < 11.){
325 particle1->setType(Neutron);
326 particle2->setType(SigmaMinus);
327 KaonType = KPlus;
328 Pion1Type = PiZero;
329 Pion2Type = PiPlus;
330 }
331 else if(rdm*22. < 12.){
332 particle1->setType(Proton);
333 particle2->setType(SigmaPlus);
334 KaonType = KZero;
335 Pion1Type = PiMinus;
336 Pion2Type = PiZero;
337 }
338 else if(rdm*22. < 13.){
339 particle1->setType(Proton);
340 particle2->setType(SigmaZero);
341 KaonType = KZero;
342 Pion1Type = PiMinus;
343 Pion2Type = PiPlus;
344 }
345 else if(rdm*22. < 15.){
346 particle1->setType(Proton);
347 particle2->setType(SigmaZero);
348 KaonType = KZero;
349 Pion1Type = PiZero;
350 Pion2Type = PiZero;
351 }
352 else if(rdm*22. < 16.){
353 particle1->setType(Proton);
354 particle2->setType(SigmaMinus);
355 KaonType = KZero;
356 Pion1Type = PiZero;
357 Pion2Type = PiPlus;
358 }
359 else if(rdm*22. < 18.){
360 particle1->setType(Proton);
361 particle2->setType(SigmaPlus);
362 KaonType = KPlus;
363 Pion1Type = PiMinus;
364 Pion2Type = PiMinus;
365 }
366 else if(rdm*22. < 19.){
367 particle1->setType(Proton);
368 particle2->setType(SigmaZero);
369 KaonType = KPlus;
370 Pion1Type = PiMinus;
371 Pion2Type = PiZero;
372 }
373 else if(rdm*22. < 20.){
374 particle1->setType(Proton);
375 particle2->setType(SigmaMinus);
376 KaonType = KPlus;
377 Pion1Type = PiMinus;
378 Pion2Type = PiPlus;
379 }
380 else{
381 particle1->setType(Proton);
382 particle2->setType(SigmaMinus);
383 KaonType = KPlus;
384 Pion1Type = PiZero;
385 Pion2Type = PiZero;
386 }
387
388 }
389
390
391 ParticleList list;
392 list.push_back(particle1);
393 list.push_back(particle2);
394 const ThreeVector &rcol1 = particle1->getPosition();
395 const ThreeVector &rcol2 = particle2->getPosition();
396 const ThreeVector zero;
397 Particle *pion1 = new Particle(Pion1Type,zero,rcol1);
398 Particle *pion2 = new Particle(Pion2Type,zero,rcol1);
399 Particle *kaon = new Particle(KaonType,zero,rcol2);
400 list.push_back(kaon);
401 list.push_back(pion1);
402 list.push_back(pion2);
403
404 if(Random::shoot()<0.5) PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
405 else PhaseSpaceGenerator::generateBiased(sqrtS, list, 1, angularSlope);
406
407 fs->addModifiedParticle(particle1);
408 fs->addModifiedParticle(particle2);
409 fs->addCreatedParticle(kaon);
410 fs->addCreatedParticle(pion1);
411 fs->addCreatedParticle(pion2);
412
413 }
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: