Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4INCLNNToNSK2piChannel.cc
이 파일의 문서화 페이지로 가기
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 
39 #include "G4INCLKinematicsUtils.hh"
41 #include "G4INCLRandom.hh"
42 #include "G4INCLGlobals.hh"
43 #include "G4INCLLogger.hh"
44 #include <algorithm>
46 
47 namespace G4INCL {
48 
49  const G4double NNToNSK2piChannel::angularSlope = 2.; // What is the exact effect? Sould be check
50 
52  : particle1(p1), particle2(p2)
53  {}
54 
56 
58 
59  /* Equipartition in all channel with factor N(pi)!
60  */
61 
63 
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.){
76  KaonType = KZero;
77  Pion1Type = PiZero;
78  Pion2Type = PiPlus;
79  }
80  else if(rdm*20. < 3.){
83  KaonType = KZero;
84  Pion1Type = PiPlus;
85  Pion2Type = PiPlus;
86  }
87  else if(rdm*20. < 4.){
90  KaonType = KPlus;
91  Pion1Type = PiMinus;
92  Pion2Type = PiPlus;
93  }
94  else if(rdm*20. < 6.){
97  KaonType = KPlus;
98  Pion1Type = PiZero;
99  Pion2Type = PiZero;
100  }
101  else if(rdm*20. < 7.){
104  KaonType = KPlus;
105  Pion1Type = PiZero;
106  Pion2Type = PiPlus;
107  }
108  else if(rdm*20. < 9.){
111  KaonType = KPlus;
112  Pion1Type = PiPlus;
113  Pion2Type = PiPlus;
114  }
115  else if(rdm*20. < 10.){
118  KaonType = KZero;
119  Pion1Type = PiMinus;
120  Pion2Type = PiPlus;
121  }
122  else if(rdm*20. < 12.){
125  KaonType = KZero;
126  Pion1Type = PiZero;
127  Pion2Type = PiZero;
128  }
129  else if(rdm*20. < 13.){
132  KaonType = KZero;
133  Pion1Type = PiZero;
134  Pion2Type = PiPlus;
135  }
136  else if(rdm*20. < 15.){
139  KaonType = KZero;
140  Pion1Type = PiPlus;
141  Pion2Type = PiPlus;
142  }
143  else if(rdm*20. < 16.){
146  KaonType = KPlus;
147  Pion1Type = PiMinus;
148  Pion2Type = PiZero;
149  }
150  else if(rdm*20. < 17.){
153  KaonType = KPlus;
154  Pion1Type = PiMinus;
155  Pion2Type = PiPlus;
156  }
157  else if(rdm*20. < 19.){
160  KaonType = KPlus;
161  Pion1Type = PiZero;
162  Pion2Type = PiZero;
163  }
164  else{
167  KaonType = KPlus;
168  Pion1Type = PiZero;
169  Pion2Type = PiPlus;
170  }
171 
172 
173  }if(iso == -2){
174  if(rdm*20. < 1.){
177  KaonType = KZero;
178  Pion1Type = PiMinus;
179  Pion2Type = PiZero;
180  }
181  else if(rdm*20. < 2.){
184  KaonType = KZero;
185  Pion1Type = PiMinus;
186  Pion2Type = PiPlus;
187  }
188  else if(rdm*20. < 4.){
191  KaonType = KZero;
192  Pion1Type = PiZero;
193  Pion2Type = PiZero;
194  }
195  else if(rdm*20. < 5.){
198  KaonType = KZero;
199  Pion1Type = PiZero;
200  Pion2Type = PiPlus;
201  }
202  else if(rdm*20. < 7.){
205  KaonType = KPlus;
206  Pion1Type = PiMinus;
207  Pion2Type = PiMinus;
208  }
209  else if(rdm*20. < 8.){
212  KaonType = KPlus;
213  Pion1Type = PiMinus;
214  Pion2Type = PiZero;
215  }
216  else if(rdm*20. < 9.){
219  KaonType = KPlus;
220  Pion1Type = PiMinus;
221  Pion2Type = PiPlus;
222  }
223  else if(rdm*20. < 11.){
226  KaonType = KPlus;
227  Pion1Type = PiZero;
228  Pion2Type = PiZero;
229  }
230  else if(rdm*20. < 13.){
233  KaonType = KZero;
234  Pion1Type = PiMinus;
235  Pion2Type = PiMinus;
236  }
237  else if(rdm*20. < 14.){
240  KaonType = KZero;
241  Pion1Type = PiMinus;
242  Pion2Type = PiZero;
243  }
244  else if(rdm*20. < 15.){
247  KaonType = KZero;
248  Pion1Type = PiMinus;
249  Pion2Type = PiPlus;
250  }
251  else if(rdm*20. < 17.){
254  KaonType = KZero;
255  Pion1Type = PiZero;
256  Pion2Type = PiZero;
257  }
258  else if(rdm*20. < 19.){
261  KaonType = KPlus;
262  Pion1Type = PiMinus;
263  Pion2Type = PiMinus;
264  }
265  else{
268  KaonType = KPlus;
269  Pion1Type = PiMinus;
270  Pion2Type = PiZero;
271  }
272 
273  }
274  else{
275  if(rdm*22. < 1.){
278  KaonType = KZero;
279  Pion1Type = PiMinus;
280  Pion2Type = PiPlus;
281  }
282  else if(rdm*22. < 3.){
285  KaonType = KZero;
286  Pion1Type = PiZero;
287  Pion2Type = PiZero;
288  }
289  else if(rdm*22. < 4.){
292  KaonType = KZero;
293  Pion1Type = PiZero;
294  Pion2Type = PiPlus;
295  }
296  else if(rdm*22. < 6.){
299  KaonType = KZero;
300  Pion1Type = PiPlus;
301  Pion2Type = PiPlus;
302  }
303  else if(rdm*22. < 7.){
306  KaonType = KPlus;
307  Pion1Type = PiMinus;
308  Pion2Type = PiZero;
309  }
310  else if(rdm*22. < 8.){
313  KaonType = KPlus;
314  Pion1Type = PiMinus;
315  Pion2Type = PiPlus;
316  }
317  else if(rdm*22. < 10.){
320  KaonType = KPlus;
321  Pion1Type = PiZero;
322  Pion2Type = PiZero;
323  }
324  else if(rdm*22. < 11.){
327  KaonType = KPlus;
328  Pion1Type = PiZero;
329  Pion2Type = PiPlus;
330  }
331  else if(rdm*22. < 12.){
334  KaonType = KZero;
335  Pion1Type = PiMinus;
336  Pion2Type = PiZero;
337  }
338  else if(rdm*22. < 13.){
341  KaonType = KZero;
342  Pion1Type = PiMinus;
343  Pion2Type = PiPlus;
344  }
345  else if(rdm*22. < 15.){
348  KaonType = KZero;
349  Pion1Type = PiZero;
350  Pion2Type = PiZero;
351  }
352  else if(rdm*22. < 16.){
355  KaonType = KZero;
356  Pion1Type = PiZero;
357  Pion2Type = PiPlus;
358  }
359  else if(rdm*22. < 18.){
362  KaonType = KPlus;
363  Pion1Type = PiMinus;
364  Pion2Type = PiMinus;
365  }
366  else if(rdm*22. < 19.){
369  KaonType = KPlus;
370  Pion1Type = PiMinus;
371  Pion2Type = PiZero;
372  }
373  else if(rdm*22. < 20.){
376  KaonType = KPlus;
377  Pion1Type = PiMinus;
378  Pion2Type = PiPlus;
379  }
380  else{
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 
405 
406  INCL_DEBUG("NNToNSK2pi " << (kaon->getMomentum().theta()) * 180. / G4INCL::Math::pi << '\n');
407 
410  fs->addCreatedParticle(kaon);
411  fs->addCreatedParticle(pion1);
412  fs->addCreatedParticle(pion2);
413 
414  }
415 }
void generateBiased(const G4double sqrtS, ParticleList &particles, const size_t index, const G4double slope)
Generate a biased event in the CM system.
void addModifiedParticle(Particle *p)
const G4INCL::ThreeVector & getPosition() const
G4double totalEnergyInCM(Particle const *const p1, Particle const *const p2)
const G4INCL::ThreeVector & getMomentum() const
#define INCL_DEBUG(x)
double G4double
Definition: G4Types.hh:76
G4double shoot()
Definition: G4INCLRandom.cc:93
const G4double pi
void setType(ParticleType t)
int G4int
Definition: G4Types.hh:78
G4int getIsospin(const ParticleType t)
Get the isospin of a particle.
G4INCL::ParticleType getType() const
void fillFinalState(FinalState *fs)
NNToNSK2piChannel(Particle *, Particle *)
G4double theta() const
void addCreatedParticle(Particle *p)
static const G4double angularSlope