We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dear @Gratt55,
In the function GammaHandler::photoIonization is the first dimension of sourceInfo expected to be large (e.g. > 10)?
GammaHandler::photoIonization
sourceInfo
> 10
If yes, it might be worth changing
double GammaHandler::photoIonization(vector<vector<double>> sourceInfo, vector<double> xyTry) { //implement simple delta function to the spectrum double fValue = 0.0; for(int i = 0; i < sourceInfo.size(); i++) { double initialEnergy = sourceInfo[i][0]; double br = sourceInfo[i][1]; double pe = sourceInfo[i][2]; double co = sourceInfo[i][3]; double pp = sourceInfo[i][4]; if(abs(xyTry[0]-initialEnergy) < brThresh) { fValue = yMax*br*(pe/(pe+co+pp)); } } return fValue; }
to
double GammaHandler::photoIonization(const vector<vector<double>>& sourceInfo, const vector<double>& xyTry) { //implement simple delta function to the spectrum double value {0.0}; std::size_t index {0}; for(int i = 0; i < sourceInfo.size(); i++) { double initialEnergy {sourceInfo[i][0]}; if(abs(xyTry[0] - initialEnergy) < brThresh) { index = i; } } double br = sourceInfo[index][1]; double pe = sourceInfo[index][2]; double co = sourceInfo[index][3]; double pp = sourceInfo[index][4]; value = yMax * br * ( pe / (pe + co + pp) ); return value; }
(also changed fValue → value as f<Name> is usually the notation for class members, not local variables).
fValue
value
f<Name>
The text was updated successfully, but these errors were encountered:
fixed issue NESTCollaboration#79
90b01eb
Fixing issue #79 (#81)
12aa917
* fixed issue #79 * use PI constant instead of self-defined value
No branches or pull requests
Dear @Gratt55,
In the function
GammaHandler::photoIonization
is the first dimension ofsourceInfo
expected to be large (e.g.> 10
)?If yes, it might be worth changing
to
(also changed
fValue
→value
asf<Name>
is usually the notation for class members, not local variables).The text was updated successfully, but these errors were encountered: