File indexing completed on 2026-09-20 09:11:12
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027 #include <vector>
0028 #include <list>
0029
0030 #include <G4Types.hh>
0031 #include <MCGIDI.hpp>
0032
0033 #ifndef G4GIDI_hh_included
0034 #define G4GIDI_hh_included 1
0035
0036 #define channelID std::string
0037
0038 extern PoPI::Database G4GIDI_pops;
0039
0040 class G4GIDI_Product {
0041
0042 public:
0043 int A, Z, m;
0044 double kineticEnergy, px, py, pz;
0045 double birthTimeSec;
0046 };
0047
0048 class G4GIDI_target {
0049
0050 private:
0051 MCGIDI::Protare *m_MCGIDI_protare;
0052 std::string m_target;
0053 std::string m_fileName;
0054 std::string m_evaluation;
0055 int m_targetZ;
0056 int m_targetA;
0057 int m_targetM;
0058 double m_targetMass;
0059 MCGIDI::DomainHash m_domainHash;
0060 MCGIDI::URR_protareInfos m_URR_protareInfos;
0061 std::vector<int> m_elasticIndices;
0062 std::vector<int> m_captureIndices;
0063 std::vector<int> m_fissionIndices;
0064 std::vector<int> m_othersIndices;
0065 MCGIDI::Probabilities::ProbabilityBase2d const *m_elasticAngular;
0066
0067 public:
0068 G4GIDI_target( PoPI::Database const &a_pops, MCGIDI::DomainHash const &a_domainHash, GIDI::Protare const &a_GIDI_protare,
0069 MCGIDI::Protare *a_MCGIDI_protare );
0070 ~G4GIDI_target( );
0071
0072 std::string const *getName( ) const { return( &m_target ); }
0073 std::string const *getFilename( ) const { return( &m_fileName ); }
0074 std::string const *getEvaluation( ) const { return( &m_evaluation ); }
0075 int getZ( ) const { return( m_targetZ ); }
0076 int getA( ) const { return( m_targetA ); }
0077 int getM( ) const { return( m_targetM ); }
0078 double getMass( ) const { return( m_targetMass ); }
0079
0080
0081
0082
0083
0084
0085
0086 std::vector<int> const &elasticIndices( ) { return( m_elasticIndices ); }
0087 std::vector<int> const &captureIndices( ) { return( m_captureIndices ); }
0088 std::vector<int> const &fissionIndices( ) { return( m_fissionIndices ); }
0089 std::vector<int> const &othersIndices( ) { return( m_othersIndices ); }
0090
0091 int getNumberOfChannels( ) const ;
0092 int getNumberOfProductionChannels( ) const ;
0093 channelID getChannelsID( int channelIndex ) const ;
0094 std::vector<channelID> *getChannelIDs( ) const ;
0095 std::vector<channelID> *getProductionChannelIDs( ) const ;
0096
0097
0098
0099 double getTotalCrossSectionAtE( double a_energy, double a_temperature ) const ;
0100 double getElasticCrossSectionAtE( double a_energy, double a_temperature ) const ;
0101 double getCaptureCrossSectionAtE( double a_energy, double a_temperature ) const ;
0102 double getFissionCrossSectionAtE( double a_energy, double a_temperature ) const ;
0103 double getOthersCrossSectionAtE( double a_energy, double a_temperature ) const ;
0104 double sumChannelCrossSectionAtE( std::vector<int> const &a_indices, double a_energy, double a_temperature ) const ;
0105 double sumChannelCrossSectionAtE( int a_nIndices, int const *a_indices, double a_energy, double a_temperature ) const ;
0106 int sampleChannelCrossSectionAtE( std::vector<int> const &a_indices, double a_energy, double a_temperature,
0107 double (*a_rng)( void * ), void *a_rngState ) const ;
0108 int sampleChannelCrossSectionAtE( int a_nIndices, int const *a_indices, double a_energy, double a_temperature,
0109 double (*a_rng)( void * ), void *a_rngState ) const ;
0110
0111 double getElasticFinalState( double a_energy, double a_temperature, double (*a_rng)( void * ), void *a_rngState ) const ;
0112 std::vector<G4GIDI_Product> *getCaptureFinalState( double a_energy, double a_temperature, double (*a_rng)( void * ), void *a_rngState ) const ;
0113 std::vector<G4GIDI_Product> *getFissionFinalState( double a_energy, double a_temperature, double (*a_rng)( void * ), void *a_rngState ) const ;
0114 std::vector<G4GIDI_Product> *getOthersFinalState( double a_energy, double a_temperature, double (*a_rng)( void * ), void *a_rngState ) const ;
0115 std::vector<G4GIDI_Product> *getFinalState( std::vector<int> const &a_indices, double a_energy, double a_temperature,
0116 double (*a_rng)( void * ), void *a_rngState ) const ;
0117 std::vector<G4GIDI_Product> *getFinalState( int a_nIndices, int const *a_indices, double a_energy, double a_temperature,
0118 double (*a_rng)( void * ), void *a_rngState ) const ;
0119
0120
0121
0122 };
0123
0124 class G4GIDI {
0125
0126 private:
0127 G4int m_projectileIP;
0128 std::string m_projectile;
0129 std::vector<GIDI::Map::Map *> m_maps;
0130 std::vector<G4GIDI_target *> m_protares;
0131
0132 public:
0133 G4GIDI( G4int a_ip, std::string const &a_dataDirectory );
0134 G4GIDI( G4int a_ip, std::list<std::string> const &a_dataDirectory );
0135 ~G4GIDI( );
0136
0137 G4int projectileIP( ) const { return( m_projectileIP ); }
0138
0139 G4int numberOfDataDirectories( ) const { return( static_cast<G4int>( m_maps.size( ) ) ); }
0140 G4int addDataDirectory( std::string const &a_dataDirectory );
0141 G4int removeDataDirectory( std::string const &a_dataDirectory );
0142 std::string const getDataDirectoryAtIndex( G4int a_index ) const ;
0143 std::vector<std::string> *getDataDirectories( ) const ;
0144
0145 bool isThisDataAvailable( std::string const &a_lib_name, G4int a_Z, G4int a_A, G4int a_M = 0 ) const ;
0146 bool isThisDataAvailable( std::string const &a_lib_name, std::string const &a_targetName ) const ;
0147
0148 std::string dataFilename( std::string const &lib_name, G4int a_Z, G4int a_A, G4int a_M = 0 ) const ;
0149 std::string dataFilename( std::string const &lib_name, std::string const &a_targetName ) const ;
0150
0151 std::vector<std::string> *getNamesOfAvailableLibraries( G4int a_Z, G4int a_A, G4int a_M = 0 ) const ;
0152 std::vector<std::string> *getNamesOfAvailableLibraries( std::string const &a_targetName ) const ;
0153
0154 std::vector<std::string> *getNamesOfAvailableTargets( ) const ;
0155
0156 G4GIDI_target *readTarget( std::string const &lib_name, G4int a_Z, G4int a_A, G4int a_M = 0, bool a_bind = true );
0157 G4GIDI_target *readTarget( std::string const &lib_name, std::string const &a_targetName, bool a_bind = true );
0158
0159 G4GIDI_target *getAlreadyReadTarget( G4int a_Z, G4int a_A, G4int a_M = 0 );
0160 G4GIDI_target *getAlreadyReadTarget( std::string const &a_targetName );
0161
0162 G4int freeTarget( G4int a_Z, G4int a_A, G4int a_M = 0 );
0163 G4int freeTarget( std::string const &a_targetSymbol );
0164 G4int freeTarget( G4GIDI_target *a_target );
0165
0166 std::vector<std::string> *getListOfReadTargetsNames( );
0167 };
0168
0169 std::string G4GIDI_version( );
0170 int G4GIDI_versionMajor( );
0171 int G4GIDI_versionMinor( );
0172 int G4GIDI_versionPatchLevel( );
0173 std::string G4GIDI_GitHash( );
0174 void G4GIDI_initialize( std::string const &a_dataPath );
0175 std::string G4GIDI_Misc_Z_toSymbol( int a_Z );
0176 std::string G4GIDI_Misc_Z_A_m_ToName( int a_Z, int a_A, int a_M );
0177
0178 #endif