Skip to content

Commit 829c6ca

Browse files
authored
Add track selections (AliceO2Group#4731)
1 parent 50b56ae commit 829c6ca

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

PWGLF/Tasks/Nuspex/nucleiFlow.cxx

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ struct nucleiFlow {
8989
Configurable<int> cfgHarmonic{"cfgHarmonic", 2, "cfgHarmonic number"};
9090
Configurable<int> cfgQvecDetector{"cfgQvecDetector", 0, "Detector for Q vector estimation (FV0A: 0, FT0M: 1, FT0A: 2, FT0C: 3, TPC Pos: 4, TPC Neg: 5)"};
9191
Configurable<int> cfgSpecies{"cfgSpecies", 3, "Species under study (proton: 0, deuteron: 1, triton: 2, helion: 3, alpha: 4)"};
92+
93+
Configurable<float> cfgNclusTPCcut{"cfgNclusTPCcut", 70, "Minimum number of TPC clusters"};
94+
Configurable<float> cfgDCAxyCut{"cfgDCAxyCut", 0.1, "Cut on DCAxy (cm)"};
95+
Configurable<float> cfgDCAzCut{"cfgDCAzCut", 1, "Cut on DCAz (cm)"};
9296
Configurable<int> cfgItsClusSizeCut{"cfgItsClusSizeCut", 4, "Cut on the average ITS cluster size."};
9397

9498
HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject};
@@ -149,6 +153,24 @@ struct nucleiFlow {
149153
return sum / nClus;
150154
}
151155

156+
/// @brief Get average ITS cluster size
157+
/// @tparam T type for the track
158+
/// @param track
159+
/// @return true if the candidates passes all the selections
160+
template <class T>
161+
bool selectTrack(T const& track)
162+
{
163+
if (track.tpcNCls() < cfgNclusTPCcut)
164+
return false;
165+
if (track.dcaxy() > cfgDCAxyCut)
166+
return false;
167+
if (track.dcaz() > cfgDCAzCut)
168+
return false;
169+
if (getITSClSize(track) < cfgItsClusSizeCut)
170+
return false;
171+
return true;
172+
}
173+
152174
/// \brief Get the centrality with the selected detector
153175
/// \param collision collision with the centrality information
154176
/// \return centrality expressed in percentage
@@ -277,7 +299,7 @@ struct nucleiFlow {
277299

278300
for (auto track : tracks) {
279301

280-
if (getITSClSize(track) < cfgItsClusSizeCut)
302+
if (!selectTrack(track))
281303
continue;
282304

283305
// Get candidate vector

0 commit comments

Comments
 (0)