Skip to content

Commit ab13e1e

Browse files
committed
Update track selection in FactorialMomentsTask
1 parent 273d175 commit ab13e1e

1 file changed

Lines changed: 22 additions & 17 deletions

File tree

‎PWGCF/EbyEFluctuations/Tasks/FactorialMomentsTask.cxx‎

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@
88
// In applying this license CERN does not waive the privileges and immunities
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
11+
1112
/// \file FactorialMomentsTask.cxx
1213
/// \brief This task is for Normalized Factorial Moments Analysis: Hwa and Yang, Phys. Rev. C 85, 044914 (2012)
1314
/// \author Salman Malik
1415
/// \author Balwan Singh
16+
1517
#include "Common/CCDB/EventSelectionParams.h"
1618
#include "Common/CCDB/TriggerAliases.h"
1719
#include "Common/Core/RecoDecay.h"
18-
#include "Common/Core/TrackSelection.h"
1920
#include "Common/DataModel/Centrality.h"
2021
#include "Common/DataModel/EventSelection.h"
2122
#include "Common/DataModel/Multiplicity.h"
@@ -54,7 +55,8 @@ using namespace o2::framework::expressions;
5455

5556
struct FactorialMomentsTask {
5657
Configurable<bool> useDcaCut{"useDcaCut", true, "Enable DCA cut"};
57-
Configurable<bool> useTPCRefit{"useTPCRefit", true, "Enable TPC refit cut"};
58+
Configurable<bool> usePVContributor{"usePVContributor", true,
59+
"Require the track to contribute to the primary-vertex fit (Run 3)"};
5860
Configurable<bool> useTPCChi2{"useTPCChi2", true, "Enable TPC chi2 cut"};
5961
Configurable<bool> useTPCCluster{"useTPCCluster", false, "Select tracks with TPCCluster"};
6062
Configurable<bool> useITS{"useITS", false, "Select tracks with ITS"};
@@ -72,7 +74,6 @@ struct FactorialMomentsTask {
7274
Configurable<float> dcaZ{"dcaZ", 1.0f, "DCA z cut"};
7375
Configurable<float> maxTPCChi2NCl{"maxTPCChi2NCl", 4.0f, "Maximum TPCchi2NCl"};
7476
Configurable<float> maxITSChi2NCl{"maxITSChi2NCl", 40.0f, "Maximum ITSchi2NCl"};
75-
Configurable<float> minTPCr{"minTPCr", 70.0f, "minimum number of TPC clusters"};
7677
Configurable<float> minTPCNCls{"minTPCNCls", 70.0f, "minimum number of TPC clusters"};
7778
Configurable<std::vector<int>> centLimits{"centLimits", {0, 5}, "centrality min and max"};
7879
Configurable<std::vector<float>> vertexXYZ{"vertexXYZ", {0.3f, 0.4f, 10.0f}, "vertex cuts"};
@@ -90,8 +91,7 @@ struct FactorialMomentsTask {
9091
Configurable<bool> includeITSTracks{"includeITSTracks", false, "ITS Tracks"};
9192
Configurable<int> nSlots{"nSlots", 1250, "Number of hash slots for merge-safe subsampling (slot = splitmix64(globalBC) % nSlots); must be identical for every job"};
9293
Configurable<bool> useMC{"useMC", false, "Use MC information"};
93-
Configurable<bool> useCrossedRows{"useCrossedRows", true, "Require global track in filter"};
94-
Configurable<bool> useGlobalTrack{"useGlobalTrack", true, "Require global track in filter"};
94+
Configurable<bool> useCrossedRows{"useCrossedRows", true, "Require minimum number of TPC crossed rows"};
9595
Configurable<int> minITSClusters{"minITSClusters", 6, "Minimum Number of ITS cluster"};
9696
Configurable<int> minTPCClusters{"minTPCClusters", 70, "Minimum Number of TPC cluster"};
9797
Configurable<int> minTPCCrossedRows{"minTPCCrossedRows", 70, "Minimum Number of TPC crossed-rows"};
@@ -138,15 +138,15 @@ struct FactorialMomentsTask {
138138
},
139139
OutputObjHandlingPolicy::AnalysisObject,
140140
true};
141+
float collisionZ = 0.f;
142+
static constexpr double DcaXY0 = 0.0105;
143+
static constexpr double DcaXY1 = 0.035;
144+
static constexpr double DcaXY2 = 1.1;
141145
static const int nBins = 52;
142146
static const int nCentLim = 2;
143147
static const int nPtVal = 2;
144148
static const int nVertexXYZ = 3;
145149
static constexpr int NPt = 5;
146-
float collisionZ = 0.f;
147-
static constexpr double DcaXY0 = 0.0105;
148-
static constexpr double DcaXY1 = 0.035;
149-
static constexpr double DcaXY2 = 1.1;
150150
static constexpr double MinCharge = 1e-6;
151151
static constexpr int MaxSlots = 1000000;
152152
static const int nfqOrder = 6;
@@ -182,17 +182,17 @@ struct FactorialMomentsTask {
182182
void init(o2::framework::InitContext&)
183183
{
184184
if (numPt.value < 1 || numPt.value > NPt) {
185-
LOG(fatal) << "NPt must be between 1 and 5, got " << numPt.value;
185+
LOG(fatal) << "numPt must be between 1 and " << NPt << ", got " << numPt.value;
186186
}
187187
if (static_cast<int>(ptCuts.value.size()) < nPtVal * numPt.value) {
188188
LOG(fatal) << "ptCuts needs " << nPtVal * numPt.value << " values for numPt=" << numPt.value
189189
<< ", got " << ptCuts.value.size();
190190
}
191191
if (nSlots.value < 1 || nSlots.value > MaxSlots) {
192-
LOG(fatal) << "nSlots must be in [1, MaxSlots], got " << nSlots.value;
192+
LOG(fatal) << "nSlots must be in [1, " << MaxSlots << "], got " << nSlots.value;
193193
}
194194
if (centLimits.value.size() != nCentLim || vertexXYZ.value.size() != nVertexXYZ) {
195-
LOG(fatal) << "centLimits needs 2 and vertexXYZ needs 3 values";
195+
LOG(fatal) << "centLimits needs " << nCentLim << " and vertexXYZ needs " << nVertexXYZ << " values";
196196
}
197197
if (applyCheckPtForRec.value == applyCheckPtForMC.value) {
198198
LOG(fatal) << "exactly one of applyCheckPtForRec / applyCheckPtForMC must be enabled";
@@ -205,6 +205,12 @@ struct FactorialMomentsTask {
205205
for (int i = 0; i < static_cast<int>(ptCuts.value.size()); i++) {
206206
cfg += Form("%s%g", i > 0 ? "," : "", ptCuts.value[i]);
207207
}
208+
cfg += Form(" useDcaCut=%d usePVContributor=%d useTPCChi2=%d useTPCCluster=%d useCrossedRows=%d",
209+
useDcaCut.value ? 1 : 0, usePVContributor.value ? 1 : 0, useTPCChi2.value ? 1 : 0,
210+
useTPCCluster.value ? 1 : 0, useCrossedRows.value ? 1 : 0);
211+
cfg += Form(" useITS=%d useTPC=%d useGlobal=%d maxTPCChi2NCl=%g minTPCClusters=%d minTPCCrossedRows=%d",
212+
useITS.value ? 1 : 0, useTPC.value ? 1 : 0, useGlobal.value ? 1 : 0,
213+
maxTPCChi2NCl.value, minTPCClusters.value, minTPCCrossedRows.value);
208214
histos.add("metaConfig", cfg.Data(), HistType::kTH1D, {{1, 0.5, 1.5}});
209215
auto mEventSelected = std::get<std::shared_ptr<TH1>>(histos.add("mEventSelected", "eventSelected", HistType::kTH1D, {{NEventSteps, 0.5, NEventSteps + 0.5}}));
210216
const std::array<const char*, NEventSteps> evLabels = {"all", "sel8", "kNoITSROFrameBorder", "kNoTimeFrameBorder", "kNoSameBunchPileup", "kIsGoodITSLayersAll", "kIsGoodZvtxFT0vsPV", "kIsVertexITSTPC", "centrality", "accepted"};
@@ -456,6 +462,7 @@ struct FactorialMomentsTask {
456462
histos.fill(HIST("mEventSelected"), EvAccepted);
457463
return true;
458464
}
465+
459466
template <typename T>
460467
bool selectTrack(const T& track)
461468
{
@@ -468,26 +475,24 @@ struct FactorialMomentsTask {
468475
if (useGlobal && !track.isGlobalTrack()) {
469476
return false;
470477
}
471-
if (useCrossedRows && track.tpcNClsCrossedRows() < minTPCr) {
478+
if (useCrossedRows && track.tpcNClsCrossedRows() < minTPCCrossedRows) {
472479
return false;
473480
}
474481
if (useDcaCut && !passDcaCut(track)) {
475482
return false;
476483
}
477-
478-
if (useTPCRefit && !(track.flags() & o2::aod::track::TPCrefit)) {
484+
if (usePVContributor && !track.isPVContributor()) {
479485
return false;
480486
}
481-
482487
if (useTPCChi2 && track.tpcChi2NCl() > maxTPCChi2NCl) {
483488
return false;
484489
}
485-
486490
if (useTPCCluster && track.tpcNClsFound() < minTPCClusters) {
487491
return false;
488492
}
489493
return true;
490494
}
495+
491496
void beginEvent()
492497
{
493498
for (int iPt = 0; iPt < numPt; ++iPt) {

0 commit comments

Comments
 (0)