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 | // |
---|
27 | // This software was developed by Lawrence Livermore National Laboratory. |
---|
28 | // |
---|
29 | // Redistribution and use in source and binary forms, with or without |
---|
30 | // modification, are permitted provided that the following conditions are met: |
---|
31 | // |
---|
32 | // 1. Redistributions of source code must retain the above copyright notice, |
---|
33 | // this list of conditions and the following disclaimer. |
---|
34 | // 2. Redistributions in binary form must reproduce the above copyright notice, |
---|
35 | // this list of conditions and the following disclaimer in the documentation |
---|
36 | // and/or other materials provided with the distribution. |
---|
37 | // 3. The name of the author may not be used to endorse or promote products |
---|
38 | // derived from this software without specific prior written permission. |
---|
39 | // |
---|
40 | // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED |
---|
41 | // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
---|
42 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO |
---|
43 | // EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
---|
44 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
---|
45 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
---|
46 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
---|
47 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
---|
48 | // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
---|
49 | // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
---|
50 | // |
---|
51 | // Copyright (c) 2006 The Regents of the University of California. |
---|
52 | // All rights reserved. |
---|
53 | // UCRL-CODE-224807 |
---|
54 | // |
---|
55 | // $Id: G4fissionEvent.cc,v 1.2 2007/06/01 13:46:53 gcosmo Exp $ |
---|
56 | // |
---|
57 | |
---|
58 | #include "G4fissionEvent.hh" |
---|
59 | |
---|
60 | G4int G4fissionEvent::delayoption=0; |
---|
61 | G4int G4fissionEvent::correlationoption=0; |
---|
62 | G4int G4fissionEvent::nudistoption=3; |
---|
63 | G4int G4fissionEvent::Cf252ndistoption=0; |
---|
64 | G4int G4fissionEvent::Cf252nengoption=0; |
---|
65 | |
---|
66 | G4fissionEvent::G4fissionEvent(G4int isotope, G4double time, G4double nubar, G4double eng) { |
---|
67 | /* |
---|
68 | * Constructs a fission event with neutronNu neutrons and photonNu |
---|
69 | * photons. |
---|
70 | */ |
---|
71 | G4int i; |
---|
72 | |
---|
73 | neutronNu = 0; |
---|
74 | photonNu = 0; |
---|
75 | if (nubar == -1.) { |
---|
76 | /* spontaneous fission */ |
---|
77 | neutronNu = G4SmpSpNuDistData(isotope, Cf252ndistoption); |
---|
78 | photonNu = G4SmpSpNugDistData(isotope); |
---|
79 | } else { |
---|
80 | /* induced fission */ |
---|
81 | if (nudistoption == 0 || nudistoption == 1) { |
---|
82 | switch (isotope) { |
---|
83 | case 92235: |
---|
84 | neutronNu = G4SmpNuDistDataU235(eng,nudistoption); |
---|
85 | break; |
---|
86 | case 92238: |
---|
87 | neutronNu = G4SmpNuDistDataU238(eng); |
---|
88 | break; |
---|
89 | case 94239: |
---|
90 | neutronNu = G4SmpNuDistDataPu239(eng); |
---|
91 | break; |
---|
92 | default: |
---|
93 | neutronNu = (G4int) G4SmpTerrell(nubar); |
---|
94 | break; |
---|
95 | } |
---|
96 | } else if (nudistoption == 2) { |
---|
97 | switch (isotope) { |
---|
98 | case 92232: |
---|
99 | case 92234: |
---|
100 | case 92236: |
---|
101 | case 92238: |
---|
102 | neutronNu = G4SmpNuDistDataU232_234_236_238(nubar); |
---|
103 | break; |
---|
104 | case 92233: |
---|
105 | case 92235: |
---|
106 | neutronNu = (G4int) G4SmpNuDistDataU233_235(nubar); |
---|
107 | break; |
---|
108 | case 94239: |
---|
109 | case 94241: |
---|
110 | neutronNu = G4SmpNuDistDataPu239_241(nubar); |
---|
111 | break; |
---|
112 | default: |
---|
113 | neutronNu = (G4int) G4SmpTerrell(nubar); |
---|
114 | break; |
---|
115 | } |
---|
116 | } else if (nudistoption == 3) { |
---|
117 | switch (isotope) { |
---|
118 | case 92232: |
---|
119 | case 92234: |
---|
120 | case 92236: |
---|
121 | case 92238: |
---|
122 | neutronNu = G4SmpNuDistDataU232_234_236_238_MC(nubar); |
---|
123 | break; |
---|
124 | case 92233: |
---|
125 | case 92235: |
---|
126 | neutronNu = (G4int) G4SmpNuDistDataU233_235_MC(nubar); |
---|
127 | break; |
---|
128 | case 94239: |
---|
129 | case 94241: |
---|
130 | neutronNu = G4SmpNuDistDataPu239_241_MC(nubar); |
---|
131 | break; |
---|
132 | default: |
---|
133 | neutronNu = (G4int) G4SmpTerrell(nubar); |
---|
134 | break; |
---|
135 | } |
---|
136 | } |
---|
137 | photonNu = G4SmpNugDist(isotope, nubar); |
---|
138 | } |
---|
139 | if (neutronNu > 0) { |
---|
140 | neutronEnergies = new G4double[ neutronNu ]; |
---|
141 | neutronVelocities = new G4double[ neutronNu ]; |
---|
142 | neutronDircosu = new G4double[ neutronNu ]; |
---|
143 | neutronDircosv = new G4double[ neutronNu ]; |
---|
144 | neutronDircosw = new G4double[ neutronNu ]; |
---|
145 | neutronAges = new G4double[neutronNu]; |
---|
146 | for (i=0; i<neutronNu; i++) { |
---|
147 | if (isotope == 98252) neutronEnergies[i] = G4SmpNEngCf252(Cf252nengoption); |
---|
148 | else neutronEnergies[i] = G4SmpWatt(eng, isotope); |
---|
149 | neutronVelocities[i] = G4SmpNVel( |
---|
150 | neutronEnergies[i], |
---|
151 | &(neutronDircosu[i]), |
---|
152 | &(neutronDircosv[i]), |
---|
153 | &(neutronDircosw[i]) |
---|
154 | ); |
---|
155 | neutronAges[i] = time; |
---|
156 | } |
---|
157 | } |
---|
158 | if (photonNu > 0) { |
---|
159 | photonEnergies = new G4double[photonNu]; |
---|
160 | photonVelocities = new G4double[photonNu]; |
---|
161 | photonDircosu = new G4double[photonNu]; |
---|
162 | photonDircosv = new G4double[photonNu]; |
---|
163 | photonDircosw = new G4double[photonNu]; |
---|
164 | photonAges = new G4double[photonNu]; |
---|
165 | for (i=0; i<photonNu; i++) { |
---|
166 | photonEnergies[i] = G4SmpGEng(); |
---|
167 | photonVelocities[i] = G4SmpPVel( |
---|
168 | photonEnergies[i], |
---|
169 | &(photonDircosu[i]), |
---|
170 | &(photonDircosv[i]), |
---|
171 | &(photonDircosw[i]) |
---|
172 | ); |
---|
173 | photonAges[i] = time; |
---|
174 | } |
---|
175 | } |
---|
176 | } |
---|
177 | |
---|
178 | G4fissionEvent::~G4fissionEvent() { |
---|
179 | if (neutronNu > 0) { |
---|
180 | delete [] neutronEnergies; |
---|
181 | delete [] neutronVelocities; |
---|
182 | delete [] neutronDircosu; |
---|
183 | delete [] neutronDircosv; |
---|
184 | delete [] neutronDircosw; |
---|
185 | delete [] neutronAges; |
---|
186 | } |
---|
187 | |
---|
188 | if (photonNu > 0) { |
---|
189 | delete [] photonEnergies; |
---|
190 | delete [] photonVelocities; |
---|
191 | delete [] photonDircosu; |
---|
192 | delete [] photonDircosv; |
---|
193 | delete [] photonDircosw; |
---|
194 | delete [] photonAges; |
---|
195 | } |
---|
196 | } |
---|