19 #include "Geant4/G4Gamma.hh" 20 #include "Geant4/Randomize.hh" 29 G4ReactionProductVector*
32 G4ReactionProductVector* theGammas =
new G4ReactionProductVector;
34 for (
unsigned int i = 0; i < nrj.size(); i++) {
35 G4ReactionProduct* theOne =
new G4ReactionProduct;
36 theOne->SetDefinition(G4Gamma::Gamma());
38 G4double costheta = 2. * G4UniformRand() - 1;
39 G4double theta = acos(costheta);
40 G4double phi = CLHEP::twopi * G4UniformRand();
41 G4double sinth = sin(theta);
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);
71 vector<double> Egammas;
75 double Levels[13] = {6.0989,
91 double probability = 0.;
94 double probMyGamma = 51.2;
107 while (level != Levels[12]) {
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) {
114 Egammas.push_back(5.5820);
117 }
else if (probability > 10.79 && probability <= 10.79 + 0.242) {
119 Egammas.push_back(5.0637);
122 }
else if (probability > 10.79 + 0.242 && probability <= 10.79 + 0.242 + probMyGamma) {
124 Egammas.push_back(4.7450);
127 }
else if (probability > 10.79 + 0.242 + probMyGamma &&
128 probability <= 10.79 + 0.242 + probMyGamma + 9.11) {
130 Egammas.push_back(3.7004);
133 }
else if (probability > 10.79 + 0.242 + probMyGamma + 9.11 &&
134 probability <= 10.79 + 0.242 + probMyGamma + 9.11 + 3.91) {
136 Egammas.push_back(3.3655);
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) {
142 Egammas.push_back(3.1502);
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) {
148 Egammas.push_back(3.0894);
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) {
154 Egammas.push_back(2.7718);
157 }
else if (probability > 10.79 + 0.242 + probMyGamma + 9.11 + 3.91 + 3.72 + 1.02 + 8.00 &&
159 10.79 + 0.242 + probMyGamma + 9.11 + 3.91 + 3.72 + 1.02 + 8.00 + 4.09) {
161 Egammas.push_back(2.1307);
164 }
else if (probability >
165 10.79 + 0.242 + probMyGamma + 9.11 + 3.91 + 3.72 + 1.02 + 8.00 + 4.09 &&
167 10.79 + 0.242 + probMyGamma + 9.11 + 3.91 + 3.72 + 1.02 + 8.00 + 4.09 + 0.93) {
169 Egammas.push_back(1.8288);
175 if (level == Levels[1]) {
176 probability = G4UniformRand() * 0.93;
177 if (probability <= 0.93) {
179 Egammas.push_back(4.1025);
185 if (level == Levels[2]) {
186 probability = G4UniformRand() * (1.86 + 2.7);
187 if (probability <= 1.86) {
189 Egammas.push_back(3.4518);
192 }
else if (probability > 1.86 && probability <= 1.86 + 2.7) {
194 Egammas.push_back(2.6143);
200 if (level == Levels[3]) {
201 probability = G4UniformRand() * (5.49 + 0.186 + 0.502);
202 if (probability <= 5.49) {
204 Egammas.push_back(2.8105);
207 }
else if (probability > 5.49 && probability <= 5.49 + 0.186) {
209 Egammas.push_back(2.2916);
212 }
else if (probability > 5.49 + 0.186 && probability <= 5.49 + 0.186 + 0.502) {
214 Egammas.push_back(1.9726);
220 if (level == Levels[4]) {
221 probability = G4UniformRand() * (0.818);
222 if (probability <= 0.818) {
224 Egammas.push_back(2.8425);
230 if (level == Levels[5]) {
231 probability = G4UniformRand() * (1.58 + 0.781);
232 if (probability <= 1.58) {
234 Egammas.push_back(2.7818);
237 }
else if (probability > 1.58 && probability <= 1.58 + 0.781) {
239 Egammas.push_back(2.4325);
245 if (level == Levels[6]) {
246 probability = G4UniformRand() * (2.6);
247 if (probability <= 2.6) {
249 Egammas.push_back(2.5661);
255 if (level == Levels[7]) {
256 probability = G4UniformRand() * (0.27 + 1.3 + 5.58);
257 if (probability <= 0.27) {
259 Egammas.push_back(2.2295);
262 }
else if (probability > 0.27 && probability <= 0.27 + 1.3) {
264 Egammas.push_back(1.8815);
267 }
else if (probability > 0.27 + 1.3 && probability <= 0.27 + 1.3 + 5.58) {
269 Egammas.push_back(1.0443);
275 if (level == Levels[8]) {
276 probability = G4UniformRand() * (2.14 + 48.5 + 8.93);
277 if (probability <= 2.14) {
279 Egammas.push_back(1.3540);
282 }
else if (probability > 2.14 && probability <= 2.14 + 48.5) {
284 Egammas.push_back(1.1868);
287 }
else if (probability > 2.14 + 48.5 && probability <= 2.14 + 48.5 + 8.93) {
289 Egammas.push_back(0.8377);
295 if (level == Levels[9]) {
296 probability = G4UniformRand() * (1.02);
297 if (probability <= 1.02) {
299 Egammas.push_back(0.8673);
305 if (level == Levels[10]) {
306 probability = G4UniformRand() * (23.5 + 6.14);
307 if (probability <= 23.5) {
309 Egammas.push_back(0.5160);
312 }
else if (probability > 23.5 && probability <= 23.5 + 6.14) {
314 Egammas.push_back(0.3487);
320 if (level == Levels[11]) {
321 probability = G4UniformRand() * (74.0);
322 if (probability <= 74.0) {
324 Egammas.push_back(0.1673);
G4ReactionProductVector * GetGammas()
vector< double > CapAr40()
vector< double > Initialize()
vector< double > continuum()