Skip to content

Commit 2888347

Browse files
[PWGCF] task for pt-diff radial flow (#12010)
1 parent 148b2ec commit 2888347

File tree

3 files changed

+622
-32
lines changed

3 files changed

+622
-32
lines changed

PWGCF/EbyEFluctuations/Tasks/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ o2physics_add_dpl_workflow(antiproton-cumulants-mc
3333
SOURCES antiprotonCumulantsMc.cxx
3434
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore
3535
COMPONENT_NAME Analysis)
36-
36+
3737
o2physics_add_dpl_workflow(event-mean-pt-id
3838
SOURCES eventMeanPtId.cxx
3939
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore
@@ -68,3 +68,8 @@ o2physics_add_dpl_workflow(nch-cumulants-id
6868
SOURCES nchCumulantsId.cxx
6969
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore
7070
COMPONENT_NAME Analysis)
71+
72+
o2physics_add_dpl_workflow(v0pt-had-pi-ka-prot
73+
SOURCES v0ptHadPiKaProt.cxx
74+
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore
75+
COMPONENT_NAME Analysis)

PWGCF/EbyEFluctuations/Tasks/MeanptFluctuations.cxx

Lines changed: 62 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,40 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12-
#include <CCDB/BasicCCDBManager.h>
13-
#include <algorithm>
14-
#include <numeric>
15-
#include <cmath>
16-
#include <vector>
17-
18-
#include "Framework/AnalysisTask.h"
19-
#include "Framework/runDataProcessing.h"
20-
#include "Framework/ASoAHelpers.h"
21-
#include "Framework/RunningWorkflowInfo.h"
22-
#include "Framework/HistogramRegistry.h"
12+
/// \file MeanptFluctuations.cxx
13+
/// \brief Task for analyzing <pT> fluctuation upto fourth order of inclusive hadrons
14+
/// \author Swati Saha
2315

24-
#include "Common/DataModel/EventSelection.h"
2516
#include "Common/Core/TrackSelection.h"
26-
#include "Common/DataModel/TrackSelectionTables.h"
2717
#include "Common/DataModel/Centrality.h"
18+
#include "Common/DataModel/EventSelection.h"
2819
#include "Common/DataModel/Multiplicity.h"
20+
#include "Common/DataModel/TrackSelectionTables.h"
2921

22+
#include "CommonConstants/MathConstants.h"
23+
#include "Framework/ASoAHelpers.h"
24+
#include "Framework/AnalysisTask.h"
25+
#include "Framework/HistogramRegistry.h"
26+
#include "Framework/RunningWorkflowInfo.h"
27+
#include "Framework/runDataProcessing.h"
28+
#include <CCDB/BasicCCDBManager.h>
29+
30+
#include "TF1.h"
31+
#include "TH1D.h"
32+
#include "TH2D.h"
3033
#include "TList.h"
34+
#include "TMath.h"
3135
#include "TProfile.h"
3236
#include "TProfile2D.h"
33-
#include "TH2D.h"
34-
#include "TH1D.h"
3537
#include "TRandom3.h"
36-
#include "TMath.h"
37-
#include "TF1.h"
38+
39+
#include <algorithm>
40+
#include <array>
41+
#include <cmath>
42+
#include <cstdlib>
43+
#include <numeric>
44+
#include <string>
45+
#include <vector>
3846

3947
namespace o2::aod
4048
{
@@ -62,16 +70,20 @@ struct MeanptFluctuations_QA_QnTable {
6270
Configurable<float> cfgCutPtLower{"cfgCutPtLower", 0.2f, "Lower pT cut"};
6371
Configurable<float> cfgCutPtUpper{"cfgCutPtUpper", 3.0f, "Higher pT cut"};
6472
Configurable<float> cfgCutTpcChi2NCl{"cfgCutTpcChi2NCl", 2.5f, "Maximum TPCchi2NCl"};
65-
// Configurable<float> cfgCutTrackDcaXY{"cfgCutTrackDcaXY", 0.2f, "Maximum DcaXY"};
73+
Configurable<float> cfgCutItsChi2NCl{"cfgCutItsChi2NCl", 36.0f, "Maximum ITSchi2NCl"};
6674
Configurable<float> cfgCutTrackDcaZ{"cfgCutTrackDcaZ", 2.0f, "Maximum DcaZ"};
75+
Configurable<int> cfgITScluster{"cfgITScluster", 1, "Minimum Number of ITS cluster"};
76+
Configurable<int> cfgTPCcluster{"cfgTPCcluster", 80, "Minimum Number of TPC cluster"};
77+
Configurable<int> cfgTPCnCrossedRows{"cfgTPCnCrossedRows", 70, "Minimum Number of TPC crossed-rows"};
6778
ConfigurableAxis nchAxis{"nchAxis", {5000, 0.5, 5000.5}, ""};
79+
Configurable<bool> cfgEvSelkNoSameBunchPileup{"cfgEvSelkNoSameBunchPileup", true, "Pileup removal"};
80+
Configurable<bool> cfgUseGoodITSLayerAllCut{"cfgUseGoodITSLayerAllCut", true, "Remove time interval with dead ITS zone"};
6881

6982
O2_DEFINE_CONFIGURABLE(cfgUse22sEventCut, bool, true, "Use 22s event cut on mult correlations")
7083

7184
// Filter command***********
7285
Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex;
73-
Filter trackFilter = (nabs(aod::track::eta) < 0.8f) && (aod::track::pt > cfgCutPtLower) && (aod::track::pt < 5.0f) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)) && (aod::track::tpcChi2NCl < cfgCutTpcChi2NCl) && (nabs(aod::track::dcaZ) < cfgCutTrackDcaZ);
74-
// Filter trackFilter = (nabs(aod::track::eta) < 0.8f) && (aod::track::pt > cfgCutPtLower) && (aod::track::pt < 5.0f) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)) && (aod::track::tpcChi2NCl < cfgCutTpcChi2NCl) && (nabs(aod::track::dcaXY) < cfgCutTrackDcaZ) && (nabs(aod::track::dcaZ) < cfgCutTrackDcaZ);
86+
Filter trackFilter = (nabs(aod::track::eta) < 0.8f) && (aod::track::pt > cfgCutPtLower) && (aod::track::pt < 5.0f) && (requireGlobalTrackInFilter()) && (aod::track::tpcChi2NCl < cfgCutTpcChi2NCl) && (aod::track::itsChi2NCl < cfgCutItsChi2NCl) && (nabs(aod::track::dcaZ) < cfgCutTrackDcaZ);
7587

7688
// Connect to ccdb
7789
Service<ccdb::BasicCCDBManager> ccdb;
@@ -108,7 +120,7 @@ struct MeanptFluctuations_QA_QnTable {
108120
histos.add("hZvtx_after_sel", ";Z (cm)", kTH1F, {vtxZAxis});
109121
histos.add("hP", ";#it{p} (GeV/#it{c})", kTH1F, {{35, 0.2, 4.}});
110122
histos.add("hPt", ";#it{p}_{T} (GeV/#it{c})", kTH1F, {ptAxis});
111-
histos.add("hPhi", ";#phi", kTH1F, {{100, 0., 2. * M_PI}});
123+
histos.add("hPhi", ";#phi", kTH1F, {{100, 0., o2::constants::math::TwoPI}});
112124
histos.add("hEta", ";#eta", kTH1F, {{100, -2.01, 2.01}});
113125
histos.add("hCentrality", ";centrality (%)", kTH1F, {{90, 0, 90}});
114126
histos.add("hDcaXY", ";#it{dca}_{XY}", kTH1F, {{1000, -5, 5}});
@@ -144,7 +156,7 @@ struct MeanptFluctuations_QA_QnTable {
144156
float vtxz = -999;
145157
if (collision.numContrib() > 1) {
146158
vtxz = collision.posZ();
147-
float zRes = TMath::Sqrt(collision.covZZ());
159+
float zRes = std::sqrt(collision.covZZ());
148160
if (zRes > 0.25 && collision.numContrib() < 20)
149161
vtxz = -999;
150162
}
@@ -171,8 +183,15 @@ struct MeanptFluctuations_QA_QnTable {
171183
// void process(aod::Collision const& coll, aod::Tracks const& inputTracks)
172184
void process(aodCollisions::iterator const& coll, aod::BCsWithTimestamps const&, aodTracks const& inputTracks)
173185
{
174-
if (!coll.sel8())
186+
if (!coll.sel8()) {
175187
return;
188+
}
189+
if (cfgUseGoodITSLayerAllCut && !(coll.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll))) {
190+
return;
191+
}
192+
if (cfgEvSelkNoSameBunchPileup && !(coll.selection_bit(o2::aod::evsel::kNoSameBunchPileup))) {
193+
return;
194+
}
176195

177196
const auto CentralityFT0C = coll.centFT0C();
178197
if (cfgUse22sEventCut && !eventSelected(coll, inputTracks.size(), CentralityFT0C))
@@ -194,7 +213,19 @@ struct MeanptFluctuations_QA_QnTable {
194213
float q4 = 0.0;
195214
float n_ch = 0.0;
196215

197-
for (auto track : inputTracks) { // Loop over tracks
216+
for (const auto& track : inputTracks) { // Loop over tracks
217+
218+
if (!track.has_collision()) {
219+
continue;
220+
}
221+
222+
if (!track.isPVContributor()) {
223+
continue;
224+
}
225+
226+
if (!(track.itsNCls() > cfgITScluster) || !(track.tpcNClsFound() >= cfgTPCcluster) || !(track.tpcNClsCrossedRows() >= cfgTPCnCrossedRows)) {
227+
continue;
228+
}
198229

199230
histos.fill(HIST("hP"), track.p());
200231
histos.fill(HIST("hPt"), track.pt());
@@ -209,10 +240,10 @@ struct MeanptFluctuations_QA_QnTable {
209240
float pT = track.pt();
210241
// calculating Q1, Q2, Q3, Q4. N_ch
211242
if (track.pt() > cfgCutPtLower && track.pt() < cfgCutPtUpper && track.sign() != 0) {
212-
q1 = q1 + pow(pT, 1.0);
213-
q2 = q2 + pow(pT, 2.0);
214-
q3 = q3 + pow(pT, 3.0);
215-
q4 = q4 + pow(pT, 4.0);
243+
q1 = q1 + std::pow(pT, 1.0);
244+
q2 = q2 + std::pow(pT, 2.0);
245+
q3 = q3 + std::pow(pT, 3.0);
246+
q4 = q4 + std::pow(pT, 4.0);
216247
n_ch = n_ch + 1;
217248
}
218249
}
@@ -280,9 +311,9 @@ struct MeanptFluctuations_analysis {
280311

281312
// calculating observables
282313
mean_term1 = event_ptqn.q1() / event_ptqn.n_ch();
283-
variance_term1 = (TMath::Power(event_ptqn.q1(), 2.0f) - event_ptqn.q2()) / (event_ptqn.n_ch() * (event_ptqn.n_ch() - 1.0f));
284-
skewness_term1 = (TMath::Power(event_ptqn.q1(), 3.0f) - 3.0f * event_ptqn.q2() * event_ptqn.q1() + 2.0f * event_ptqn.q3()) / (event_ptqn.n_ch() * (event_ptqn.n_ch() - 1.0f) * (event_ptqn.n_ch() - 2.0f));
285-
kurtosis_term1 = (TMath::Power(event_ptqn.q1(), 4.0f) - (6.0f * event_ptqn.q4()) + (8.0f * event_ptqn.q1() * event_ptqn.q3()) - (6.0f * TMath::Power(event_ptqn.q1(), 2.0f) * event_ptqn.q2()) + (3.0f * TMath::Power(event_ptqn.q2(), 2.0f))) / (event_ptqn.n_ch() * (event_ptqn.n_ch() - 1.0f) * (event_ptqn.n_ch() - 2.0f) * (event_ptqn.n_ch() - 3.0f));
314+
variance_term1 = (std::pow(event_ptqn.q1(), 2.0f) - event_ptqn.q2()) / (event_ptqn.n_ch() * (event_ptqn.n_ch() - 1.0f));
315+
skewness_term1 = (std::pow(event_ptqn.q1(), 3.0f) - 3.0f * event_ptqn.q2() * event_ptqn.q1() + 2.0f * event_ptqn.q3()) / (event_ptqn.n_ch() * (event_ptqn.n_ch() - 1.0f) * (event_ptqn.n_ch() - 2.0f));
316+
kurtosis_term1 = (std::pow(event_ptqn.q1(), 4.0f) - (6.0f * event_ptqn.q4()) + (8.0f * event_ptqn.q1() * event_ptqn.q3()) - (6.0f * std::pow(event_ptqn.q1(), 2.0f) * event_ptqn.q2()) + (3.0f * std::pow(event_ptqn.q2(), 2.0f))) / (event_ptqn.n_ch() * (event_ptqn.n_ch() - 1.0f) * (event_ptqn.n_ch() - 2.0f) * (event_ptqn.n_ch() - 3.0f));
286317

287318
// filling profiles and histograms for central values
288319
registry.get<TProfile2D>(HIST("Prof_mean_t1"))->Fill(event_ptqn.centrality(), event_ptqn.n_ch(), mean_term1);

0 commit comments

Comments
 (0)