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()) {
97 G4cout <<
"WARNING: G4BremsstrahlungParameters::FindValue "
98 <<
"did not find ID = "
105 void G4BremsstrahlungParameters::LoadData(
const G4String&
name)
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",
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);
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;
virtual const G4DataVector & GetEnergies(G4int componentId) const =0
virtual G4double FindValue(G4double x, G4int componentId=0) const =0
G4double GetTotNbOfElectPerVolume() const
std::vector< G4Element * > G4ElementVector
static G4MaterialTable * GetMaterialTable()
std::vector< G4Material * > G4MaterialTable
const G4ElementVector * GetElementVector() const
G4GLOB_DLL std::ostream G4cout
const XML_Char int const XML_Char * value
static constexpr double classic_electr_radius
G4double Parameter(G4int parameterIndex, G4int Z, G4double energy) const
static size_t GetNumberOfMaterials()
G4BremsstrahlungParameters(const G4String &name, size_t num, G4int minZ=1, G4int maxZ=99)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
virtual void PrintData(void) const =0
~G4BremsstrahlungParameters()
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4double energy(const ThreeVector &p, const G4double m)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
static constexpr double pi
size_t GetNumberOfElements() const
G4bool contains(const G4double &) const
G4double ParameterC(G4int index) const
static const G4double pos
static constexpr double electron_Compton_length