66 std::map<G4int,G4VEMDataSet*,std::less<G4int> >::iterator pos;
68 for (pos = param.begin(); pos != param.end(); ++pos)
84 G4int id = Z*length + parameterIndex;
85 std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos;
88 if (pos!= param.end()) {
92 G4double ee = std::max(ener.front(),std::min(ener.back(),energy));
96 G4cout <<
"WARNING: G4BremsstrahlungParameters::FindValue "
97 <<
"did not find ID = "
104void G4BremsstrahlungParameters::LoadData(
const G4String& name)
107 classic_electr_radius*electron_Compton_length*electron_Compton_length*4.0*pi;
113 if (materialTable == 0)
114 G4Exception(
"G4BremsstrahlungParameters::LoadData",
120 for (
G4int mmLocal=0; mmLocal<100; mmLocal++) {
124 for (
G4int mLocal=0; mLocal<nMaterials; mLocal++) {
126 const G4Material* material= (*materialTable)[mLocal];
130 for (
G4int iEl=0; iEl<nElements; iEl++) {
131 G4Element* element = (*elementVector)[iEl];
139 activeZ.push_back(Z);
146 char* path = std::getenv(
"G4LEDATA");
149 G4Exception(
"G4BremsstrahlungParameters::LoadData",
156 std::ifstream file_a(name_a);
157 std::filebuf* lsdp_a = file_a.rdbuf();
159 if (! (lsdp_a->is_open()) )
161 G4String stringConversion2(
"G4BremsstrahlungParameters::LoadData");
162 G4String excep = stringConversion2 + name_a;
163 G4Exception(
"G4BremsstrahlungParameters::LoadData",
177 std::vector<G4DataVector*> a;
186 file_a >> ener >> sum;
193 }
else if (ener == (
G4double)(-1)) {
201 for (
size_t k=0; k<length; ++k) {
203 G4int id = z*length + k;
206 size_t eSize = e.size();
207 for (
size_t sLocal=0; sLocal<eSize; sLocal++) {
208 eVector->push_back(e[sLocal]);
214 for (
size_t j=0; j<length; j++) {
225 for (
size_t j=0; j<length; ++j) {
230 if(ener > 1000.) ener = 1000.;
232 a[length-1]->push_back(sum);
234 for (
size_t j=0; j<length-1; j++) {
237 a[j]->push_back(qRead);
250 G4int n = paramC.size();
251 if (id < 0 || id >= n)
254 G4String ex =
"Wrong id " + stringConversion2;
255 G4Exception(
"G4BremsstrahlungParameters::ParameterC",
268 G4cout <<
"===== G4BremsstrahlungParameters =====" <<
G4endl;
273 size_t nZ = activeZ.size();
274 std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos;
276 for (
size_t j=0; j<nZ; j++) {
279 for (
size_t i=0; i<length; i++) {
281 pos = param.find(Z*length + i);
282 if (pos!= param.end()) {
284 G4cout <<
"===== Z= " << Z
285 <<
" parameter[" << i <<
"] ====="
293 G4cout <<
"==========================================" <<
G4endl;
std::vector< G4Element * > G4ElementVector
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::vector< G4Material * > G4MaterialTable
G4GLOB_DLL std::ostream G4cout
G4double Parameter(G4int parameterIndex, G4int Z, G4double energy) const
~G4BremsstrahlungParameters()
G4BremsstrahlungParameters(const G4String &name, size_t num, G4int minZ=1, G4int maxZ=99)
G4double ParameterC(G4int index) const
G4bool contains(const G4double &) const
const G4ElementVector * GetElementVector() const
static size_t GetNumberOfMaterials()
G4double GetTotNbOfElectPerVolume() const
size_t GetNumberOfElements() const
static G4MaterialTable * GetMaterialTable()
virtual const G4DataVector & GetEnergies(G4int componentId) const =0
virtual G4double FindValue(G4double x, G4int componentId=0) const =0
virtual void PrintData(void) const =0
const char * name(G4int ptype)