Geant4-11
G4fissionEvent.cc
Go to the documentation of this file.
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//
56
57#include "G4fissionEvent.hh"
58
64
66 G4double nubar, G4double eng)
67 :neutronNu(0), neutronEnergies(0), neutronVelocities(0), neutronDircosu(0),
68 neutronDircosv(), neutronDircosw(), neutronAges(0),
69 photonNu(0), photonEnergies(0), photonVelocities(0), photonDircosu(0),
70 photonDircosv(0), photonDircosw(0), photonAges(0)
71{
72 /*
73 * Constructs a fission event with neutronNu neutrons and photonNu
74 * photons.
75 */
76 G4int i;
77
78 if (nubar == -1.) {
79 /* spontaneous fission */
82 } else {
83 /* induced fission */
84 if (nudistoption == 0 || nudistoption == 1) {
85 switch (isotope) {
86 case 92235:
88 break;
89 case 92238:
91 break;
92 case 94239:
94 break;
95 default:
96 neutronNu = (G4int) G4SmpTerrell(nubar);
97 break;
98 }
99 } else if (nudistoption == 2) {
100 switch (isotope) {
101 case 92232:
102 case 92234:
103 case 92236:
104 case 92238:
106 break;
107 case 92233:
108 case 92235:
110 break;
111 case 94239:
112 case 94241:
114 break;
115 default:
116 neutronNu = (G4int) G4SmpTerrell(nubar);
117 break;
118 }
119 } else if (nudistoption == 3) {
120 switch (isotope) {
121 case 92232:
122 case 92234:
123 case 92236:
124 case 92238:
126 break;
127 case 92233:
128 case 92235:
130 break;
131 case 94239:
132 case 94241:
134 break;
135 default:
136 neutronNu = (G4int) G4SmpTerrell(nubar);
137 break;
138 }
139 }
140 photonNu = G4SmpNugDist(isotope, nubar);
141 }
142 if (neutronNu > 0) {
149 for (i=0; i<neutronNu; i++) {
150 if (isotope == 98252) neutronEnergies[i] = G4SmpNEngCf252(Cf252nengoption);
151 else neutronEnergies[i] = G4SmpWatt(eng, isotope);
154 &(neutronDircosu[i]),
155 &(neutronDircosv[i]),
156 &(neutronDircosw[i])
157 );
158 neutronAges[i] = time;
159 }
160 }
161 if (photonNu > 0) {
168 for (i=0; i<photonNu; i++) {
172 &(photonDircosu[i]),
173 &(photonDircosv[i]),
174 &(photonDircosw[i])
175 );
176 photonAges[i] = time;
177 }
178 }
179}
180
182 if (neutronNu > 0) {
183 delete [] neutronEnergies;
184 delete [] neutronVelocities;
185 delete [] neutronDircosu;
186 delete [] neutronDircosv;
187 delete [] neutronDircosw;
188 delete [] neutronAges;
189 }
190
191 if (photonNu > 0) {
192 delete [] photonEnergies;
193 delete [] photonVelocities;
194 delete [] photonDircosu;
195 delete [] photonDircosv;
196 delete [] photonDircosw;
197 delete [] photonAges;
198 }
199}
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
G4double G4SmpPVel(G4double eng, G4double *cosdiru, G4double *cosdirv, G4double *cosdirw)
Definition: G4SmpPVel.cc:61
G4int G4SmpNuDistDataU232_234_236_238(G4double nubar)
G4double G4SmpTerrell(G4double nubar)
Definition: G4SmpTerrell.cc:68
G4double * neutronVelocities
G4int G4SmpNuDistDataU232_234_236_238_MC(G4double nubar)
G4int G4SmpSpNuDistData(G4int isotope, G4int Cf252option)
G4double G4SmpGEng()
Definition: G4SmpGEng.cc:63
G4double * photonDircosv
G4double * photonEnergies
G4fissionEvent(G4int isotope, G4double time, G4double nubar, G4double eng)
G4double * photonDircosw
static G4int Cf252ndistoption
G4double * neutronDircosu
G4int G4SmpSpNugDistData(G4int isotope)
G4double * neutronAges
G4double G4SmpNEngCf252(G4int option)
G4int G4SmpNuDistDataU235(G4double erg, G4int option)
G4double * photonAges
static G4int delayoption
G4double G4SmpWatt(G4double ePart, G4int iso)
Definition: G4SmpWatt.cc:66
G4int G4SmpNuDistDataPu239_241(G4double nubar)
static G4int correlationoption
G4double * neutronDircosw
G4double * neutronDircosv
G4double * photonVelocities
static G4int nudistoption
G4double G4SmpNVel(G4double eng, G4double *cosdiru, G4double *cosdirv, G4double *cosdirw)
Definition: G4SmpNVel.cc:61
G4int G4SmpNuDistDataU233_235_MC(G4double nubar)
G4double * photonDircosu
G4int G4SmpNuDistDataU233_235(G4double nubar)
G4int G4SmpNuDistDataPu239_241_MC(G4double nubar)
G4int G4SmpNuDistDataPu239(G4double erg)
static G4int Cf252nengoption
G4int G4SmpNuDistDataU238(G4double erg)
G4int G4SmpNugDist(G4int isotope, G4double nubar)
Definition: G4SmpNugDist.cc:67
G4double * neutronEnergies