Skip to content

Commit 9f20e89

Browse files
victor-gonzalezVictor
andauthored
[PWGCF] DptDpt - Tracking the fraction of shared TPC clusters (#9102)
Co-authored-by: Victor <victor@cern.ch>
1 parent b76fd7a commit 9f20e89

File tree

4 files changed

+34
-20
lines changed

4 files changed

+34
-20
lines changed

PWGCF/Core/AnalysisConfigurableCuts.h

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -86,27 +86,28 @@ class TrackSelectionCfg
8686
ClassDefNV(TrackSelectionCfg, 1);
8787
};
8888

89-
/// \brief Simple class for fine tuning a track selection object
90-
/// The tune is done after the actual track selection has ben performed
91-
/// Take into consideration that only more restrictive tunes are supported
92-
/// For more relaxed tunes the whole track selection object must be modified
89+
/// \brief Simple class for configuring the fine tuning a track selection object
90+
/// The tune should change the track selection objects and probably do further checks
91+
/// after the actual track selection has ben performed
9392
class TrackSelectionTuneCfg
9493
{
9594
public:
96-
bool mUseIt = false; ///< use this track selection tuning configuration
97-
int mTPCclusters = 0; ///< minimum number of TPC clusters
98-
bool mUseTPCclusters = false; ///< use or not the number of TPC clusters
99-
int mTPCxRows = 70; ///< minimum number of TPC crossed rows
100-
bool mUseTPCxRows = false; ///< use or not the number of TPC crossed rows
101-
float mTPCXRoFClusters = 0.8; ///< minimum value of the TPC ratio no of crossed rows over findable clusters
102-
bool mUseTPCXRoFClusters = false; ///< use or not the TPC ration of no of crossed rows over findable clusters
103-
float mDCAxy = 2.4; ///< maximum DCA on xy plane
104-
bool mUseDCAxy = false; ///< use or not the maximum DCA on the xy plane
105-
float mDCAz = 3.2; ///< maximum DCA on z axis
106-
bool mUseDCAz = false; ///< use or not the maximum DCA on z asis
95+
bool mUseIt = false; ///< use this track selection tuning configuration
96+
int mTPCclusters = 0; ///< minimum number of TPC clusters
97+
bool mUseTPCclusters = false; ///< use or not the number of TPC clusters
98+
int mTPCxRows = 70; ///< minimum number of TPC crossed rows
99+
bool mUseTPCxRows = false; ///< use or not the number of TPC crossed rows
100+
float mTPCXRoFClusters = 0.8; ///< minimum value of the TPC ratio no of crossed rows over findable clusters
101+
bool mUseTPCXRoFClusters = false; ///< use or not the TPC ratio of no of crossed rows over findable clusters
102+
float mFractionTpcSharedClusters = 0.4; ///< the maximum fraction of TPC shared clusters
103+
bool mUseFractionTpcSharedClusters = false; ///< use or not the fraction of TPC share clusters
104+
float mDCAxy = 2.4; ///< maximum DCA on xy plane
105+
bool mUseDCAxy = false; ///< use or not the maximum DCA on the xy plane
106+
float mDCAz = 3.2; ///< maximum DCA on z axis
107+
bool mUseDCAz = false; ///< use or not the maximum DCA on z asis
107108

108109
private:
109-
ClassDefNV(TrackSelectionTuneCfg, 1);
110+
ClassDefNV(TrackSelectionTuneCfg, 2);
110111
};
111112

112113
/// \brief Simple class to configure a selection based on PID

PWGCF/TableProducer/dptdptfilter.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ struct DptDptFilterTracks {
770770
Configurable<o2::analysis::CheckRangeCfg> cfgTraceDCAOutliers{"trackdcaoutliers", {false, 0.0, 0.0}, "Track the generator level DCAxy outliers: false/true, low dcaxy, up dcaxy. Default {false,0.0,0.0}"};
771771
Configurable<float> cfgTraceOutOfSpeciesParticles{"trackoutparticles", false, "Track the particles which are not e,mu,pi,K,p: false/true. Default false"};
772772
Configurable<int> cfgRecoIdMethod{"recoidmethod", 0, "Method for identifying reconstructed tracks: 0 No PID, 1 PID, 2 mcparticle, 3 mcparticle only primaries, 4 mcparticle only sec, 5 mcparicle only sec from decays, 6 mcparticle only sec from material. Default 0"};
773-
Configurable<o2::analysis::TrackSelectionTuneCfg> cfgTuneTrackSelection{"tunetracksel", {}, "Track selection: {useit: true/false, tpccls-useit, tpcxrws-useit, tpcxrfc-useit, dcaxy-useit, dcaz-useit}. Default {false,0.70,false,0.8,false,2.4,false,3.2,false}"};
773+
Configurable<o2::analysis::TrackSelectionTuneCfg> cfgTuneTrackSelection{"tunetracksel", {}, "Track selection: {useit: true/false, tpccls-useit, tpcxrws-useit, tpcxrfc-useit, tpcshcls-useit, dcaxy-useit, dcaz-useit}. Default {false,0.70,false,0.8,false,0.4,false,2.4,false,3.2,false}"};
774774
Configurable<o2::analysis::TrackSelectionPIDCfg> cfgPionPIDSelection{"pipidsel",
775775
{},
776776
"PID criteria for pions"};
@@ -835,7 +835,7 @@ struct DptDptFilterTracks {
835835

836836
/* the track types and combinations */
837837
tracktype = cfgTrackType.value;
838-
initializeTrackSelection(cfgTuneTrackSelection);
838+
initializeTrackSelection(cfgTuneTrackSelection.value);
839839
traceDCAOutliers = cfgTraceDCAOutliers;
840840
traceOutOfSpeciesParticles = cfgTraceOutOfSpeciesParticles;
841841
recoIdMethod = cfgRecoIdMethod;

PWGCF/TableProducer/dptdptfilter.h

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ std::function<float(float)> maxDcaZPtDep{}; // max dca in z axis as function of
210210

211211
std::vector<TrackSelection*> trackFilters = {};
212212
bool dca2Dcut = false;
213+
float sharedTpcClusters = 1.0; ///< max fraction of shared TPC clusters
213214
float maxDCAz = 1e6f;
214215
float maxDCAxy = 1e6f;
215216

@@ -236,7 +237,7 @@ inline TList* getCCDBInput(auto& ccdb, const char* ccdbpath, const char* ccdbdat
236237
return lst;
237238
}
238239

239-
inline void initializeTrackSelection(const TrackSelectionTuneCfg& tune)
240+
inline void initializeTrackSelection(TrackSelectionTuneCfg& tune)
240241
{
241242
switch (tracktype) {
242243
case 1: { /* Run2 global track */
@@ -341,12 +342,20 @@ inline void initializeTrackSelection(const TrackSelectionTuneCfg& tune)
341342
filter->SetMinNCrossedRowsOverFindableClustersTPC(tune.mTPCXRoFClusters);
342343
}
343344
if (tune.mUseDCAxy) {
345+
/* DCAxy is tricky due to how the pT dependence is implemented */
346+
filter->SetMaxDcaXYPtDep([&tune](float) { return tune.mDCAxy; });
344347
filter->SetMaxDcaXY(tune.mDCAxy);
345348
}
346349
if (tune.mUseDCAz) {
347350
filter->SetMaxDcaZ(tune.mDCAz);
348351
}
349352
}
353+
if (tune.mUseDCAz) {
354+
maxDcaZPtDep = [&tune](float) { return tune.mDCAz; };
355+
}
356+
if (tune.mUseFractionTpcSharedClusters) {
357+
sharedTpcClusters = tune.mFractionTpcSharedClusters;
358+
}
350359
}
351360
}
352361

@@ -1128,6 +1137,10 @@ inline bool matchTrackType(TrackObject const& track)
11281137
if (!checkDca2Dcut(track)) {
11291138
return false;
11301139
}
1140+
/* shared fraction of TPC clusters */
1141+
if (!(track.tpcFractionSharedCls() < sharedTpcClusters)) {
1142+
return false;
1143+
}
11311144
return true;
11321145
}
11331146
}

PWGCF/Tasks/matchRecoGen.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ struct MatchRecoGen {
120120

121121
/* the track types and combinations */
122122
tracktype = cfgTrackType.value;
123-
initializeTrackSelection(cfgTuneTrackSelection);
123+
initializeTrackSelection(cfgTuneTrackSelection.value);
124124
/* the centrality/multiplicity estimation */
125125
fCentMultEstimator = getCentMultEstimator(cfgCentMultEstimator);
126126
/* the trigger selection */

0 commit comments

Comments
 (0)