Skip to content

Commit bb3e85b

Browse files
authored
[PWGLF] PWGMM-Lumi: Orbit histograms per run number issues (AliceO2Group#8246)
1 parent da55634 commit bb3e85b

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

PWGMM/Lumi/Tasks/lumiStability.cxx

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
/// it is meant to be a blank page for further developments.
1414
/// \author everyone
1515

16+
#include <utility>
17+
#include <map>
18+
#include <string>
19+
#include <vector>
20+
1621
#include "Framework/runDataProcessing.h"
1722
#include "Framework/AnalysisTask.h"
1823
#include "Framework/AnalysisDataModel.h"
@@ -42,7 +47,8 @@ struct lumiStabilityTask {
4247
Configurable<int> myMaxDeltaBCFDD{"myMaxDeltaBCFDD", 5, {"My BC cut"}};
4348
Configurable<int> myMaxDeltaBCFT0{"myMaxDeltaBCFT0", 5, {"My BC cut"}};
4449
Configurable<int> myMaxDeltaBCFV0{"myMaxDeltaBCFV0", 5, {"My BC cut"}};
45-
Configurable<int> nOrbitsConf{"nOrbits", 10000, "number of orbits"};
50+
Configurable<int> nOrbitsConf{"nOrbits", 972'288'000, "number of orbits"};
51+
Configurable<int> nOrbitsPerTF{"nOrbitsPerTF", 128, "number of orbits per time frame"};
4652
Configurable<double> minOrbitConf{"minOrbit", 0, "minimum orbit"};
4753
Configurable<bool> is2022Data{"is2022Data", true, "To 2022 data"};
4854

@@ -76,6 +82,7 @@ struct lumiStabilityTask {
7682
const AxisSpec axisTime{1000, -10, 40};
7783
const AxisSpec axisTimeFDD{1000, -20, 100};
7884
const AxisSpec axisCountsTime{2, -0.5, 1.5};
85+
const AxisSpec axisOrbits{static_cast<int>(nOrbits / nOrbitsPerTF), 0., static_cast<double>(nOrbits), ""};
7986

8087
histos.add("hBcA", "BC pattern A; BC ; It is present", kTH1F, {axisTriggger});
8188
histos.add("hBcC", "BC pattern C; BC ; It is present", kTH1F, {axisTriggger});
@@ -87,6 +94,10 @@ struct lumiStabilityTask {
8794
histos.add("hvertexZ", "Pos Z vertex trigger; Pos z; Count ", kTH1F, {axisPosZ});
8895
histos.add("hnumContrib", "Num of contributors; Num of contributors; Count ", kTH1I, {axisNumContrib});
8996
histos.add("hcollisinTime", "Collision Time; ns; Count ", kTH1F, {axisColisionTime});
97+
histos.add("hOrbitFDDVertexCoinc", "", kTH1F, {axisOrbits});
98+
histos.add("hOrbitFDDVertex", "", kTH1F, {axisOrbits});
99+
histos.add("hOrbitFT0vertex", "", kTH1F, {axisOrbits});
100+
histos.add("hOrbitFV0Central", "", kTH1F, {axisOrbits});
90101
// time 32.766 is dummy time
91102
// histo about triggers
92103
histos.add("FDD/hCounts", "0 FDDCount - 1 FDDVertexCount - 2 FDDPPVertexCount - 3 FDDCoincidencesVertexCount - 4 FDDPPCoincidencesVertexCount - 5 FDDPPBotSidesCount; Number; counts", kTH1F, {axisCounts});
@@ -211,6 +222,7 @@ struct lumiStabilityTask {
211222
int executionCounter = 0;
212223
uint32_t nOrbitsPerTF = 128; // 128 in 2022, 32 in 2023
213224
int runNumber = bcs.iteratorAt(0).runNumber();
225+
// std::string histName = "hOrbitFDDVertexCoinc_" + std::to_string(runNumber);
214226
if (runNumber != lastRunNumber && executionCounter < 1) {
215227
lastRunNumber = runNumber; // do it only once
216228
executionCounter++;
@@ -244,7 +256,7 @@ struct lumiStabilityTask {
244256
}
245257
}
246258

247-
EventSelectionParams* par = ccdb->getForTimeStamp<EventSelectionParams>("EventSelection/EventSelectionParams", ts);
259+
/*EventSelectionParams* par = ccdb->getForTimeStamp<EventSelectionParams>("EventSelection/EventSelectionParams", ts);
248260
// access orbit-reset timestamp
249261
auto ctpx = ccdb->getForTimeStamp<std::vector<Long64_t>>("CTP/Calib/OrbitReset", ts);
250262
int64_t tsOrbitReset = (*ctpx)[0]; // us
@@ -269,15 +281,17 @@ struct lumiStabilityTask {
269281
// duration of TF in bcs
270282
nBCsPerTF = nOrbitsPerTF * o2::constants::lhc::LHCMaxBunches;
271283
LOGP(info, "tsOrbitReset={} us, SOR = {} ms, EOR = {} ms, orbitSOR = {}, nBCsPerTF = {}", tsOrbitReset, tsSOR, tsEOR, orbitSOR, nBCsPerTF);
284+
std::cout << "<<<<<<<<<<<<<<<<<<<<<<<<< Orbits per second: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" << nOrbits << std::endl;*/
272285
}
273286

274287
// create orbit-axis histograms on the fly with binning based on info from GRP if GRP is available
275288
// otherwise default minOrbit and nOrbits will be used
276-
const AxisSpec axisOrbits{static_cast<int>(nOrbits / nOrbitsPerTF), 0., static_cast<double>(nOrbits), ""};
277-
histos.add("hOrbitFDDVertexCoinc", "FDD Orbits; Orbit; Entries", kTH1F, {axisOrbits});
278-
histos.add("hOrbitFDDVertex", "FDD Orbits; Orbit; Entries", kTH1F, {axisOrbits});
279-
histos.add("hOrbitFT0vertex", "FT0 Orbits; Orbit; Entries", kTH1F, {axisOrbits});
280-
histos.add("hOrbitFV0Central", "FV0 Orbits; Orbit; Entries", kTH1F, {axisOrbits});
289+
/*const AxisSpec axisOrbits{static_cast<int>(nOrbits / nOrbitsPerTF), 0., static_cast<double>(nOrbits), ""};
290+
std::cout << "<<<<<<<<<<<<<<<<<<<<<<<<< Creating histograms >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" << std::endl;
291+
histos.add("hOrbitFDDVertexCoinc", "", kTH1F, {axisOrbits});
292+
histos.add("hOrbitFDDVertex", "", kTH1F, {axisOrbits});
293+
histos.add("hOrbitFT0vertex", "", kTH1F, {axisOrbits});
294+
histos.add("hOrbitFV0Central", "", kTH1F, {axisOrbits});*/
281295
}
282296

283297
for (auto const& fdd : fdds) {

0 commit comments

Comments
 (0)