Skip to content

Commit 1e3a43c

Browse files
committed
PWGJE: Add FT0 EA thresholds and update detector-level MC means
Add raw-data and detector-level MC FT0C/FT0M threshold axes in the Hist configurable group. Set MC means to 2640 for FT0A and 802.9 for FT0C. Reject near-zero means using std::fabs and float epsilon.
1 parent 73f4e66 commit 1e3a43c

1 file changed

Lines changed: 20 additions & 4 deletions

File tree

‎PWGJE/Tasks/trackEfficiency.cxx‎

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838

3939
#include <algorithm>
4040
#include <cmath>
41+
#include <limits>
4142
#include <string>
4243
#include <vector>
4344

@@ -99,15 +100,28 @@ struct TrackEfficiency {
99100
struct FT0A : ConfigurableGroup {
100101
std::string prefix = "ft0a";
101102
Configurable<float> mean{"mean", 3499., "Mean FT0A signal"};
102-
Configurable<float> meanMCDetLevel{"meanMCDetLevel", 3499., "Mean FT0A signal at MC detector level"};
103+
Configurable<float> meanMCDetLevel{"meanMCDetLevel", 2640., "Mean FT0A signal at MC detector level"};
103104
} ft0a;
104105

105106
struct FT0C : ConfigurableGroup {
106107
std::string prefix = "ft0c";
107108
Configurable<float> mean{"mean", 844.6, "Mean FT0C signal"};
108-
Configurable<float> meanMCDetLevel{"meanMCDetLevel", 844.6, "Mean FT0C signal at MC detector level"};
109+
Configurable<float> meanMCDetLevel{"meanMCDetLevel", 802.9, "Mean FT0C signal at MC detector level"};
109110
} ft0c;
110111

112+
// FT0C event activity thresholds
113+
struct Hist : ConfigurableGroup {
114+
std::string prefix = "hist";
115+
116+
// Raw data
117+
ConfigurableAxis multFT0CThresh{"multFT0CThresh", {VARIABLE_WIDTH, 0.0, 0.109421, 0.215022, 0.343214, 0.50515, 0.712277, 0.978245, 1.3189, 1.75744, 2.36001, 3.59696, 25.}, "Percentiles of scaled FT0C: 100%, 90%, 80%, 70%, 60%, 50%, 40%, 30%, 20%, 10%, 1%"};
118+
ConfigurableAxis multFT0MThresh{"multFT0MThresh", {VARIABLE_WIDTH, 0.0, 0.130987, 0.237916, 0.36664, 0.528441, 0.734705, 0.996611, 1.32785, 1.74896, 2.31024, 3.37852, 25.}, "Percentiles of scaled FT0M: 100%, 90%, 80%, 70%, 60%, 50%, 40%, 30%, 20%, 10%, 1%"};
119+
120+
// MC detector-level data
121+
ConfigurableAxis multFT0CThreshMCDetLevel{"multFT0CThreshMCDetLevel", {VARIABLE_WIDTH, 0.0, 0.124992, 0.243769, 0.380291, 0.543998, 0.748078, 1.00424, 1.3237, 1.72648, 2.27373, 3.43144, 25.}, "Percentiles of scaled FT0C: 100%, 90%, 80%, 70%, 60%, 50%, 40%, 30%, 20%, 10%, 1%"};
122+
ConfigurableAxis multFT0MThreshMCDetLevel{"multFT0MThreshMCDetLevel", {VARIABLE_WIDTH, 0.0, 0.142622, 0.262095, 0.397069, 0.558622, 0.762008, 1.01685, 1.33219, 1.72377, 2.24008, 3.26309, 25.}, "Percentiles of scaled FT0M: 100%, 90%, 80%, 70%, 60%, 50%, 40%, 30%, 20%, 10%, 1%"};
123+
} hist;
124+
111125
// systematics variation - Run 2 guidelines: https://twiki.cern.ch/twiki/bin/view/ALICE/AliDPGtoolsTrackSystematicUncertainty
112126
TrackSelection customTrackSelection;
113127
Configurable<bool> useCustomTrackSelection{"useCustomTrackSelection", false, "whether to use the custom cuts (used for cut variation for tracking efficiency systematics)"};
@@ -218,8 +232,10 @@ struct TrackEfficiency {
218232
LOGP(fatal, "Configurable acceptSplitCollisions has wrong input value; stopping workflow");
219233
}
220234

221-
if (ft0a.mean == 0.f || ft0c.mean == 0.f || ft0a.meanMCDetLevel == 0.f || ft0c.meanMCDetLevel == 0.f) {
222-
LOGP(fatal, "FT0A and FT0C means must be non-zero to avoid division by zero; stopping workflow");
235+
constexpr float minFT0Mean = std::numeric_limits<float>::epsilon();
236+
if (std::fabs(ft0a.mean.value) <= minFT0Mean || std::fabs(ft0c.mean.value) <= minFT0Mean ||
237+
std::fabs(ft0a.meanMCDetLevel.value) <= minFT0Mean || std::fabs(ft0c.meanMCDetLevel.value) <= minFT0Mean) {
238+
LOGP(fatal, "FT0A and FT0C means must have magnitude greater than {} to avoid near-zero denominators; stopping workflow", minFT0Mean);
223239
}
224240

225241
eventSelectionBits = jetderiveddatautilities::initialiseEventSelectionBits(static_cast<std::string>(eventSelections));

0 commit comments

Comments
 (0)