Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4GIDI.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#include <vector>
28#include <list>
29
30#include <G4Types.hh>
31#include <MCGIDI.hpp>
32
33#ifndef G4GIDI_hh_included
34#define G4GIDI_hh_included 1
35
36#define channelID std::string
37
39
41
42 public:
43 int A, Z, m;
44 double kineticEnergy, px, py, pz;
46};
47
49
50 private:
51 MCGIDI::Protare *m_MCGIDI_protare;
52 std::string m_target;
53 std::string m_fileName;
54 std::string m_evaluation;
55 int m_targetZ;
56 int m_targetA;
57 int m_targetM;
58 double m_targetMass;
59 MCGIDI::DomainHash m_domainHash;
60 MCGIDI::URR_protareInfos m_URR_protareInfos;
61 std::vector<int> m_elasticIndices;
62 std::vector<int> m_captureIndices;
63 std::vector<int> m_fissionIndices;
64 std::vector<int> m_othersIndices;
65 MCGIDI::Probabilities::ProbabilityBase2d const *m_elasticAngular;
66
67 public:
68 G4GIDI_target( PoPI::Database const &a_pops, MCGIDI::DomainHash const &a_domainHash, GIDI::Protare const &a_GIDI_protare,
69 MCGIDI::Protare *a_MCGIDI_protare );
71
72 std::string const *getName( ) const { return( &m_target ); }
73 std::string const *getFilename( ) const { return( &m_fileName ); }
74 std::string const *getEvaluation( ) const { return( &m_evaluation ); }
75 int getZ( ) const { return( m_targetZ ); }
76 int getA( ) const { return( m_targetA ); }
77 int getM( ) const { return( m_targetM ); }
78 double getMass( ) const { return( m_targetMass ); }
79
80// int getTemperatures( double *a_temperatures ) const ;
81// int readTemperature( int index );
82
83// std::string getEqualProbableBinSampleMethod( );
84// int setEqualProbableBinSampleMethod( std::string const &a_method );
85
86 std::vector<int> const &elasticIndices( ) { return( m_elasticIndices ); }
87 std::vector<int> const &captureIndices( ) { return( m_captureIndices ); }
88 std::vector<int> const &fissionIndices( ) { return( m_fissionIndices ); }
89 std::vector<int> const &othersIndices( ) { return( m_othersIndices ); }
90
91 int getNumberOfChannels( ) const ;
93 channelID getChannelsID( int channelIndex ) const ;
94 std::vector<channelID> *getChannelIDs( ) const ;
95 std::vector<channelID> *getProductionChannelIDs( ) const ;
96
97// std::vector<double> *getEnergyGridAtTIndex( int index );
98
99 double getTotalCrossSectionAtE( double a_energy, double a_temperature ) const ;
100 double getElasticCrossSectionAtE( double a_energy, double a_temperature ) const ;
101 double getCaptureCrossSectionAtE( double a_energy, double a_temperature ) const ;
102 double getFissionCrossSectionAtE( double a_energy, double a_temperature ) const ;
103 double getOthersCrossSectionAtE( double a_energy, double a_temperature ) const ;
104 double sumChannelCrossSectionAtE( std::vector<int> const &a_indices, double a_energy, double a_temperature ) const ;
105 double sumChannelCrossSectionAtE( int a_nIndices, int const *a_indices, double a_energy, double a_temperature ) const ;
106 int sampleChannelCrossSectionAtE( std::vector<int> const &a_indices, double a_energy, double a_temperature,
107 double (*a_rng)( void * ), void *a_rngState ) const ;
108 int sampleChannelCrossSectionAtE( int a_nIndices, int const *a_indices, double a_energy, double a_temperature,
109 double (*a_rng)( void * ), void *a_rngState ) const ;
110
111 double getElasticFinalState( double a_energy, double a_temperature, double (*a_rng)( void * ), void *a_rngState ) const ;
112 std::vector<G4GIDI_Product> *getCaptureFinalState( double a_energy, double a_temperature, double (*a_rng)( void * ), void *a_rngState ) const ;
113 std::vector<G4GIDI_Product> *getFissionFinalState( double a_energy, double a_temperature, double (*a_rng)( void * ), void *a_rngState ) const ;
114 std::vector<G4GIDI_Product> *getOthersFinalState( double a_energy, double a_temperature, double (*a_rng)( void * ), void *a_rngState ) const ;
115 std::vector<G4GIDI_Product> *getFinalState( std::vector<int> const &a_indices, double a_energy, double a_temperature,
116 double (*a_rng)( void * ), void *a_rngState ) const ;
117 std::vector<G4GIDI_Product> *getFinalState( int a_nIndices, int const *a_indices, double a_energy, double a_temperature,
118 double (*a_rng)( void * ), void *a_rngState ) const ;
119
120// double getReactionsThreshold( int a_index ) const ;
121// void getReactionsDomain( int a_index, double *a_EMin, double *a_EMax ) const ;
122};
123
124class G4GIDI {
125
126 private:
127 G4int m_projectileIP;
128 std::string m_projectile;
129 std::vector<GIDI::Map::Map *> m_maps;
130 std::vector<G4GIDI_target *> m_protares;
131
132 public:
133 G4GIDI( G4int a_ip, std::string const &a_dataDirectory );
134 G4GIDI( G4int a_ip, std::list<std::string> const &a_dataDirectory );
135 ~G4GIDI( );
136
137 G4int projectileIP( ) const { return( m_projectileIP ); }
138
139 G4int numberOfDataDirectories( ) const { return( static_cast<G4int>( m_maps.size( ) ) ); }
140 G4int addDataDirectory( std::string const &a_dataDirectory );
141 G4int removeDataDirectory( std::string const &a_dataDirectory );
142 std::string const getDataDirectoryAtIndex( G4int a_index ) const ;
143 std::vector<std::string> *getDataDirectories( ) const ;
144
145 bool isThisDataAvailable( std::string const &a_lib_name, G4int a_Z, G4int a_A, G4int a_M = 0 ) const ;
146 bool isThisDataAvailable( std::string const &a_lib_name, std::string const &a_targetName ) const ;
147
148 std::string dataFilename( std::string const &lib_name, G4int a_Z, G4int a_A, G4int a_M = 0 ) const ;
149 std::string dataFilename( std::string const &lib_name, std::string const &a_targetName ) const ;
150
151 std::vector<std::string> *getNamesOfAvailableLibraries( G4int a_Z, G4int a_A, G4int a_M = 0 ) const ;
152 std::vector<std::string> *getNamesOfAvailableLibraries( std::string const &a_targetName ) const ;
153
154 std::vector<std::string> *getNamesOfAvailableTargets( ) const ;
155
156 G4GIDI_target *readTarget( std::string const &lib_name, G4int a_Z, G4int a_A, G4int a_M = 0, bool a_bind = true );
157 G4GIDI_target *readTarget( std::string const &lib_name, std::string const &a_targetName, bool a_bind = true );
158
159 G4GIDI_target *getAlreadyReadTarget( G4int a_Z, G4int a_A, G4int a_M = 0 );
160 G4GIDI_target *getAlreadyReadTarget( std::string const &a_targetName );
161
162 G4int freeTarget( G4int a_Z, G4int a_A, G4int a_M = 0 );
163 G4int freeTarget( std::string const &a_targetSymbol );
164 G4int freeTarget( G4GIDI_target *a_target );
165
166 std::vector<std::string> *getListOfReadTargetsNames( );
167};
168
169std::string G4GIDI_version( );
173std::string G4GIDI_GitHash( );
174void G4GIDI_initialize( std::string const &a_dataPath );
175std::string G4GIDI_Misc_Z_toSymbol( int a_Z );
176std::string G4GIDI_Misc_Z_A_m_ToName( int a_Z, int a_A, int a_M );
177
178#endif // End of G4GIDI_hh_included
int G4GIDI_versionMinor()
int G4GIDI_versionMajor()
std::string G4GIDI_Misc_Z_toSymbol(int a_Z)
int G4GIDI_versionPatchLevel()
#define channelID
Definition G4GIDI.hh:36
std::string G4GIDI_Misc_Z_A_m_ToName(int a_Z, int a_A, int a_M)
void G4GIDI_initialize(std::string const &a_dataPath)
Definition G4GIDI.cc:66
std::string G4GIDI_GitHash()
std::string G4GIDI_version()
PoPI::Database G4GIDI_pops
Definition G4GIDI.cc:29
int G4int
Definition G4Types.hh:85
double px
Definition G4GIDI.hh:44
double birthTimeSec
Definition G4GIDI.hh:45
double pz
Definition G4GIDI.hh:44
double kineticEnergy
Definition G4GIDI.hh:44
double py
Definition G4GIDI.hh:44
int getA() const
Definition G4GIDI.hh:76
std::vector< int > const & othersIndices()
Definition G4GIDI.hh:89
double getMass() const
Definition G4GIDI.hh:78
double sumChannelCrossSectionAtE(std::vector< int > const &a_indices, double a_energy, double a_temperature) const
G4GIDI_target(PoPI::Database const &a_pops, MCGIDI::DomainHash const &a_domainHash, GIDI::Protare const &a_GIDI_protare, MCGIDI::Protare *a_MCGIDI_protare)
channelID getChannelsID(int channelIndex) const
double getElasticFinalState(double a_energy, double a_temperature, double(*a_rng)(void *), void *a_rngState) const
int getNumberOfProductionChannels() const
double getFissionCrossSectionAtE(double a_energy, double a_temperature) const
std::string const * getName() const
Definition G4GIDI.hh:72
std::vector< int > const & captureIndices()
Definition G4GIDI.hh:87
double getTotalCrossSectionAtE(double a_energy, double a_temperature) const
std::string const * getEvaluation() const
Definition G4GIDI.hh:74
std::vector< int > const & elasticIndices()
Definition G4GIDI.hh:86
std::vector< G4GIDI_Product > * getFinalState(std::vector< int > const &a_indices, double a_energy, double a_temperature, double(*a_rng)(void *), void *a_rngState) const
int getZ() const
Definition G4GIDI.hh:75
double getElasticCrossSectionAtE(double a_energy, double a_temperature) const
std::vector< int > const & fissionIndices()
Definition G4GIDI.hh:88
std::vector< G4GIDI_Product > * getCaptureFinalState(double a_energy, double a_temperature, double(*a_rng)(void *), void *a_rngState) const
std::vector< G4GIDI_Product > * getOthersFinalState(double a_energy, double a_temperature, double(*a_rng)(void *), void *a_rngState) const
double getOthersCrossSectionAtE(double a_energy, double a_temperature) const
int sampleChannelCrossSectionAtE(std::vector< int > const &a_indices, double a_energy, double a_temperature, double(*a_rng)(void *), void *a_rngState) const
int getNumberOfChannels() const
std::vector< G4GIDI_Product > * getFissionFinalState(double a_energy, double a_temperature, double(*a_rng)(void *), void *a_rngState) const
std::string const * getFilename() const
Definition G4GIDI.hh:73
std::vector< channelID > * getProductionChannelIDs() const
std::vector< channelID > * getChannelIDs() const
double getCaptureCrossSectionAtE(double a_energy, double a_temperature) const
int getM() const
Definition G4GIDI.hh:77
G4GIDI(G4int a_ip, std::string const &a_dataDirectory)
Definition G4GIDI.cc:84
std::vector< std::string > * getListOfReadTargetsNames()
Definition G4GIDI.cc:480
std::vector< std::string > * getDataDirectories() const
Definition G4GIDI.cc:177
G4int projectileIP() const
Definition G4GIDI.hh:137
std::vector< std::string > * getNamesOfAvailableLibraries(G4int a_Z, G4int a_A, G4int a_M=0) const
Definition G4GIDI.cc:268
G4int addDataDirectory(std::string const &a_dataDirectory)
Definition G4GIDI.cc:121
G4GIDI_target * readTarget(std::string const &lib_name, G4int a_Z, G4int a_A, G4int a_M=0, bool a_bind=true)
Definition G4GIDI.cc:331
std::vector< std::string > * getNamesOfAvailableTargets() const
Definition G4GIDI.cc:300
std::string const getDataDirectoryAtIndex(G4int a_index) const
Definition G4GIDI.cc:162
G4int removeDataDirectory(std::string const &a_dataDirectory)
Definition G4GIDI.cc:138
~G4GIDI()
Definition G4GIDI.cc:109
G4int freeTarget(G4int a_Z, G4int a_A, G4int a_M=0)
Definition G4GIDI.cc:453
G4GIDI_target * getAlreadyReadTarget(G4int a_Z, G4int a_A, G4int a_M=0)
Definition G4GIDI.cc:398
std::string dataFilename(std::string const &lib_name, G4int a_Z, G4int a_A, G4int a_M=0) const
Definition G4GIDI.cc:233
G4int numberOfDataDirectories() const
Definition G4GIDI.hh:139
bool isThisDataAvailable(std::string const &a_lib_name, G4int a_Z, G4int a_A, G4int a_M=0) const
Definition G4GIDI.cc:199