Skip to content

Commit 0a241e6

Browse files
authored
[PWGUD] fix zdc gapside selection (#18122)
1 parent cd56171 commit 0a241e6

1 file changed

Lines changed: 10 additions & 23 deletions

File tree

‎PWGUD/Tasks/flowCorrelationsUpc.cxx‎

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ struct FlowCorrelationsUpc {
7878
O2_DEFINE_CONFIGURABLE(cfgDcazCut, float, 2.0, "dcaz cut")
7979
O2_DEFINE_CONFIGURABLE(cfgMaxTPCChi2NCl, int, 4, "tpcchi2")
8080
O2_DEFINE_CONFIGURABLE(cfgGapSide, int, 1, "choose one side 0:A; 1:C")
81-
O2_DEFINE_CONFIGURABLE(cfgGapSideMerge, bool, true, "merge A and C side")
8281
O2_DEFINE_CONFIGURABLE(cfgCutTPCCrossedRows, float, 70.0f, "minimum number of crossed TPC Rows")
8382
O2_DEFINE_CONFIGURABLE(cfgCutTPCclu, float, 50.0f, "minimum number of found TPC clusters")
8483
O2_DEFINE_CONFIGURABLE(cfgCutITSclu, float, 5.0f, "minimum number of ITS clusters")
@@ -122,11 +121,7 @@ struct FlowCorrelationsUpc {
122121

123122
// make the filters and cuts.
124123
Filter trackFilter = (aod::udtrack::isPVContributor == true);
125-
Filter collisionFilter = cfgGapSideMerge
126-
? ((aod::udcollision::gapSide == (uint8_t)0 || aod::udcollision::gapSide == (uint8_t)1) &&
127-
(aod::upcservice::truegapside == 0 || aod::upcservice::truegapside == 1))
128-
: ((aod::udcollision::gapSide == (uint8_t)cfgGapSide) &&
129-
(aod::upcservice::truegapside == cfgGapSide));
124+
Filter collisionFilter = ((aod::udcollision::gapSide == (uint8_t)cfgGapSide) && (aod::upcservice::truegapside == cfgGapSide));
130125

131126
// Connect to ccdb
132127
Service<ccdb::BasicCCDBManager> ccdb{};
@@ -264,13 +259,13 @@ struct FlowCorrelationsUpc {
264259
registry.fill(HIST("neutronClass"), 0, 0);
265260
}
266261
if (std::abs(timeZNA) <= cfgZdcTimeCut && std::abs(timeZNC) > cfgZdcTimeCut) {
267-
neutronClass = 1;
268-
registry.fill(HIST("neutronClass"), 0, 1);
269-
}
270-
if (std::abs(timeZNA) > cfgZdcTimeCut && std::abs(timeZNC) <= cfgZdcTimeCut) {
271262
neutronClass = 2;
272263
registry.fill(HIST("neutronClass"), 1, 0);
273264
}
265+
if (std::abs(timeZNA) > cfgZdcTimeCut && std::abs(timeZNC) <= cfgZdcTimeCut) {
266+
neutronClass = 1;
267+
registry.fill(HIST("neutronClass"), 0, 1);
268+
}
274269
if (std::abs(timeZNA) <= cfgZdcTimeCut && std::abs(timeZNC) <= cfgZdcTimeCut) {
275270
neutronClass = 3;
276271
registry.fill(HIST("neutronClass"), 1, 1);
@@ -281,15 +276,11 @@ struct FlowCorrelationsUpc {
281276
return false;
282277
}
283278
// if A or C gap is requested, keep corresponding neutron class
284-
if (cfgGapSideMerge) {
285-
// accepted
286-
} else {
287-
if (cfgGapSide == 0 || cfgGapSide == 1) {
288-
if ((cfgGapSide == 0 && neutronClass == 1) || (cfgGapSide == 1 && neutronClass == 2)) { // o2-linter: disable=magic-number (ZDC time cut)
289-
// accepted
290-
} else {
291-
return false;
292-
}
279+
if (cfgGapSide == 0 || cfgGapSide == 1) {
280+
if ((cfgGapSide == 0 && neutronClass == 1) || (cfgGapSide == 1 && neutronClass == 2)) { // o2-linter: disable=magic-number (ZDC time cut)
281+
// accepted
282+
} else {
283+
return false;
293284
}
294285
}
295286
}
@@ -332,10 +323,6 @@ struct FlowCorrelationsUpc {
332323
return false;
333324
}
334325

335-
if (!zdcTimeCut(collision)) {
336-
return false;
337-
}
338-
339326
return true;
340327
}
341328

0 commit comments

Comments
 (0)