G4SmpSpNuDistData.cc

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // This software was developed by Lawrence Livermore National Laboratory.
00028 //
00029 // Redistribution and use in source and binary forms, with or without
00030 // modification, are permitted provided that the following conditions are met:
00031 //
00032 // 1. Redistributions of source code must retain the above copyright notice,
00033 //   this list of conditions and the following disclaimer.
00034 // 2. Redistributions in binary form must reproduce the above copyright notice,
00035 //   this list of conditions and the following disclaimer in the documentation
00036 //   and/or other materials provided with the distribution.
00037 // 3. The name of the author may not be used to endorse or promote products
00038 //   derived from this software without specific prior written permission.
00039 //
00040 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
00041 // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
00042 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
00043 // EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00044 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00045 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
00046 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00047 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
00048 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
00049 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00050 //
00051 // Copyright (c) 2006 The Regents of the University of California.
00052 // All rights reserved.
00053 // UCRL-CODE-224807
00054 //
00055 //
00056 // $Id: G4SmpSpNuDistData.cc 69860 2013-05-16 14:39:02Z gcosmo $
00057 //
00058 
00059 #include "G4fissionEvent.hh"
00060 
00061 #define nSPfissIso 8
00062 #define nSPfissn 11
00063 
00064 G4int G4fissionEvent::G4SmpSpNuDistData(G4int isotope, G4int Cf252option) {
00065 
00066 /*
00067   Description
00068     Sample Number of Neutrons from spontaneous fission 
00069     (a) from the neutron multiplicity data for 
00070         U-238, Pu-238, Pu-240, Pu-242, Cm-242, Cm-244
00071            using Holden and Zucker's tabulated data
00072         Cf-252 using either Spencer's tabulated data or 
00073            Boldeman's data
00074     (b) from Terrell's approximation using nubar for
00075         Th-232, 
00076         U-232, U-233, U-234, U-235, U-236,
00077         Np-237, 
00078         Pu-239, Pu-241, 
00079         Am-241, 
00080         Bk-249
00081            using Ensslin's data.
00082 */
00083 
00084 /*
00085   Input
00086     iso          - isotope
00087     Cf252option  - 0 to use Spencer's tabulated data
00088                    1 to use Boldeman's data
00089   Output
00090     G4SmpSpNuDistData - sampled multiplicity
00091                       -1 is the isotope has 
00092                          no multiplicity data,
00093                          nor any nubar data
00094 */
00095  
00096   G4int i, index;
00097   G4double sum, nubar;
00098   G4double r;
00099 
00100   static G4double sfnu [nSPfissIso][nSPfissn] = { 
00101     {0.0481677,0.2485215,0.4253044,0.2284094,0.0423438,0.0072533,
00102      0.0000000,0.0000000,0.0000000,0.0000000,0.0000000},
00103 
00104     {0.0631852,0.2319644,0.3333230,0.2528207,0.0986461,0.0180199,
00105      0.0020407,0.0000000,0.0000000,0.0000000,0.0000000},
00106 
00107     {0.0679423,0.2293159,0.3341228,0.2475507,0.0996922,0.0182398,
00108      0.0031364,0.0000000,0.0000000,0.0000000,0.0000000},
00109 
00110     {0.0212550,0.1467407,0.3267531,0.3268277,0.1375090,0.0373815,
00111      0.0025912,0.0007551,0.0001867,0.0000000,0.0000000},
00112 
00113     {0.0150050,0.1161725,0.2998427,0.3331614,0.1837748,0.0429780,
00114      0.0087914,0.0002744,0.0000000,0.0000000,0.0000000},
00115 
00116     {0.0540647,0.2053880,0.3802279,0.2248483,0.1078646,0.0276366,
00117      0.0000000,0.0000000,0.0000000,0.0000000,0.0000000},
00118 
00119     {0.0021100,0.0246700,0.1229000,0.2714400,0.3076300,0.1877000,
00120      0.0677000,0.0140600,0.0016700,0.0001000,0.0000000},
00121 
00122     {0.0020900,0.0262100,0.1262000,0.2752000,0.3018000,0.1846000,
00123      0.0668000,0.0150000,0.0021000,0.0000000,0.0000000} };
00124 
00125 /*
00126   sample the spontaneous fission neutron number distribution
00127 */
00128   index = -1;
00129 
00130   if (isotope == 92238) index = 0;
00131   else if (isotope == 94240) index = 1;
00132   else if (isotope == 94242) index = 2;
00133   else if (isotope == 96242) index = 3;
00134   else if (isotope == 96244) index = 4;
00135   else if (isotope == 94238) index = 5;
00136   else if (isotope == 98252 && Cf252option == 0) index = 6;
00137   else if (isotope == 98252 && Cf252option == 1) index = 7;
00138 
00139   if (index != -1) { 
00140     r=fisslibrng();
00141 
00142     sum = 0.;
00143     for (i = 0; i < nSPfissn-1; i++) {
00144       sum = sum + sfnu[index][i];
00145       if (r <= sum || sfnu[index][i+1] == 0.) return i;
00146     }
00147     //
00148     // Fall through
00149     //
00150     G4cout << " Random number out of range in SmpSpNuDistData " << G4endl;
00151     return -1;
00152 
00153   } else {
00154 // There is no full multiplicity distribution data available
00155 // for that isotope, let's try to find a nubar for it in
00156 // N. Ensslin, et.al., "Application Guide to Neutron
00157 // Multiplicity Counting," LA-13422-M (November 1998)
00158 // and use Terrell's approximation
00159     nubar = G4SmpSpNubarData(isotope);
00160     if (nubar != -1.) {
00161       return (G4int) G4SmpTerrell(nubar);
00162     } else {
00163 // There is no nubar information for that isotope, return -1,
00164 // meaning no data available for that isotope
00165       return -1;
00166     }
00167   }
00168 }

Generated on Mon May 27 17:49:51 2013 for Geant4 by  doxygen 1.4.7