00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061 #ifndef G4GIDI_target_h_included
00062 #define G4GIDI_target_h_included 1
00063
00064 #include <vector>
00065 #include <string>
00066
00067 #include <tpia_target.h>
00068
00069 typedef struct crossSectionData_s crossSectionData;
00070 typedef struct channelID_s channelID;
00071 typedef struct G4GIDI_Product_s G4GIDI_Product;
00072
00073 struct crossSectionData_s {
00074 int start, end;
00075 std::vector<double> crossSection;
00076 };
00077
00078 struct channelID_s {
00079 std::string ID;
00080 };
00081
00082
00083 struct G4GIDI_Product_s {
00084 int A, Z, m;
00085 double kineticEnergy, px, py, pz;
00086 };
00087
00088 class G4GIDI_target {
00089
00090 public:
00091 void init( const char *fileName );
00092 std::string equalProbableBinSampleMethod;
00093 int nElasticIndices, nCaptureIndices, nFissionIndices, nOthersIndices;
00094 int *elasticIndices, *captureIndices, *fissionIndices, *othersIndices;
00095
00096 public:
00097 GIDI::statusMessageReporting smr;
00098 std::string name;
00099 std::string sourceFilename;
00100 double mass;
00101 GIDI::tpia_target *target;
00102
00103 G4GIDI_target( const char *fileName );
00104 G4GIDI_target( std::string &fileName );
00105 ~G4GIDI_target( );
00106
00107 std::string *getName( void );
00108 std::string *getFilename( void );
00109 int getZ( void );
00110 int getA( void );
00111 int getM( void );
00112 double getMass( void );
00113 int getTemperatures( double *temperatures );
00114 int readTemperature( int index );
00115 std::string getEqualProbableBinSampleMethod( void );
00116 int setEqualProbableBinSampleMethod( std::string method );
00117
00118 int getNumberOfChannels( void );
00119 int getNumberOfProductionChannels( void );
00120 std::vector<channelID> *getChannelIDs( void );
00121 std::vector<channelID> *getProductionChannelIDs( void );
00122 std::vector<channelID> *getChannelIDs2( GIDI::tpia_channel **channels, int n );
00123
00124 std::vector<double> *getEnergyGridAtTIndex( int index );
00125
00126 double getTotalCrossSectionAtE( double e_in, double temperature );
00127 double getElasticCrossSectionAtE( double e_in, double temperature );
00128 double getCaptureCrossSectionAtE( double e_in, double temperature );
00129 double getFissionCrossSectionAtE( double e_in, double temperature );
00130 double getOthersCrossSectionAtE( double e_in, double temperature );
00131 double sumChannelCrossSectionAtE( int nIndices, int *indices, double e_in, double temperature );
00132 int sampleChannelCrossSectionAtE( int nIndices, int *indices, double e_in, double temperature, double (*rng)( void * ), void *rngState );
00133
00134 double getElasticFinalState( double e_in, double temperature, double (*rng)( void * ), void *rngState );
00135 std::vector<G4GIDI_Product> *getCaptureFinalState( double e_in, double temperature, double (*rng)( void * ), void *rngState );
00136 std::vector<G4GIDI_Product> *getFissionFinalState( double e_in, double temperature, double (*rng)( void * ), void *rngState );
00137 std::vector<G4GIDI_Product> *getOthersFinalState( double e_in, double temperature, double (*rng)( void * ), void *rngState );
00138 std::vector<G4GIDI_Product> *getFinalState( int nIndices, int *indices, double e_in, double temperature, double (*rng)( void * ), void *rngState );
00139 };
00140
00141 #endif // End of G4GIDI_target_h_included