@@ -242,6 +242,12 @@ struct FlowGfwNonflow {
242242 ProtonID,
243243 SpeciesCount
244244 };
245+ enum NchSelector {
246+ TableSize,
247+ Corrected,
248+ Uncorrected,
249+ ResponseMatrixCorrected
250+ };
245251
246252 // Generic Framework
247253 GFW * fGFW = new GFW ();
@@ -650,7 +656,7 @@ struct FlowGfwNonflow {
650656 LOGF (fatal, " Could not load Nch response matrix from %s" , cfgCorrections.cfgNchResponsePath .value .c_str ());
651657 }
652658 LOGF (info, " Loaded Nch response matrix from %s" , cfgCorrections.cfgNchResponsePath .value .c_str ());
653- } else if (cfgUseNchCorrection == 3 ) {
659+ } else if (cfgUseNchCorrection == NchSelector::ResponseMatrixCorrected ) {
654660 LOGF (fatal, " cfgUseNchCorrection=3 requires cfgNchResponsePath" );
655661 }
656662 correctionsConfig.correctionsLoaded = true ;
@@ -665,7 +671,7 @@ struct FlowGfwNonflow {
665671 const int recoBin = response->GetXaxis ()->FindFixBin (multReconstructed);
666672 if (recoBin < 1 || recoBin > response->GetNbinsX ()) {
667673 LOGF (warn, " Reconstructed Nch %u is outside the response matrix; using the uncorrected value" , multReconstructed);
668- return reconstructedNch ;
674+ return multReconstructed ;
669675 }
670676 double sumWeights = 0 .;
671677 double sumGeneratedNch = 0 .;
@@ -1088,16 +1094,16 @@ struct FlowGfwNonflow {
10881094
10891095 float multiplicity = 0 .f ;
10901096 switch (cfgUseNchCorrection) {
1091- case 0 :
1097+ case NchSelector::TableSize :
10921098 multiplicity = tracks.size ();
10931099 break ;
1094- case 1 :
1100+ case NchSelector::Corrected :
10951101 multiplicity = acceptedTracks.total ;
10961102 break ;
1097- case 2 :
1103+ case NchSelector::Uncorrected :
10981104 multiplicity = acceptedTracks.totaluncorr ;
10991105 break ;
1100- case 3 :
1106+ case NchSelector::ResponseMatrixCorrected :
11011107 multiplicity = (dt == Gen) ? acceptedTracks.totaluncorr : getResponseCorrectedNch (acceptedTracks.totaluncorr );
11021108 break ;
11031109 default :
0 commit comments