LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
ArCaptureGammas Class Reference

#include "ArCaptureGammas.hh"

Public Member Functions

 ArCaptureGammas ()
 
 ~ArCaptureGammas ()
 
G4ReactionProductVector * GetGammas ()
 
vector< double > Initialize ()
 
vector< double > CapAr40 ()
 
vector< double > continuum ()
 

Public Attributes

double Elevel
 
double xint [4][750]
 

Detailed Description

Definition at line 24 of file ArCaptureGammas.hh.

Constructor & Destructor Documentation

ArCaptureGammas::ArCaptureGammas ( )

Definition at line 25 of file ArCaptureGammas.cc.

25 {}
ArCaptureGammas::~ArCaptureGammas ( )

Definition at line 27 of file ArCaptureGammas.cc.

27 {}

Member Function Documentation

vector< double > ArCaptureGammas::CapAr40 ( )

Definition at line 64 of file ArCaptureGammas.cc.

65 {
66  // gammas from Ar40
67  // either 2 gammas
68  // either a continuum
69  // total energy = 8.46 MeV
70 
71  vector<double> Egammas;
72 
73  // List of levels 0 1 2 3 4 5 6 7 8 9 10
74  // 11 12
75  double Levels[13] = {6.0989,
76  4.2700,
77  3.9682,
78  3.3268,
79  3.0096,
80  2.9487,
81  2.7334,
82  2.3981,
83  1.3539,
84  1.0347,
85  0.5161,
86  0.1673,
87  0.0};
88  double level = 0.0;
89 
90  int nb_gammas = 0; // number of gammas for this decay
91  double probability = 0.; // the probability we'll use in the loop
92  //<--double Etot = 0.;
93 
94  double probMyGamma = 51.2;
95 
96  //<--int nb1 = 0, nb2 = 0, nb3 = 0, nb4 = 0, nb5 = 0;
97  // 1 is 4.7+1.18+0.167
98  // 2 is 5.582+0.516
99  // 3 is 4.7+0.8+0.5
100  // 4 is 3.7+1+1.18+0.167
101  // 5 is 2.7718 1.9726 0.8377 0.3487 0.1673
102 
103  nb_gammas = 0;
104  level = Levels[0];
105 
106  // generate gammas
107  while (level != Levels[12]) {
108 
109  if (level == Levels[0]) {
110  probability = G4UniformRand() *
111  (10.79 + 0.242 + probMyGamma + 9.11 + 3.91 + 3.72 + 1.02 + 8.00 + 4.09 + 0.93);
112  if (probability <= 10.79) {
113  level = Levels[10];
114  Egammas.push_back(5.5820);
115  nb_gammas++;
116  continue;
117  } else if (probability > 10.79 && probability <= 10.79 + 0.242) {
118  level = Levels[9];
119  Egammas.push_back(5.0637);
120  nb_gammas++;
121  continue;
122  } else if (probability > 10.79 + 0.242 && probability <= 10.79 + 0.242 + probMyGamma) {
123  level = Levels[8];
124  Egammas.push_back(4.7450);
125  nb_gammas++;
126  continue;
127  } else if (probability > 10.79 + 0.242 + probMyGamma &&
128  probability <= 10.79 + 0.242 + probMyGamma + 9.11) {
129  level = Levels[7];
130  Egammas.push_back(3.7004);
131  nb_gammas++;
132  continue;
133  } else if (probability > 10.79 + 0.242 + probMyGamma + 9.11 &&
134  probability <= 10.79 + 0.242 + probMyGamma + 9.11 + 3.91) {
135  level = Levels[6];
136  Egammas.push_back(3.3655);
137  nb_gammas++;
138  continue;
139  } else if (probability > 10.79 + 0.242 + probMyGamma + 9.11 + 3.91 &&
140  probability <= 10.79 + 0.242 + probMyGamma + 9.11 + 3.91 + 3.72) {
141  level = Levels[5];
142  Egammas.push_back(3.1502);
143  nb_gammas++;
144  continue;
145  } else if (probability > 10.79 + 0.242 + probMyGamma + 9.11 + 3.91 + 3.72 &&
146  probability <= 10.79 + 0.242 + probMyGamma + 9.11 + 3.91 + 3.72 + 1.02) {
147  level = Levels[4];
148  Egammas.push_back(3.0894);
149  nb_gammas++;
150  continue;
151  } else if (probability > 10.79 + 0.242 + probMyGamma + 9.11 + 3.91 + 3.72 + 1.02 &&
152  probability <= 10.79 + 0.242 + probMyGamma + 9.11 + 3.91 + 3.72 + 1.02 + 8.00) {
153  level = Levels[3];
154  Egammas.push_back(2.7718);
155  nb_gammas++;
156  continue;
157  } else if (probability > 10.79 + 0.242 + probMyGamma + 9.11 + 3.91 + 3.72 + 1.02 + 8.00 &&
158  probability <=
159  10.79 + 0.242 + probMyGamma + 9.11 + 3.91 + 3.72 + 1.02 + 8.00 + 4.09) {
160  level = Levels[2];
161  Egammas.push_back(2.1307);
162  nb_gammas++;
163  continue;
164  } else if (probability >
165  10.79 + 0.242 + probMyGamma + 9.11 + 3.91 + 3.72 + 1.02 + 8.00 + 4.09 &&
166  probability <=
167  10.79 + 0.242 + probMyGamma + 9.11 + 3.91 + 3.72 + 1.02 + 8.00 + 4.09 + 0.93) {
168  level = Levels[1];
169  Egammas.push_back(1.8288);
170  nb_gammas++;
171  continue;
172  }
173  }
174 
175  if (level == Levels[1]) {
176  probability = G4UniformRand() * 0.93;
177  if (probability <= 0.93) {
178  level = Levels[11];
179  Egammas.push_back(4.1025);
180  nb_gammas++;
181  continue;
182  }
183  }
184 
185  if (level == Levels[2]) {
186  probability = G4UniformRand() * (1.86 + 2.7);
187  if (probability <= 1.86) {
188  level = Levels[10];
189  Egammas.push_back(3.4518);
190  nb_gammas++;
191  continue;
192  } else if (probability > 1.86 && probability <= 1.86 + 2.7) {
193  level = Levels[8];
194  Egammas.push_back(2.6143);
195  nb_gammas++;
196  continue;
197  }
198  }
199 
200  if (level == Levels[3]) {
201  probability = G4UniformRand() * (5.49 + 0.186 + 0.502);
202  if (probability <= 5.49) {
203  level = Levels[10];
204  Egammas.push_back(2.8105);
205  nb_gammas++;
206  continue;
207  } else if (probability > 5.49 && probability <= 5.49 + 0.186) {
208  level = Levels[9];
209  Egammas.push_back(2.2916);
210  nb_gammas++;
211  continue;
212  } else if (probability > 5.49 + 0.186 && probability <= 5.49 + 0.186 + 0.502) {
213  level = Levels[8];
214  Egammas.push_back(1.9726);
215  nb_gammas++;
216  continue;
217  }
218  }
219 
220  if (level == Levels[4]) {
221  probability = G4UniformRand() * (0.818);
222  if (probability <= 0.818) {
223  level = Levels[11];
224  Egammas.push_back(2.8425);
225  nb_gammas++;
226  continue;
227  }
228  }
229 
230  if (level == Levels[5]) {
231  probability = G4UniformRand() * (1.58 + 0.781);
232  if (probability <= 1.58) {
233  level = Levels[11];
234  Egammas.push_back(2.7818);
235  nb_gammas++;
236  continue;
237  } else if (probability > 1.58 && probability <= 1.58 + 0.781) {
238  level = Levels[10];
239  Egammas.push_back(2.4325);
240  nb_gammas++;
241  continue;
242  }
243  }
244 
245  if (level == Levels[6]) {
246  probability = G4UniformRand() * (2.6);
247  if (probability <= 2.6) {
248  level = Levels[11];
249  Egammas.push_back(2.5661);
250  nb_gammas++;
251  continue;
252  }
253  }
254 
255  if (level == Levels[7]) {
256  probability = G4UniformRand() * (0.27 + 1.3 + 5.58);
257  if (probability <= 0.27) {
258  level = Levels[11];
259  Egammas.push_back(2.2295);
260  nb_gammas++;
261  continue;
262  } else if (probability > 0.27 && probability <= 0.27 + 1.3) {
263  level = Levels[10];
264  Egammas.push_back(1.8815);
265  nb_gammas++;
266  continue;
267  } else if (probability > 0.27 + 1.3 && probability <= 0.27 + 1.3 + 5.58) {
268  level = Levels[8];
269  Egammas.push_back(1.0443);
270  nb_gammas++;
271  continue;
272  }
273  }
274 
275  if (level == Levels[8]) {
276  probability = G4UniformRand() * (2.14 + 48.5 + 8.93);
277  if (probability <= 2.14) {
278  level = Levels[12];
279  Egammas.push_back(1.3540);
280  nb_gammas++;
281  continue;
282  } else if (probability > 2.14 && probability <= 2.14 + 48.5) {
283  level = Levels[11];
284  Egammas.push_back(1.1868);
285  nb_gammas++;
286  continue;
287  } else if (probability > 2.14 + 48.5 && probability <= 2.14 + 48.5 + 8.93) {
288  level = Levels[10];
289  Egammas.push_back(0.8377);
290  nb_gammas++;
291  continue;
292  }
293  }
294 
295  if (level == Levels[9]) {
296  probability = G4UniformRand() * (1.02);
297  if (probability <= 1.02) {
298  level = Levels[11];
299  Egammas.push_back(0.8673);
300  nb_gammas++;
301  continue;
302  }
303  }
304 
305  if (level == Levels[10]) {
306  probability = G4UniformRand() * (23.5 + 6.14);
307  if (probability <= 23.5) {
308  level = Levels[12];
309  Egammas.push_back(0.5160);
310  nb_gammas++;
311  continue;
312  } else if (probability > 23.5 && probability <= 23.5 + 6.14) {
313  level = Levels[11];
314  Egammas.push_back(0.3487);
315  nb_gammas++;
316  continue;
317  }
318  }
319 
320  if (level == Levels[11]) {
321  probability = G4UniformRand() * (74.0);
322  if (probability <= 74.0) {
323  level = Levels[12];
324  Egammas.push_back(0.1673);
325  nb_gammas++;
326  continue;
327  }
328  }
329  }
330  return Egammas;
331 }
vector< double > ArCaptureGammas::continuum ( )

Definition at line 334 of file ArCaptureGammas.cc.

References energy.

335 {
336  // continuum part of gadolinium
337  // cross sections
338  vector<double> energy;
339 
340  return energy;
341 }
double energy
Definition: plottest35.C:25
G4ReactionProductVector * ArCaptureGammas::GetGammas ( )

Definition at line 30 of file ArCaptureGammas.cc.

References Initialize().

Referenced by ArParticleHPCaptureFS::ApplyYourself().

31 {
32  G4ReactionProductVector* theGammas = new G4ReactionProductVector;
33  vector<double> nrj = Initialize();
34  for (unsigned int i = 0; i < nrj.size(); i++) {
35  G4ReactionProduct* theOne = new G4ReactionProduct;
36  theOne->SetDefinition(G4Gamma::Gamma());
37 
38  G4double costheta = 2. * G4UniformRand() - 1;
39  G4double theta = acos(costheta);
40  G4double phi = CLHEP::twopi * G4UniformRand();
41  G4double sinth = sin(theta);
42 
43  theOne->SetTotalEnergy(nrj[i]);
44  G4ThreeVector temp(nrj[i] * sinth * cos(phi), nrj[i] * sinth * sin(phi), nrj[i] * cos(theta));
45  theOne->SetMomentum(temp);
46  theGammas->push_back(theOne);
47  }
48 
49  //<--for(int i=0;i<100;i++){
50  //<-- std::cout<<"I am ArCaptureGammas"<<std::endl;
51  //<--}
52  return theGammas;
53 }
vector< double > Initialize()
vector< double > ArCaptureGammas::Initialize ( void  )

Definition at line 56 of file ArCaptureGammas.cc.

57 {
58  vector<double> Eg;
59  Eg = CapAr40(); // other isotopes to be added
60  return Eg;
61 }
vector< double > CapAr40()

Member Data Documentation

double ArCaptureGammas::Elevel

Definition at line 34 of file ArCaptureGammas.hh.

double ArCaptureGammas::xint[4][750]

Definition at line 35 of file ArCaptureGammas.hh.


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