Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

ENDF_file.cpp

Go to the documentation of this file.
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: 1842 $
00029  * $Date: 2006-04-18 15:34:13 -0700 (Tue, 18 Apr 2006) $
00030  * $Author: hedstrom $
00031  * $Id: ENDF_file.cpp 1842 2006-04-18 22:34:13Z hedstrom $
00032  * 
00033  * ******** fete: From ENDF To ENDL *********
00034  */
00035 
00036 #include "ENDF_file.hpp"
00037 #include "record_types.hpp"
00038 
00039 // the length of an ENDF line
00040 const int Line_len = 80;
00041 
00042 // ------------------- skip ---------------
00043 void ENDF_file::skip(int N)
00044 // Skip the next N entries in the file
00045 {
00046   char linje[Line_len];
00047   string linebuff;
00048   string strbuff;
00049   double dummy;
00050 
00051   for( int iN=0; iN < N; iN++ ) //Loop over N numbers
00052   {
00053     int iC=iN % 6;  //There are 6 items per line
00054     if ( iC == 0 )
00055     {
00056       getline( linje, Line_len-1 ); //read in new line
00057       linebuff = linje;
00058     }
00059     strbuff = linebuff.substr(iC*11, 11); //Grab the right entry
00060     read_d(&strbuff, &dummy );
00061   }
00062 }
00063 // ------------------- mfx_line1 ---------------
00064 void ENDF_file::mfx_line1(int *ZA, double *AWR, int *I1, int *I2,
00065   int *I3, int *I4)
00066 // read the first header line for an mf? file
00067 {
00068   char linje[Line_len];
00069 
00070   getline(linje, Line_len-1 ); //read first line
00071   string linebuff(linje); // the input string
00072 
00073   read_idiiii(&linebuff, 
00074           ZA,              // target Z & A 
00075           AWR,             // target mass
00076               I1, I2, I3, I4); // depends on the mf number
00077 }
00078 // ------------------- mfx_line2 ---------------
00079 void ENDF_file::mfx_line2(double *D1, double *D2, int *I1, int *I2,
00080   int *I3, int *I4)
00081 // read the second header line for an mf? file
00082 {
00083   char linje[Line_len];
00084 
00085   getline(linje, Line_len-1 ); //read first line
00086   string linebuff(linje); // the input string
00087 
00088   read_ddiiii(&linebuff,
00089           D1, D2,            // depends on the mf number
00090               I1, I2, I3, I4);   // depends on the mf number
00091 }
00092 // ------------------- get_regions ---------------
00093 void ENDF_file::get_regions(int NR, vector<int>& NBT, vector<int>& INT)
00094 // read the interpolation information
00095 {
00096   char linje[Line_len];
00097 
00098   string linebuff; // the input string
00099   string strbuff; // the current data
00100 
00101   int NBT_value, INT_value;
00102 
00103   // read the data
00104   for ( int iNR = 0; iNR < NR; iNR++ ) //Loop over NR NBT,INT pairs
00105   {
00106     int iR = iNR % 3;  //There are 3 pairs per line
00107     if ( iR == 0 )
00108     {
00109       getline(linje, Line_len-1); //read the line
00110       linebuff = linje;
00111     }
00112     strbuff = linebuff.substr(iR*22, 22); //Grab the right pair
00113     read_ii( &strbuff, &NBT_value, &INT_value );
00114     NBT.push_back( NBT_value );
00115     INT.push_back( INT_value );
00116   }
00117 }
00118 
00119 // ------------------- mf1_file::read_line1 ---------------
00120 void mf1_file::read_line1(int *ZA, double *AWR, int *LNU)
00121 // read the first header line for an mf1 file
00122 {
00123   int iDum;
00124 
00125   mfx_line1(ZA,             // target Z & A 
00126         AWR,            // target mass
00127         &iDum,
00128             LNU,            // flag for spontaneous fission
00129         &iDum, &iDum);  // zeros
00130 }
00131 // ------------------- mf1_file::delay_head ---------------
00132 void mf1_file::delay_head(int *NC)
00133 // read the header line for time constants in an mf1 file
00134 {
00135   int iDum;
00136   double zero;
00137 
00138   mfx_line2(&zero,
00139             &zero,
00140             &iDum, &iDum,   // zero
00141             NC,             // number of INT regions 
00142             &iDum);         // zero
00143 }
00144 // ------------------- mf1_file::mult_head ---------------
00145 void mf1_file::mult_head(int *NR, int *NP)
00146 // read the header line for multiplicities in an mf1 file
00147 {
00148   int iDum;
00149   double zero;
00150 
00151   mfx_line2(&zero,
00152             &zero,
00153             &iDum, &iDum,   // not used
00154             NR,             // number of INT regions 
00155             NP);            // number of data points
00156 }
00157 // ------------------- mf3_file::read_line1 ---------------
00158 void mf3_file::read_line1(int *ZA, double *AWR)
00159 // read the first header line for an mf3 file
00160 {
00161   int iDum;
00162 
00163   mfx_line1(ZA,             // target Z & A 
00164         AWR,            // target mass
00165         &iDum, &iDum,       // zeros
00166         &iDum, &iDum);      // zeros
00167 }
00168 // ------------------- mf3_file::read_line2 ---------------
00169 void mf3_file::read_line2(double *QM, double *QI, int *LR, int *NR, int *NP)
00170 // read the second header line for an mf3 file
00171 {
00172   int iDum;
00173 
00174   mfx_line2(QM,             // mass difference Q value
00175             QI,             // reaction Q value for the lowest state
00176             &iDum,          // zero
00177             LR,             // complex or "breakup" flag
00178             NR,             // number of INT regions 
00179             NP);            // number of data points
00180 }
00181 // ------------------- mf4_file::read_line1 ---------------
00182 void mf4_file::read_line1(int *ZA, double *AWR, int *LVT, int *LTT)
00183 // read the first header line for an mf4 file
00184 {
00185   int iDum;
00186 
00187   mfx_line1(ZA,             // target Z & A 
00188         AWR,            // target mass
00189         LVT,            // tranfsformation matrix flag
00190         LTT,            // representation flag
00191         &iDum, &iDum);  // zeros
00192 }
00193 // ------------------- mf4_file::read_line2 ---------------
00194 void mf4_file::read_line2(int *LI, int *LCT, int *NK, int *NM)
00195 // read the second header line for an mf4 file
00196 {
00197   double ZERO;
00198   double AWR;
00199 
00200   mfx_line2(&ZERO,
00201             &AWR,           // target mass
00202             LI,             // flag: isotropic or not
00203             LCT,            // 1 -> lab frame, 2 -> CM system
00204             NK,             // number of elements in transformation matrix 
00205             NM );           // max order of Legendre (should be even)
00206 }
00207 // ------------------- mf4_file::read_line3 ---------------
00208 void mf4_file::read_line3(int *NR, int *NE)
00209 // read the third header line for an mf4 file
00210 {
00211   double ZERO;
00212   int iDum;
00213 
00214   mfx_line2(&ZERO,            // zero
00215         &ZERO,            // zero
00216         &iDum,            // zero
00217         &iDum,            // zero
00218         NR,               // number of interpolation regions
00219         NE );             // number of incident energy points
00220 }
00221 // ------------------- mf5_file::read_line1 ---------------
00222 void mf5_file::read_line1(int *ZA, double *AWR, int *NK)
00223 // read the first header line for an mf5 file
00224 {
00225   int iDum;
00226 
00227   mfx_line1(ZA,             // target Z & A 
00228         AWR,            // target mass
00229         &iDum, &iDum,   // zeros
00230             NK,             // the number of partial regions
00231             &iDum);         // zero
00232 }
00233 // ------------------- mf5_file::read_line2 ---------------
00234 void mf5_file::read_line2(double *U, int *LF, int *NR, int *NP)
00235 // read the second header line for an mf5 file
00236 {
00237   double ZERO;
00238   int iZERO;
00239 
00240   mfx_line2(U,               // upper energy limit of secondary
00241             &ZERO,           // zero
00242             &iZERO,          // zero
00243             LF,              // Energy law flag
00244             NR,              // number of interpolation regions
00245             NP );            // number of incident energy points
00246 }
00247 // ------------------- mf5_file::read_Madland ---------------
00248 void mf5_file::read_Madland(double *EFL, double *EFH, int *NR, int *NE)
00249 // read a Madland-Nix header line
00250 {
00251   int iZERO;
00252 
00253   mfx_line2(EFL,             // average energy of light fission fragment
00254             EFH,             // average energy of heavy fission fragment
00255             &iZERO,          // zero
00256             &iZERO,          // Energy law flag
00257             NR,              // number of interpolation regions
00258             NE );            // number of incident energy points
00259 }
00260 // ------------------- mf6_file::read_line1 ---------------
00261 void mf6_file::read_line1(int *ZA, double *AWR, int *LCT, int *NK)
00262 // read the first header line for an mf6 file
00263 {
00264   int iDum;
00265 
00266   mfx_line1(ZA,             // target Z & A 
00267         AWR,            // target mass
00268         &iDum,          // zero
00269             LCT,            // data reference frame
00270             NK,             // the number of subsections
00271             &iDum);         // zero
00272 }
00273 // ------------------- mf6_file::particle_line1 ---------------
00274 void mf6_file::particle_line1(int *ZAP, double *AWP, int *LIP,
00275   int *LAW, int *NR, int *NP)
00276 // read the header line for a particle in an mf6 file
00277 {
00278   mfx_line1(ZAP,  // product Z & A
00279         AWP,             // product mass
00280         LIP,             // residual isomeric state
00281         LAW,             // kinetics model
00282         NR,              // number of interpolation regions
00283         NP);             // number of multiplicity points
00284 }
00285 // ------------------- mf6_file::mf6_get_model ---------------
00286 void mf6_file::get_model(int *LANG, int *LEP, int *NR, int *NE)
00287 // get the model for a particle in an mf6 file
00288 {
00289   double ZERO;
00290 
00291   mfx_line2(&ZERO, &ZERO, // 2 zeros
00292         LANG,        // the model
00293         LEP,         // interpolation for E_out
00294         NR,          // number of regions
00295         NE);         // number of incident energies
00296 }
00297 // ------------------- mf6_file::gamma_ein ---------------
00298 void mf6_file::gamma_ein( double *e_in, int *ND, int *NEP )
00299 // get the pertinant information for an mf6 gamma file
00300 {
00301   double ZERO;
00302   int dummy;
00303   int NA;
00304 
00305   mfx_line2( &ZERO,      // zero
00306              e_in,       // energy of incident neutron
00307          ND,         // number of discrete lines
00308          &NA,        // 0
00309          &dummy,     // number of regions
00310          NEP );      // number of outgoing energies
00311   if( NA != 0 )
00312   {
00313     Unimplemented("mf6_file::gamma_ein","Implement anisotropic gammas.");
00314   }
00315 }
00316 // ------------------- mf6_file::phase_space ---------------
00317 void mf6_file::phase_space( double *APSX, int *NPSX )
00318 // get the total mass and number of particles for a phase-space file
00319 {
00320   double Zero;
00321   int zero;
00322   mfx_line2(APSX,        // total mass
00323         &Zero,       // zero
00324         &zero, &zero, &zero, // 3 zeros
00325         NPSX);       // number of particles
00326 }
00327 // ------------------- mf6_file::mf4_line1 ---------------
00328 void mf6_file::mf4_line1(int *NR, int *NE)
00329 // get the number of incident energies for a gen_mf4 file
00330 {
00331   double ZERO;
00332   int zero;
00333 
00334   mfx_line2(&ZERO, &ZERO, // 2 zeros
00335         &zero, &zero, // more zeros
00336         NR,          // number of regions
00337         NE);         // number of incident energies
00338 }
00339 // ------------------- mf6_file::mf4_line2 ---------------
00340 void mf6_file::mf4_line2( double *e_in, int *LANG, int *NW, int *NL )
00341 // get the model for a gen_mf4 incident energy
00342 {
00343   double ZERO;
00344   int zero;
00345 
00346   mfx_line2(&ZERO,    //  zero
00347             e_in,     // incident energy
00348             LANG,     // the model
00349         &zero,    // zero
00350         NW,       // amount of data
00351         NL);      // Legendre order or number of cosines
00352 }
00353 // ------------------- mf6_file::ENDL ---------------
00354 void mf6_file::ENDL(int *NR, int *NE)
00355 // get the number of incident energies for an ENDL_table
00356 {
00357   mf4_line1( NR,         // number of interpolation regions
00358          NE );       // number of incident energies
00359 }
00360 // ------------------- mf6_file::ENDL_head ---------------
00361 void mf6_file::ENDL_head( double *e_in, int *NR, int *NE )
00362 // get the incident energy or cosine for an ENDL_table
00363 {
00364   double ZERO;
00365   int zero;
00366 
00367   mfx_line2(&ZERO,        // zero
00368             e_in,         // incident energy or cosine
00369         &zero, &zero, // more zeros
00370         NR,          // number of regions
00371         NE);         // number of incident energies
00372 }
00373 // ------------------- mf6_file::Legendre_E_in ---------------
00374 void mf6_file::Legendre_E_in( double *e_in, int *ND, int *order, int *NE )
00375 // Gets the incident energy and the order for a Legendre table
00376 {
00377   double ZERO;
00378   int dummy;
00379 
00380   mfx_line2(&ZERO,       // zero
00381             e_in,        // incident energy or cosine
00382         ND,          // number of discrete lines
00383             order,       // Legendre order
00384         &dummy,      // NE*(order + 2)
00385         NE);         // number of incident energies
00386   if( dummy != (*NE)*(*order + 2) )
00387   {
00388     Warning( "mf6_file::Legendre_E_in", 
00389          pastenum("order inconsistent for e_in: ", *e_in ) );
00390     *order = dummy/(*NE) - 2;
00391   }
00392 }
00393 // ------------------- mf6_file::read_spin ---------------
00394 void mf6_file::read_spin( double *spin, int *NR, int *NE )
00395 // Gets the spin, number of interpolation regions and number of energies
00396 {
00397   int zero, dummy;
00398   double Zero;
00399 
00400   mfx_line2(spin,        // spin of incident particle
00401             &Zero,       // zero
00402         &dummy,      // 1 if particle the same, otherwise 0
00403             &zero,       // zero
00404         NR,          // number of interpolation regions
00405         NE);         // number of incident energies
00406 }
00407 // ------------------- mf6_file::read_model ---------------
00408 void mf6_file::read_model( double *e_in, int *LTP, int *NL )
00409 // Gets the incident energy and the model for charged-particle scattering
00410 {
00411   int zero, dummy;
00412   double Zero;
00413 
00414   mfx_line2(&Zero,       // zero
00415             e_in,        // incident energy
00416         LTP,         // the model
00417             &zero,       // zero
00418         &dummy,      // number of data entries
00419         NL);         // depends on the model
00420 }
00421 // ------------------- mf12_file::read_line1 ---------------
00422 void mf12_file::read_line1(int *ZA, double *AWR, int *LO, int *LG,
00423   int *NK)
00424 // read the first header line for an mf12 file
00425 {
00426   int iDum;
00427 
00428   mfx_line1(ZA,             // target Z & A 
00429             AWR,            // target mass
00430             LO,             // representation flag (=1 or 2) 
00431             LG,             // for LO = 2: flag for gamma source
00432             NK,             // number of discrete photons (inc continuum)
00433             &iDum);         // zero
00434 }
00435 // ------------------- mf12_file::read_line2 ---------------
00436 void mf12_file::read_line2(int *NR, int *NP)
00437 // read the second header line for an mf12 file
00438 {
00439   double ZERO;
00440   int iZERO;
00441 
00442   mfx_line2(&ZERO, &ZERO,     // zeros
00443         &iZERO, &iZERO,   // zeros
00444         NR,               // number of interpolation regions
00445         NP );             // number of data points
00446 }
00447 // ------------------- mf12_file::gamma_line1 ---------------
00448 void mf12_file::gamma_line1(double *EG, double *ES, int *LP, int *LF,
00449   int *NR, int *NP)
00450 // read the first line for particular gamma
00451 {
00452   mfx_line2(EG,     //  gamma energy
00453             ES,     //  excitation level
00454         LP,     // is this a primary gamma?
00455         LF,     // discrete-continuum flag
00456         NR,     // number of interpolation regions
00457         NP);    // number of (E, multiplicity) pairs
00458 }
00459 // ------------------- mf13_file::read_line1 ---------------
00460 void mf13_file::read_line1(int *ZA, double *AWR, int *NK)
00461 // read the first header line for an mf13 file
00462 {
00463   int iDum;
00464 
00465   mfx_line1(ZA,             // target Z & A 
00466             AWR,            // target mass
00467         &iDum,          // zero
00468         &iDum,          // zero
00469             NK,             // number of discrete photons (inc continuum)
00470             &iDum);         // zero
00471 }
00472 // ------------------- mf13_file::read_line2 ---------------
00473 void mf13_file::read_line2(int *NR, int *NP)
00474 // read the second header line for an mf13 file
00475 {
00476   double ZERO;
00477   int iZERO;
00478 
00479   mfx_line2(&ZERO, &ZERO,     // zeros
00480         &iZERO, &iZERO,   // zeros
00481         NR,               // number of interpolation regions
00482         NP );             // number of data points
00483 }
00484 // ------------------- mf13_file::gamma_line1 ---------------
00485 void mf13_file::gamma_line1(double *EG, double *ES, int *LP, int *LF,
00486   int *NR, int *NP)
00487 // read the first line for particular gamma
00488 {
00489   mfx_line2(EG,     //  gamma energy
00490             ES,     //  excitation level
00491         LP,     // is this a primary gamma?
00492         LF,     // discrete-continuum flag
00493         NR,     // number of interpolation regions
00494         NP);    // number of (E, gamma production) pairs
00495 }
00496 // ------------------- mf14_file::first_line ---------------
00497 void mf14_file::first_line(int *ZA, double *AWR, int *LI, int *LTT,
00498   int *NK, int *NI)
00499 // read the first header line for an mf14 file
00500 {
00501   mfx_line1(ZA,             // target Z & A 
00502             AWR,            // target mass
00503         LI,             // isotropy flag
00504         LTT,            // Legendre flag
00505         NK,             // number of discreet photons (inc continuum)
00506         NI);            // number of isotropic photon dists
00507 }
00508 // ------------------- mf14_file::read_EG ---------------
00509 void mf14_file::read_EG( double *EG, int *NR, int *NE )
00510 // read the gamma energy and the amount of data for one gamma
00511 {
00512   double ES;
00513   int zero;
00514 
00515   mfx_line2(EG,              // gamma energy
00516             &ES,             // excitation energy
00517         &zero,
00518         &zero,
00519         NR,             // number of interpolation regions
00520         NE);            // number of incident energies
00521 }
00522 // ------------------- mf14_file::discrete ---------------
00523 void mf14_file::discrete( double *EG )
00524 // read the gamma energy for an isotropic distribution
00525 {
00526   double ES;
00527   int zero;
00528 
00529   mfx_line2(EG,              // gamma energy
00530             &ES,             // excitation energy
00531         &zero,
00532         &zero,
00533         &zero,
00534         &zero);
00535 }
00536 // ------------------- mf14_file::Leg_head ---------------
00537 void mf14_file::Leg_head( double *e_in, int *NL )
00538 // read the incident energy and the Legendre order
00539 {
00540   double Zero;
00541   int zero;
00542 
00543   mfx_line2(&Zero,
00544             e_in,             // energy of incident neutron
00545         &zero,
00546         &zero,
00547         NL,               // Legendre order
00548         &zero);
00549 }
00550 // ------------------- mf14_file::get_order ---------------
00551 int mf14_file::get_order( int NK, int NI )
00552 // return the maximum Legendre order for gamma distributions
00553 // NK: total number of lines
00554 // NI: number of isotropic lines
00555 {
00556   int max_order = 0;
00557   int num_to_do = NK - NI;
00558   int count;
00559   double EG;
00560 
00561   // skip the isotropic lines
00562   skip_iso( NI );
00563 
00564   // the anisotropic data
00565   for( count = 0; count < num_to_do; ++count )
00566   {
00567     int NR, NE;
00568     read_EG( &EG, &NR, &NE );
00569     skip( 2*NR );  // skip the interpolation regions
00570     for( int iNE = 0; iNE < NE; ++iNE )
00571     {
00572       int num_coef;
00573       double e_in;
00574       Leg_head( &e_in, & num_coef );
00575       if( num_coef > max_order )
00576       {
00577         max_order = num_coef;
00578       }
00579       skip( num_coef );
00580     }
00581   }
00582   return max_order;
00583 }
00584 // ------------------- mf14_file::skip_iso ---------------
00585 void mf14_file::skip_iso( int NI )
00586 // skip NI lines of isotropic gammas
00587 {
00588   // skip the isotropic lines
00589   for( int count = 0; count < NI; ++count )
00590   {
00591     double EG;
00592     discrete( &EG );
00593   }
00594 }
00595 // ------------------- mf15_file::read_line1 ---------------
00596 void mf15_file::read_line1(int *ZA, double *AWR, int *NC)
00597 // read the first header line for an mf15 file
00598 {
00599   int iDum;
00600 
00601   mfx_line1(ZA,             // target Z & A 
00602             AWR,            // target mass
00603         &iDum,          // zero
00604         &iDum,          // zero
00605         NC,             // number of partial distributions
00606         &iDum);         // zero
00607 }
00608 // ------------------- mf15_file::weight_line ---------------
00609 void mf15_file::weight_line(int *LF, int *NR, int *NP)
00610 // read the header for the weights for this section
00611 {
00612   int iDum;
00613   double zero;
00614 
00615   mfx_line1(&iDum,          // zero
00616             &zero,
00617         &iDum,          // zero
00618         LF,             // energy distribution model
00619         NR,             // number of interpolation regions
00620             NP);            // number of incident energries
00621 }
00622 // ------------------- mf15_file::E_in_interp ---------------
00623 void mf15_file::E_in_interp(int *NR, int *NP)
00624 // get the number of incident neutron energies
00625 {
00626   int iDum;
00627   double zero;
00628 
00629   mfx_line1(&iDum,          // zero
00630             &zero,
00631         &iDum, &iDum,   // zeros
00632         NR,             // number of interpolation regions
00633             NP);            // number of incident neutron energries
00634 }
00635 // ------------------- mf15_file::get_E_in ---------------
00636 void mf15_file::get_E_in(double *E_in, int *NR, int *NP)
00637 // get the number of secondary neutron energies
00638 {
00639   int iDum;
00640 
00641   mfx_line1(&iDum,          // zero
00642             E_in,           // incident neutron energy
00643         &iDum, &iDum,   // zeros
00644         NR,             // number of interpolation regions
00645             NP);            // number of secondary neutron energries
00646 }
00647 // ------------------- mt458_file::read_line1 ---------------
00648 void mt458_file::read_line1(int *ZA, double *AWR)
00649 // read the first header line for an mf15 file
00650 {
00651   int iDum;
00652 
00653   mfx_line1(ZA,             // target Z & A 
00654             AWR,            // target mass
00655         &iDum,          // zero
00656         &iDum,          // zero
00657         &iDum,          // zero
00658         &iDum);         // zero
00659 }
00660 // ------------------- mt458_file::read_line2 ---------------
00661 void mt458_file::read_line2( int *num_E, int *num_data )
00662 // read the number of energies
00663 {
00664   int zero;
00665   double Zero;
00666 
00667   mfx_line2(&Zero, &Zero,
00668             &zero, &zero, 
00669         num_E,     // number of (energy, d_energy) pairs
00670         num_data); // amount of data
00671 }
00672 // ------------------- mt458_file::read_data ---------------
00673 void mt458_file::read_data( double *E_1, double *dE_1, double *E_2,
00674     double *dE_2, double *E_3, double *dE_3 )
00675 // read a data line for an mt458 file
00676 {
00677   char linje[Line_len];
00678 
00679   getline(linje, Line_len-1 ); //read line
00680   string linebuff(linje); // the input string
00681 
00682   read_dddddd(&linebuff,
00683           E_1, dE_1, E_2, dE_2, E_3, dE_3);
00684 }
00685 // ------------------- mt458_file::reduce_Q ---------------
00686 double mt458_file::reduce_Q( double Q )
00687 // return Q minus energy from delayed decay of fission fragments
00688 {
00689   double new_Q = Q;  // initialize
00690   int ZA;
00691   double AWR;
00692   int num_E, num_data;
00693 
00694   read_line1(&ZA, &AWR);  // gobble the first line
00695   read_line2(&num_E, &num_data); // gobble the second line
00696 
00697   double EFR, d_EFR,  // kinetic energy of fission fragments
00698          ENP, d_ENP,  // kinetic energy of prompt fission neutrons
00699          END, d_END;  // kinetic energy of delayed fission neutrons
00700   read_data( &EFR, &d_EFR, &ENP, &d_ENP, &END, &d_END );
00701   new_Q -= END;  // take off energy of delayed fission neutrons
00702 
00703   double EGP, d_EGP,  // energy of prompt gammas
00704          EGD, d_EGD,  // energy of delayed gammas
00705          EB, d_EB;    // energy of delayed betas
00706   read_data( &EGP, &d_EGP, &EGD, &d_EGD, &EB, &d_EB );
00707   new_Q -= EGD + EB;  // take off energy of delayed gammas and betas
00708 
00709   return new_Q;
00710 }

Generated on Thu Sep 7 10:30:03 2006 for fete -- From ENDFB6 To ENDL by doxygen 1.3.4