|
38 | 38 |
|
39 | 39 | #include <algorithm> |
40 | 40 | #include <cmath> |
| 41 | +#include <limits> |
41 | 42 | #include <string> |
42 | 43 | #include <vector> |
43 | 44 |
|
@@ -99,15 +100,28 @@ struct TrackEfficiency { |
99 | 100 | struct FT0A : ConfigurableGroup { |
100 | 101 | std::string prefix = "ft0a"; |
101 | 102 | 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"}; |
103 | 104 | } ft0a; |
104 | 105 |
|
105 | 106 | struct FT0C : ConfigurableGroup { |
106 | 107 | std::string prefix = "ft0c"; |
107 | 108 | 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"}; |
109 | 110 | } ft0c; |
110 | 111 |
|
| 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 | + |
111 | 125 | // systematics variation - Run 2 guidelines: https://twiki.cern.ch/twiki/bin/view/ALICE/AliDPGtoolsTrackSystematicUncertainty |
112 | 126 | TrackSelection customTrackSelection; |
113 | 127 | 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 { |
218 | 232 | LOGP(fatal, "Configurable acceptSplitCollisions has wrong input value; stopping workflow"); |
219 | 233 | } |
220 | 234 |
|
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); |
223 | 239 | } |
224 | 240 |
|
225 | 241 | eventSelectionBits = jetderiveddatautilities::initialiseEventSelectionBits(static_cast<std::string>(eventSelections)); |
|
0 commit comments