00001 /* 00002 * ******** fete: From ENDF To ENDL ********* 00003 * 00004 * Copyright (c) 2006, The Regents of the University of California. 00005 * All rights reserved. 00006 * 00007 * Produced at the Lawrence Livermore National Laboratory. 00008 * Written by David A. Brown, Gerry Hedstrom, Tony Hill 00009 * 00010 * This file is part of fete v1.0 (UCRL-CODE-218718) 00011 * 00012 * Please read the COPYING file for "Our Notice and GNU General 00013 * Public License" in the root of this software distribution. 00014 * 00015 * This program is free software; you can redistribute it and/or modify 00016 * it under the terms of the GNU General Public License (as published by 00017 * the Free Software Foundation) version 2, dated June 1991. 00018 * 00019 * This program is distributed in the hope that it will be useful, 00020 * but WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF 00021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms 00022 * and conditions of the GNU General Public License for more details. 00023 * 00024 * You should have received a copy of the GNU General Public License along 00025 * with this program; if not, write to the Free Software Foundation, Inc., 00026 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00027 * 00028 * $Revision: 1735 $ 00029 * $Date: 2006-02-09 13:47:26 -0800 (Thu, 09 Feb 2006) $ 00030 * $Author: dbrown $ 00031 * $Id: kalbach.hpp 1735 2006-02-09 21:47:26Z dbrown $ 00032 * 00033 * ******** fete: From ENDF To ENDL ********* 00034 */ 00035 00036 // header for the class three_d_Kalbach 00037 00038 #ifndef THREE_D_KALBACH 00039 #define THREE_D_KALBACH 00040 00041 #include "mf6classes.hpp" 00042 #include "math_util.hpp" 00043 00044 // ----------- class Kalbach_triple ----------------- 00045 //! a single set of Kalbach data 00046 class Kalbach_triple 00047 { 00048 public: 00049 double E_out; 00050 double Prob_E_out; 00051 double compound_frac; 00052 00053 //! Default constructor 00054 Kalbach_triple() {} 00055 00056 //! Default destructor 00057 ~Kalbach_triple() {} 00058 }; 00059 00060 // ----------- class Kalbach_data ----------------- 00061 //! Class to read and hold the Kalbach data 00062 class Kalbach_data : public list< Kalbach_triple > 00063 { 00064 public: 00065 double E_in; 00066 00067 //! Default constructor 00068 Kalbach_data() {} 00069 00070 //! Default destructor 00071 ~Kalbach_data() {} 00072 00073 //! Reads in the data for one incident energy 00074 void read_data( mf6_file& inFile, int num_E_out ); 00075 00076 //! Finds E_out in the data list 00077 Kalbach_data::iterator find_data(double E_out); 00078 }; 00079 00080 // ------------------- Get_a routine ------------------ 00081 //! Evaluate the Kalbach a function for the slope value 00082 double Get_a( double E_out, Param& params ); 00083 00084 // ----------- class one_d_Kalbach ----------------- 00085 //! Class for pairs (E', probability) for one E and mu 00086 class one_d_Kalbach : public mf6_one_d 00087 { 00088 private: 00089 // point to the Kalbach data for this incident energy 00090 list< Kalbach_data >::iterator data_ptr__; 00091 00092 // Kalbach parameters (E', f0, r) 00093 Kalbach_data::iterator E_f0_r_ptr; 00094 00095 Param *params__; // 5 parameters for the quadrature routine 00096 00097 public: 00098 //! Default constructor 00099 one_d_Kalbach( ) 00100 { 00101 } 00102 00103 //! We need a special one_E_row to handle the histograms 00104 void one_E_row( double min_E, double max_E ); 00105 00106 //! for E_cm increasing with E_lab 00107 void cm_E_incr( double min_E, double max_E ); 00108 00109 //! for E_cm decreeasing with increasing E_lab 00110 void cm_E_decr( double min_E, double max_E ); 00111 00112 //! Copy the parameters 00113 void copy_params( Param *params ); 00114 00115 //! Copy the pointer to the data 00116 void copy_data( list< Kalbach_data >::iterator data_ptr ); 00117 00118 //! Evaluate the Kalbach a function for the slope value 00119 double get_a( double E_out ); 00120 00121 //! The Kalbach distribution function 00122 double f( double E ); 00123 }; 00124 00125 // ----------- class two_d_Kalbach ----------------- 00126 //! Class for one incident energy for the ENDF three dimension Kalbach data 00127 class two_d_Kalbach : public three_d_link< one_d_Kalbach > 00128 { 00129 private: 00130 list< Kalbach_data >::iterator data_ptr_; // point to the current data 00131 00132 Param *params_; // 5 parameters for the quadrature routine 00133 00134 public: 00135 00136 // ********* implement virtual functions ******************* 00137 //! Append a new one_d_phase and set its parameters 00138 two_d_Kalbach::iterator new_one_d( two_d_Kalbach::iterator where ); 00139 // ********** end of virtual functions ********************* 00140 00141 //! Set the parameters 00142 void set_params( list< Kalbach_data >::iterator data_ptr, 00143 Param *params ); 00144 00145 }; 00146 00147 // ----------- class three_d_Kalbach ----------------- 00148 //! Class to handle the ENDF three dimension Kalbach data 00149 class three_d_Kalbach : public three_d_list< two_d_Kalbach > 00150 { 00151 private: 00152 double S_a; // Kalbach S_a value for this reaction 00153 double M_a; // Kalbach M value for the incident particle 00154 double m_b; // Kalbach m value for the ejected particle 00155 int this_mult_; // multiplicity of particle (if constant) 00156 Param Params; // 5 parameters for the quadrature routine 00157 00158 list<Kalbach_data> triples; // the lists of ENDF/B-VI data 00159 00160 list<Kalbach_data>::iterator Data_ptr; // point to the current data 00161 00162 //! Evaluates the Kalbach S function for the separation energy 00163 double get_S(Nuclei& targ_A, Nuclei& proj_a); 00164 00165 //! Evaluate the Kalbach a function for the slope value 00166 double get_a(double E_out); 00167 00168 //! Expands the double differential data for single incident energy 00169 void expand_E_in( three_d_Kalbach::iterator e_in_link ); 00170 00171 //! Reads in all of the ENDF/B-VI data from an intermediate file 00172 void read_data( mf6_file& inFile, int num_E_in ); 00173 00174 //! Expands the data for one incident energy 00175 void one_e_in( ); 00176 00177 public: 00178 three_d_Kalbach( int targ_ZA, int proj_ZA, int eject_ZA, int this_mult ); 00179 ~three_d_Kalbach() {} 00180 00181 //! Reads the data from an intermediate file and expands it to a list 00182 void expand_data(int num_E_in, mf6_file& inFile); 00183 00184 void renorm(void); 00185 00186 //! Calculates the average energy of the outgoing particle 00187 void check_i10( ); 00188 }; 00189 00190 // ------------------- av_energy routine ------------------ 00191 //! Integrand for the average energy integral 00192 double av_energy( double E_b, Param& params ); 00193 00194 #endif