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: 1887 $ 00029 * $Date: 2006-08-23 11:34:44 -0700 (Wed, 23 Aug 2006) $ 00030 * $Author: dbrown $ 00031 * $Id: mf12classes.hpp 1887 2006-08-23 18:34:44Z dbrown $ 00032 * 00033 * ******** fete: From ENDF To ENDL ********* 00034 */ 00035 00036 // header for the MF=12 translation code 00037 00038 #ifndef MF12CLASSES 00039 #define MF12CLASSES 00040 00041 #include "list_1d.hpp" 00042 #include "list_2d.hpp" 00043 #include "ENDF_file.hpp" 00044 #include "mf15classes.hpp" 00045 #include "multiplicity.hpp" 00046 00047 using namespace std; 00048 00049 // ----------- class MF12_raw ----------------- 00050 //! This class just holds raw ENDF data for gamma multiplicity files 00051 // (LO = 1). That is, the tag for each 1-d list is the gamma energy, 00052 // and each 1-d list consists of pairs (neutron energy, multiplicity), 00053 // The MF12_list class uses one of these lists for energy-independent 00054 // gammas and one for energy-dependent gammas. 00055 class MF12_raw : public two_d_list< multiplicity > 00056 { 00057 public: 00058 mf12_file *inFile; 00059 00060 // object for the total multiplicity 00061 multiplicity multiple; 00062 00063 //! default constructor 00064 MF12_raw(): inFile(NULL), multiple(){} 00065 00066 //! Read the data for one gamma 00067 void one_line( double EG, int NR, int NP ); 00068 00069 //! Makes sure that if any gamma energy has a ( E_in, multiplicity ) pair for some E_in, then all of the lists contain this E_in. 00070 void fill_raw_lists( ); 00071 00072 //! Makes sure that the ( E_in, multiplicity ) pairs in the ENDF raw list have E_in values matching the E_in tags in cont_data. 00073 void fill_raw_lists( MF15_list& cont_data ); 00074 00075 //! Inserts neutron energies at which moving gammas coincide with stationary ones 00076 void insert_cross( list< double >& crossings ); 00077 00078 //! ENDF/B-VI sometimes has duplicate gamma lines from different cascades. We combine them. 00079 void duplicate_E( ); 00080 }; 00081 00082 // ----------- class MF12_base ----------------- 00083 //! This is the base class for the MF12_list class 00084 class MF12_base : public two_d_table 00085 { 00086 public: 00087 mf12_file *inFile; 00088 double AWR; // the atomic weight 00089 00090 // multiplicity multiple; 00091 multiplicity multiple; 00092 00093 //! default constructor 00094 MF12_base(): inFile(NULL), AWR(0.0), multiple(){} 00095 00096 //! Handles the total gamma multiplicity 00097 void read_mult( multiplicity& multiple ); 00098 00099 //! Find the 1-d list with incident energy E_in 00100 MF12_base::iterator find_link( double E_in, double EG ); 00101 00102 //! Shift the gamma energies according to the atomic weight 00103 void shift_gammas( ); 00104 00105 //! Set the weights for the discrete spectra 00106 void set_weights( multiplicity& multiple ); 00107 00108 // set the weights of the lines and save their multiplicities 00109 void weight_mult( multiplicity& multiple, multiplicity& move_mult ); 00110 00111 //! initialize the ENDL list from raw_list 00112 void init_list( MF12_raw& raw_list ); 00113 00114 //! Widen all of the delta-functions; if clean_up is true, delete 1-d lists with zero norm 00115 void widen_deltas( bool clean_up ); 00116 00117 //! If two adjacent lines have the same frequency, this routine adds their intensities. 00118 void join_lines( ); 00119 00120 }; 00121 00122 // ----------- class MF12_list ----------------- 00123 //! This class is for gamma multiplicity files (LO = 1) 00124 class MF12_list : public MF12_base 00125 { 00126 public: 00127 mf15_file contin_file; // continuum energy distributions 00128 00129 int mf12_NK; // total number of mf12 gammas, including continuum 00130 bool with_mf15; // is there an mf15 continuum data file? 00131 bool with_move; // are there gammas dependent on the neutron energy? 00132 bool with_static; // are there gammas independent of the neutron energy? 00133 00134 // continuum represented as energy-dependent lines in mf12 format 00135 MF12_raw raw_move; 00136 00137 // continuum represented as energy-dependent lines in ENDL format 00138 MF12_base movers; 00139 00140 // the energy-independent mf12 gamma data 00141 MF12_raw raw_static; 00142 00143 // the energy-independent gammas in ENDL format 00144 MF12_base statics; 00145 00146 // the continuum data 00147 MF15_list cont_data; 00148 00149 //! default constructor 00150 MF12_list(): contin_file(), mf12_NK(0), with_mf15(false), with_move(false), 00151 with_static(false), raw_move(), movers(), raw_static(), statics(), cont_data(){} 00152 00153 //! Handles an mf12 multiplicity file 00154 void master( double awr, int NK, mf12_file *InFile ); 00155 00156 //! This routine is used to read in probabilities of gammas 00157 void read_data( ); 00158 00159 //! Makes sure that the multiplicity is 0 if there is no distribution 00160 void clean_multiple( MF12_base& statics ); 00161 00162 //! Writes only the continuum data 00163 void write_continuum( ); 00164 00165 //! Writes discrete gamma multiplicities 00166 void write_statics( ); 00167 00168 //! Writes the one static line 00169 void write_static( ); 00170 00171 //! Writes the one moving line 00172 void write_mover( ); 00173 00174 //! Writes the sum of mf15 continuum plus static lines 00175 void plus_contin( ); 00176 00177 //! Joins the moving lines with static ones 00178 void join_move_static( ); 00179 00180 //! Writes the sum of mf15 continuum plus moving lines 00181 void move_w_contin( ); 00182 00183 //! Writes the sum of static plus moving lines 00184 void do_movers( ); 00185 00186 //! Write the static lines 00187 void just_statics( ); 00188 00189 //! Finds the neutron energies at which an energy-dependent gamma coincides with a stationary gamma 00190 void find_crossings( ); 00191 00192 //! Reorders the mf12_data as ENDL_data 00193 void ENDL_order( MF12_raw& mf12_data, MF12_base& ENDL_data ); 00194 00195 //! Sets the weights for the continuum 00196 void set_mf15_wt( ); 00197 00198 //! Handles multiplicity and energy distributions for the continuum 00199 void continuum( int NR, int NP ); 00200 00201 }; 00202 00203 00204 // ----------- class MF12_deexcite ----------------- 00205 //! This class is for nuclear transition probabilities (LO = 2) 00206 // and its pricipal use is for gammas from (n, n' gamma) reactions. 00207 class MF12_deexcite : public two_d_table 00208 { 00209 public: 00210 // Holds the energy level for this level 00211 double ES; 00212 00213 list< dd_list > EP_pairs; 00214 00215 //!default constructor 00216 MF12_deexcite(): ES(0.0), EP_pairs(0){} 00217 00218 void print() 00219 { 00220 cout<<"Energy of this level is "<<ES<<endl; 00221 for(two_d_iterator list_ptr = begin(); 00222 list_ptr != end(); ++list_ptr) 00223 { 00224 list_ptr->print(); 00225 } 00226 cout << endl; 00227 } 00228 00229 00230 // Handles an mf12 transition probability file 00231 void master( double AWR, int LG, mf12_file& inFile ); 00232 00233 // This routine is used to read in transition probabilities 00234 void read_data( double AWR, int LG, 00235 mf12_file& inFile ); 00236 00237 //Sticks the cascade data into the MF12-deexcite object 00238 void stick_it( MF12_deexcite::iterator e_in_link ); 00239 00240 }; 00241 00242 // ----------- class cascade ----------------- 00243 class cascade: public dd_list 00244 { 00245 public: 00246 double Level_Energy; // Energy of a level above ground state 00247 00248 //!default constructor 00249 cascade(): Level_Energy(0.0){} 00250 00251 // Print utility 00252 void print(); 00253 00254 // Writes the multiplicity file 00255 void write_endl(); 00256 00257 }; 00258 00259 #endif