Geant4  10.01.p03
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 // $Id: G4fissionEvent.cc 68799 2013-04-05 13:29:46Z gcosmo $
56 //
57 
58 #include "G4fissionEvent.hh"
59 
65 
67  G4double nubar, G4double eng)
68  :neutronNu(0), neutronEnergies(0), neutronVelocities(0), neutronDircosu(0),
69  neutronDircosv(), neutronDircosw(), neutronAges(0),
70  photonNu(0), photonEnergies(0), photonVelocities(0), photonDircosu(0),
71  photonDircosv(0), photonDircosw(0), photonAges(0)
72 {
73  /*
74  * Constructs a fission event with neutronNu neutrons and photonNu
75  * photons.
76  */
77  G4int i;
78 
79  if (nubar == -1.) {
80  /* spontaneous fission */
82  photonNu = G4SmpSpNugDistData(isotope);
83  } else {
84  /* induced fission */
85  if (nudistoption == 0 || nudistoption == 1) {
86  switch (isotope) {
87  case 92235:
89  break;
90  case 92238:
92  break;
93  case 94239:
95  break;
96  default:
97  neutronNu = (G4int) G4SmpTerrell(nubar);
98  break;
99  }
100  } else if (nudistoption == 2) {
101  switch (isotope) {
102  case 92232:
103  case 92234:
104  case 92236:
105  case 92238:
107  break;
108  case 92233:
109  case 92235:
111  break;
112  case 94239:
113  case 94241:
115  break;
116  default:
117  neutronNu = (G4int) G4SmpTerrell(nubar);
118  break;
119  }
120  } else if (nudistoption == 3) {
121  switch (isotope) {
122  case 92232:
123  case 92234:
124  case 92236:
125  case 92238:
127  break;
128  case 92233:
129  case 92235:
131  break;
132  case 94239:
133  case 94241:
135  break;
136  default:
137  neutronNu = (G4int) G4SmpTerrell(nubar);
138  break;
139  }
140  }
141  photonNu = G4SmpNugDist(isotope, nubar);
142  }
143  if (neutronNu > 0) {
150  for (i=0; i<neutronNu; i++) {
151  if (isotope == 98252) neutronEnergies[i] = G4SmpNEngCf252(Cf252nengoption);
152  else neutronEnergies[i] = G4SmpWatt(eng, isotope);
154  neutronEnergies[i],
155  &(neutronDircosu[i]),
156  &(neutronDircosv[i]),
157  &(neutronDircosw[i])
158  );
159  neutronAges[i] = time;
160  }
161  }
162  if (photonNu > 0) {
169  for (i=0; i<photonNu; i++) {
170  photonEnergies[i] = G4SmpGEng();
172  photonEnergies[i],
173  &(photonDircosu[i]),
174  &(photonDircosv[i]),
175  &(photonDircosw[i])
176  );
177  photonAges[i] = time;
178  }
179  }
180 }
181 
183  if (neutronNu > 0) {
184  delete [] neutronEnergies;
185  delete [] neutronVelocities;
186  delete [] neutronDircosu;
187  delete [] neutronDircosv;
188  delete [] neutronDircosw;
189  delete [] neutronAges;
190  }
191 
192  if (photonNu > 0) {
193  delete [] photonEnergies;
194  delete [] photonVelocities;
195  delete [] photonDircosu;
196  delete [] photonDircosv;
197  delete [] photonDircosw;
198  delete [] photonAges;
199  }
200 }
G4int G4SmpNuDistDataPu239_241(G4double nubar)
G4int G4SmpNuDistDataU232_234_236_238(G4double nubar)
G4double * neutronDircosw
int G4int
Definition: G4Types.hh:78
G4double G4SmpTerrell(G4double nubar)
Definition: G4SmpTerrell.cc:67
G4fissionEvent(G4int isotope, G4double time, G4double nubar, G4double eng)
G4int G4SmpSpNuDistData(G4int isotope, G4int Cf252option)
G4double G4SmpWatt(G4double ePart, G4int iso)
Definition: G4SmpWatt.cc:66
G4double * neutronVelocities
static G4int nudistoption
G4double G4SmpGEng()
Definition: G4SmpGEng.cc:62
G4double * neutronDircosv
G4int G4SmpNuDistDataU232_234_236_238_MC(G4double nubar)
static G4int Cf252ndistoption
G4double G4SmpNEngCf252(G4int option)
G4double G4SmpPVel(G4double eng, G4double *cosdiru, G4double *cosdirv, G4double *cosdirw)
Definition: G4SmpPVel.cc:62
G4double * neutronDircosu
G4int G4SmpNuDistDataU233_235_MC(G4double nubar)
static G4int Cf252nengoption
G4int G4SmpNugDist(G4int isotope, G4double nubar)
Definition: G4SmpNugDist.cc:65
G4int G4SmpNuDistDataPu239(G4double erg)
G4double * photonAges
G4int G4SmpSpNugDistData(G4int isotope)
G4double * photonDircosv
G4int G4SmpNuDistDataU233_235(G4double nubar)
G4double * neutronEnergies
G4double * photonDircosw
G4double * neutronAges
G4int G4SmpNuDistDataU235(G4double erg, G4int option)
G4double G4SmpNVel(G4double eng, G4double *cosdiru, G4double *cosdirv, G4double *cosdirw)
Definition: G4SmpNVel.cc:62
static G4int delayoption
G4int G4SmpNuDistDataPu239_241_MC(G4double nubar)
double G4double
Definition: G4Types.hh:76
G4double * photonVelocities
G4double * photonDircosu
static G4int correlationoption
G4int G4SmpNuDistDataU238(G4double erg)
G4double * photonEnergies