Skip to content

Commit 4506ed8

Browse files
committed
PWGEM/PhotonMeson: update createPCM for really TPC only tracks
1 parent 7b38c98 commit 4506ed8

1 file changed

Lines changed: 26 additions & 7 deletions

File tree

PWGEM/PhotonMeson/TableProducer/createPCM.cxx

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ struct createPCM {
7676
Configurable<float> maxeta{"maxeta", 0.9, "eta acceptance for single track"};
7777
Configurable<int> mincrossedrows{"mincrossedrows", 10, "min crossed rows"};
7878
Configurable<float> maxchi2tpc{"maxchi2tpc", 4.0, "max chi2/NclsTPC"};
79+
Configurable<bool> useTPConly{"useTPConly", false, "Use truly TPC only tracks for V0 finder"};
7980

8081
int mRunNumber;
8182
float d_bz;
@@ -178,13 +179,6 @@ struct createPCM {
178179
array<float, 3> pvec0 = {0.};
179180
array<float, 3> pvec1 = {0.};
180181

181-
if (ele.tpcNClsCrossedRows() < mincrossedrows) {
182-
return;
183-
}
184-
if (pos.tpcNClsCrossedRows() < mincrossedrows) {
185-
return;
186-
}
187-
188182
auto pTrack = getTrackParCov(pos); // positive
189183
auto nTrack = getTrackParCov(ele); // negative
190184

@@ -244,6 +238,22 @@ struct createPCM {
244238
auto posTracks_coll = posTracks->sliceByCached(o2::aod::track::collisionId, collision.globalIndex(), cache);
245239

246240
for (auto& [ele, pos] : combinations(CombinationsFullIndexPolicy(negTracks_coll, posTracks_coll))) {
241+
if (ele.tpcNClsCrossedRows() < mincrossedrows) {
242+
continue;
243+
}
244+
if (pos.tpcNClsCrossedRows() < mincrossedrows) {
245+
continue;
246+
}
247+
248+
if (useTPConly) {
249+
if ((ele.hasITS() || ele.hasTOF() || ele.hasTRD())) {
250+
continue;
251+
}
252+
if ((pos.hasITS() || pos.hasTOF() || pos.hasTRD())) {
253+
continue;
254+
}
255+
}
256+
247257
fillV0Table(collision, ele, pos);
248258
}
249259
} // end of collision loop
@@ -285,6 +295,15 @@ struct createPCM {
285295
continue;
286296
}
287297

298+
if (useTPConly) {
299+
if ((ele.hasITS() || ele.hasTOF() || ele.hasTRD())) {
300+
continue;
301+
}
302+
if ((pos.hasITS() || pos.hasTOF() || pos.hasTRD())) {
303+
continue;
304+
}
305+
}
306+
288307
if (ele.sign() < 0) {
289308
fillV0Table(collision, ele, pos);
290309
} else {

0 commit comments

Comments
 (0)