Skip to content

Commit a715df6

Browse files
miranov25claude
andcommitted
TPC TimeSeries: vertex BC and BC differences to the closest TRD triggers
- vertex_bc: BC number (from the TF start, orbit firstTFOrbit) of the vertex time, for the same vertex as vertex_time. - trdTrigDBCVtxBefore/After: closest TRD-triggered BC at or before / at or after vertex_bc, minus vertex_bc (<= 0 / >= 0; -999999/999999 if none or no vertex), to calibrate the TRD-in-collision estimators. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YYeB7SW1TM7vU8qhVHiG61
1 parent 514d29b commit a715df6

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

‎Detectors/TPC/workflow/src/TPCTimeSeriesSpec.cxx‎

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1593,22 +1593,23 @@ class TPCTimeSeries : public Task
15931593
}
15941594
}
15951595

1596-
// BC numbers from the TF start (orbit firstTFOrbit, bc 0), for calibrating the two estimators: BC of the vertex time
1597-
// (same reference as vertex_time), and the closest TRD-triggered BCs at or before and at or after it (both equal to
1598-
// vertexBC if a trigger is at that BC). -999999 if no vertex or no such trigger in this TF.
1596+
// For calibrating the two estimators: BC of the vertex time as a BC number from the TF start (orbit firstTFOrbit, bc 0;
1597+
// same reference as vertex_time), and the closest TRD-triggered BCs at or before / at or after it, as BC differences to
1598+
// vertex_bc: trdTrigDBCVtxBefore <= 0, trdTrigDBCVtxAfter >= 0 (both 0 if a trigger is at vertex_bc).
1599+
// Sentinels: vertex_bc -999999 without vertex; -999999 / 999999 without vertex or without such a trigger in this TF.
15991600
int vertexBC = -999999;
1600-
int trdTrigBCBefore = -999999;
1601-
int trdTrigBCAfter = -999999;
1601+
int trdTrigDBCVtxBefore = -999999;
1602+
int trdTrigDBCVtxAfter = 999999;
16021603
if (vtxID >= 0) {
16031604
vertexBC = static_cast<int>(std::lround(vertex.getTimeStamp().getTimeStamp() / o2::constants::lhc::LHCBunchSpacingMUS));
16041605
const auto itBC = std::lower_bound(mTRDTrigBCsInTF.begin(), mTRDTrigBCsInTF.end(), vertexBC); // first trigger at or after vertexBC
16051606
if (itBC != mTRDTrigBCsInTF.end()) {
1606-
trdTrigBCAfter = *itBC;
1607+
trdTrigDBCVtxAfter = *itBC - vertexBC;
16071608
}
16081609
if (itBC != mTRDTrigBCsInTF.end() && *itBC == vertexBC) {
1609-
trdTrigBCBefore = vertexBC;
1610+
trdTrigDBCVtxBefore = 0;
16101611
} else if (itBC != mTRDTrigBCsInTF.begin()) {
1611-
trdTrigBCBefore = *(itBC - 1);
1612+
trdTrigDBCVtxBefore = *(itBC - 1) - vertexBC;
16121613
}
16131614
}
16141615

@@ -1757,10 +1758,10 @@ class TPCTimeSeries : public Task
17571758
<< "vertex_nContributorsTRD=" << nContribTRD
17581759
<< "trdTrigDBCBefore=" << trdTrigDBCBefore
17591760
<< "trdTrigDBCAfter=" << trdTrigDBCAfter
1760-
// BC numbers from the TF start: vertex (from its time) and closest TRD triggers at or before / at or after it
1761+
// vertex BC (from its time, BC number from the TF start) and closest TRD triggers as BC differences to it
17611762
<< "vertex_bc=" << vertexBC
1762-
<< "trdTrigBCBefore=" << trdTrigBCBefore
1763-
<< "trdTrigBCAfter=" << trdTrigBCAfter
1763+
<< "trdTrigDBCVtxBefore=" << trdTrigDBCVtxBefore
1764+
<< "trdTrigDBCVtxAfter=" << trdTrigDBCVtxAfter
17641765
<< "isNearestVertex=" << isNearestVtx
17651766
// tpc track properties
17661767
<< "pt=" << trkOrig.getPt()

0 commit comments

Comments
 (0)