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 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

  1 //
  2 // ********************************************************************
  3 // * License and Disclaimer                                           *
  4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.                             *
 10 // *                                                                  *
 11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                                                  *
 18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // ********************************************************************
 25 //
 26 /*
 27  * File:   G4ENDFTapeRead.hh
 28  * Author: B. Wendt (wendbryc@isu.edu)
 29  *
 30  * Created on September 6, 2011, 10:01 AM
 31  */
 32 
 33 #ifndef G4ENDFTAPEREAD_HH
 34 #define G4ENDFTAPEREAD_HH
 35 
 36 #include "G4ENDFYieldDataContainer.hh"
 37 #include "G4FFGEnumerations.hh"
 38 #include "G4TableTemplate.hh"
 39 #include "globals.hh"
 40 
 41 /** G4ENDFTapeRead is a class designed to read in data from unformatted ENDF data
 42  *  tapes for MT = 454 or MT = 459, which correspond to independent fission
 43  *  yields and cumulative fission yields, respectively. The data is stored
 44  *  internally and can be recalled one product at a time by calling
 45  *  G4GetNextYield().
 46  */
 47 class G4ENDFTapeRead
 48 {
 49   public:
 50     // Constructor definition
 51     /** Default constructor
 52      *  - Usage:
 53      *      - \p FileLocation: the absolute path to the file
 54      *      - \p FileName: the name of the data file
 55      *      - \p WhichYield: \p INDEPENDENT or \p CUMULATIVE
 56      *      - \p WhichCause: \p SPONTANEOUS or \p N_INDUCED
 57      *
 58      *  - Notes: The data will be read in immediately upon construction.
 59      */
 60     G4ENDFTapeRead(const G4String& FileLocation, const G4String& FileName,
 61                    G4FFGEnumerations::YieldType WhichYield,
 62                    G4FFGEnumerations::FissionCause WhichCause);
 63     /** Overloaded constructor
 64      *  - Usage:
 65      *      - \p FileLocation: the absolute path to the file
 66      *      - \p FileName: the name of the data file
 67      *      - \p WhichYield: \p INDEPENDENT or \p CUMULATIVE
 68      *      - \p WhichCause: \p SPONTANEOUS or \p N_INDUCED
 69      *      - \p Verbosity: Verbosity level
 70      *
 71      *  - Notes: The data will be read in immediately upon construction.
 72      */
 73     G4ENDFTapeRead(const G4String& FileLocation, const G4String& FileName,
 74                    G4FFGEnumerations::YieldType WhichYield,
 75                    G4FFGEnumerations::FissionCause WhichCause, G4int Verbosity);
 76     /** Overloaded constructor
 77      *  - Usage:
 78      *      - \p DataFile: The absolute path to the data file
 79      *      - \p WhichYield: \p INDEPENDENT or \p CUMULATIVE
 80      *      - \p WhichCause: \p SPONTANEOUS or \p N_INDUCED
 81      *      - \p Verbosity: Verbosity level
 82      *
 83      *  - Notes: The data will be read in immediately upon construction.
 84      */
 85     G4ENDFTapeRead(std::istringstream& dataStream, G4FFGEnumerations::YieldType WhichYield,
 86                    G4FFGEnumerations::FissionCause WhichCause, G4int Verbosity);
 87 
 88   protected:
 89     /** Initialize is a common function called by all constructors. */
 90     void Initialize(const G4String& dataFile);
 91     /** Initialize is a common function calles by all constructors */
 92     void Initialize(std::istringstream& dataStream);
 93 
 94   public:
 95     // Functions
 96     /** Returns and array containing the values of each of the energy groups
 97      *  - Usage: No arguments required
 98      *
 99      *  - Notes:
100      */
101     G4double* G4GetEnergyGroupValues() const;
102     /** Returns the number of energy yield groups that were extracted from the
103      *  ENDF tape file
104      *  - Usage: No arguments required
105      *
106      *  - Notes:
107      */
108     G4int G4GetNumberOfEnergyGroups() const;
109     /** Returns the number of fission products that were extracted from the
110      *  ENDF tape file
111      *  - Usage: No arguments required
112      *
113      *  - Notes:
114      */
115     G4int G4GetNumberOfFissionProducts() const;
116     /** Returns the data for the requested fission product
117      *  - Usage:
118      *      - \p WhichYield: 0-based index of the fission product for which to
119      *           get the yield data
120      *
121      *  - Notes:
122      *      - This will return a pointer to the next G4FissionYieldContainer.
123      *        NULL will be returned if no more fission containers exist.
124      */
125     G4ENDFYieldDataContainer* G4GetYield(G4int WhichYield) const;
126     /** Sets the verbosity levels
127      *  - Usage:
128      *      - \p WhichVerbosity: Combination of  levels
129      *
130      *  - Notes:
131      *      - \p SILENT: All verbose output is repressed
132      *      - \p UPDATES: Only high-level internal changes are reported
133      *      - \p DAUGHTER_INFO: Displays information about daughter product sampling
134      *      - \p NEUTRON_INFO: Displays information about neutron sampling
135      *      - \p GAMMA_INFO: Displays information about gamma sampling
136      *      - \p ALPHA_INFO: Displays information about alpha sampling
137      *      - \p MOMENTUM_INFO: Displays information about momentum balancing
138      *      - \p EXTRAPOLATION_INTERPOLATION_INFO: Displays information about any data extrapolation
139      * or interpolation that occurs
140      *      - \p DEBUG: Reports program flow as it steps through functions
141      *      - \p PRINT_ALL: Displays any and all output
142      */
143     void G4SetVerbosity(G4int WhatVerbosity);
144 
145   private:
146     // Functions
147     /** Read in the data from an ENDF data tape. */
148     void ReadInData(std::istringstream& dataStream);
149 
150     // Data members
151     /** Stores the number corresponding to the fission cause that will be extracted */
152     // const G4FFGEnumerations::FissionCause Cause_;
153     /** Counter for the number of energy groups that were extracted */
154     G4int EnergyGroups_;
155     /** Array containing the values of the extracted energy groups */
156     G4double* EnergyGroupValues_;
157     /** Verbosity level */
158     G4int Verbosity_;
159     /** Storage for the extracted data */
160     G4TableTemplate<G4ENDFYieldDataContainer>* YieldContainerTable_;
161     /** Stores the number corresponding to the yield type that will be extracted */
162     const G4FFGEnumerations::YieldType YieldType_;
163 
164     // Destructor function(s)
165   public:
166     /** Default Deconstructor */
167     ~G4ENDFTapeRead();
168 };
169 
170 #endif /* G4ENDFTAPEREAD_HH */
171