Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4ParticleHPManager Class Reference

#include <G4ParticleHPManager.hh>

Public Member Functions

G4ParticleHPReactionWhiteBoardGetReactionWhiteBoard ()
 
void OpenReactionWhiteBoard ()
 
void CloseReactionWhiteBoard ()
 
void GetDataStream (G4String, std::istringstream &iss)
 
void GetDataStream2 (G4String, std::istringstream &iss)
 
void SetVerboseLevel (G4int i)
 
G4int GetVerboseLevel ()
 
void DumpDataSource ()
 
G4bool GetUseOnlyPhotoEvaporation ()
 
void SetUseOnlyPhotoEvaporation (G4bool val)
 
G4bool GetSkipMissingIsotopes ()
 
G4bool GetNeglectDoppler ()
 
G4bool GetDoNotAdjustFinalState ()
 
G4bool GetProduceFissionFragments ()
 
void SetSkipMissingIsotopes (G4bool val)
 
void SetNeglectDoppler (G4bool val)
 
void SetDoNotAdjustFinalState (G4bool val)
 
void SetProduceFissionFragments (G4bool val)
 
void RegisterElasticCrossSections (G4PhysicsTable *val)
 
G4PhysicsTableGetElasticCrossSections ()
 
void RegisterCaptureCrossSections (G4PhysicsTable *val)
 
G4PhysicsTableGetCaptureCrossSections ()
 
void RegisterInelasticCrossSections (const G4ParticleDefinition *, G4PhysicsTable *)
 
G4PhysicsTableGetInelasticCrossSections (const G4ParticleDefinition *)
 
void RegisterFissionCrossSections (G4PhysicsTable *val)
 
G4PhysicsTableGetFissionCrossSections ()
 
std::vector
< G4ParticleHPChannel * > * 
GetElasticFinalStates ()
 
void RegisterElasticFinalStates (std::vector< G4ParticleHPChannel * > *val)
 
std::vector
< G4ParticleHPChannelList * > * 
GetInelasticFinalStates (const G4ParticleDefinition *)
 
void RegisterInelasticFinalStates (const G4ParticleDefinition *, std::vector< G4ParticleHPChannelList * > *)
 
std::vector
< G4ParticleHPChannel * > * 
GetCaptureFinalStates ()
 
void RegisterCaptureFinalStates (std::vector< G4ParticleHPChannel * > *val)
 
std::vector
< G4ParticleHPChannel * > * 
GetFissionFinalStates ()
 
void RegisterFissionFinalStates (std::vector< G4ParticleHPChannel * > *val)
 
std::map< G4int, std::map
< G4double, G4ParticleHPVector * > * > * 
GetThermalScatteringCoherentCrossSections ()
 
void RegisterThermalScatteringCoherentCrossSections (std::map< G4int, std::map< G4double, G4ParticleHPVector * > * > *val)
 
std::map< G4int, std::map
< G4double, G4ParticleHPVector * > * > * 
GetThermalScatteringIncoherentCrossSections ()
 
void RegisterThermalScatteringIncoherentCrossSections (std::map< G4int, std::map< G4double, G4ParticleHPVector * > * > *val)
 
std::map< G4int, std::map
< G4double, G4ParticleHPVector * > * > * 
GetThermalScatteringInelasticCrossSections ()
 
void RegisterThermalScatteringInelasticCrossSections (std::map< G4int, std::map< G4double, G4ParticleHPVector * > * > *val)
 
std::map< G4int, std::map
< G4double, std::vector
< std::pair< G4double,
G4double > * > * > * > * 
GetThermalScatteringCoherentFinalStates ()
 
void RegisterThermalScatteringCoherentFinalStates (std::map< G4int, std::map< G4double, std::vector< std::pair< G4double, G4double > * > * > * > *val)
 
std::map< G4int, std::map
< G4double, std::vector
< E_isoAng * > * > * > * 
GetThermalScatteringIncoherentFinalStates ()
 
void RegisterThermalScatteringIncoherentFinalStates (std::map< G4int, std::map< G4double, std::vector< E_isoAng * > * > * > *val)
 
std::map< G4int, std::map
< G4double, std::vector
< E_P_E_isoAng * > * > * > * 
GetThermalScatteringInelasticFinalStates ()
 
void RegisterThermalScatteringInelasticFinalStates (std::map< G4int, std::map< G4double, std::vector< E_P_E_isoAng * > * > * > *val)
 

Static Public Member Functions

static G4ParticleHPManagerGetInstance ()
 

Detailed Description

Definition at line 53 of file G4ParticleHPManager.hh.

Member Function Documentation

void G4ParticleHPManager::CloseReactionWhiteBoard ( )

Definition at line 93 of file G4ParticleHPManager.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void G4ParticleHPManager::DumpDataSource ( )

Definition at line 202 of file G4ParticleHPManager.cc.

203 {
204 
205  G4cout << "Data source of this Partile HP calculation are " << G4endl;
206  for ( std::map< G4String , G4String >::iterator
207  it = mDataEvaluation.begin() ; it != mDataEvaluation.end() ; it++ ) {
208  G4cout << it->first << " " << it->second << G4endl;
209  }
210  G4cout << G4endl;
211 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
G4PhysicsTable* G4ParticleHPManager::GetCaptureCrossSections ( )
inline

Definition at line 96 of file G4ParticleHPManager.hh.

96 { return theCaptureCrossSections; };

Here is the caller graph for this function:

std::vector<G4ParticleHPChannel*>* G4ParticleHPManager::GetCaptureFinalStates ( )
inline

Definition at line 106 of file G4ParticleHPManager.hh.

106 { return theCaptureFSs; };

Here is the caller graph for this function:

void G4ParticleHPManager::GetDataStream ( G4String  filename,
std::istringstream &  iss 
)

Definition at line 100 of file G4ParticleHPManager.cc.

101 {
102  G4String* data=NULL;
103  G4String compfilename(filename);
104  compfilename += ".z";
105  std::ifstream* in = new std::ifstream ( compfilename , std::ios::binary | std::ios::ate );
106  if ( in->good() )
107  {
108 // Use the compressed file
109  G4int file_size = in->tellg();
110  in->seekg( 0 , std::ios::beg );
111  Bytef* compdata = new Bytef[ file_size ];
112 
113  while ( *in ) { // Loop checking, 11.05.2015, T. Koi
114  in->read( (char*)compdata , file_size );
115  }
116 
117  uLongf complen = (uLongf) ( file_size*4 );
118  Bytef* uncompdata = new Bytef[complen];
119 
120  while ( Z_OK != uncompress ( uncompdata , &complen , compdata , file_size ) ) { // Loop checking, 11.05.2015, T. Koi
121  //G4cout << "Too small, retry 2 times bigger size." << G4endl;
122  delete[] uncompdata;
123  complen *= 2;
124  uncompdata = new Bytef[complen];
125  }
126  delete [] compdata;
127  // Now "complen" has uncomplessed size
128  data = new G4String ( (char*)uncompdata , (G4long)complen );
129  delete [] uncompdata;
130  } else {
131 // Use regular text file
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 ];
137  while ( thefData ) { // Loop checking, 11.05.2015, T. Koi
138  thefData.read( filedata , file_size );
139  }
140  thefData.close();
141  data = new G4String ( filedata , file_size );
142  delete [] filedata;
143  } else {
144 // found no data file
145 // set error bit to the stream
146  iss.setstate( std::ios::badbit );
147  }
148  }
149  if ( data != NULL ) {
150  iss.str(*data);
151  G4String id;
152  iss >> id;
153  if ( id == "G4NDL" ) {
154  //Register information of file
155  G4String source;
156  iss >> source;
157  register_data_file(filename,source);
158  } else {
159  iss.seekg( 0 , std::ios::beg );
160  }
161  }
162  //G4cout << iss.rdbuf()->in_avail() << G4endl;
163  in->close(); delete in;
164  delete data;
165 }
long G4long
Definition: G4Types.hh:80
int G4int
Definition: G4Types.hh:78
const XML_Char const XML_Char * data
Definition: expat.h:268
int ZEXPORT uncompress(Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)
Definition: uncompr.cc:24
#define Z_OK
Definition: zlib.h:173

Here is the call graph for this function:

Here is the caller graph for this function:

void G4ParticleHPManager::GetDataStream2 ( G4String  filename,
std::istringstream &  iss 
)

Definition at line 167 of file G4ParticleHPManager.cc.

168 {
169  G4String compfilename(filename);
170  compfilename += ".z";
171  std::ifstream* in = new std::ifstream ( compfilename , std::ios::binary | std::ios::ate );
172  if ( in->good() )
173  {
174 // Compressed file is exist
175  in->close();
176  } else {
177  std::ifstream thefData( filename , std::ios::in | std::ios::ate );
178  if ( thefData.good() ) {
179 // Regular text file is exist
180  thefData.close();
181  } else {
182 // found no data file
183 // set error bit to the stream
184  iss.setstate( std::ios::badbit );
185  }
186  }
187  delete in;
188 }

Here is the caller graph for this function:

G4bool G4ParticleHPManager::GetDoNotAdjustFinalState ( )
inline

Definition at line 85 of file G4ParticleHPManager.hh.

85 { return DO_NOT_ADJUST_FINAL_STATE; };
G4PhysicsTable* G4ParticleHPManager::GetElasticCrossSections ( )
inline

Definition at line 94 of file G4ParticleHPManager.hh.

94 { return theElasticCrossSections; };

Here is the caller graph for this function:

std::vector<G4ParticleHPChannel*>* G4ParticleHPManager::GetElasticFinalStates ( )
inline

Definition at line 102 of file G4ParticleHPManager.hh.

102 { return theElasticFSs; };

Here is the caller graph for this function:

G4PhysicsTable* G4ParticleHPManager::GetFissionCrossSections ( )
inline

Definition at line 100 of file G4ParticleHPManager.hh.

100 { return theFissionCrossSections; };

Here is the caller graph for this function:

std::vector<G4ParticleHPChannel*>* G4ParticleHPManager::GetFissionFinalStates ( )
inline

Definition at line 108 of file G4ParticleHPManager.hh.

108 { return theFissionFSs; };

Here is the caller graph for this function:

G4PhysicsTable * G4ParticleHPManager::GetInelasticCrossSections ( const G4ParticleDefinition particle)

Definition at line 213 of file G4ParticleHPManager.cc.

213  {
214  if ( theInelasticCrossSections.end() != theInelasticCrossSections.find( particle ) )
215  return theInelasticCrossSections.find( particle )->second;
216  else
217  return NULL;
218 }

Here is the caller graph for this function:

std::vector< G4ParticleHPChannelList * > * G4ParticleHPManager::GetInelasticFinalStates ( const G4ParticleDefinition particle)

Definition at line 224 of file G4ParticleHPManager.cc.

224  {
225  if ( theInelasticFSs.end() != theInelasticFSs.find( particle ) )
226  return theInelasticFSs.find( particle )->second;
227  else
228  return NULL;
229 }

Here is the caller graph for this function:

static G4ParticleHPManager* G4ParticleHPManager::GetInstance ( )
inlinestatic

Definition at line 56 of file G4ParticleHPManager.hh.

56  {
57  if ( instance == NULL) instance = new G4ParticleHPManager();
58  return instance;
59  };

Here is the caller graph for this function:

G4bool G4ParticleHPManager::GetNeglectDoppler ( )
inline

Definition at line 84 of file G4ParticleHPManager.hh.

84 { return NEGLECT_DOPPLER; };
G4bool G4ParticleHPManager::GetProduceFissionFragments ( )
inline

Definition at line 86 of file G4ParticleHPManager.hh.

86 { return PRODUCE_FISSION_FRAGMENTS; };

Here is the caller graph for this function:

G4ParticleHPReactionWhiteBoard * G4ParticleHPManager::GetReactionWhiteBoard ( )

Definition at line 84 of file G4ParticleHPManager.cc.

85 {
86 // if ( RWB == NULL ) {
87 // G4cout << "Warning: try to access G4ParticleHPReactionWhiteBoard before opening" << G4endl;
88 // RWB = new G4ParticleHPReactionWhiteBoard();
89 // }
90 // return RWB;
92 }
static G4ParticleHPThreadLocalManager * GetInstance()
G4ParticleHPReactionWhiteBoard * GetReactionWhiteBoard()

Here is the call graph for this function:

Here is the caller graph for this function:

G4bool G4ParticleHPManager::GetSkipMissingIsotopes ( )
inline

Definition at line 83 of file G4ParticleHPManager.hh.

83 { return SKIP_MISSING_ISOTOPES; };

Here is the caller graph for this function:

std::map<G4int,std::map<G4double,G4ParticleHPVector*>*>* G4ParticleHPManager::GetThermalScatteringCoherentCrossSections ( )
inline

Definition at line 111 of file G4ParticleHPManager.hh.

111 { return theTSCoherentCrossSections; };

Here is the caller graph for this function:

std::map< G4int , std::map < G4double , std::vector < std::pair< G4double , G4double >* >* >* >* G4ParticleHPManager::GetThermalScatteringCoherentFinalStates ( )
inline

Definition at line 118 of file G4ParticleHPManager.hh.

118 { return theTSCoherentFinalStates; };
std::map<G4int,std::map<G4double,G4ParticleHPVector*>*>* G4ParticleHPManager::GetThermalScatteringIncoherentCrossSections ( )
inline

Definition at line 113 of file G4ParticleHPManager.hh.

113 { return theTSIncoherentCrossSections; };

Here is the caller graph for this function:

std::map< G4int , std::map < G4double , std::vector < E_isoAng* >* >* >* G4ParticleHPManager::GetThermalScatteringIncoherentFinalStates ( )
inline

Definition at line 120 of file G4ParticleHPManager.hh.

120 { return theTSIncoherentFinalStates; };
std::map<G4int,std::map<G4double,G4ParticleHPVector*>*>* G4ParticleHPManager::GetThermalScatteringInelasticCrossSections ( )
inline

Definition at line 115 of file G4ParticleHPManager.hh.

115 { return theTSInelasticCrossSections; };

Here is the caller graph for this function:

std::map< G4int , std::map < G4double , std::vector < E_P_E_isoAng* >* >* >* G4ParticleHPManager::GetThermalScatteringInelasticFinalStates ( )
inline

Definition at line 122 of file G4ParticleHPManager.hh.

122 { return theTSInelasticFinalStates; };
G4bool G4ParticleHPManager::GetUseOnlyPhotoEvaporation ( )
inline

Definition at line 81 of file G4ParticleHPManager.hh.

81 { return USE_ONLY_PHOTONEVAPORATION; };
G4int G4ParticleHPManager::GetVerboseLevel ( )
inline

Definition at line 77 of file G4ParticleHPManager.hh.

77 {return verboseLevel; };

Here is the caller graph for this function:

void G4ParticleHPManager::OpenReactionWhiteBoard ( )

Definition at line 74 of file G4ParticleHPManager.cc.

75 {
76 // if ( RWB != NULL ) {
77 // G4cout << "Warning: G4ParticleHPReactionWhiteBoard is tried doubly opening" << G4endl;
78 // RWB = new G4ParticleHPReactionWhiteBoard();
79 // }
80 //
81 // RWB = new G4ParticleHPReactionWhiteBoard();
83 }
static G4ParticleHPThreadLocalManager * GetInstance()

Here is the call graph for this function:

Here is the caller graph for this function:

void G4ParticleHPManager::RegisterCaptureCrossSections ( G4PhysicsTable val)
inline

Definition at line 95 of file G4ParticleHPManager.hh.

95 { theCaptureCrossSections = val; };

Here is the caller graph for this function:

void G4ParticleHPManager::RegisterCaptureFinalStates ( std::vector< G4ParticleHPChannel * > *  val)
inline

Definition at line 107 of file G4ParticleHPManager.hh.

107 { theCaptureFSs = val; };

Here is the caller graph for this function:

void G4ParticleHPManager::RegisterElasticCrossSections ( G4PhysicsTable val)
inline

Definition at line 93 of file G4ParticleHPManager.hh.

93 { theElasticCrossSections = val; };

Here is the caller graph for this function:

void G4ParticleHPManager::RegisterElasticFinalStates ( std::vector< G4ParticleHPChannel * > *  val)
inline

Definition at line 103 of file G4ParticleHPManager.hh.

103 { theElasticFSs = val; };

Here is the caller graph for this function:

void G4ParticleHPManager::RegisterFissionCrossSections ( G4PhysicsTable val)
inline

Definition at line 99 of file G4ParticleHPManager.hh.

99 { theFissionCrossSections = val; };

Here is the caller graph for this function:

void G4ParticleHPManager::RegisterFissionFinalStates ( std::vector< G4ParticleHPChannel * > *  val)
inline

Definition at line 109 of file G4ParticleHPManager.hh.

109 { theFissionFSs = val; };

Here is the caller graph for this function:

void G4ParticleHPManager::RegisterInelasticCrossSections ( const G4ParticleDefinition particle,
G4PhysicsTable val 
)

Definition at line 220 of file G4ParticleHPManager.cc.

220  {
221  theInelasticCrossSections.insert( std::pair<const G4ParticleDefinition* , G4PhysicsTable* >( particle , val ) );
222 }

Here is the caller graph for this function:

void G4ParticleHPManager::RegisterInelasticFinalStates ( const G4ParticleDefinition particle,
std::vector< G4ParticleHPChannelList * > *  val 
)

Definition at line 231 of file G4ParticleHPManager.cc.

231  {
232  theInelasticFSs.insert ( std::pair<const G4ParticleDefinition*,std::vector<G4ParticleHPChannelList*>*>( particle , val ) );
233 }

Here is the caller graph for this function:

void G4ParticleHPManager::RegisterThermalScatteringCoherentCrossSections ( std::map< G4int, std::map< G4double, G4ParticleHPVector * > * > *  val)
inline

Definition at line 112 of file G4ParticleHPManager.hh.

112 { theTSCoherentCrossSections = val; };

Here is the caller graph for this function:

void G4ParticleHPManager::RegisterThermalScatteringCoherentFinalStates ( std::map< G4int, std::map< G4double, std::vector< std::pair< G4double, G4double > * > * > * > *  val)
inline

Definition at line 119 of file G4ParticleHPManager.hh.

119 { theTSCoherentFinalStates = val; };
void G4ParticleHPManager::RegisterThermalScatteringIncoherentCrossSections ( std::map< G4int, std::map< G4double, G4ParticleHPVector * > * > *  val)
inline

Definition at line 114 of file G4ParticleHPManager.hh.

114 { theTSIncoherentCrossSections = val; };

Here is the caller graph for this function:

void G4ParticleHPManager::RegisterThermalScatteringIncoherentFinalStates ( std::map< G4int, std::map< G4double, std::vector< E_isoAng * > * > * > *  val)
inline

Definition at line 121 of file G4ParticleHPManager.hh.

121 { theTSIncoherentFinalStates = val; };
void G4ParticleHPManager::RegisterThermalScatteringInelasticCrossSections ( std::map< G4int, std::map< G4double, G4ParticleHPVector * > * > *  val)
inline

Definition at line 116 of file G4ParticleHPManager.hh.

116 { theTSInelasticCrossSections = val; };

Here is the caller graph for this function:

void G4ParticleHPManager::RegisterThermalScatteringInelasticFinalStates ( std::map< G4int, std::map< G4double, std::vector< E_P_E_isoAng * > * > * > *  val)
inline

Definition at line 123 of file G4ParticleHPManager.hh.

123 { theTSInelasticFinalStates = val; };
void G4ParticleHPManager::SetDoNotAdjustFinalState ( G4bool  val)
inline

Definition at line 90 of file G4ParticleHPManager.hh.

90 { DO_NOT_ADJUST_FINAL_STATE = val; };

Here is the caller graph for this function:

void G4ParticleHPManager::SetNeglectDoppler ( G4bool  val)
inline

Definition at line 89 of file G4ParticleHPManager.hh.

89 { NEGLECT_DOPPLER = val; };

Here is the caller graph for this function:

void G4ParticleHPManager::SetProduceFissionFragments ( G4bool  val)
inline

Definition at line 91 of file G4ParticleHPManager.hh.

91 { PRODUCE_FISSION_FRAGMENTS = val; };

Here is the caller graph for this function:

void G4ParticleHPManager::SetSkipMissingIsotopes ( G4bool  val)
inline

Definition at line 88 of file G4ParticleHPManager.hh.

88 { SKIP_MISSING_ISOTOPES = val; };

Here is the caller graph for this function:

void G4ParticleHPManager::SetUseOnlyPhotoEvaporation ( G4bool  val)
inline

Definition at line 82 of file G4ParticleHPManager.hh.

82 { USE_ONLY_PHOTONEVAPORATION = val; };

Here is the caller graph for this function:

void G4ParticleHPManager::SetVerboseLevel ( G4int  i)

Definition at line 190 of file G4ParticleHPManager.cc.

191 {
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;
194  verboseLevel = newValue;
195 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Here is the caller graph for this function:


The documentation for this class was generated from the following files: