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10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /processes/hadronic/models/fission/src/G4fissionEvent.cc (Version 11.3.0) and /processes/hadronic/models/fission/src/G4fissionEvent.cc (Version 10.3)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 //                                                 26 //
 27 // This software was developed by Lawrence Liv     27 // This software was developed by Lawrence Livermore National Laboratory.
 28 //                                                 28 //
 29 // Redistribution and use in source and binary     29 // Redistribution and use in source and binary forms, with or without
 30 // modification, are permitted provided that t     30 // modification, are permitted provided that the following conditions are met:
 31 //                                                 31 //
 32 // 1. Redistributions of source code must reta     32 // 1. Redistributions of source code must retain the above copyright notice,
 33 //   this list of conditions and the following     33 //   this list of conditions and the following disclaimer.
 34 // 2. Redistributions in binary form must repr     34 // 2. Redistributions in binary form must reproduce the above copyright notice,
 35 //   this list of conditions and the following     35 //   this list of conditions and the following disclaimer in the documentation
 36 //   and/or other materials provided with the      36 //   and/or other materials provided with the distribution.
 37 // 3. The name of the author may not be used t     37 // 3. The name of the author may not be used to endorse or promote products
 38 //   derived from this software without specif     38 //   derived from this software without specific prior written permission.
 39 //                                                 39 //
 40 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``A     40 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
 41 // WARRANTIES, INCLUDING, BUT NOT LIMITED TO,      41 // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 42 // MERCHANTABILITY AND FITNESS FOR A PARTICULA     42 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
 43 // EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DI     43 // EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 44 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGE     44 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 45 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES     45 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 46 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AN     46 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 47 // WHETHER IN CONTRACT, STRICT LIABILITY, OR T     47 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 48 // OTHERWISE) ARISING IN ANY WAY OUT OF THE US     48 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 49 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.      49 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 50 //                                                 50 //
 51 // Copyright (c) 2006 The Regents of the Unive     51 // Copyright (c) 2006 The Regents of the University of California.
 52 // All rights reserved.                            52 // All rights reserved.
 53 // UCRL-CODE-224807                                53 // UCRL-CODE-224807
 54 //                                                 54 //
                                                   >>  55 // $Id: G4fissionEvent.cc 68799 2013-04-05 13:29:46Z gcosmo $
 55 //                                                 56 //
 56                                                    57 
 57 #include "G4fissionEvent.hh"                       58 #include "G4fissionEvent.hh"
 58                                                    59 
 59 G4int G4fissionEvent::delayoption=0;               60 G4int G4fissionEvent::delayoption=0;
 60 G4int G4fissionEvent::correlationoption=0;         61 G4int G4fissionEvent::correlationoption=0;
 61 G4int G4fissionEvent::nudistoption=3;              62 G4int G4fissionEvent::nudistoption=3;
 62 G4int G4fissionEvent::Cf252ndistoption=0;          63 G4int G4fissionEvent::Cf252ndistoption=0;
 63 G4int G4fissionEvent::Cf252nengoption=0;           64 G4int G4fissionEvent::Cf252nengoption=0;
 64                                                    65 
 65 G4fissionEvent::G4fissionEvent(G4int isotope,      66 G4fissionEvent::G4fissionEvent(G4int isotope, G4double time,
 66                                G4double nubar,     67                                G4double nubar, G4double eng)
 67  :neutronNu(0), neutronEnergies(0), neutronVel     68  :neutronNu(0), neutronEnergies(0), neutronVelocities(0), neutronDircosu(0),
 68   neutronDircosv(), neutronDircosw(), neutronA     69   neutronDircosv(), neutronDircosw(), neutronAges(0),
 69   photonNu(0), photonEnergies(0), photonVeloci     70   photonNu(0), photonEnergies(0), photonVelocities(0), photonDircosu(0),
 70   photonDircosv(0), photonDircosw(0), photonAg     71   photonDircosv(0), photonDircosw(0), photonAges(0)
 71 {                                                  72 {
 72    /*                                              73    /*
 73     * Constructs a fission event with neutronN     74     * Constructs a fission event with neutronNu neutrons and photonNu
 74     * photons.                                     75     * photons.
 75     */                                             76     */
 76    G4int i;                                        77    G4int i;
 77                                                    78 
 78    if (nubar == -1.) {                             79    if (nubar == -1.) {
 79       /* spontaneous fission */                    80       /* spontaneous fission */
 80       neutronNu = G4SmpSpNuDistData(isotope, C     81       neutronNu = G4SmpSpNuDistData(isotope, Cf252ndistoption);
 81       photonNu = G4SmpSpNugDistData(isotope);      82       photonNu = G4SmpSpNugDistData(isotope);
 82    } else {                                        83    } else {
 83       /* induced fission */                        84       /* induced fission */
 84       if (nudistoption == 0 || nudistoption ==     85       if (nudistoption == 0 || nudistoption == 1) {
 85          switch (isotope) {                        86          switch (isotope) {
 86             case 92235:                            87             case 92235:
 87                neutronNu = G4SmpNuDistDataU235     88                neutronNu = G4SmpNuDistDataU235(eng,nudistoption);
 88                break;                              89                break;
 89             case 92238:                            90             case 92238:
 90                neutronNu = G4SmpNuDistDataU238     91                neutronNu = G4SmpNuDistDataU238(eng);
 91                break;                              92                break;
 92             case 94239:                            93             case 94239:
 93                neutronNu = G4SmpNuDistDataPu23     94                neutronNu = G4SmpNuDistDataPu239(eng);
 94                break;                              95                break;
 95             default:                               96             default:
 96                neutronNu = (G4int) G4SmpTerrel     97                neutronNu = (G4int) G4SmpTerrell(nubar);
 97                break;                              98                break;
 98          }                                         99          } 
 99       } else if (nudistoption == 2) {             100       } else if (nudistoption == 2) {
100          switch (isotope) {                       101          switch (isotope) {
101             case 92232:                           102             case 92232:
102             case 92234:                           103             case 92234:
103             case 92236:                           104             case 92236:
104             case 92238:                           105             case 92238:
105                neutronNu = G4SmpNuDistDataU232    106                neutronNu = G4SmpNuDistDataU232_234_236_238(nubar);
106                break;                             107                break;
107             case 92233:                           108             case 92233:
108             case 92235:                           109             case 92235:
109                neutronNu = (G4int) G4SmpNuDist    110                neutronNu = (G4int) G4SmpNuDistDataU233_235(nubar);
110                break;                             111                break;
111             case 94239:                           112             case 94239:
112             case 94241:                           113             case 94241:
113                neutronNu = G4SmpNuDistDataPu23    114                neutronNu = G4SmpNuDistDataPu239_241(nubar);
114                break;                             115                break;
115             default:                              116             default:
116                neutronNu = (G4int) G4SmpTerrel    117                neutronNu = (G4int) G4SmpTerrell(nubar);
117                break;                             118                break;
118          }                                        119          }
119       } else if (nudistoption == 3) {             120       } else if (nudistoption == 3) {
120          switch (isotope) {                       121          switch (isotope) {
121             case 92232:                           122             case 92232:
122             case 92234:                           123             case 92234:
123             case 92236:                           124             case 92236:
124             case 92238:                           125             case 92238:
125                neutronNu = G4SmpNuDistDataU232    126                neutronNu = G4SmpNuDistDataU232_234_236_238_MC(nubar);
126                break;                             127                break;
127             case 92233:                           128             case 92233:
128             case 92235:                           129             case 92235:
129                neutronNu = (G4int) G4SmpNuDist    130                neutronNu = (G4int) G4SmpNuDistDataU233_235_MC(nubar);
130                break;                             131                break;
131             case 94239:                           132             case 94239:
132             case 94241:                           133             case 94241:
133                neutronNu = G4SmpNuDistDataPu23    134                neutronNu = G4SmpNuDistDataPu239_241_MC(nubar);
134                break;                             135                break;
135             default:                              136             default:
136                neutronNu = (G4int) G4SmpTerrel    137                neutronNu = (G4int) G4SmpTerrell(nubar);
137                break;                             138                break;
138          }                                        139          } 
139       }                                           140       }
140       photonNu = G4SmpNugDist(isotope, nubar);    141       photonNu = G4SmpNugDist(isotope, nubar);
141    }                                              142    }
142    if (neutronNu > 0) {                           143    if (neutronNu > 0) {
143       neutronEnergies = new G4double[ neutronN    144       neutronEnergies = new G4double[ neutronNu ];
144       neutronVelocities = new G4double[ neutro    145       neutronVelocities = new G4double[ neutronNu ];
145       neutronDircosu = new G4double[ neutronNu    146       neutronDircosu = new G4double[ neutronNu ];
146       neutronDircosv = new G4double[ neutronNu    147       neutronDircosv = new G4double[ neutronNu ];
147       neutronDircosw = new G4double[ neutronNu    148       neutronDircosw = new G4double[ neutronNu ];
148       neutronAges = new G4double[neutronNu];      149       neutronAges = new G4double[neutronNu];
149       for (i=0; i<neutronNu; i++) {               150       for (i=0; i<neutronNu; i++) {
150          if (isotope == 98252) neutronEnergies    151          if (isotope == 98252) neutronEnergies[i] = G4SmpNEngCf252(Cf252nengoption);
151          else neutronEnergies[i] = G4SmpWatt(e    152          else neutronEnergies[i] = G4SmpWatt(eng, isotope);
152          neutronVelocities[i] = G4SmpNVel(        153          neutronVelocities[i] = G4SmpNVel(
153                  neutronEnergies[i],              154                  neutronEnergies[i],
154                  &(neutronDircosu[i]),            155                  &(neutronDircosu[i]),
155                  &(neutronDircosv[i]),            156                  &(neutronDircosv[i]),
156                  &(neutronDircosw[i])             157                  &(neutronDircosw[i])
157                 );                                158                 );
158          neutronAges[i] = time;                   159          neutronAges[i] = time;
159       }                                           160       }
160    }                                              161    }
161    if (photonNu > 0) {                            162    if (photonNu > 0) {
162       photonEnergies = new G4double[photonNu];    163       photonEnergies = new G4double[photonNu];
163       photonVelocities = new G4double[photonNu    164       photonVelocities = new G4double[photonNu];
164       photonDircosu = new G4double[photonNu];     165       photonDircosu = new G4double[photonNu];
165       photonDircosv = new G4double[photonNu];     166       photonDircosv = new G4double[photonNu];
166       photonDircosw = new G4double[photonNu];     167       photonDircosw = new G4double[photonNu];
167       photonAges = new G4double[photonNu];        168       photonAges = new G4double[photonNu];
168       for (i=0; i<photonNu; i++) {                169       for (i=0; i<photonNu; i++) {
169          photonEnergies[i] = G4SmpGEng();         170          photonEnergies[i] = G4SmpGEng();
170          photonVelocities[i] = G4SmpPVel(         171          photonVelocities[i] = G4SmpPVel(
171                  photonEnergies[i],               172                  photonEnergies[i],
172                  &(photonDircosu[i]),             173                  &(photonDircosu[i]),
173                  &(photonDircosv[i]),             174                  &(photonDircosv[i]),
174                  &(photonDircosw[i])              175                  &(photonDircosw[i])
175                 );                                176                 );
176          photonAges[i] = time;                    177          photonAges[i] = time;
177       }                                           178       }
178    }                                              179    }
179 }                                                 180 }
180                                                   181 
181 G4fissionEvent::~G4fissionEvent() {               182 G4fissionEvent::~G4fissionEvent() {
182    if (neutronNu > 0) {                           183    if (neutronNu > 0) {
183       delete [] neutronEnergies;                  184       delete [] neutronEnergies;
184       delete [] neutronVelocities;                185       delete [] neutronVelocities;
185       delete [] neutronDircosu;                   186       delete [] neutronDircosu;
186       delete [] neutronDircosv;                   187       delete [] neutronDircosv;
187       delete [] neutronDircosw;                   188       delete [] neutronDircosw;
188       delete [] neutronAges;                      189       delete [] neutronAges;
189    }                                              190    }
190                                                   191 
191    if (photonNu > 0) {                            192    if (photonNu > 0) {
192       delete [] photonEnergies;                   193       delete [] photonEnergies;
193       delete [] photonVelocities;                 194       delete [] photonVelocities;
194       delete [] photonDircosu;                    195       delete [] photonDircosu;
195       delete [] photonDircosv;                    196       delete [] photonDircosv;
196       delete [] photonDircosw;                    197       delete [] photonDircosw;
197       delete [] photonAges;                       198       delete [] photonAges;
198    }                                              199    }
199 }                                                 200 }
200                                                   201