39 theNDistributions = 0;
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;
67 theDistributions[energySep] = angleDist;
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;
93 if( theNDistributions == 1 ){
94 distr = (*( (*(theDistributions.begin())).second ).begin()).second;
96 mdmddist::const_iterator itedd;
97 for( itedd = theDistributions.begin(); itedd != theDistributions.end(); 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);
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::map< G4double, G4LEPTSDistribution * > mddist
G4double Sample(G4double, G4double)
void ReadFile(G4String fileName)
G4double Sample(G4double, G4double)
G4LEPTSElossDistr(std::string)