Skip to content

Commit 626f949

Browse files
committed
Adjustable maximum number of TFs
1 parent a8c88b0 commit 626f949

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

‎PWGUD/TableProducer/upcCandProducerBarrel.cxx‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ struct UpcCandProducerBarrel {
274274
Configurable<float> minAmpFDDA{"minAmpFDDA", 1000.f, "Minimum amplitude for FDDA veto"};
275275
Configurable<float> minAmpFDDC{"minAmpFDDC", 1000.f, "Minimum amplitude for FDDC veto"};
276276

277+
Configurable<float> maxTF{"maxTF", 4.e7, "Maximum TF id"};
277278
Configurable<int> maxStoredDistance{"maxStoredDistance", 32, "Maximum stored veto distance"};
278279
Configurable<int> nBinsOccupancy{"nBinsOccupancy", 25, "Number of occupancy bins"};
279280
Configurable<int> nBinsTF{"nBinsTF", 100, "Number of TF bins"};
@@ -337,15 +338,13 @@ struct UpcCandProducerBarrel {
337338
const AxisSpec axisBCs{NBCsPerOrbit, 0., NBCsPerOrbit, "BC in orbit"};
338339
const AxisSpec axisVeto{maxStoredDistance + 1, -0.5, maxStoredDistance + 0.5, "veto range in BCs"};
339340
const AxisSpec axisOccupancy{nBinsOccupancy, 0., 250000., "FT0-based occupancy"};
340-
const AxisSpec axisTFs{nBinsTF, 0., 4.e7, "TFs"}; // 100 bins -> 400000 TFs per bin (1 bin ~ 1140 seconds for 32 orbits per TF)
341+
const AxisSpec axisTFs{nBinsTF, 0., maxTFs, "TFs"};
341342

342343
registry.add("hTF", "TF counts", HistType::kTH1D, {axisTFs});
343344
registry.add("hTVX", "TVX counts", HistType::kTH2D, {axisBCs, axisTFs});
344345
registry.add("hTVXRCT", "TVX counts after RCT selection", HistType::kTH2D, {axisBCs, axisTFs});
345-
registry.add("hTVXRCTnoPileupROF", "TVX counts after RCT and ROF pileup selection", HistType::kTH2D, {axisBCs, axisTFs});
346346
registry.add("hTVXupc", "TVX counts in upc ROFs", HistType::kTH2D, {axisBCs, axisTFs});
347347
registry.add("hTVXRCTupc", "TVX counts after RCT selection in upc ROFs", HistType::kTH2D, {axisBCs, axisTFs});
348-
registry.add("hTVXRCTnoPileupROFupc", "TVX counts after RCT and ROF pileup selection in upc ROFs", HistType::kTH2D, {axisBCs, axisTFs});
349348

350349
registry.add("hVetoT00", "no RCT selection", HistType::kTH3D, {axisBCs, axisTFs, axisVeto});
351350
registry.add("hVetoTV0", "no RCT selection", HistType::kTH3D, {axisBCs, axisTFs, axisVeto});
@@ -386,8 +385,7 @@ struct UpcCandProducerBarrel {
386385
const auto runInfo = o2::parameters::AggregatedRunInfo::buildAggregatedRunInfo(ccdb->instance(), runNumber);
387386
const int64_t orbitsPerTF = configuredOrbitsPerTF < 0 ? runInfo.orbitsPerTF : configuredOrbitsPerTF;
388387
const bool needsEventSelectionParams = configuredTFStartBorder < 0 || configuredTFEndBorder < 0;
389-
const auto ts = (runInfo.sor + runInfo.eor) / 2;
390-
const auto* eventSelectionParams = needsEventSelectionParams ? ccdb->getForTimeStamp<EventSelectionParams>("EventSelection/EventSelectionParams", ts) : nullptr;
388+
const auto* eventSelectionParams = needsEventSelectionParams ? ccdb->getForRun<EventSelectionParams>("EventSelection/EventSelectionParams", runNumber) : nullptr;
391389
if (orbitsPerTF <= 0 || !runInfo.grpLHC || (needsEventSelectionParams && !eventSelectionParams)) {
392390
LOGF(fatal, "Incomplete run information for run %d", runNumber);
393391
}
@@ -398,7 +396,7 @@ struct UpcCandProducerBarrel {
398396
collidingBCs = runInfo.grpLHC->getBunchFilling().getBCPattern();
399397

400398
// get ITS ROF parameters
401-
auto alppar = ccdb->getForTimeStamp<o2::itsmft::DPLAlpideParam<0>>("ITS/Config/AlpideParam", ts);
399+
auto alppar = ccdb->getForRun<o2::itsmft::DPLAlpideParam<0>>("ITS/Config/AlpideParam", runNumber);
402400
rofOffset = alppar->roFrameBiasInBC;
403401
rofLength = alppar->roFrameLengthInBC;
404402
nRofPerTF = nBCsPerTF / rofLength;

0 commit comments

Comments
 (0)