43 ,USE_ONLY_PHOTONEVAPORATION(false)
44 ,SKIP_MISSING_ISOTOPES(false)
45 ,NEGLECT_DOPPLER(false)
46 ,DO_NOT_ADJUST_FINAL_STATE(false)
47 ,PRODUCE_FISSION_FRAGMENTS(false)
48 ,theElasticCrossSections(NULL)
49 ,theCaptureCrossSections(NULL)
51 ,theFissionCrossSections(NULL)
56 ,theTSCoherentCrossSections(NULL)
57 ,theTSIncoherentCrossSections(NULL)
58 ,theTSInelasticCrossSections(NULL)
59 ,theTSCoherentFinalStates(NULL)
60 ,theTSIncoherentFinalStates(NULL)
61 ,theTSInelasticFinalStates(NULL)
64 if ( getenv(
"G4NEUTRONHP_DO_NOT_ADJUST_FINAL_STATE" ) || getenv(
"G4PHP_DO_NOT_ADJUST_FINAL_STATE") )
DO_NOT_ADJUST_FINAL_STATE =
true;
66 if ( getenv(
"G4NEUTRONHP_NEGLECT_DOPPLER" ) || getenv(
"G4PHP_NEGLECT_DOPPLER") )
NEGLECT_DOPPLER =
true;
104 compfilename +=
".z";
105 std::ifstream* in =
new std::ifstream ( compfilename , std::ios::binary | std::ios::ate );
109 G4int file_size = in->tellg();
110 in->seekg( 0 , std::ios::beg );
111 Bytef* compdata =
new Bytef[ file_size ];
114 in->read( (
char*)compdata , file_size );
117 uLongf complen = (uLongf) ( file_size*4 );
118 Bytef* uncompdata =
new Bytef[complen];
120 while ( Z_OK !=
uncompress ( uncompdata , &complen , compdata , file_size ) ) {
124 uncompdata =
new Bytef[complen];
129 delete [] uncompdata;
132 std::ifstream thefData( filename , std::ios::in | std::ios::ate );
133 if ( thefData.good() ) {
134 G4int file_size = thefData.tellg();
135 thefData.seekg( 0 , std::ios::beg );
136 char* filedata =
new char[ file_size ];
138 thefData.read( filedata , file_size );
141 data =
new G4String ( filedata , file_size );
146 iss.setstate( std::ios::badbit );
149 if ( data != NULL ) {
153 if (
id ==
"G4NDL" ) {
159 iss.seekg( 0 , std::ios::beg );
163 in->close();
delete in;
170 compfilename +=
".z";
171 std::ifstream* in =
new std::ifstream ( compfilename , std::ios::binary | std::ios::ate );
177 std::ifstream thefData( filename , std::ios::in | std::ios::ate );
178 if ( thefData.good() ) {
184 iss.setstate( std::ios::badbit );
192 G4cout <<
"You are setting a new verbose level for Particle HP package." <<
G4endl;
193 G4cout <<
"the new value will be used in whole of the Particle HP package, i.e., models and cross sections for Capture, Elastic, Fission and Inelastic interaction." <<
G4endl;
199 mDataEvaluation.insert( std::pair < G4String , G4String > ( filename , source ) );
205 G4cout <<
"Data source of this Partile HP calculation are " <<
G4endl;
206 for ( std::map< G4String , G4String >::iterator
static G4ParticleHPManager * GetInstance()
void RegisterInelasticCrossSections(const G4ParticleDefinition *, G4PhysicsTable *)
G4ParticleHPMessenger * messenger
static G4ParticleHPThreadLocalManager * GetInstance()
void GetDataStream(G4String, std::istringstream &iss)
G4bool PRODUCE_FISSION_FRAGMENTS
void CloseReactionWhiteBoard()
void SetVerboseLevel(G4int i)
G4bool USE_ONLY_PHOTONEVAPORATION
static G4ParticleHPManager * instance
G4GLOB_DLL std::ostream G4cout
G4ParticleHPReactionWhiteBoard * GetReactionWhiteBoard()
void OpenReactionWhiteBoard()
void GetDataStream2(G4String, std::istringstream &iss)
void OpenReactionWhiteBoard()
std::map< const G4ParticleDefinition *, std::vector< G4ParticleHPChannelList * > * > theInelasticFSs
int ZEXPORT uncompress(Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)
void register_data_file(G4String, G4String)
std::map< const G4ParticleDefinition *, G4PhysicsTable * > theInelasticCrossSections
G4bool SKIP_MISSING_ISOTOPES
G4PhysicsTable * GetInelasticCrossSections(const G4ParticleDefinition *)
std::vector< G4ParticleHPChannelList * > * GetInelasticFinalStates(const G4ParticleDefinition *)
void CloseReactionWhiteBoard()
std::map< G4String, G4String > mDataEvaluation
G4ParticleHPReactionWhiteBoard * GetReactionWhiteBoard()
void RegisterInelasticFinalStates(const G4ParticleDefinition *, std::vector< G4ParticleHPChannelList * > *)
G4bool DO_NOT_ADJUST_FINAL_STATE