43G4ParticleHPManager::G4ParticleHPManager()
45,USE_ONLY_PHOTONEVAPORATION(false)
46,SKIP_MISSING_ISOTOPES(false)
47,NEGLECT_DOPPLER(false)
48,DO_NOT_ADJUST_FINAL_STATE(false)
49,PRODUCE_FISSION_FRAGMENTS(false)
50,USE_WENDT_FISSION_MODEL(false)
51,USE_NRESP71_MODEL(false)
52,theElasticCrossSections(nullptr)
53,theCaptureCrossSections(nullptr)
54,theFissionCrossSections(nullptr)
55,theElasticFSs(nullptr)
56,theCaptureFSs(nullptr)
57,theFissionFSs(nullptr)
58,theTSCoherentCrossSections(nullptr)
59,theTSIncoherentCrossSections(nullptr)
60,theTSInelasticCrossSections(nullptr)
61,theTSCoherentFinalStates(nullptr)
62,theTSIncoherentFinalStates(nullptr)
63,theTSInelasticFinalStates(nullptr)
68G4ParticleHPManager::~G4ParticleHPManager()
76 if (instance ==
nullptr)
102 compfilename +=
".z";
103 std::ifstream* in =
new std::ifstream ( compfilename , std::ios::binary | std::ios::ate );
107 std::streamoff file_size = in->tellg();
108 in->seekg( 0 , std::ios::beg );
109 Bytef* compdata =
new Bytef[ file_size ];
113 in->read( (
char*)compdata , file_size );
116 uLongf complen = (uLongf) ( file_size*4 );
117 Bytef* uncompdata =
new Bytef[complen];
119 while (
Z_OK !=
uncompress ( uncompdata , &complen , compdata , file_size ) )
123 uncompdata =
new Bytef[complen];
128 delete [] uncompdata;
133 std::ifstream thefData( filename , std::ios::in | std::ios::ate );
134 if ( thefData.good() )
136 std::streamoff file_size = thefData.tellg();
137 thefData.seekg( 0 , std::ios::beg );
138 char* filedata =
new char[ file_size ];
141 thefData.read( filedata , file_size );
144 data =
new G4String ( filedata , file_size );
151 iss.setstate( std::ios::badbit );
164 register_data_file(filename,source);
168 iss.seekg( 0 , std::ios::beg );
171 in->close();
delete in;
180 compfilename +=
".z";
181 std::ifstream* in =
new std::ifstream ( compfilename , std::ios::binary | std::ios::ate );
189 std::ifstream thefData( filename , std::ios::in | std::ios::ate );
190 if ( thefData.good() )
199 iss.setstate( std::ios::badbit );
207 G4cout <<
"You are setting a new verbose level for Particle HP package." <<
G4endl;
208 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;
209 verboseLevel = newValue;
212void G4ParticleHPManager::register_data_file(
G4String filename,
G4String source)
214 mDataEvaluation.insert( std::pair < G4String , G4String > ( filename , source ) );
220 G4cout <<
"Data source of this Partile HP calculation are " <<
G4endl;
221 for (
auto it = mDataEvaluation.cbegin(); it != mDataEvaluation.cend(); ++it)
230 if ( theInelasticCrossSections.end() != theInelasticCrossSections.find( particle ) )
231 return theInelasticCrossSections.find( particle )->second;
238 theInelasticCrossSections.insert( std::pair<const G4ParticleDefinition* , G4PhysicsTable* >( particle , val ) );
243 if ( theInelasticFSs.end() != theInelasticFSs.find( particle ) )
244 return theInelasticFSs.find( particle )->second;
251 theInelasticFSs.insert ( std::pair<
const G4ParticleDefinition*,std::vector<G4ParticleHPChannelList*>*>( particle , val ) );
258 <<
"=======================================================" <<
G4endl
259 <<
"====== ParticleHP Physics Parameters ========" <<
G4endl
260 <<
"=======================================================" <<
G4endl
261 <<
" UseOnlyPhotoEvaporation ? " << USE_ONLY_PHOTONEVAPORATION <<
G4endl
262 <<
" SkipMissingIsotopes ? " << SKIP_MISSING_ISOTOPES <<
G4endl
263 <<
" NeglectDoppler ? " << NEGLECT_DOPPLER <<
G4endl
264 <<
" DoNotAdjustFinalState ? " << DO_NOT_ADJUST_FINAL_STATE <<
G4endl
265 <<
" ProduceFissionFragments ? " << PRODUCE_FISSION_FRAGMENTS <<
G4endl
266 <<
" UseWendtFissionModel ? " << USE_WENDT_FISSION_MODEL <<
G4endl
267 <<
" UseNRESP71Model ? " << USE_NRESP71_MODEL <<
G4endl
268 <<
"=======================================================" <<
G4endl
G4GLOB_DLL std::ostream G4cout
void GetDataStream2(G4String, std::istringstream &iss)
std::vector< G4ParticleHPChannelList * > * GetInelasticFinalStates(const G4ParticleDefinition *)
void RegisterInelasticFinalStates(const G4ParticleDefinition *, std::vector< G4ParticleHPChannelList * > *)
void SetVerboseLevel(G4int i)
G4PhysicsTable * GetInelasticCrossSections(const G4ParticleDefinition *)
void RegisterInelasticCrossSections(const G4ParticleDefinition *, G4PhysicsTable *)
static G4ParticleHPManager * GetInstance()
void CloseReactionWhiteBoard()
void GetDataStream(G4String, std::istringstream &iss)
void OpenReactionWhiteBoard()
G4ParticleHPReactionWhiteBoard * GetReactionWhiteBoard()
void CloseReactionWhiteBoard()
static G4ParticleHPThreadLocalManager * GetInstance()
void OpenReactionWhiteBoard()
G4ParticleHPReactionWhiteBoard * GetReactionWhiteBoard()
int ZEXPORT uncompress(Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)