Skip to content

Commit a6eaceb

Browse files
committed
Comments from Anton are implemented
1 parent 5f6ff87 commit a6eaceb

2 files changed

Lines changed: 111 additions & 10 deletions

File tree

.idea/workspace.xml

Lines changed: 96 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

PWGMM/Lumi/Tasks/fitLumi.cxx

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12+
// author: arvind.khuntia@cern.ch
13+
1214
#include "Framework/runDataProcessing.h"
1315
#include "Framework/AnalysisTask.h"
1416
#include "Framework/AnalysisDataModel.h"
@@ -24,9 +26,8 @@
2426
#include "DataFormatsParameters/GRPLHCIFData.h"
2527
#include "TH1F.h"
2628
#include "TH2F.h"
27-
#include <iostream>
2829

29-
// author: arvind.khuntia@cern.ch
30+
3031

3132
using namespace o2;
3233
using namespace o2::framework;
@@ -41,13 +42,13 @@ struct fitLumi {
4142
HistogramRegistry registry;
4243
int nBins, nCollBins;
4344
int relTS;
44-
Configurable<ULong64_t> startTimeInS{"startTime", 1668079200, "unix start time"};
45-
Configurable<ULong64_t> endTimeInS{"endTime", 1668098700, "unix end time"};
45+
Configurable<uint64_t> startTimeInS{"startTime", 1668079200, "unix start time"};
46+
Configurable<uint64_t> endTimeInS{"endTime", 1668098700, "unix end time"};
4647
Configurable<std::vector<int>> collBCArray{"collBCArray", {1022, 1062, 1102, 1142, 2015, 2055, 2161, 2201, 2241, 2281, 2321, 2361, 2401, 2441, 2481, 2521, 2561, 2601, 2641, 2681}, "Colliding BC for the VdM"};
4748

4849
void init(InitContext&)
4950
{
50-
nBins = ULong64_t(endTimeInS - startTimeInS) / 2.;
51+
nBins = uint64_t(endTimeInS - startTimeInS) / 2.;
5152
nCollBins = collBCArray->size();
5253
// Hist for FT0
5354
registry.add("FT0/VtxTrig", "vertex trigger;ts (s); Counts", {HistType::kTH1F, {{nBins, 0., static_cast<double>(endTimeInS - startTimeInS)}}});
@@ -65,16 +66,18 @@ struct fitLumi {
6566
if (nTF < 1) {
6667
for (int iBin = 0; iBin < nCollBins; iBin++) {
6768
registry.get<TH1>(HIST("FT0/CollBCMap"))->SetBinContent(iBin + 1, collBCArray->at(iBin));
68-
std::cout << "bin " << iBin << " value " << collBCArray->at(iBin) << std::endl;
69+
LOG(debug) << "bin " << iBin << " value " << collBCArray->at(iBin);
6970
}
7071
}
7172

7273
for (auto const& ft0 : ft0s) {
7374
auto bc = ft0.bc_as<BCsWithTimestamps>();
7475
if (!bc.timestamp())
75-
continue;
76+
{
77+
continue;
78+
}
7679
std::bitset<8> fT0Triggers = ft0.triggerMask();
77-
[[maybe_unused]] auto localBC = bc.globalBC() % nBCsPerOrbit;
80+
auto localBC = bc.globalBC() % nBCsPerOrbit;
7881
int index = FIND_INDEX(collBCArray, localBC);
7982
bool vertex = fT0Triggers[o2::fdd::Triggers::bitVertex];
8083
auto tsInSecond = ((bc.timestamp() * 1.e-3) - startTimeInS); // covert ts from ms to second
@@ -89,9 +92,11 @@ struct fitLumi {
8992
for (auto const& fdd : fdds) {
9093
auto bc = fdd.bc_as<BCsWithTimestamps>();
9194
if (!bc.timestamp())
92-
continue;
95+
{
96+
continue;
97+
}
9398
std::bitset<8> fddTriggers = fdd.triggerMask();
94-
[[maybe_unused]] auto localBC = bc.globalBC() % nBCsPerOrbit;
99+
auto localBC = bc.globalBC() % nBCsPerOrbit;
95100
int index = FIND_INDEX(collBCArray, localBC);
96101
bool vertex = fddTriggers[o2::fdd::Triggers::bitVertex];
97102
auto tsInSecond = ((bc.timestamp() * 1.e-3) - startTimeInS); // covert ts from ms to second

0 commit comments

Comments
 (0)