G4SmpGEng.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: G4SmpGEng.cc 69860 2013-05-16 14:39:02Z gcosmo $
00057 //
00058 
00059 #include <cmath>
00060 #include "G4fissionEvent.hh"
00061 
00062 G4double G4fissionEvent::G4SmpGEng() {
00063 
00064 /*
00065   Description
00066     Sample energy spectrum for photons emitted by fission-induced reactions. 
00067     The energy spectrum of the prompt fission gamma rays is obtained from
00068     Maienschein's measurements.
00069 */
00070 
00071 /*
00072   Input
00073   Return
00074     energy of photon emitted by neutron-induced fission
00075 */
00076 
00077    G4double r;
00078 /*
00079   Calculate the energy of photons emitted from fission
00080 */
00081    r=fisslibrng();
00082 
00083    if (r == 0.0) return 0.085;
00084 
00085    if (r <= 0.0001) return 0.0855+0.01692*(r/0.0001)-0.02401*std::pow(r/0.0001,2.)+0.01274*std::pow(r/0.0001,3.);
00086 
00087    if (r > 0.0001 && r <= 0.01) return 0.09141 +  0.23846*((r-0.0001)/0.0099) 
00088                                                -  1.75947*std::pow((r-.0001)/0.0099,2.)
00089                                                + 10.98611*std::pow((r-0.0001)/0.0099,3.)
00090                                                - 43.19181*std::pow((r-.0001)/0.0099,4.)
00091                                                +105.70005*std::pow((r-.0001)/.0099,5.)
00092                                                -160.72894*std::pow((r-.0001)/.0099,6.)
00093                                                +147.43399*std::pow((r-.0001)/.0099,7.)
00094                                                - 74.60043*std::pow((r-.0001)/0.0099,8.)
00095                                                + 15.97547*std::pow((r-.0001)/0.0099,9.);
00096 
00097    if (r > 0.01 && r <= 0.1537) return 0.14486 + 0.40914*((r-.01)/.1437)
00098                                                - 1.28150*std::pow((r-0.01)/0.1437,2.)
00099                                                + 5.07377*std::pow((r-0.01)/0.1437,3.)
00100                                                -15.42031*std::pow((r-0.01)/0.1437,4.)
00101                                                +31.96346*std::pow((r-0.01)/0.1437,5.)
00102                                                -43.12605*std::pow((r-0.01)/0.1437,6.)
00103                                                +36.02908*std::pow((r-0.01)/0.1437,7.)
00104                                                -16.87185*std::pow((r-0.01)/0.1437,8.)
00105                                                + 3.37941*std::pow((r-0.01)/0.1437,9.);
00106 
00107    if (r > 0.1537 && r <= 0.7114) return (-1./2.3)*std::log(0.71956*(0.1537-r)+0.50158);
00108 
00109    if (r > 0.7114 && r <= 1.0) return (-1./1.1)*std::log(1.15292*(0.7114-r)+0.33287);
00110    //
00111    // Fall through 
00112    //
00113    G4cout << " Random number out of range in SmpGEng " << G4endl;
00114    return -1.0;
00115 }

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