@@ -29,13 +29,13 @@ double FluenceWeightCalculator::GetWeight(const int pdg, const double kineticEne
2929 }
3030 switch (std::abs (pdg)) {
3131 case 2112 : {
32- return neutronG->Eval (kineticEnergy, 0 , " S" );
32+ return neutronG->Eval (kineticEnergy, nullptr , " S" );
3333 }
3434 case 2212 : {
35- return ((kineticEnergy > 1e-3 ) ? protonG->Eval (kineticEnergy, 0 , " S" ) : 0 .);
35+ return ((kineticEnergy > 1e-3 ) ? protonG->Eval (kineticEnergy, nullptr , " S" ) : 0 .);
3636 }
3737 case 211 : {
38- return ((kineticEnergy > 10 .) ? pionG->Eval (kineticEnergy, 0 , " S" ) : 0 .);
38+ return ((kineticEnergy > 10 .) ? pionG->Eval (kineticEnergy, nullptr , " S" ) : 0 .);
3939 }
4040 default :
4141 return 0.0 ;
@@ -97,16 +97,20 @@ void FluenceWeightCalculator::InitWeightsFromCSV(const std::string& filename)
9797 }
9898 std::string line;
9999 while (std::getline (in, line)) {
100- if (line.empty () || line[0 ] == ' #' )
100+ if (line.empty () || line[0 ] == ' #' ) {
101101 continue ;
102+ }
102103 std::istringstream ss (line);
103104 std::string particle, e_str, w_str;
104- if (!std::getline (ss, particle, ' ,' ))
105+ if (!std::getline (ss, particle, ' ,' )) {
105106 continue ;
106- if (!std::getline (ss, e_str, ' ,' ))
107+ }
108+ if (!std::getline (ss, e_str, ' ,' )) {
107109 continue ;
108- if (!std::getline (ss, w_str, ' ,' ))
110+ }
111+ if (!std::getline (ss, w_str, ' ,' )) {
109112 continue ;
113+ }
110114 auto e = std::stod (e_str);
111115 auto w = std::stod (w_str);
112116 auto pdg = std::stoi (particle);
0 commit comments