|
40 | 40 | #include <Framework/runDataProcessing.h> |
41 | 41 | #include <ReconstructionDataFormats/Vertex.h> |
42 | 42 |
|
| 43 | +#include <TH1.h> |
43 | 44 | #include <TH2.h> |
44 | 45 | #include <TH3.h> |
45 | 46 |
|
@@ -336,6 +337,7 @@ struct UpcCandProducerBarrel { |
336 | 337 | const AxisSpec axisOccupancy{nBinsOccupancy, 0., 250000., "FT0-based occupancy"}; |
337 | 338 | const AxisSpec axisTFs{nBinsTF, 0., 4.e7, "TFs"}; // 100 bins -> 400000 TFs per bin (1 bin ~ 1140 seconds for 32 orbits per TF) |
338 | 339 |
|
| 340 | + registry.add("hTF", "TF counts", HistType::kTH1D, {axisTFs}); |
339 | 341 | registry.add("hTVX", "TVX counts", HistType::kTH2D, {axisBCs, axisTFs}); |
340 | 342 | registry.add("hTVXRCT", "TVX counts after RCT selection", HistType::kTH2D, {axisBCs, axisTFs}); |
341 | 343 | registry.add("hTVXRCTnoPileupROF", "TVX counts after RCT and ROF pileup selection", HistType::kTH2D, {axisBCs, axisTFs}); |
@@ -414,9 +416,12 @@ struct UpcCandProducerBarrel { |
414 | 416 | std::vector<size_t> localTFIndex; |
415 | 417 | localTFIndex.reserve(bcs.size()); |
416 | 418 | // Cache the local TF slot for each BC row for collision and MC lookups |
| 419 | + auto hTF = registry.get<TH1>(HIST("hTF")); |
417 | 420 | for (const auto& bc : bcs) { |
418 | | - const auto tfID = static_cast<uint32_t>((static_cast<int64_t>(bc.globalBC()) - bcSOR) / nBCsPerTF); |
| 421 | + const int64_t globalBC = bc.globalBC(); |
| 422 | + const uint32_t tfID = (globalBC - bcSOR) / nBCsPerTF; |
419 | 423 | if (tfIDs.empty() || tfID != tfIDs.back()) { |
| 424 | + hTF->Fill(tfID); |
420 | 425 | tfIDs.push_back(tfID); |
421 | 426 | tfPassesRCT.push_back(static_cast<uint8_t>(rctChecker(bc))); |
422 | 427 | } |
|
0 commit comments