Skip to content

Commit 2bb0346

Browse files
committed
[PWGCF] Set global tracks in track filter
1 parent 6edbb0a commit 2bb0346

File tree

1 file changed

+38
-31
lines changed

1 file changed

+38
-31
lines changed

PWGCF/Flow/Tasks/flowGfwTask.cxx

Lines changed: 38 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,25 @@
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>
17+
1918
#include <cmath>
2019
#include <vector>
2120
#include <string>
2221
#include <memory>
22+
23+
#include "TList.h"
24+
#include <TProfile.h>
25+
#include <TRandom3.h>
26+
#include <TF1.h>
27+
2328
#include "Framework/runDataProcessing.h"
2429
#include "Framework/AnalysisTask.h"
2530
#include "Framework/ASoAHelpers.h"
2631
#include "Framework/RunningWorkflowInfo.h"
2732
#include "Framework/HistogramRegistry.h"
2833
#include "Framework/AnalysisDataModel.h"
34+
#include <CCDB/BasicCCDBManager.h>
35+
#include <DataFormatsParameters/GRPMagField.h>
2936

3037
#include "Common/DataModel/EventSelection.h"
3138
#include "Common/Core/TrackSelection.h"
@@ -39,15 +46,11 @@
3946
#include "ReconstructionDataFormats/Track.h"
4047
#include "TPDGCode.h"
4148

42-
#include "GFWPowerArray.h"
4349
#include "GFW.h"
50+
#include "GFWPowerArray.h"
4451
#include "GFWCumulant.h"
4552
#include "GFWWeights.h"
4653
#include "FlowContainer.h"
47-
#include "TList.h"
48-
#include <TProfile.h>
49-
#include <TRandom3.h>
50-
#include <TF1.h>
5154

5255
using namespace o2;
5356
using namespace o2::framework;
@@ -70,41 +73,41 @@ struct FlowGfwTask {
7073
O2_DEFINE_CONFIGURABLE(cfgCutPtMax, float, 3.0f, "Maximal pT for ref tracks")
7174
O2_DEFINE_CONFIGURABLE(cfgCutEta, float, 0.8f, "Eta range for tracks")
7275
O2_DEFINE_CONFIGURABLE(cfgCutChi2prTPCcls, float, 2.5, "Chi2 per TPC clusters")
73-
O2_DEFINE_CONFIGURABLE(cfgCutTPCclu, float, 70.0f, "minimum TPC clusters")
76+
O2_DEFINE_CONFIGURABLE(cfgCutTPCclu, float, 50.0f, "minimum TPC clusters")
77+
O2_DEFINE_CONFIGURABLE(cfgCutTPCCrossedRows, float, 70.0f, "minimum TPC crossed rows")
7478
O2_DEFINE_CONFIGURABLE(cfgCutITSclu, float, 5.0f, "minimum ITS clusters")
7579
O2_DEFINE_CONFIGURABLE(cfgTrackSel, bool, false, "ITS and TPC cluster selection")
7680
O2_DEFINE_CONFIGURABLE(cfgMinCentFT0C, float, 0.0f, "Minimum FT0C Centrality")
7781
O2_DEFINE_CONFIGURABLE(cfgMaxCentFT0C, float, 100.0f, "Maximum FT0C Centrality")
82+
O2_DEFINE_CONFIGURABLE(cfgCutOccupancyHigh, int, 500, "High cut on TPC occupancy")
83+
O2_DEFINE_CONFIGURABLE(cfgCutOccupancyLow, int, 0, "Low cut on TPC occupancy")
84+
O2_DEFINE_CONFIGURABLE(cfgCutDCAz, float, 2.0f, "Custom DCA Z cut")
85+
O2_DEFINE_CONFIGURABLE(cfgNbootstrap, int, 10, "Number of subsamples")
7886
O2_DEFINE_CONFIGURABLE(cfgCentEstFt0c, bool, false, "Centrality estimator based on FT0C signal")
7987
O2_DEFINE_CONFIGURABLE(cfgCentEstFt0a, bool, false, "Centrality estimator based on FT0A signal")
8088
O2_DEFINE_CONFIGURABLE(cfgCentEstFt0m, bool, false, " A centrality estimator based on FT0A+FT0C signals.")
8189
O2_DEFINE_CONFIGURABLE(cfgCentEstFv0a, bool, false, "Centrality estimator based on FV0A signal")
8290
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")
8891
O2_DEFINE_CONFIGURABLE(cfgOutputNUAWeights, bool, false, "Fill and output NUA weights")
89-
O2_DEFINE_CONFIGURABLE(cfgEfficiency, std::string, "", "CCDB path to efficiency object")
92+
O2_DEFINE_CONFIGURABLE(cfgEfficiencyPt, std::string, "", "CCDB path to efficiency object")
9093
O2_DEFINE_CONFIGURABLE(cfgEfficiencyNch, std::string, "", "CCDB path to Nch efficiency object")
9194
O2_DEFINE_CONFIGURABLE(cfgAcceptance, std::string, "", "CCDB path to acceptance object")
9295
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")
9796
O2_DEFINE_CONFIGURABLE(cfgDCAzPt, bool, true, "switch for DCAz pt dependent")
97+
O2_DEFINE_CONFIGURABLE(cfgTrackSelRun3ITSMatch, bool, false, "Track selection for ITS matches")
98+
O2_DEFINE_CONFIGURABLE(cfgUseAdditionalEventCut, bool, false, "Use additional event cut on mult correlations")
99+
O2_DEFINE_CONFIGURABLE(cfgUseAdditionalTrackCut, bool, false, "Use additional track cut on phi")
100+
O2_DEFINE_CONFIGURABLE(cfgOccupancy, bool, false, "Bool for event selection on detector occupancy");
98101
O2_DEFINE_CONFIGURABLE(cfgNoTimeFrameBorder, bool, false, "kNoTimeFrameBorder");
99102
O2_DEFINE_CONFIGURABLE(cfgNoITSROFrameBorder, bool, false, "kNoITSROFrameBorder");
100103
O2_DEFINE_CONFIGURABLE(cfgNoSameBunchPileup, bool, false, "kNoSameBunchPileup");
101104
O2_DEFINE_CONFIGURABLE(cfgIsGoodZvtxFT0vsPV, bool, false, "kIsGoodZvtxFT0vsPV");
102105
O2_DEFINE_CONFIGURABLE(cfgIsVertexITSTPC, bool, false, "kIsVertexITSTPC");
103106
O2_DEFINE_CONFIGURABLE(cfgNoCollInTimeRangeStandard, bool, false, "kNoCollInTimeRangeStandard");
104107
O2_DEFINE_CONFIGURABLE(cfgEvSelkIsGoodITSLayersAll, bool, false, "kIsGoodITSLayersAll")
105-
O2_DEFINE_CONFIGURABLE(cfgOccupancy, bool, false, "Bool for event selection on detector occupancy");
106108
O2_DEFINE_CONFIGURABLE(cfgMultCut, bool, false, "Use additional event cut on mult correlations");
107109
O2_DEFINE_CONFIGURABLE(cfgV0AT0A5Sigma, bool, false, "V0A T0A 5 sigma cut")
110+
O2_DEFINE_CONFIGURABLE(cfgGlobalTracks, bool, false, "Global tracks")
108111
O2_DEFINE_CONFIGURABLE(cfgGlobalplusITS, bool, false, "Global and ITS tracks")
109112
O2_DEFINE_CONFIGURABLE(cfgGlobalonly, bool, false, "Global only tracks")
110113
O2_DEFINE_CONFIGURABLE(cfgITSonly, bool, false, "ITS only tracks")
@@ -360,6 +363,7 @@ struct FlowGfwTask {
360363
registry.add("phi_Cen_ITSOnly", "phi_Cen_ITS;Centrality (%); #phi;", {HistType::kTH2D, {axisCentrality, axisPhi}});
361364

362365
// Track types
366+
registry.add("GlobalTracks", "Global Tracks;Centrality FT0C;Nch", {HistType::kTH2D, {axisCentrality, axisNch}});
363367
registry.add("GlobalplusITS", "Global plus ITS;Centrality FT0C;Nch", {HistType::kTH2D, {axisCentrality, axisNch}});
364368
registry.add("Globalonly", "Global only;Centrality FT0C;Nch", {HistType::kTH2D, {axisCentrality, axisNch}});
365369
registry.add("ITSonly", "ITS only;Centrality FT0C;Nch", {HistType::kTH2D, {axisCentrality, axisNch}});
@@ -620,12 +624,12 @@ struct FlowGfwTask {
620624
else
621625
LOGF(warning, "Could not load acceptance weights from %s (%p)", cfgAcceptance.value.c_str(), (void*)mAcceptance);
622626
}
623-
if (cfgEfficiency.value.empty() == false) {
624-
mEfficiency = ccdb->getForTimeStamp<TH1D>(cfgEfficiency, timestamp);
627+
if (cfgEfficiencyPt.value.empty() == false) {
628+
mEfficiency = ccdb->getForTimeStamp<TH1D>(cfgEfficiencyPt, timestamp);
625629
if (mEfficiency == nullptr) {
626-
LOGF(fatal, "Could not load efficiency histogram for trigger particles from %s", cfgEfficiency.value.c_str());
630+
LOGF(fatal, "Could not load Pt efficiency histogram for trigger particles from %s", cfgEfficiencyPt.value.c_str());
627631
}
628-
LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgEfficiency.value.c_str(), (void*)mEfficiency);
632+
LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgEfficiencyPt.value.c_str(), (void*)mEfficiency);
629633
}
630634

631635
if (cfgEfficiencyNch.value.empty() == false) {
@@ -809,20 +813,16 @@ struct FlowGfwTask {
809813
return ((track.tpcNClsFound() >= cfgCutTPCclu) && (track.itsNCls() >= cfgCutITSclu));
810814
} else if (cfgITSonly) {
811815
return ((track.itsNCls() >= cfgCutITSclu));
816+
} else if (cfgGlobalTracks) {
817+
return ((track.tpcNClsFound() >= cfgCutTPCclu) && (track.tpcNClsCrossedRows() >= cfgCutTPCCrossedRows) && (track.itsNCls() >= cfgCutITSclu));
812818
} else {
813819
return false;
814820
}
815821
}
816822

817-
// Apply process filters
823+
// Apply process filters GlobalTracks
818824
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);
825+
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);
826826

827827
void processData(Colls::iterator const& collision, aod::BCsWithTimestamps const&, AodTracks const& tracks, aod::FT0s const&, aod::Zdcs const&, BCsRun3 const&)
828828
{
@@ -1029,6 +1029,13 @@ struct FlowGfwTask {
10291029
registry.fill(HIST("hDCAxy"), track.dcaXY(), track.pt());
10301030
}
10311031

1032+
if (cfgGlobalTracks) {
1033+
if (withinPtRef) {
1034+
registry.fill(HIST("GlobalTracks"), centrality, nch);
1035+
fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), wacc * weff, 1);
1036+
}
1037+
}
1038+
10321039
if (cfgGlobalplusITS) {
10331040
if (withinPtRef) {
10341041
registry.fill(HIST("GlobalplusITS"), centrality, nch);

0 commit comments

Comments
 (0)