Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4GIDI_target.hh
Go to the documentation of this file.
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 # <<BEGIN-copyright>>
28 # Copyright (c) 2010, Lawrence Livermore National Security, LLC.
29 # Produced at the Lawrence Livermore National Laboratory
30 # Written by Bret R. Beck, beck6@llnl.gov.
31 # CODE-461393
32 # All rights reserved.
33 #
34 # This file is part of GIDI. For details, see nuclear.llnl.gov.
35 # Please also read the "Additional BSD Notice" at nuclear.llnl.gov.
36 #
37 # Redistribution and use in source and binary forms, with or without modification,
38 # are permitted provided that the following conditions are met:
39 #
40 # 1) Redistributions of source code must retain the above copyright notice,
41 # this list of conditions and the disclaimer below.
42 # 2) Redistributions in binary form must reproduce the above copyright notice,
43 # this list of conditions and the disclaimer (as noted below) in the
44 # documentation and/or other materials provided with the distribution.
45 # 3) Neither the name of the LLNS/LLNL nor the names of its contributors may be
46 # used to endorse or promote products derived from this software without
47 # specific prior written permission.
48 #
49 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
50 # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
51 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
52 # SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, LLC, THE U.S. DEPARTMENT OF ENERGY OR
53 # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
54 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
55 # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
56 # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
57 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
58 # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
59 # <<END-copyright>>
60 */
61 #ifndef G4GIDI_target_h_included
62 #define G4GIDI_target_h_included 1
63 
64 #include <vector>
65 #include <string>
66 
67 #include <tpia_target.h>
68 
70 typedef struct channelID_s channelID;
72 
74  int start, end;
75  std::vector<double> crossSection;
76 };
77 
78 struct channelID_s {
79  std::string ID;
80 };
81 
82 //typedef struct G4GIDI_Product_s {
84  int A, Z, m;
85  double kineticEnergy, px, py, pz;
86 };
87 
89 
90  public:
91  void init( const char *fileName );
95 
96  public:
98  std::string name;
99  std::string sourceFilename;
100  double mass;
102 
103  G4GIDI_target( const char *fileName );
104  G4GIDI_target( std::string &fileName );
105  ~G4GIDI_target( );
106 
107  std::string *getName( void );
108  std::string *getFilename( void );
109  int getZ( void );
110  int getA( void );
111  int getM( void );
112  double getMass( void );
113  int getTemperatures( double *temperatures );
114  int readTemperature( int index );
115  std::string getEqualProbableBinSampleMethod( void );
116  int setEqualProbableBinSampleMethod( std::string method );
117 
118  int getNumberOfChannels( void );
119  int getNumberOfProductionChannels( void );
120  std::vector<channelID> *getChannelIDs( void );
121  std::vector<channelID> *getProductionChannelIDs( void );
122  std::vector<channelID> *getChannelIDs2( GIDI::tpia_channel **channels, int n );
123 
124  std::vector<double> *getEnergyGridAtTIndex( int index );
125 
126  double getTotalCrossSectionAtE( double e_in, double temperature );
127  double getElasticCrossSectionAtE( double e_in, double temperature );
128  double getCaptureCrossSectionAtE( double e_in, double temperature );
129  double getFissionCrossSectionAtE( double e_in, double temperature );
130  double getOthersCrossSectionAtE( double e_in, double temperature );
131  double sumChannelCrossSectionAtE( int nIndices, int *indices, double e_in, double temperature );
132  int sampleChannelCrossSectionAtE( int nIndices, int *indices, double e_in, double temperature, double (*rng)( void * ), void *rngState );
133 
134  double getElasticFinalState( double e_in, double temperature, double (*rng)( void * ), void *rngState );
135  std::vector<G4GIDI_Product> *getCaptureFinalState( double e_in, double temperature, double (*rng)( void * ), void *rngState );
136  std::vector<G4GIDI_Product> *getFissionFinalState( double e_in, double temperature, double (*rng)( void * ), void *rngState );
137  std::vector<G4GIDI_Product> *getOthersFinalState( double e_in, double temperature, double (*rng)( void * ), void *rngState );
138  std::vector<G4GIDI_Product> *getFinalState( int nIndices, int *indices, double e_in, double temperature, double (*rng)( void * ), void *rngState );
139 };
140 
141 #endif // End of G4GIDI_target_h_included
std::vector< channelID > * getChannelIDs2(GIDI::tpia_channel **channels, int n)
GIDI::statusMessageReporting smr
double getFissionCrossSectionAtE(double e_in, double temperature)
std::string * getFilename(void)
struct statusMessageReporting statusMessageReporting
G4GIDI_target(const char *fileName)
int * captureIndices
double getOthersCrossSectionAtE(double e_in, double temperature)
void init(const char *fileName)
double sumChannelCrossSectionAtE(int nIndices, int *indices, double e_in, double temperature)
std::string equalProbableBinSampleMethod
struct tpia_target_s tpia_target
Definition: tpia_target.h:53
int sampleChannelCrossSectionAtE(int nIndices, int *indices, double e_in, double temperature, double(*rng)(void *), void *rngState)
std::vector< double > crossSection
std::string sourceFilename
std::vector< G4GIDI_Product > * getOthersFinalState(double e_in, double temperature, double(*rng)(void *), void *rngState)
struct tpia_channel_s tpia_channel
Definition: tpia_target.h:72
double getElasticCrossSectionAtE(double e_in, double temperature)
int getTemperatures(double *temperatures)
double getTotalCrossSectionAtE(double e_in, double temperature)
std::vector< G4GIDI_Product > * getFissionFinalState(double e_in, double temperature, double(*rng)(void *), void *rngState)
double getCaptureCrossSectionAtE(double e_in, double temperature)
std::string name
double getElasticFinalState(double e_in, double temperature, double(*rng)(void *), void *rngState)
std::string ID
std::vector< G4GIDI_Product > * getFinalState(int nIndices, int *indices, double e_in, double temperature, double(*rng)(void *), void *rngState)
int getZ(void)
int getA(void)
double getMass(void)
std::string * getName(void)
std::vector< G4GIDI_Product > * getCaptureFinalState(double e_in, double temperature, double(*rng)(void *), void *rngState)
std::vector< double > * getEnergyGridAtTIndex(int index)
const G4int n
int getNumberOfProductionChannels(void)
std::vector< channelID > * getProductionChannelIDs(void)
int setEqualProbableBinSampleMethod(std::string method)
int * elasticIndices
GIDI::tpia_target * target
int getNumberOfChannels(void)
int readTemperature(int index)
std::vector< channelID > * getChannelIDs(void)
std::string getEqualProbableBinSampleMethod(void)
int getM(void)
int * fissionIndices