Skip to content

Commit d841871

Browse files
authored
[PWGCF] Add configurable flags for ITS layer selection (#15915)
1 parent 7af0655 commit d841871

2 files changed

Lines changed: 36 additions & 11 deletions

File tree

PWGCF/Flow/Tasks/flowMc.cxx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ struct FlowMc {
102102
O2_DEFINE_CONFIGURABLE(cfgTrackDensityCorrSlopeFactor, float, 1.0f, "A factor to scale the track density efficiency slope")
103103
O2_DEFINE_CONFIGURABLE(cfgRecoEvRejectMC, bool, false, "reject both MC and Reco events when reco do not pass")
104104
O2_DEFINE_CONFIGURABLE(cfgRecoEvSel8, bool, false, "require sel8 for reconstruction events")
105-
O2_DEFINE_CONFIGURABLE(cfgRecoEvkIsGoodITSLayersAll, bool, false, "require kIsGoodITSLayersAll for reconstruction events")
105+
O2_DEFINE_CONFIGURABLE(cfgRecoEvkIsGoodITSLayers, bool, true, "cut time intervals with dead ITS staves")
106+
O2_DEFINE_CONFIGURABLE(cfgRecoEvkIsGoodITSLayersFlag, int, 0, "0: kIsGoodITSLayersAll; 1: kIsGoodITSLayer0123; 2: kIsGoodITSLayer3")
106107
O2_DEFINE_CONFIGURABLE(cfgRecoEvkNoSameBunchPileup, bool, false, "require kNoSameBunchPileup for reconstruction events")
107108
O2_DEFINE_CONFIGURABLE(cfgRecoEvSelkIsGoodZvtxFT0vsPV, bool, false, "removes collisions with large differences between z of PV by tracks and z of PV from FT0 A-C time difference, use this cut at low multiplicities with caution")
108109
O2_DEFINE_CONFIGURABLE(cfgRecoEvSelkNoITSROFrameBorder, bool, false, "reject events at ITS ROF border")
@@ -151,6 +152,12 @@ struct FlowMc {
151152
TF1* funcV2;
152153
TF1* funcV3;
153154
TF1* funcV4;
155+
enum GoodITSLayersFlag {
156+
kITSLayersAll,
157+
kITSLayer0123,
158+
kITSLayer3,
159+
kCount_ITSLayersFlag
160+
};
154161

155162
// Connect to ccdb
156163
Service<ccdb::BasicCCDBManager> ccdb;
@@ -426,10 +433,15 @@ struct FlowMc {
426433
// https://indico.cern.ch/event/1396220/#1-event-selection-with-its-rof
427434
return 0;
428435
}
429-
if (cfgRecoEvkIsGoodITSLayersAll && !collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) {
436+
if (cfgRecoEvkIsGoodITSLayers) {
430437
// from Jan 9 2025 AOT meeting
431438
// cut time intervals with dead ITS staves
432-
return 0;
439+
if (cfgRecoEvkIsGoodITSLayersFlag == kITSLayersAll && !collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll))
440+
return 0;
441+
if (cfgRecoEvkIsGoodITSLayersFlag == kITSLayer0123 && !collision.selection_bit(o2::aod::evsel::kIsGoodITSLayer0123))
442+
return 0;
443+
if (cfgRecoEvkIsGoodITSLayersFlag == kITSLayer3 && !collision.selection_bit(o2::aod::evsel::kIsGoodITSLayer3))
444+
return 0;
433445
}
434446
if (cfgRecoEvSelkIsGoodZvtxFT0vsPV && !collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV)) {
435447
// removes collisions with large differences between z of PV by tracks and z of PV from FT0 A-C time difference

PWGCF/Flow/Tasks/flowTask.cxx

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,21 @@ struct FlowTask {
111111
kTrCutNch = 0,
112112
kTrCutObs = 1
113113
};
114+
enum GoodITSLayersFlag {
115+
kITSLayersAll,
116+
kITSLayer0123,
117+
kITSLayer3,
118+
kCount_ITSLayersFlag
119+
};
114120
// Additional events selection flags
115121
O2_DEFINE_CONFIGURABLE(cfgUseAdditionalEventCut, bool, false, "Use additional event cut on mult correlations")
116122
O2_DEFINE_CONFIGURABLE(cfgEvSelkNoSameBunchPileup, bool, false, "rejects collisions which are associated with the same found-by-T0 bunch crossing")
117123
O2_DEFINE_CONFIGURABLE(cfgEvSelkNoITSROFrameBorder, bool, false, "reject events at ITS ROF border")
118124
O2_DEFINE_CONFIGURABLE(cfgEvSelkNoTimeFrameBorder, bool, false, "reject events at TF border")
119125
O2_DEFINE_CONFIGURABLE(cfgEvSelkIsGoodZvtxFT0vsPV, bool, false, "removes collisions with large differences between z of PV by tracks and z of PV from FT0 A-C time difference, use this cut at low multiplicities with caution")
120126
O2_DEFINE_CONFIGURABLE(cfgEvSelkNoCollInTimeRangeStandard, bool, false, "no collisions in specified time range")
121-
O2_DEFINE_CONFIGURABLE(cfgEvSelkIsGoodITSLayersAll, bool, true, "cut time intervals with dead ITS staves")
127+
O2_DEFINE_CONFIGURABLE(cfgEvSelkIsGoodITSLayers, bool, true, "cut time intervals with dead ITS staves")
128+
O2_DEFINE_CONFIGURABLE(cfgEvSelkIsGoodITSLayersFlag, int, 0, "0: kIsGoodITSLayersAll; 1: kIsGoodITSLayer0123; 2: kIsGoodITSLayer3")
122129
O2_DEFINE_CONFIGURABLE(cfgEvSelkNoCollInRofStandard, bool, false, "no other collisions in this Readout Frame with per-collision multiplicity above threshold")
123130
O2_DEFINE_CONFIGURABLE(cfgEvSelkNoHighMultCollInPrevRof, bool, false, "veto an event if FT0C amplitude in previous ITS ROF is above threshold")
124131
O2_DEFINE_CONFIGURABLE(cfgEvSelMultCorrelation, bool, true, "Multiplicity correlation cut")
@@ -346,7 +353,8 @@ struct FlowTask {
346353
registry.get<TH1>(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(4, "kNoTimeFrameBorder");
347354
registry.get<TH1>(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(5, "kIsGoodZvtxFT0vsPV");
348355
registry.get<TH1>(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(6, "kNoCollInTimeRangeStandard");
349-
registry.get<TH1>(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(7, "kIsGoodITSLayersAll");
356+
std::string itsLayersFlag[kCount_ITSLayersFlag] = {"ITSLayersAll", "ITSLayers0123", "ITSLayer3"};
357+
registry.get<TH1>(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(7, Form("kIsGood%s", itsLayersFlag[cfgEvSelkIsGoodITSLayersFlag].c_str()));
350358
registry.get<TH1>(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(8, "kNoCollInRofStandard");
351359
registry.get<TH1>(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(9, "kNoHighMultCollInPrevRof");
352360
registry.get<TH1>(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(10, "occupancy");
@@ -396,8 +404,8 @@ struct FlowTask {
396404
registry.add("hnTPCClu", "Number of found TPC clusters", {HistType::kTH1D, {{100, 40, 180}}});
397405
registry.add("hnITSClu", "Number of found ITS clusters", {HistType::kTH1D, {{100, 0, 20}}});
398406
registry.add("hnTPCCrossedRow", "Number of crossed TPC Rows", {HistType::kTH1D, {{100, 40, 180}}});
399-
registry.add("hDCAz", "DCAz after cuts; DCAz (cm); Pt", {HistType::kTH2D, {{200, -0.5, 0.5}, {200, 0, 5}}});
400-
registry.add("hDCAxy", "DCAxy after cuts; DCAxy (cm); Pt", {HistType::kTH2D, {{200, -0.5, 0.5}, {200, 0, 5}}});
407+
registry.add("hDCAz", "DCAz after cuts; DCAz (cm); Pt", {HistType::kTH2D, {{200, -1., 1.}, {200, 0, 5}}});
408+
registry.add("hDCAxy", "DCAxy after cuts; DCAxy (cm); Pt", {HistType::kTH2D, {{200, -1., 1.}, {200, 0, 5}}});
401409
registry.add("hTrackCorrection2d", "Correlation table for number of tracks table; uncorrected track; corrected track", {HistType::kTH2D, {axisNch, axisNch}});
402410
registry.add("hMeanPt", "", {HistType::kTProfile, {axisIndependent}});
403411
registry.add("hMeanPtWithinGap08", "", {HistType::kTProfile, {axisIndependent}});
@@ -979,12 +987,17 @@ struct FlowTask {
979987
}
980988
if (cfgEvSelkNoCollInTimeRangeStandard)
981989
registry.fill(HIST("hEventCountSpecific"), 5.5);
982-
if (cfgEvSelkIsGoodITSLayersAll && !collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) {
990+
if (cfgEvSelkIsGoodITSLayers) {
983991
// from Jan 9 2025 AOT meeting
984992
// cut time intervals with dead ITS staves
985-
return 0;
993+
if (cfgEvSelkIsGoodITSLayersFlag == kITSLayersAll && !collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll))
994+
return 0;
995+
if (cfgEvSelkIsGoodITSLayersFlag == kITSLayer0123 && !collision.selection_bit(o2::aod::evsel::kIsGoodITSLayer0123))
996+
return 0;
997+
if (cfgEvSelkIsGoodITSLayersFlag == kITSLayer3 && !collision.selection_bit(o2::aod::evsel::kIsGoodITSLayer3))
998+
return 0;
986999
}
987-
if (cfgEvSelkIsGoodITSLayersAll)
1000+
if (cfgEvSelkIsGoodITSLayers)
9881001
registry.fill(HIST("hEventCountSpecific"), 6.5);
9891002
if (cfgEvSelkNoCollInRofStandard && !collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) {
9901003
// no other collisions in this Readout Frame with per-collision multiplicity above threshold
@@ -1406,7 +1419,7 @@ struct FlowTask {
14061419
}
14071420
registry.fill(HIST("hNormDeltaPt_X_afterCut"), normDeltaPt, independent, weffEvent);
14081421
if (ptEtaVec.size() > 0) {
1409-
for (auto trptEta : ptEtaVec) {
1422+
for (auto const& trptEta : ptEtaVec) {
14101423
registry.fill(HIST("hPt_afterDptCut"), trptEta.first);
14111424
if (trptEta.second < -1. * cfgAdditionObs.cfgDptDisEtaGapQA)
14121425
registry.fill(HIST("hPtA_afterDptCut"), trptEta.first);

0 commit comments

Comments
 (0)