Skip to content

Commit ccb64dd

Browse files
miranov25miranov25
authored andcommitted
TPC: add ITS-TPC combined-momentum sampling trigger (#15599)
Add a third sampling trigger bit for tracks with matched ITS-TPC combined momentum. The new trigger uses the Tsallis sampling function on the combined-track pT instead of the TPC-only pT and stores the corresponding weight as weight_ITSTPC. This extends the existing trigger mask scheme: 0x1: minimum-bias sampling 0x2: Tsallis sampling using TPC-only track pT 0x4: Tsallis sampling using ITS-TPC combined-track pT The output condition is updated so tracks selected by the new ITS-TPC sampling path are written even when they are not selected by the existing TPC-only or minimum-bias triggers. Motivation: sampling only on TPC-only momentum can bias correlated observables such as qpt_TPC - qpt_Comb. The new trigger provides a dedicated sampled stream for combined-track performance studies while preserving the existing TPC-only and minimum-bias sampling streams. Co-authored-by: miranov25 <marian.ivanov@cern.cg>
1 parent 4bda43c commit ccb64dd

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

Detectors/TPC/workflow/src/TPCTimeSeriesSpec.cxx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1324,12 +1324,17 @@ class TPCTimeSeries : public Task
13241324
if (mUnbinnedWriter && mStreamer[iThread]) {
13251325
const float factorPt = mSamplingFactor;
13261326
bool writeData = true;
1327+
bool writeDataITSTPC = false;
13271328
float weight = 0;
1329+
float weightITSTPC = 0;
13281330
if (mSampleTsallis) {
13291331
std::uniform_real_distribution<> distr(0., 1.);
13301332
writeData = o2::math_utils::Tsallis::downsampleTsallisCharged(tracksTPC[iTrk].getPt(), factorPt, mSqrt, weight, distr(mGenerator[iThread]));
1333+
if (hasITSTPC) {
1334+
writeDataITSTPC = o2::math_utils::Tsallis::downsampleTsallisCharged(tracksITSTPC[idxITSTPC.front()].getPt(), factorPt, mSqrt, weightITSTPC, distr(mGenerator[iThread]));
1335+
}
13311336
}
1332-
if (writeData || minBiasOk) {
1337+
if (writeData || writeDataITSTPC || minBiasOk) {
13331338
auto clusterMask = makeClusterBitMask(trackFull);
13341339
const auto& trkOrig = tracksTPC[iTrk];
13351340
const bool isNearestVtx = (idxITSTPC.back() == -1); // is nearest vertex in case no vertex was found
@@ -1384,7 +1389,11 @@ class TPCTimeSeries : public Task
13841389
}
13851390
}
13861391
}
1387-
const int triggerMask = 0x1 * minBiasOk + 0x2 * writeData;
1392+
// triggerMask bits:
1393+
// 0x1: flat minimum-bias stream
1394+
// 0x2: Tsallis stream sampled with TPC-only pT
1395+
// 0x4: Tsallis stream sampled with ITS-TPC combined pT
1396+
const int triggerMask = 0x1 * minBiasOk + 0x2 * writeData + 0x4 * writeDataITSTPC;
13881397

13891398
float deltaP2ConstrVtx = -999;
13901399
float deltaP3ConstrVtx = -999;
@@ -1435,6 +1444,7 @@ class TPCTimeSeries : public Task
14351444
<< "factorMinBias=" << factorMinBias
14361445
<< "factorPt=" << factorPt
14371446
<< "weight=" << weight
1447+
<< "weight_ITSTPC=" << weightITSTPC
14381448
<< "dcar_tpc_vertex=" << dcaTPCAtVertex
14391449
<< "dcar_tpc=" << dca[0]
14401450
<< "dcaz_tpc=" << dca[1]

0 commit comments

Comments
 (0)