#include <G4LEPTSElossDistr.hh>
Definition at line 42 of file G4LEPTSElossDistr.hh.
G4LEPTSElossDistr::G4LEPTSElossDistr |
( |
std::string |
file | ) |
|
G4bool G4LEPTSElossDistr::IsFileFound |
( |
| ) |
const |
|
inline |
void G4LEPTSElossDistr::ReadFile |
( |
| ) |
|
Definition at line 37 of file G4LEPTSElossDistr.cc.
39 theNDistributions = 0;
43 if ((fp=fopen(fileName.c_str(),
"r"))==NULL){
55 fscanf(fp,
"%i \n",&nEnergies);
56 for(
G4int ie = 0; ie < nEnergies; ie++ ){
58 fscanf(fp,
"%f \n",&energySep);
59 fscanf(fp,
"%i \n",&nAngles);
60 for(
G4int ia = 0; ia < nAngles; ia++ ){
62 fscanf(fp,
"%f \n",&angleSep);
66 angleDist[angleSep] = dist;
67 theDistributions[energySep] = angleDist;
69 fscanf(fp,
"%i \n",&nData);
74 (
"End of file found while reading file"+ fileName).c_str());
std::map< G4double, G4LEPTSDistribution * > mddist
void ReadFile(G4String fileName)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition at line 85 of file G4LEPTSElossDistr.cc.
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);
std::map< G4double, G4LEPTSDistribution * > mddist
static constexpr double second
G4double Sample(G4double, G4double)
The documentation for this class was generated from the following files: