G4SmpNuDistDataU238.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: G4SmpNuDistDataU238.cc 69860 2013-05-16 14:39:02Z gcosmo $
00057 //
00058 
00059 #include <cmath>
00060 #include "G4fissionEvent.hh"
00061 
00062 G4int G4fissionEvent::G4SmpNuDistDataU238(G4double erg) {
00063 
00064 /*
00065   Description
00066     Sample Number of Neutrons from fission in U-238 using 
00067       Zucker and Holden's tabulated data for U-238
00068 */
00069 
00070 /*
00071   Input
00072     erg      - incident neutron energy
00073   Output
00074     G4SmpNuDistDataU238  - sampled multiplicity
00075     
00076 */
00077  
00078   G4double cpnu;
00079   G4double pnu[] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
00080   G4double eng;
00081   G4double r;
00082 
00083 /* 
00084   Check if energy is within the range of experimental values
00085 */
00086   if (erg > 10) eng=10.;
00087   else eng=erg;
00088 
00089   r=fisslibrng();
00090 /*
00091   U-238 nu distribution
00092 */
00093   if (eng <= 5.0) pnu[0]=0.0396484e0-1.14202e-2*eng+1.94627e-3*std::pow(eng,2)-2.95412e-4*std::pow(eng,3)+2.98333e-5*std::pow(eng,4)-1.31417e-6*std::pow(eng,5);
00094   if (eng > 5 && eng <= 10) pnu[0]=0.0360013e0-8.06662e-3*eng+6.59461e-4*std::pow(eng,2)-3.54123e-5*std::pow(eng,3)+2.03749e-6*std::pow(eng,4)-5.91663e-8*std::pow(eng,5);
00095   if (r <= pnu[0]) return 0;
00096 
00097   if (eng <= 5.0) pnu[1]=0.252954e0-5.17151e-2*eng+2.84558e-3*std::pow(eng,2)+2.93563e-4*std::pow(eng,3)-5.99833e-5*std::pow(eng,4)+3.34417e-6*std::pow(eng,5);
00098   if (eng > 5 && eng <= 10) pnu[1]=0.259093e0-5.7936e-2*eng+5.50734e-3*std::pow(eng,2)-3.09607e-4*std::pow(eng,3)+1.20957e-5*std::pow(eng,4)-2.49997e-7*std::pow(eng,5);
00099   cpnu=pnu[0]+pnu[1];
00100   if (r <= cpnu) return 1;
00101 
00102   pnu[2]=0.29395353e0+0.01098908e0*eng-0.00565976e0*std::pow(eng,2)+3.14515399e-4*std::pow(eng,3)-5.66793415e-6*std::pow(eng,4)+1.54070513e-7*std::pow(eng,5);
00103   cpnu=cpnu+pnu[2];
00104   if (r <= cpnu) return 2;
00105 
00106   if (eng <= 5.0) pnu[3]=0.264447e0+3.02825e-2*eng-3.12762e-3*std::pow(eng,2)-1.5875e-4*std::pow(eng,3)+4.91667e-5*std::pow(eng,4)-3.38667e-6*std::pow(eng,5);
00107   if (eng > 5 && eng <= 10) pnu[3]=0.262024e0+3.37134e-2*eng-5.01711e-3*std::pow(eng,2)+3.58761e-4*std::pow(eng,3)-2.17959e-5*std::pow(eng,4)+5.10834e-7*std::pow(eng,5);
00108   cpnu=cpnu+pnu[3];
00109   if (r <= cpnu) return 3;
00110 
00111   if (eng <= 5) pnu[4]=0.111176e0+1.66321e-2*eng+2.56307e-3*std::pow(eng,2)-2.17754e-4*std::pow(eng,3)-5.96667e-6*std::pow(eng,4)+7.44167e-7*std::pow(eng,5);
00112   if (eng > 5 && eng <= 10) pnu[4]=0.107859e0+1.88862e-2*eng+2.07521e-3*std::pow(eng,2)-2.08099e-4*std::pow(eng,3)+3.23745e-6*std::pow(eng,4)-1.24999e-7*std::pow(eng,5);
00113   cpnu=cpnu+pnu[4];
00114   if (r <= cpnu) return 4;
00115 
00116   if (eng <= 5.0) pnu[5]=0.0312261e0+4.12932e-3*eng+9.18413e-4*std::pow(eng,2)+4.36542e-5*std::pow(eng,3)-5.9125e-6*std::pow(eng,4)+3.20833e-7*std::pow(eng,5);
00117   if (eng > 5 && eng <= 10) pnu[5]=0.0324008e0+3.04772e-3*eng+1.3327e-3*std::pow(eng,2)-3.96916e-5*std::pow(eng,3)+2.94583e-6*std::pow(eng,4)-7.66666e-8*std::pow(eng,5);
00118   cpnu=cpnu+pnu[5];
00119   if (r <= cpnu) return 5;
00120 
00121   if (eng <= 5.0) pnu[6]=5.9347e-3+9.80023e-4*eng+4.24667e-4*std::pow(eng,2)+3.04458e-5*std::pow(eng,3)-6.46667e-6*std::pow(eng,4)+4.30833e-7*std::pow(eng,5);
00122   if (eng > 5 && eng <= 10) pnu[6]=6.5421e-3+3.07834e-4*eng+7.39454e-4*std::pow(eng,2)-4.70459e-5*std::pow(eng,3)+3.44583e-6*std::pow(eng,4)-8.91667e-8*std::pow(eng,5);
00123   cpnu=cpnu+pnu[6];
00124   if (r <= cpnu) return 6;
00125 
00126   if (eng <= 5.0) pnu[7]=5.436e-4+1.3756e-4*eng-5.0e-7*std::pow(eng,2)+1.35917e-5*std::pow(eng,3)+5.0e-7*std::pow(eng,4)-5.16667e-8*std::pow(eng,5);
00127   if (eng > 5 && eng <= 10) pnu[7]=9.212e-4-1.57585e-4*eng+8.41126e-5*std::pow(eng,2)+4.14166e-6*std::pow(eng,3)+5.37501e-7*std::pow(eng,4)-6.66668e-9*std::pow(eng,5);
00128   cpnu=cpnu+pnu[7];
00129   if (r <= cpnu) return 7;
00130   else return 8;
00131 }

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