Skip to content

Commit 31ee60f

Browse files
committed
Small fixes
1 parent afd6dc0 commit 31ee60f

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

‎PWGUD/TableProducer/upcCandProducerBarrel.cxx‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// or submit itself to any jurisdiction.
1111

1212
/// \file upcCandProducerBarrel.cxx
13-
/// \brief Compact two-track double-gap candidate table producer for exclusive diffraction and UPC studies.
13+
/// \brief Compact candidate table producer for diffraction and UPC studies.
1414
/// Requires: event selection, propagation, TPC PID and TOF PID services
1515
/// \author Nazar Burmasov (JINR), Evgeny Kryshen (JINR)
1616

@@ -185,7 +185,7 @@ struct UpcCandProducerBarrel {
185185
int tfEndBorder = 0;
186186
std::bitset<NBCsPerOrbit> collidingBCs;
187187

188-
Configurable<size_t> candidateTrackCount{"candidateTrackCount", 2, "Required N tracks in selected collisions"};
188+
Configurable<int> nTracks{"nTracks", 2, "Required N tracks in selected collisions"};
189189
Configurable<float> maxAbsEta{"maxAbsEta", 0.8f, "Maximum |eta| of selected tracks"};
190190
Configurable<float> minPt{"minPt", 0.2f, "Minimum pT of selected tracks (GeV/c)"};
191191
Configurable<int> vetoBCWindow{"vetoBCWindow", 0, "FIT veto half-window in BC; <0 disables"};
@@ -252,7 +252,6 @@ struct UpcCandProducerBarrel {
252252
std::vector<uint8_t> tfPassesRCT;
253253
std::vector<size_t> localTFIndex;
254254
localTFIndex.reserve(bcs.size());
255-
const auto bcOffset = bcs.begin().globalIndex();
256255
for (const auto& bc : bcs) {
257256
const auto tfID = static_cast<uint32_t>((static_cast<int64_t>(bc.globalBC()) - bcSOR) / nBCsPerTF);
258257
if (tfIDs.empty() || tfID != tfIDs.back()) {
@@ -330,12 +329,12 @@ struct UpcCandProducerBarrel {
330329
}
331330

332331
for (const auto& collision : collisions) {
333-
if (collision.numContrib() != candidateTrackCount || !collision.selection_bit(aod::evsel::kNoTimeFrameBorder) || !rctChecker(collision)) {
332+
if (collision.numContrib() != nTracks || !collision.selection_bit(aod::evsel::kNoTimeFrameBorder) || !rctChecker(collision)) {
334333
continue;
335334
}
336335
auto bc = collision.bc_as<BCsWithSels>();
337336
auto gbc = bc.globalBC();
338-
const auto iTF = localTFIndex[bc.globalIndex() - bcOffset];
337+
const auto iTF = localTFIndex[bc.globalIndex()];
339338
const int64_t bcInTF = (static_cast<int64_t>(gbc) - bcSOR) % nBCsPerTF;
340339
const auto distFT0 = minDistanceFT0[iTF][bcInTF];
341340
const auto distFV0 = minDistanceFV0[iTF][bcInTF];
@@ -370,7 +369,7 @@ struct UpcCandProducerBarrel {
370369
nClusters.push_back(track.tpcNClsFound());
371370
sign.push_back(track.sign());
372371
}
373-
if (px.size() != candidateTrackCount) {
372+
if (px.size() != static_cast<size_t>(nTracks)) {
374373
continue;
375374
}
376375
selectedCandidates(bc.runNumber(), gbc, tfIDs[iTF], bc.timestamp(), collision.posX(), collision.posY(), collision.posZ(),

0 commit comments

Comments
 (0)