Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4SPBaryon.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 #include "G4SPBaryon.hh"
27 #include "Randomize.hh"
28 #include "G4ParticleTable.hh"
29 
30 // correcting numbers, HPW Dec 1999
31 
33 {
34  G4double sum = GetProbability(diQuark);
35  G4double random = G4UniformRand();
36  G4double running = 0;
37  G4int Quark(0);
38  typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
39  iter i;
40  for(i = thePartonInfo.begin(); i!=thePartonInfo.end(); i++)
41  {
42  if (std::abs((*i)->GetDiQuark()) == std::abs(diQuark))
43  {
44  running += (*i)->GetProbability();
45  if (running/sum >= random)
46  {
47  Quark = (*i)->GetQuark();
48  break;
49  }
50  }
51  }
52  return Quark;
53 }
54 
56 {
57  G4double sum = 0;
58  typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
59  iter i;
60  for(i = thePartonInfo.begin(); i!=thePartonInfo.end(); i++)
61  {
62  if (std::abs((*i)->GetDiQuark()) == std::abs(diQuark))
63  {
64  sum += (*i)->GetProbability();
65  }
66  }
67  return sum;
68 }
69 
71 MatchDiQuarkAndGetQuark(const G4SPBaryon & aBaryon, G4int & aDiQuark) const
72 {
73  G4int result=0;
74  typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
75  iter i;
76  G4double running = 0;
77  G4double total = 0;
78  for(i = thePartonInfo.begin(); i!=thePartonInfo.end(); i++)
79  {
80  total += aBaryon.GetProbability((*i)->GetDiQuark());
81  }
82  G4double random = G4UniformRand(); //*total; 17 Sept.
83  for(i = thePartonInfo.begin(); i!=thePartonInfo.end(); i++)
84  {
85  running += aBaryon.GetProbability((*i)->GetDiQuark());
86  if(random<running/total) // if(random/total<running) 17 Sept.
87  {
88  result = (*i)->GetQuark(); // (diquark annihilated)
89  aDiQuark = (*i)->GetDiQuark();
90  break;
91  }
92  }
93  return result;
94 }
95 
96 void G4SPBaryon::
97 SampleQuarkAndDiquark(G4int & quark, G4int & diQuark) const
98 {
99  typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
100 
101  G4double random = G4UniformRand();
102  G4double sum = 0;
103  iter i;
104 
105  for(i=thePartonInfo.begin() ; i!=thePartonInfo.end(); i++)
106  {
107  sum += (*i)->GetProbability();
108  if (sum > random)
109  {
110  if (theDefinition->GetPDGEncoding() < 0)
111  {
112  quark = (*i)->GetDiQuark();
113  diQuark = (*i)->GetQuark();
114  }
115  else
116  {
117  quark = (*i)->GetQuark();
118  diQuark = (*i)->GetDiQuark();
119  }
120  break;
121  }
122  }
123 }
124 
125 void G4SPBaryon::
126 FindDiquark(G4int quark, G4int & diQuark) const
127 {
128  typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
129  G4double sum = 0;
130  iter i;
131  for(i=thePartonInfo.begin() ; i!=thePartonInfo.end(); i++)
132  {
133  if (std::abs((*i)->GetQuark()) == std::abs(quark))
134  {
135  sum += (*i)->GetProbability();
136  }
137  }
138  G4double random = G4UniformRand();
139  G4double running = 0;
140  for(i=thePartonInfo.begin() ; i!=thePartonInfo.end(); i++)
141  {
142  if (std::abs((*i)->GetQuark()) == std::abs(quark))
143  {
144  running += (*i)->GetProbability();
145  if (running/sum >= random)
146  {
147  diQuark = (*i)->GetDiQuark();
148  break;
149  }
150  }
151  }
152 }
153 
154 
157 {
158  theDefinition = aProton; // Uzhi
159 //
160  thePartonInfo.push_back(new G4SPPartonInfo(2203, 1, 1./3./2.)); // uu_1, d
161  thePartonInfo.push_back(new G4SPPartonInfo(2103, 2, 1./6.*2.)); // ud_1, u
162  thePartonInfo.push_back(new G4SPPartonInfo(2101, 2, 1./2.)); // ud_0, u
163 //
164 }
165 
167 G4SPBaryon(G4AntiProton * aAntiProton)
168 {
169  theDefinition = aAntiProton;
170  thePartonInfo.push_back(new G4SPPartonInfo(-2203, -1, 1./3.));
171  thePartonInfo.push_back(new G4SPPartonInfo(-2103, -2, 1./6.));
172  thePartonInfo.push_back(new G4SPPartonInfo(-2101, -2, 1./2.));
173 }
174 
177 {
178  theDefinition = aNeutron; // Uzhi
179  thePartonInfo.push_back(new G4SPPartonInfo(2103, 1, 1./6.*2.)); // ud_1, d
180  thePartonInfo.push_back(new G4SPPartonInfo(2101, 1, 1./2. )); // ud_0, d
181  thePartonInfo.push_back(new G4SPPartonInfo(1103, 2, 1./3./2 )); // dd_1, u
182 }
183 
185 G4SPBaryon(G4AntiNeutron * aAntiNeutron)
186 {
187  theDefinition = aAntiNeutron;
188  thePartonInfo.push_back(new G4SPPartonInfo(-2103, -1, 1./6.));
189  thePartonInfo.push_back(new G4SPPartonInfo(-2101, -1, 1./2.));
190  thePartonInfo.push_back(new G4SPPartonInfo(-1103, -2, 1./3.));
191 }
192 
195 {
196  theDefinition = aLambda;
197  thePartonInfo.push_back(new G4SPPartonInfo(2103, 3, 1./3.)); // ud_1, s
198  thePartonInfo.push_back(new G4SPPartonInfo(3203, 1, 1./4.)); // su_1, d
199  thePartonInfo.push_back(new G4SPPartonInfo(3201, 1, 1./12.)); // su_0, d
200  thePartonInfo.push_back(new G4SPPartonInfo(3103, 2, 1./4.)); // sd_1, u
201  thePartonInfo.push_back(new G4SPPartonInfo(3101, 2, 1./12.)); // sd_0, u
202 }
203 
205 G4SPBaryon(G4AntiLambda * aAntiLambda)
206 {
207  theDefinition = aAntiLambda;
208  thePartonInfo.push_back(new G4SPPartonInfo(-2103, -3, 1./3.));
209  thePartonInfo.push_back(new G4SPPartonInfo(-3203, -1, 1./4.));
210  thePartonInfo.push_back(new G4SPPartonInfo(-3201, -1, 1./12.));
211  thePartonInfo.push_back(new G4SPPartonInfo(-3103, -2, 1./4.));
212  thePartonInfo.push_back(new G4SPPartonInfo(-3101, -2, 1./12.));
213 }
214 
216 G4SPBaryon(G4SigmaPlus * aSigmaPlus)
217 {
218  theDefinition = aSigmaPlus;
219  thePartonInfo.push_back(new G4SPPartonInfo(2203, 3, 1./3.));
220  thePartonInfo.push_back(new G4SPPartonInfo(3203, 2, 1./6.));
221  thePartonInfo.push_back(new G4SPPartonInfo(3201, 2, 1./2.));
222 }
223 
225 G4SPBaryon(G4AntiSigmaPlus * aAntiSigmaPlus)
226 {
227  theDefinition = aAntiSigmaPlus;
228  thePartonInfo.push_back(new G4SPPartonInfo(-2203, -3, 1./3.));
229  thePartonInfo.push_back(new G4SPPartonInfo(-3203, -2, 1./6.));
230  thePartonInfo.push_back(new G4SPPartonInfo(-3201, -2, 1./2.));
231 }
232 
234 G4SPBaryon(G4SigmaZero * aSigmaZero)
235 {
236  theDefinition = aSigmaZero;
237  thePartonInfo.push_back(new G4SPPartonInfo(2103, 3, 1./3.));
238  thePartonInfo.push_back(new G4SPPartonInfo(3203, 1, 1./12.));
239  thePartonInfo.push_back(new G4SPPartonInfo(3201, 1, 1./4.));
240  thePartonInfo.push_back(new G4SPPartonInfo(3103, 2, 1./12.));
241  thePartonInfo.push_back(new G4SPPartonInfo(3101, 2, 1./4.));
242 }
243 
245 G4SPBaryon(G4AntiSigmaZero * aAntiSigmaZero)
246 {
247  theDefinition = aAntiSigmaZero;
248  thePartonInfo.push_back(new G4SPPartonInfo(-2103, -3, 1./3.));
249  thePartonInfo.push_back(new G4SPPartonInfo(-3203, -1, 1./12.));
250  thePartonInfo.push_back(new G4SPPartonInfo(-3201, -1, 1./4.));
251  thePartonInfo.push_back(new G4SPPartonInfo(-3103, -2, 1./12.));
252  thePartonInfo.push_back(new G4SPPartonInfo(-3101, -2, 1./4.));
253 }
254 
256 G4SPBaryon(G4SigmaMinus * aSigmaMinus)
257 {
258  theDefinition = aSigmaMinus;
259  thePartonInfo.push_back(new G4SPPartonInfo(1103, 3, 1./3.));
260  thePartonInfo.push_back(new G4SPPartonInfo(3103, 1, 1./6.));
261  thePartonInfo.push_back(new G4SPPartonInfo(3101, 1, 1./2.));
262 }
263 
265 G4SPBaryon(G4AntiSigmaMinus * aAntiSigmaMinus)
266 {
267  theDefinition = aAntiSigmaMinus;
268  thePartonInfo.push_back(new G4SPPartonInfo(-1103, -3, 1./3.));
269  thePartonInfo.push_back(new G4SPPartonInfo(-3103, -1, 1./6.));
270  thePartonInfo.push_back(new G4SPPartonInfo(-3101, -1, 1./2.));
271 }
272 
275 {
276  theDefinition = aXiMinus;
277  thePartonInfo.push_back(new G4SPPartonInfo(3103, 3, 1./6.));
278  thePartonInfo.push_back(new G4SPPartonInfo(3101, 3, 1./2.));
279  thePartonInfo.push_back(new G4SPPartonInfo(3303, 1, 1./3.));
280 }
281 
283 G4SPBaryon(G4AntiXiMinus * aAntiXiMinus)
284 {
285  theDefinition = aAntiXiMinus;
286  thePartonInfo.push_back(new G4SPPartonInfo(-3103, -3, 1./6.));
287  thePartonInfo.push_back(new G4SPPartonInfo(-3101, -3, 1./2.));
288  thePartonInfo.push_back(new G4SPPartonInfo(-3303, -1, 1./3.));
289 }
290 
293 {
294  theDefinition = aXiZero;
295  thePartonInfo.push_back(new G4SPPartonInfo(3203, 3, 1./6.));
296  thePartonInfo.push_back(new G4SPPartonInfo(3201, 3, 1./2.));
297  thePartonInfo.push_back(new G4SPPartonInfo(3303, 2, 1./3.));
298 }
299 
301 G4SPBaryon(G4AntiXiZero * aAntiXiZero)
302 {
303  theDefinition = aAntiXiZero;
304  thePartonInfo.push_back(new G4SPPartonInfo(-3203, -3, 1./6.));
305  thePartonInfo.push_back(new G4SPPartonInfo(-3201, -3, 1./2.));
306  thePartonInfo.push_back(new G4SPPartonInfo(-3303, -2, 1./3.));
307 }
308 
310 G4SPBaryon(G4OmegaMinus * anOmegaMinus)
311 {
312  theDefinition = anOmegaMinus;
313  thePartonInfo.push_back(new G4SPPartonInfo(3303, 3, 1.));
314 }
315 
316 
318 G4SPBaryon(G4AntiOmegaMinus * anAntiOmegaMinus)
319 {
320  theDefinition = anAntiOmegaMinus;
321  thePartonInfo.push_back(new G4SPPartonInfo(-3303, -3, 1.));
322 }
323 
324 // non static particles
327 {
328  theDefinition = aDefinition;
329  if(theDefinition ==
330  G4ParticleTable::GetParticleTable()->FindParticle(2224))// D++
331  {
332  thePartonInfo.push_back(new G4SPPartonInfo(2203, 2, 1.));
333  }
334  else if(theDefinition ==
335  G4ParticleTable::GetParticleTable()->FindParticle(-2224))// anti D++
336  {
337  thePartonInfo.push_back(new G4SPPartonInfo(-2203, -2, 1.));
338  }
339  else if(theDefinition ==
340  G4ParticleTable::GetParticleTable()->FindParticle(2214))// D+
341  {
342  thePartonInfo.push_back(new G4SPPartonInfo(2203, 1, 1./3.));
343  thePartonInfo.push_back(new G4SPPartonInfo(2103, 2, 2./3.));
344  }
345  else if(theDefinition ==
346  G4ParticleTable::GetParticleTable()->FindParticle(-2214))// anti D+
347  {
348  thePartonInfo.push_back(new G4SPPartonInfo(-2203, -1, 1./3.));
349  thePartonInfo.push_back(new G4SPPartonInfo(-2103, -2, 2./3.));
350  }
351  else if(theDefinition ==
352  G4ParticleTable::GetParticleTable()->FindParticle(2114))// D0
353  {
354  thePartonInfo.push_back(new G4SPPartonInfo(2103, 1, 2./3.));
355 // Uzhi thePartonInfo.push_back(new G4SPPartonInfo(2103, 2, 1./3.));
356  thePartonInfo.push_back(new G4SPPartonInfo(1103, 2, 1./3.)); // Uzhi 14.05.2014
357  }
358  else if(theDefinition ==
359  G4ParticleTable::GetParticleTable()->FindParticle(-2114))// anti D0
360  {
361  thePartonInfo.push_back(new G4SPPartonInfo(-2103, -1, 2./3.));
362  thePartonInfo.push_back(new G4SPPartonInfo(-2103, -2, 1./3.));
363  }
364  else if(theDefinition ==
365  G4ParticleTable::GetParticleTable()->FindParticle(1114))// D-
366  {
367  thePartonInfo.push_back(new G4SPPartonInfo(1103, 1, 1.));
368  }
369  else if(theDefinition ==
370  G4ParticleTable::GetParticleTable()->FindParticle(-1114))// anti D-
371  {
372  thePartonInfo.push_back(new G4SPPartonInfo(-1103, -1, 1.));
373  }
374  else if(theDefinition ==
375  G4ParticleTable::GetParticleTable()->FindParticle(3224))// S*+
376  {
377  thePartonInfo.push_back(new G4SPPartonInfo(2203, 3, 1./3.));
378  thePartonInfo.push_back(new G4SPPartonInfo(3203, 2, 2./3.));
379  }
380  else if(theDefinition ==
381  G4ParticleTable::GetParticleTable()->FindParticle(-3224))// anti S*+
382  {
383  thePartonInfo.push_back(new G4SPPartonInfo(-2203, -3, 1./3.));
384  thePartonInfo.push_back(new G4SPPartonInfo(-3203, -2, 2./3.));
385  }
386  else if(theDefinition ==
387  G4ParticleTable::GetParticleTable()->FindParticle(3214))// S*0
388  {
389  thePartonInfo.push_back(new G4SPPartonInfo(2103, 3, 1./3.));
390  thePartonInfo.push_back(new G4SPPartonInfo(3203, 1, 1./3.));
391  thePartonInfo.push_back(new G4SPPartonInfo(3103, 2, 1./3.));
392  }
393  else if(theDefinition ==
394  G4ParticleTable::GetParticleTable()->FindParticle(-3214))// anti S*0
395  {
396  thePartonInfo.push_back(new G4SPPartonInfo(-2103, -3, 1./3.));
397  thePartonInfo.push_back(new G4SPPartonInfo(-3203, -1, 1./3.));
398  thePartonInfo.push_back(new G4SPPartonInfo(-3103, -2, 1./3.));
399  }
400  else if(theDefinition ==
401  G4ParticleTable::GetParticleTable()->FindParticle(3114))// S*-
402  {
403  thePartonInfo.push_back(new G4SPPartonInfo(1103, 3, 1./3.));
404  thePartonInfo.push_back(new G4SPPartonInfo(3103, 1, 2./3.));
405  }
406  else if(theDefinition ==
407  G4ParticleTable::GetParticleTable()->FindParticle(-3224))// anti S*-
408  {
409  thePartonInfo.push_back(new G4SPPartonInfo(-1103, -3, 1./3.));
410  thePartonInfo.push_back(new G4SPPartonInfo(-3103, -1, 2./3.));
411  }
412  else if(theDefinition ==
413  G4ParticleTable::GetParticleTable()->FindParticle(3324))// Xi*0
414  {
415  thePartonInfo.push_back(new G4SPPartonInfo(3203, 3, 1./3.));
416  thePartonInfo.push_back(new G4SPPartonInfo(3303, 2, 2./3.));
417  }
418  else if(theDefinition ==
419  G4ParticleTable::GetParticleTable()->FindParticle(-3324))// anti Xi*0
420  {
421  thePartonInfo.push_back(new G4SPPartonInfo(-3203, -3, 1./3.));
422  thePartonInfo.push_back(new G4SPPartonInfo(-3303, -2, 2./3.));
423  }
424  else if(theDefinition ==
425  G4ParticleTable::GetParticleTable()->FindParticle(3314))// Xi*-
426  {
427  thePartonInfo.push_back(new G4SPPartonInfo(3103, 3, 2./3.));
428  thePartonInfo.push_back(new G4SPPartonInfo(3303, 1, 1./3.));
429  }
430  else if(theDefinition ==
431  G4ParticleTable::GetParticleTable()->FindParticle(-3314))// anti Xi*-
432  {
433  thePartonInfo.push_back(new G4SPPartonInfo(-3103, -3, 2./3.));
434  thePartonInfo.push_back(new G4SPPartonInfo(-3303, -1, 1./3.));
435  }
436 }
437 
439 {
440  for(unsigned int i=0;i<thePartonInfo.size(); i++) delete thePartonInfo[i];
441 }
G4int FindQuark(G4int diQuark) const
Definition: G4SPBaryon.cc:32
G4double total(Particle const *const p1, Particle const *const p2)
static G4ParticleTable * GetParticleTable()
G4ParticleDefinition * theDefinition
Definition: G4SPBaryon.hh:95
G4int MatchDiQuarkAndGetQuark(const G4SPBaryon &aBaryon, G4int &aDiQuark) const
Definition: G4SPBaryon.cc:71
void SampleQuarkAndDiquark(G4int &quark, G4int &diQuark) const
Definition: G4SPBaryon.cc:97
std::vector< G4SPPartonInfo * > thePartonInfo
Definition: G4SPBaryon.hh:96
double G4double
Definition: G4Types.hh:76
#define G4UniformRand()
Definition: Randomize.hh:53
void FindDiquark(G4int quark, G4int &diQuark) const
Definition: G4SPBaryon.cc:126
G4double G4ParticleHPJENDLHEData::G4double result
int G4int
Definition: G4Types.hh:78
G4SPBaryon(G4Proton *aProton)
Definition: G4SPBaryon.cc:156
G4double GetProbability(G4int diQuark) const
Definition: G4SPBaryon.cc:55