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: 1736 $ 00029 * $Date:$ 00030 * $Author:$ 00031 * $Id:$ 00032 * 00033 * ******** fete: From ENDF To ENDL ********* 00034 */ 00035 00036 //Header for the classes used in charged-particle scattering 00037 00038 #ifndef CHARGE_CLASSES 00039 #define CHARGE_CLASSES 00040 00041 #include <complex> 00042 00043 #include "distrib_base.hpp" 00044 #include "list_2d.hpp" 00045 #include "ENDF_file.hpp" 00046 00047 using namespace std; 00048 00049 // -------------------- class one_d_charge --------------- 00050 //! Used for the angular distribution for charged particles at one incident energy. 00051 //! Depending on the value of LTP, the data may be different types of parameters. 00052 class one_d_charge : public distrib_base 00053 { 00054 private: 00055 double spin_; 00056 int spin_factor; // (-1)^{2*spin} 00057 double k_sq; // See equation (6.9) 00058 double eta; // See equation (6.10) 00059 bool same_; // are the target and incident particles identical? 00060 00061 //! For LTP_model > 2 the data is a table of deviations from Rutherford 00062 one_d_table deviation; 00063 00064 //! Evaluates the Coulomb effects for identical particles 00065 double coulomb_same( double mu ); 00066 00067 //! Evaluates the electron interference effects for identical particles 00068 double interfere_same( double mu ); 00069 00070 //! Evaluates the nuclear reaction effects for identical particles 00071 double nuclear_same( double mu ); 00072 00073 //! Evaluates the Coulomb effects for different particles 00074 double coulomb_diff( double mu ); 00075 00076 //! Evaluates the electron interference effects for different particles 00077 double interfere_diff( double mu ); 00078 00079 //! Evaluates the nuclear reaction effects for different particles 00080 double nuclear_diff( double mu ); 00081 00082 public: 00083 //! The LTP identifier 00084 int LTP_model; 00085 00086 // order of the Legendre expansions 00087 int order; 00088 00089 // Legendre coefficients 00090 vector< complex< double > > a_coef; 00091 vector< double > b_coef; 00092 00093 //! Sets up the parameters 00094 void initiate( mf6_file& inFile, double e_in, double spin ); 00095 00096 //! Evaluates the probability density 00097 double f( double mu ); 00098 00099 //! reads the ENDF data 00100 void read_data( mf6_file& inFile ); 00101 00102 //! reads tabular (mu, probability) data 00103 void read_table( mf6_file& inFile, double e_in, int num_data ); 00104 00105 //! Expands a one_d_charge model into a linked list 00106 void expand( ); 00107 00108 //! Expands an LTP-12 model into a linked list 00109 void expand_12( double scale ); 00110 00111 }; 00112 00113 // ----------- class two_d_charge ----------------- 00114 // derive this class from two_d_list 00115 //! Class to handle charged-particle scattering data for identical particles 00116 class two_d_charge : public two_d_list< one_d_charge > 00117 { 00118 private: 00119 //! We may need the cross section data 00120 one_d_table xs; 00121 00122 bool xs_read; 00123 00124 //! Reads the "cross section" data 00125 void read_xs( ); 00126 00127 //! Calculates the cross section 00128 void get_xs( ); 00129 00130 public: 00131 //! Reads in all the data and expands into linearly interpolable pointwise data 00132 void master( mf6_file& inFile ); 00133 00134 //! Reads in data for one incident energy and expands. 00135 //! Sets *done true if the incident energy is at or above the maximum 00136 void one_E_in( mf6_file& inFile, double spin, bool *done ); 00137 00138 }; 00139 00140 #endif