Skip to content

Commit 4139c47

Browse files
ilikmetaalibuild
andauthored
[PWGCF] Set global tracks in track filter (#13317)
Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent 41d60bb commit 4139c47

File tree

1 file changed

+50
-45
lines changed

1 file changed

+50
-45
lines changed

PWGCF/Flow/Tasks/flowGfwTask.cxx

Lines changed: 50 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -14,40 +14,41 @@
1414
/// \since Mar 28, 2024
1515
/// \brief Multiparticle flow measurements with FT0 and ZDC
1616

17-
#include <CCDB/BasicCCDBManager.h>
18-
#include <DataFormatsParameters/GRPMagField.h>
19-
#include <cmath>
20-
#include <vector>
21-
#include <string>
22-
#include <memory>
23-
#include "Framework/runDataProcessing.h"
24-
#include "Framework/AnalysisTask.h"
25-
#include "Framework/ASoAHelpers.h"
26-
#include "Framework/RunningWorkflowInfo.h"
27-
#include "Framework/HistogramRegistry.h"
28-
#include "Framework/AnalysisDataModel.h"
17+
#include "FlowContainer.h"
18+
#include "GFW.h"
19+
#include "GFWCumulant.h"
20+
#include "GFWPowerArray.h"
21+
#include "GFWWeights.h"
2922

30-
#include "Common/DataModel/EventSelection.h"
3123
#include "Common/Core/TrackSelection.h"
3224
#include "Common/Core/TrackSelectionDefaults.h"
33-
#include "Common/DataModel/TrackSelectionTables.h"
3425
#include "Common/DataModel/Centrality.h"
26+
#include "Common/DataModel/EventSelection.h"
3527
#include "Common/DataModel/Multiplicity.h"
28+
#include "Common/DataModel/TrackSelectionTables.h"
3629

30+
#include "Framework/ASoAHelpers.h"
31+
#include "Framework/AnalysisDataModel.h"
32+
#include "Framework/AnalysisTask.h"
33+
#include "Framework/HistogramRegistry.h"
3734
#include "Framework/O2DatabasePDGPlugin.h"
35+
#include "Framework/RunningWorkflowInfo.h"
36+
#include "Framework/runDataProcessing.h"
3837
#include "ReconstructionDataFormats/GlobalTrackID.h"
3938
#include "ReconstructionDataFormats/Track.h"
40-
#include "TPDGCode.h"
39+
#include <CCDB/BasicCCDBManager.h>
40+
#include <DataFormatsParameters/GRPMagField.h>
4141

42-
#include "GFWPowerArray.h"
43-
#include "GFW.h"
44-
#include "GFWCumulant.h"
45-
#include "GFWWeights.h"
46-
#include "FlowContainer.h"
4742
#include "TList.h"
43+
#include "TPDGCode.h"
44+
#include <TF1.h>
4845
#include <TProfile.h>
4946
#include <TRandom3.h>
50-
#include <TF1.h>
47+
48+
#include <cmath>
49+
#include <memory>
50+
#include <string>
51+
#include <vector>
5152

5253
using namespace o2;
5354
using namespace o2::framework;
@@ -70,41 +71,41 @@ struct FlowGfwTask {
7071
O2_DEFINE_CONFIGURABLE(cfgCutPtMax, float, 3.0f, "Maximal pT for ref tracks")
7172
O2_DEFINE_CONFIGURABLE(cfgCutEta, float, 0.8f, "Eta range for tracks")
7273
O2_DEFINE_CONFIGURABLE(cfgCutChi2prTPCcls, float, 2.5, "Chi2 per TPC clusters")
73-
O2_DEFINE_CONFIGURABLE(cfgCutTPCclu, float, 70.0f, "minimum TPC clusters")
74+
O2_DEFINE_CONFIGURABLE(cfgCutTPCclu, float, 50.0f, "minimum TPC clusters")
75+
O2_DEFINE_CONFIGURABLE(cfgCutTPCCrossedRows, float, 70.0f, "minimum TPC crossed rows")
7476
O2_DEFINE_CONFIGURABLE(cfgCutITSclu, float, 5.0f, "minimum ITS clusters")
7577
O2_DEFINE_CONFIGURABLE(cfgTrackSel, bool, false, "ITS and TPC cluster selection")
7678
O2_DEFINE_CONFIGURABLE(cfgMinCentFT0C, float, 0.0f, "Minimum FT0C Centrality")
7779
O2_DEFINE_CONFIGURABLE(cfgMaxCentFT0C, float, 100.0f, "Maximum FT0C Centrality")
80+
O2_DEFINE_CONFIGURABLE(cfgCutOccupancyHigh, int, 500, "High cut on TPC occupancy")
81+
O2_DEFINE_CONFIGURABLE(cfgCutOccupancyLow, int, 0, "Low cut on TPC occupancy")
82+
O2_DEFINE_CONFIGURABLE(cfgCutDCAz, float, 2.0f, "Custom DCA Z cut")
83+
O2_DEFINE_CONFIGURABLE(cfgNbootstrap, int, 10, "Number of subsamples")
7884
O2_DEFINE_CONFIGURABLE(cfgCentEstFt0c, bool, false, "Centrality estimator based on FT0C signal")
7985
O2_DEFINE_CONFIGURABLE(cfgCentEstFt0a, bool, false, "Centrality estimator based on FT0A signal")
8086
O2_DEFINE_CONFIGURABLE(cfgCentEstFt0m, bool, false, " A centrality estimator based on FT0A+FT0C signals.")
8187
O2_DEFINE_CONFIGURABLE(cfgCentEstFv0a, bool, false, "Centrality estimator based on FV0A signal")
8288
O2_DEFINE_CONFIGURABLE(cfgCentEstFt0cVariant1, bool, false, "A variant of FT0C")
83-
O2_DEFINE_CONFIGURABLE(cfgUseAdditionalEventCut, bool, false, "Use additional event cut on mult correlations")
84-
O2_DEFINE_CONFIGURABLE(cfgUseAdditionalTrackCut, bool, false, "Use additional track cut on phi")
85-
O2_DEFINE_CONFIGURABLE(cfgTrackSelRun3ITSMatch, bool, false, "Track selection for ITS matches")
86-
O2_DEFINE_CONFIGURABLE(cfgUseNch, bool, false, "Use Nch for flow observables")
87-
O2_DEFINE_CONFIGURABLE(cfgNbootstrap, int, 10, "Number of subsamples")
8889
O2_DEFINE_CONFIGURABLE(cfgOutputNUAWeights, bool, false, "Fill and output NUA weights")
89-
O2_DEFINE_CONFIGURABLE(cfgEfficiency, std::string, "", "CCDB path to efficiency object")
90+
O2_DEFINE_CONFIGURABLE(cfgEfficiencyPt, std::string, "", "CCDB path to efficiency object")
9091
O2_DEFINE_CONFIGURABLE(cfgEfficiencyNch, std::string, "", "CCDB path to Nch efficiency object")
9192
O2_DEFINE_CONFIGURABLE(cfgAcceptance, std::string, "", "CCDB path to acceptance object")
9293
O2_DEFINE_CONFIGURABLE(cfgMagnetField, std::string, "GLO/Config/GRPMagField", "CCDB path to Magnet field object")
93-
O2_DEFINE_CONFIGURABLE(cfgCutOccupancyHigh, int, 500, "High cut on TPC occupancy")
94-
O2_DEFINE_CONFIGURABLE(cfgCutOccupancyLow, int, 0, "Low cut on TPC occupancy")
95-
O2_DEFINE_CONFIGURABLE(cfgCutDCAz, float, 2, "Custom DCA Z cut")
96-
O2_DEFINE_CONFIGURABLE(cfgCutDCAxy, float, 0.2f, "Custom DCA XY cut")
9794
O2_DEFINE_CONFIGURABLE(cfgDCAzPt, bool, true, "switch for DCAz pt dependent")
95+
O2_DEFINE_CONFIGURABLE(cfgTrackSelRun3ITSMatch, bool, false, "Track selection for ITS matches")
96+
O2_DEFINE_CONFIGURABLE(cfgUseAdditionalEventCut, bool, false, "Use additional event cut on mult correlations")
97+
O2_DEFINE_CONFIGURABLE(cfgUseAdditionalTrackCut, bool, false, "Use additional track cut on phi")
98+
O2_DEFINE_CONFIGURABLE(cfgOccupancy, bool, false, "Bool for event selection on detector occupancy");
9899
O2_DEFINE_CONFIGURABLE(cfgNoTimeFrameBorder, bool, false, "kNoTimeFrameBorder");
99100
O2_DEFINE_CONFIGURABLE(cfgNoITSROFrameBorder, bool, false, "kNoITSROFrameBorder");
100101
O2_DEFINE_CONFIGURABLE(cfgNoSameBunchPileup, bool, false, "kNoSameBunchPileup");
101102
O2_DEFINE_CONFIGURABLE(cfgIsGoodZvtxFT0vsPV, bool, false, "kIsGoodZvtxFT0vsPV");
102103
O2_DEFINE_CONFIGURABLE(cfgIsVertexITSTPC, bool, false, "kIsVertexITSTPC");
103104
O2_DEFINE_CONFIGURABLE(cfgNoCollInTimeRangeStandard, bool, false, "kNoCollInTimeRangeStandard");
104105
O2_DEFINE_CONFIGURABLE(cfgEvSelkIsGoodITSLayersAll, bool, false, "kIsGoodITSLayersAll")
105-
O2_DEFINE_CONFIGURABLE(cfgOccupancy, bool, false, "Bool for event selection on detector occupancy");
106106
O2_DEFINE_CONFIGURABLE(cfgMultCut, bool, false, "Use additional event cut on mult correlations");
107107
O2_DEFINE_CONFIGURABLE(cfgV0AT0A5Sigma, bool, false, "V0A T0A 5 sigma cut")
108+
O2_DEFINE_CONFIGURABLE(cfgGlobalTracks, bool, false, "Global tracks")
108109
O2_DEFINE_CONFIGURABLE(cfgGlobalplusITS, bool, false, "Global and ITS tracks")
109110
O2_DEFINE_CONFIGURABLE(cfgGlobalonly, bool, false, "Global only tracks")
110111
O2_DEFINE_CONFIGURABLE(cfgITSonly, bool, false, "ITS only tracks")
@@ -360,6 +361,7 @@ struct FlowGfwTask {
360361
registry.add("phi_Cen_ITSOnly", "phi_Cen_ITS;Centrality (%); #phi;", {HistType::kTH2D, {axisCentrality, axisPhi}});
361362

362363
// Track types
364+
registry.add("GlobalTracks", "Global Tracks;Centrality FT0C;Nch", {HistType::kTH2D, {axisCentrality, axisNch}});
363365
registry.add("GlobalplusITS", "Global plus ITS;Centrality FT0C;Nch", {HistType::kTH2D, {axisCentrality, axisNch}});
364366
registry.add("Globalonly", "Global only;Centrality FT0C;Nch", {HistType::kTH2D, {axisCentrality, axisNch}});
365367
registry.add("ITSonly", "ITS only;Centrality FT0C;Nch", {HistType::kTH2D, {axisCentrality, axisNch}});
@@ -620,12 +622,12 @@ struct FlowGfwTask {
620622
else
621623
LOGF(warning, "Could not load acceptance weights from %s (%p)", cfgAcceptance.value.c_str(), (void*)mAcceptance);
622624
}
623-
if (cfgEfficiency.value.empty() == false) {
624-
mEfficiency = ccdb->getForTimeStamp<TH1D>(cfgEfficiency, timestamp);
625+
if (cfgEfficiencyPt.value.empty() == false) {
626+
mEfficiency = ccdb->getForTimeStamp<TH1D>(cfgEfficiencyPt, timestamp);
625627
if (mEfficiency == nullptr) {
626-
LOGF(fatal, "Could not load efficiency histogram for trigger particles from %s", cfgEfficiency.value.c_str());
628+
LOGF(fatal, "Could not load Pt efficiency histogram for trigger particles from %s", cfgEfficiencyPt.value.c_str());
627629
}
628-
LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgEfficiency.value.c_str(), (void*)mEfficiency);
630+
LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgEfficiencyPt.value.c_str(), (void*)mEfficiency);
629631
}
630632

631633
if (cfgEfficiencyNch.value.empty() == false) {
@@ -809,20 +811,16 @@ struct FlowGfwTask {
809811
return ((track.tpcNClsFound() >= cfgCutTPCclu) && (track.itsNCls() >= cfgCutITSclu));
810812
} else if (cfgITSonly) {
811813
return ((track.itsNCls() >= cfgCutITSclu));
814+
} else if (cfgGlobalTracks) {
815+
return ((track.tpcNClsFound() >= cfgCutTPCclu) && (track.tpcNClsCrossedRows() >= cfgCutTPCCrossedRows) && (track.itsNCls() >= cfgCutITSclu));
812816
} else {
813817
return false;
814818
}
815819
}
816820

817-
// Apply process filters
821+
// Apply process filters GlobalTracks
818822
Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex && (aod::cent::centFT0C > cfgMinCentFT0C) && (aod::cent::centFT0C < cfgMaxCentFT0C);
819-
Filter trackFilter = ncheckbit(aod::track::v001::detectorMap, (uint8_t)o2::aod::track::ITS) &&
820-
ncheckbit(aod::track::trackCutFlag, TrackSelectionITS) &&
821-
ifnode(ncheckbit(aod::track::v001::detectorMap, (uint8_t)o2::aod::track::TPC),
822-
ncheckbit(aod::track::trackCutFlag, TrackSelectionTPC), true) &&
823-
ifnode(dcaZ > 0.f, nabs(aod::track::dcaZ) <= dcaZ && ncheckbit(aod::track::trackCutFlag, TrackSelectionDCAXYonly),
824-
ncheckbit(aod::track::trackCutFlag, TrackSelectionDCA)) &&
825-
(nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls);
823+
Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz);
826824

827825
void processData(Colls::iterator const& collision, aod::BCsWithTimestamps const&, AodTracks const& tracks, aod::FT0s const&, aod::Zdcs const&, BCsRun3 const&)
828826
{
@@ -1029,6 +1027,13 @@ struct FlowGfwTask {
10291027
registry.fill(HIST("hDCAxy"), track.dcaXY(), track.pt());
10301028
}
10311029

1030+
if (cfgGlobalTracks) {
1031+
if (withinPtRef) {
1032+
registry.fill(HIST("GlobalTracks"), centrality, nch);
1033+
fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), wacc * weff, 1);
1034+
}
1035+
}
1036+
10321037
if (cfgGlobalplusITS) {
10331038
if (withinPtRef) {
10341039
registry.fill(HIST("GlobalplusITS"), centrality, nch);

0 commit comments

Comments
 (0)