43 if ((fp=fopen(
fileName.c_str(),
"r"))==NULL){
55 (
void) fscanf(fp,
"%i \n",&nEnergies);
56 for(
G4int ie = 0; ie < nEnergies; ie++ ){
58 (
void) fscanf(fp,
"%f \n",&energySep);
59 (
void) fscanf(fp,
"%i \n",&nAngles);
60 for(
G4int ia = 0; ia < nAngles; ia++ ){
62 (
void) fscanf(fp,
"%f \n",&angleSep);
66 angleDist[angleSep] = dist;
69 (
void) fscanf(fp,
"%i \n",&nData);
74 (
"End of file found while reading file"+
fileName).c_str());
89 if( eMin > eMax)
return 0.0;
96 mdmddist::const_iterator itedd;
99 if( eMax < energySep ) {
101 mddist dist1 = (*itedd).second;
102 mddist::const_iterator ited;
103 for( ited = dist1.begin(); ited != dist1.end(); ited++ ){
106 distr = (*ited).second;
116 return distr->
Sample(eMin, eMax);
G4double Sample(G4double, G4double)
G4LEPTSElossDistr(std::string)
static constexpr double second
void ReadFile(G4String fileName)
std::map< G4double, G4LEPTSDistribution * > mddist
G4double Sample(G4double, G4double)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
mdmddist theDistributions
typedef void(XMLCALL *XML_ElementDeclHandler)(void *userData