Skip to content

Commit b2b23b5

Browse files
Mods in CTPFetcher + histo to get RunNumbers without IR info
1 parent 52f16c7 commit b2b23b5

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

PWGLF/Tasks/Strangeness/sigmaanalysis.cxx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ struct sigmaanalysis {
6767
// Event selection
6868
Configurable<bool> doPPAnalysis{"doPPAnalysis", true, "if in pp, set to true"};
6969
Configurable<bool> fGetIR{"fGetIR", false, "Flag to retrieve the IR info."};
70+
Configurable<bool> fIRCrashOnNull{"fIRCrashOnNull", false, "Flag to avoid CTP RateFetcher crash."};
7071
Configurable<std::string> irSource{"irSource", "T0VTX", "Estimator of the interaction rate (Recommended: pp --> T0VTX, Pb-Pb --> ZNC hadronic)"};
7172
Configurable<float> minIR{"minIR", -1, "Min Interaction Rate (kHz). Leave -1 if no selection desired."};
7273
Configurable<float> maxIR{"maxIR", -1, "Max Interaction Rate (kHz). Leave -1 if no selection desired."};
@@ -236,6 +237,7 @@ struct sigmaanalysis {
236237
}
237238

238239
// All candidates received
240+
histos.add("GeneralQA/hRunNumberNegativeIR", "", kTH1D, {{1, 0., 1.}});
239241
histos.add("GeneralQA/hInteractionRate", "hInteractionRate", kTH1F, {axisIRBinning});
240242
histos.add("GeneralQA/hInteractionRatePerColl", "hInteractionRatePerColl", kTH1F, {axisIRBinning});
241243
histos.add("GeneralQA/hCentralityVsInteractionRate", "hCentralityVsInteractionRate", kTH2F, {axisCentrality, axisIRBinning});
@@ -930,7 +932,11 @@ struct sigmaanalysis {
930932
continue;
931933
}
932934
if (fGetIR) {
933-
double interactionRate = rateFetcher.fetch(ccdb.service, sigma.sigmaTimestamp(), sigma.sigmaRunNumber(), irSource) * 1.e-3;
935+
double interactionRate = rateFetcher.fetch(ccdb.service, sigma.sigmaTimestamp(), sigma.sigmaRunNumber(), irSource, fIRCrashOnNull) * 1.e-3;
936+
937+
if (interactionRate<0)
938+
histos.get<TH1>(HIST("GeneralQA/hRunNumberNegativeIR"))->Fill(Form("%d", sigma.sigmaRunNumber()), 1);
939+
934940
histos.fill(HIST("GeneralQA/hInteractionRate"), interactionRate);
935941
histos.fill(HIST("GeneralQA/hCentralityVsInteractionRate"), sigma.sigmaCentrality(), interactionRate);
936942
if ((maxIR != -1) && (minIR != -1) && ((interactionRate <= minIR) || (interactionRate >= maxIR))) {
@@ -1076,7 +1082,10 @@ struct sigmaanalysis {
10761082
{
10771083
for (auto& sigma : sigmas) { // selecting Sigma0-like candidates
10781084
if (fGetIR) {
1079-
double interactionRate = rateFetcher.fetch(ccdb.service, sigma.sigmaTimestamp(), sigma.sigmaRunNumber(), irSource) * 1.e-3;
1085+
double interactionRate = rateFetcher.fetch(ccdb.service, sigma.sigmaTimestamp(), sigma.sigmaRunNumber(), irSource, fIRCrashOnNull) * 1.e-3;
1086+
1087+
if (interactionRate<0)
1088+
histos.get<TH1>(HIST("GeneralQA/hRunNumberNegativeIR"))->Fill(Form("%d", sigma.sigmaRunNumber()), 1);
10801089
histos.fill(HIST("GeneralQA/hInteractionRate"), interactionRate);
10811090
histos.fill(HIST("GeneralQA/hCentralityVsInteractionRate"), sigma.sigmaCentrality(), interactionRate);
10821091
if ((maxIR != -1) && (minIR != -1) && ((interactionRate <= minIR) || (interactionRate >= maxIR))) {

0 commit comments

Comments
 (0)