Skip to content

Commit bca6eb6

Browse files
authored
[PWGLF,PWGMM] Add filling scheme information to lumi stability task (#14480)
1 parent 1208a71 commit bca6eb6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

PWGMM/Lumi/Tasks/lumiStabilityPP.cxx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
#include <limits>
3333
#include <map>
34+
#include <memory>
3435
#include <string>
3536
#include <vector>
3637

@@ -114,6 +115,7 @@ struct LumiStabilityPP {
114115
parameters::GRPLHCIFData* mLHCIFdata = nullptr;
115116
int runNumber{-1};
116117
ctpRateFetcher mRateFetcher;
118+
std::string injectionScheme;
117119

118120
HistogramRegistry registry{"registry"};
119121

@@ -124,6 +126,7 @@ struct LumiStabilityPP {
124126
std::map<int, std::shared_ptr<TH1>> histTfPerMin;
125127
std::map<int, std::shared_ptr<TH1>> histBcHasFT0;
126128
std::map<int, std::shared_ptr<TH1>> histBcHasFDD;
129+
std::map<int, std::shared_ptr<TH1>> histFillingScheme;
127130

128131
static constexpr std::string_view NBCsVsTimeHistNames[NTriggerAliases][NBCCategories] =
129132
{{"AllBCs/BC_A/nBCsVsTime", "AllBCs/BC_B/nBCsVsTime", "AllBCs/BC_C/nBCsVsTime", "AllBCs/BC_E/nBCsVsTime", "AllBCs/BC_L/nBCsVsTime", "AllBCs/BC_SL/nBCsVsTime"},
@@ -137,7 +140,7 @@ struct LumiStabilityPP {
137140
{"FT0CE/BC_A/nBCsVsBCID", "FT0CE/BC_B/nBCsVsBCID", "FT0CE/BC_C/nBCsVsBCID", "FT0CE/BC_E/nBCsVsBCID", "FT0CE/BC_L/nBCsVsBCID", "FT0CE/BC_SL/nBCsVsBCID"},
138141
{"FDD/BC_A/nBCsVsBCID", "FDD/BC_B/nBCsVsBCID", "FDD/BC_C/nBCsVsBCID", "FDD/BC_E/nBCsVsBCID", "FDD/BC_L/nBCsVsBCID", "FDD/BC_SL/nBCsVsBCID"}};
139142

140-
const AxisSpec timeAxis{1440, 0., 1440., "#bf{t-t_{SOF} (min)}"}, bcIDAxis{nBCsPerOrbit, -0.5, static_cast<float>(nBCsPerOrbit) - 0.5, "#bf{BC ID in orbit}"};
143+
const AxisSpec timeAxis{2880, 0., 2880., "#bf{t-t_{SOF} (min)}"}, bcIDAxis{nBCsPerOrbit, -0.5, static_cast<float>(nBCsPerOrbit) - 0.5, "#bf{BC ID in orbit}"};
141144

142145
int64_t bcSOR;
143146
int nBCsPerTF;
@@ -154,6 +157,7 @@ struct LumiStabilityPP {
154157
histNBcsVsTime[runNumber] = registry.add<TH1>(Form("%d/FT0Vtx_EvSel/nBCsVsTime", runNumber), "Time of TVX triggered BCs since the start of fill;;#bf{#it{N}_{BC}}", HistType::kTH1D, {timeAxis});
155158
histNBcsVsBcId[runNumber] = registry.add<TH1>(Form("%d/nBCsVsBCID", runNumber), "Time of TVX triggered BCs since the start of fill;#bf{t-t_{SOF} (min)};#bf{#it{N}_{BC}}", HistType::kTH1D, {bcIDAxis});
156159
histTfPerMin[runNumber] = registry.add<TH1>(Form("%d/TFsPerMinute", runNumber), "TFs seen in this minute (to account for failed jobs);#bf{t-t_{SOF} (min)};#bf{#it{N}_{TFs}}", HistType::kTH1D, {timeAxis});
160+
histFillingScheme[runNumber] = registry.add<TH1>(Form("%d/FillingScheme", runNumber), "Filling Scheme;Filling Scheme;", HistType::kTH1D, {{1, 0, 1}});
157161

158162
histBcHasFT0[runNumber] = registry.add<TH2>(Form("%d/FITQA/BCHasFT0", runNumber), "Does the BC have FT0?;BC has FT0;TVX triggered according to CTP;#bf{#it{N}_{BC}}", HistType::kTH2D, {{2, -0.5, 1.5}, {2, -0.5, 1.5}});
159163
histBcHasFT0[runNumber]->GetYaxis()->SetBinLabel(1, "No CTP trigger");
@@ -195,6 +199,8 @@ struct LumiStabilityPP {
195199
LOG(info) << "LHCIF data fetched for run " << runNumber << " and timestamp " << timeStamp;
196200
createHistograms();
197201

202+
histFillingScheme[runNumber]->Fill(mLHCIFdata->getInjectionScheme().c_str(), 0);
203+
198204
beamPatternA = mLHCIFdata->getBunchFilling().getBeamPattern(0);
199205
beamPatternC = mLHCIFdata->getBunchFilling().getBeamPattern(1);
200206
bcPatternA = beamPatternA & ~beamPatternC;
@@ -287,7 +293,7 @@ struct LumiStabilityPP {
287293

288294
if (thisTFid != currentTFid) {
289295
currentTFid = thisTFid;
290-
histNBcsVsTime[runNumber]->Fill(timeSinceSOF);
296+
histTfPerMin[runNumber]->Fill(timeSinceSOF);
291297
}
292298

293299
std::bitset<64> ctpInputMask(bc.inputMask());

0 commit comments

Comments
 (0)