67 std::map<G4int,G4VEMDataSet*,std::less<G4int> >::iterator pos;
69 for (pos = param.begin(); pos != param.end(); ++pos)
85 G4int id = Z*length + parameterIndex;
86 std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos;
89 if (pos!= param.end()) {
93 G4double ee = std::max(ener.front(),std::min(ener.back(),energy));
97 G4cout <<
"WARNING: G4BremsstrahlungParameters::FindValue "
98 <<
"did not find ID = "
105void G4BremsstrahlungParameters::LoadData(
const G4String& name)
108 classic_electr_radius*electron_Compton_length*electron_Compton_length*4.0*pi;
114 if (materialTable == 0)
115 G4Exception(
"G4BremsstrahlungParameters::LoadData",
121 for (
G4int mmLocal=0; mmLocal<100; mmLocal++) {
125 for (
G4int mLocal=0; mLocal<nMaterials; mLocal++) {
127 const G4Material* material= (*materialTable)[mLocal];
131 for (
G4int iEl=0; iEl<nElements; iEl++) {
132 G4Element* element = (*elementVector)[iEl];
140 activeZ.push_back(Z);
147 char* path = getenv(
"G4LEDATA");
150 G4Exception(
"G4BremsstrahlungParameters::LoadData",
156 G4String name_a = pathString_a + name;
157 std::ifstream file_a(name_a);
158 std::filebuf* lsdp_a = file_a.rdbuf();
160 if (! (lsdp_a->is_open()) )
162 G4String stringConversion2(
"G4BremsstrahlungParameters::LoadData");
163 G4String excep = stringConversion2 + name_a;
164 G4Exception(
"G4BremsstrahlungParameters::LoadData",
178 std::vector<G4DataVector*> a;
187 file_a >> ener >> sum;
194 }
else if (ener == (
G4double)(-1)) {
202 for (
size_t k=0; k<length; ++k) {
204 G4int id = z*length + k;
207 size_t eSize = e.size();
208 for (
size_t sLocal=0; sLocal<eSize; sLocal++) {
209 eVector->push_back(e[sLocal]);
215 for (
size_t j=0; j<length; j++) {
226 for (
size_t j=0; j<length; ++j) {
231 if(ener > 1000.) ener = 1000.;
233 a[length-1]->push_back(sum);
235 for (
size_t j=0; j<length-1; j++) {
238 a[j]->push_back(qRead);
251 G4int n = paramC.size();
252 if (id < 0 || id >= n)
255 G4String ex =
"Wrong id " + stringConversion2;
256 G4Exception(
"G4BremsstrahlungParameters::ParameterC",
269 G4cout <<
"===== G4BremsstrahlungParameters =====" <<
G4endl;
274 size_t nZ = activeZ.size();
275 std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos;
277 for (
size_t j=0; j<nZ; j++) {
280 for (
size_t i=0; i<length; i++) {
282 pos = param.find(Z*length + i);
283 if (pos!= param.end()) {
285 G4cout <<
"===== Z= " << Z
286 <<
" parameter[" << i <<
"] ====="
294 G4cout <<
"==========================================" <<
G4endl;
std::vector< G4Element * > G4ElementVector
std::vector< G4Material * > G4MaterialTable
G4DLLIMPORT 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
static const G4MaterialTable * GetMaterialTable()
const G4ElementVector * GetElementVector() const
static size_t GetNumberOfMaterials()
G4double GetTotNbOfElectPerVolume() const
size_t GetNumberOfElements() const
virtual const G4DataVector & GetEnergies(G4int componentId) const =0
virtual G4double FindValue(G4double x, G4int componentId=0) const =0
virtual void PrintData(void) const =0
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)