Skip to content

Commit 6dd2cee

Browse files
authored
Merge branch 'AliceO2Group:master' into master
2 parents cc48bf1 + b06f0ee commit 6dd2cee

10 files changed

Lines changed: 571 additions & 272 deletions

File tree

CODEOWNERS

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,23 @@
3131
/EventFiltering/PWGJE @alibuild @fkrizek @nzardosh @jaimenorman @mpuccio @lietava @fgrosa @ariedel-cern
3232
/EventFiltering/PWGEM @alibuild @dsekihat @nstrangm @mpuccio @lietava @fgrosa @ariedel-cern
3333

34-
/PWGCF @alibuild @victor-gonzalez @shouqiye @lauraser
35-
/PWGCF/Core @alibuild @jgrosseo @lauraser
36-
/PWGCF/DataModel @alibuild @jgrosseo @jaelpark @victor-gonzalez @shouqiye @lauraser
37-
/PWGCF/TableProducer @alibuild @jgrosseo @jaelpark @victor-gonzalez @shouqiye @lauraser
38-
/PWGCF/Tasks @alibuild @jgrosseo @jaelpark @victor-gonzalez @shouqiye @lauraser
39-
/PWGCF/EbyEFluctuations @alibuild @SwatiSaha-1997 @isputows @victor-gonzalez @shouqiye @lauraser
40-
/PWGCF/Femto @alibuild @lauraser @ariedel-cern @dimihayl @victor-gonzalez @shouqiye @wrzesaCERN
41-
/PWGCF/FemtoDream @alibuild @lauraser @ariedel-cern @dimihayl @victor-gonzalez @shouqiye @wrzesaCERN
42-
/PWGCF/Femto3D @alibuild @glromane @sofiatomassini @lauraser @dimihayl @victor-gonzalez @shouqiye @wrzesaCERN
43-
/PWGCF/FemtoUniverse @alibuild @prchakra @lgraczykCern @majanik @lauraser @dimihayl @victor-gonzalez @shouqiye @wrzesaCERN
44-
/PWGCF/FemtoWorld @alibuild @prchakra @lgraczykCern @majanik @lauraser @dimihayl @victor-gonzalez @shouqiye @wrzesaCERN
45-
/PWGCF/Flow @alibuild @majanik @EmilGorm @jaelpark @wenyaCern @victor-gonzalez @shouqiye @lauraser
46-
/PWGCF/GenericFramework @alibuild @EmilGorm @jaelpark @wenyaCern @victor-gonzalez @shouqiye @lauraser
47-
/PWGCF/MultiparticleCorrelations @alibuild @abilandz @jaelpark @wenyaCern @victor-gonzalez @shouqiye @lauraser
48-
/PWGCF/JCorran @alibuild @jaelpark @wenyaCern @victor-gonzalez @shouqiye @lauraser
49-
/PWGCF/TwoParticleCorrelations @alibuild @jaelpark @wenyaCern @victor-gonzalez @shouqiye @lauraser
50-
/PWGCF/Tutorial @alibuild @ariedel-cern @victor-gonzalez @shouqiye @lauraser
34+
/PWGCF @alibuild @victor-gonzalez @dsarkaralice @lauraser
35+
/PWGCF/Core @alibuild @jgrosseo @lauraser @dsarkaralice
36+
/PWGCF/DataModel @alibuild @jgrosseo @jaelpark @victor-gonzalez @dsarkaralice @lauraser
37+
/PWGCF/TableProducer @alibuild @jgrosseo @jaelpark @victor-gonzalez @dsarkaralice @lauraser
38+
/PWGCF/Tasks @alibuild @jgrosseo @jaelpark @victor-gonzalez @dsarkaralice @lauraser
39+
/PWGCF/EbyEFluctuations @alibuild @SwatiSaha-1997 @isputows @victor-gonzalez @dsarkaralice @lauraser
40+
/PWGCF/Femto @alibuild @lauraser @ariedel-cern @dimihayl @victor-gonzalez @dsarkaralice @wrzesaCERN
41+
/PWGCF/FemtoDream @alibuild @lauraser @ariedel-cern @dimihayl @victor-gonzalez @dsarkaralice @wrzesaCERN
42+
/PWGCF/Femto3D @alibuild @glromane @sofiatomassini @lauraser @dimihayl @victor-gonzalez @dsarkaralice @wrzesaCERN
43+
/PWGCF/FemtoUniverse @alibuild @prchakra @lgraczykCern @majanik @lauraser @dimihayl @victor-gonzalez @dsarkaralice @wrzesaCERN
44+
/PWGCF/FemtoWorld @alibuild @prchakra @lgraczykCern @majanik @lauraser @dimihayl @victor-gonzalez @dsarkaralice @wrzesaCERN
45+
/PWGCF/Flow @alibuild @majanik @EmilGorm @jaelpark @wenyaCern @victor-gonzalez @dsarkaralice @lauraser
46+
/PWGCF/GenericFramework @alibuild @EmilGorm @jaelpark @wenyaCern @victor-gonzalez @dsarkaralice @lauraser
47+
/PWGCF/MultiparticleCorrelations @alibuild @abilandz @jaelpark @wenyaCern @victor-gonzalez @dsarkaralice @lauraser
48+
/PWGCF/JCorran @alibuild @jaelpark @wenyaCern @victor-gonzalez @dsarkaralice @lauraser
49+
/PWGCF/TwoParticleCorrelations @alibuild @jaelpark @wenyaCern @victor-gonzalez @dsarkaralice @lauraser
50+
/PWGCF/Tutorial @alibuild @ariedel-cern @victor-gonzalez @dsarkaralice @lauraser
5151

5252
/PWGDQ @alibuild @iarsene @mcoquet642 @XiaozhiBai @mguilbau
5353
/PWGEM @alibuild @feisenhu @dsekihat @jokonig @hscheid

PWGCF/GenericFramework/Core/FlowPtContainer.cxx

Lines changed: 74 additions & 50 deletions
Large diffs are not rendered by default.

PWGCF/GenericFramework/Core/FlowPtContainer.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ class FlowPtContainer : public TNamed
4949
explicit FlowPtContainer(const char* name);
5050
~FlowPtContainer();
5151
FlowPtContainer(const char* name, const char* title);
52-
void initialise(const o2::framework::AxisSpec axis, const int& m, const o2::analysis::genericframework::GFWCorrConfigs& configs, const int& nsub = 10);
53-
void initialise(int nbinsx, double* xbins, const int& m, const o2::analysis::genericframework::GFWCorrConfigs& configs, const int& nsub = 10);
54-
void initialise(int nbinsx, double xlow, double xhigh, const int& m, const o2::analysis::genericframework::GFWCorrConfigs& configs, const int& nsub = 10);
52+
void initialise(const o2::framework::AxisSpec axis, const int& maxOrder, const o2::analysis::genericframework::GFWCorrConfigs& configs, const int& nsub = 10);
53+
void initialise(int nbinsx, double* xbins, const int& maxOrder, const o2::analysis::genericframework::GFWCorrConfigs& configs, const int& nsub = 10);
54+
void initialise(int nbinsx, double xlow, double xhigh, const int& maxOrder, const o2::analysis::genericframework::GFWCorrConfigs& configs, const int& nsub = 10);
5555
// initial pt-pt correlations with two subevents
56-
void initialiseSubevent(const o2::framework::AxisSpec axis, const int& m, const int& nsubev = 2, const int& nsub = 10);
57-
void initialiseSubevent(int nbinsx, double* xbins, const int& m, const int& nsubev = 2, const int& nsub = 10);
58-
void initialiseSubevent(int nbinsx, double xlow, double xhigh, const int& m, const int& nsubev = 2, const int& nsub = 10);
56+
void initialiseSubevent(const o2::framework::AxisSpec axis, const int& maxOrder, const int& nsubev = 2, const int& nsub = 10);
57+
void initialiseSubevent(int nbinsx, double* xbins, const int& maxOrder, const int& nsubev = 2, const int& nsub = 10);
58+
void initialiseSubevent(int nbinsx, double xlow, double xhigh, const int& maxOrder, const int& nsubev = 2, const int& nsub = 10);
5959
void fill(const double& w, const double& pt);
6060
void fillSub(const double& w, const double& pt, int subIndex);
6161
void fillSub1(const double& w, const double& pt) { fillSub(w, pt, 0); }
@@ -221,6 +221,7 @@ class FlowPtContainer : public TNamed
221221
double getStdABDDD(T& inarr);
222222

223223
private:
224+
static const int centralMomentMaxOrder = 4;
224225
std::vector<std::vector<int>> subevents;
225226
void getSubevents(int k, int n, std::vector<int>& current, std::vector<std::vector<int>>& subevents);
226227
static constexpr float FactorialArray[9] = {1., 1., 2., 6., 24., 120., 720., 5040., 40320.};

PWGCF/GenericFramework/Core/GFWConfig.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ int CheckSameSize(const std::vector<T>& first, const std::vector<Args>&... rest)
5353
class GFWBinningCuts
5454
{
5555
public:
56+
// cppcheck-suppress noExplicitConstructor
5657
GFWBinningCuts(int vtxzbins_ = 40, int etabins_ = 16, int phibins_ = 72, int nchbins_ = 300, float nchmin_ = 0, float nchmax_ = 3000,
5758
float ptpoimin_ = 0.2, float ptpoimax_ = 10., float ptrefmin_ = 0.2, float ptrefmax_ = 3.,
5859
std::vector<double> ptbinning_ = {0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55,
@@ -144,6 +145,7 @@ class GFWBinningCuts
144145
class GFWRegions
145146
{
146147
public:
148+
// cppcheck-suppress noExplicitConstructor
147149
GFWRegions(std::vector<std::string> names_ = {"refN", "refP", "refFull"}, std::vector<float> etaminvals_ = {-0.8, 0.4, -0.8},
148150
std::vector<float> etamaxvals_ = {-0.4, 0.8, 0.8},
149151
std::vector<int> pTDifs_ = {0, 0, 0},
@@ -189,6 +191,7 @@ class GFWRegions
189191
class GFWCorrConfigs
190192
{
191193
public:
194+
// cppcheck-suppress noExplicitConstructor
192195
GFWCorrConfigs(std::vector<std::string> corrs_ = {"refP {2} refN {-2}", "refP {3} refN {-3}", "refP {4} refN {-4}", "refFull {2 -2}",
193196
"refFull {2 2 -2 -2}"},
194197
std::vector<std::string> heads_ = {"ChGap22", "ChGap32", "ChGap42", "ChFull22", "ChFull24"},

PWGCF/GenericFramework/Tasks/flowGfwNonflow.cxx

Lines changed: 64 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -348,30 +348,36 @@ struct FlowGfwNonflow {
348348
AxisSpec dcaXYAXis = {200, -1, 1, "DCA_{xy} (cm)"};
349349

350350
if (cfgFillQA) {
351-
registry.add("trackQA/before/phi_eta_vtxZ", "", {HistType::kTH3D, {phiAxis, etaAxis, vtxAxis}});
352-
registry.add("trackQA/before/pt_dcaXY_dcaZ", "", {HistType::kTH3D, {ptAxis, dcaXYAXis, dcaZAXis}});
353-
registry.add("trackQA/before/pt_phi", "", {HistType::kTH2D, {ptAxis, phiModAxis}});
354-
registry.add("trackQA/before/chi2prTPCcls", "#chi^{2}/cluster for the TPC track segment", {HistType::kTH1D, {{100, 0., 5.}}});
355-
registry.add("trackQA/before/chi2prITScls", "#chi^{2}/cluster for the ITS track", {HistType::kTH1D, {{100, 0., 50.}}});
356-
registry.add("trackQA/before/nTPCClusters", "Number of found TPC clusters", {HistType::kTH1D, {{100, 40, 180}}});
357-
registry.add("trackQA/before/nITSClusters", "Number of found ITS clusters", {HistType::kTH1D, {{100, 0, 20}}});
358-
registry.add("trackQA/before/nTPCCrossedRows", "Number of crossed TPC Rows", {HistType::kTH1D, {{100, 40, 180}}});
359-
registry.addClone("trackQA/before/", "trackQA/after/");
360-
registry.add("trackQA/after/pt_ref", "; #it{p}_{T}; Counts", {HistType::kTH1D, {{100, gfwMemberCache.ptreflow, gfwMemberCache.ptrefup}}});
361-
registry.add("trackQA/after/pt_poi", "; #it{p}_{T}; Counts", {HistType::kTH1D, {{100, gfwMemberCache.ptpoilow, gfwMemberCache.ptpoiup}}});
362-
registry.add("trackQA/after/Nch_corrected", "; N_{ch}; Counts", {HistType::kTH1D, {nchAxis}});
363-
registry.add("trackQA/after/Nch_uncorrected", "; N_{ch}; Counts", {HistType::kTH1D, {nchAxis}});
364-
registry.add("trackQA/after/etaNch", "; #eta; Counts", {HistType::kTH1D, {etaAxis}});
365-
registry.add("trackQA/after/etaPtPt", "; #eta; Counts", {HistType::kTH1D, {etaAxis}});
366-
367-
registry.add("eventQA/before/globalTracks_centT0C", "; FT0C centrality (%); N_{global}", {HistType::kTH2D, {centAxis, nchAxis}});
368-
registry.add("eventQA/before/PVTracks_centT0C", "; FT0C centrality (%); N_{PV}", {HistType::kTH2D, {centAxis, multpvAxis}});
369-
registry.add("eventQA/before/globalTracks_PVTracks", "; N_{PV}; N_{global}", {HistType::kTH2D, {multpvAxis, nchAxis}});
370-
registry.add("eventQA/before/globalTracks_multT0A", "; multT0A; N_{global}", {HistType::kTH2D, {t0aAxis, nchAxis}});
371-
registry.add("eventQA/before/globalTracks_multV0A", "; multV0A; N_{global}", {HistType::kTH2D, {v0aAxis, nchAxis}});
372-
registry.add("eventQA/before/multV0A_multT0A", "; multV0A; multT0A", {HistType::kTH2D, {t0aAxis, v0aAxis}});
373-
registry.add("eventQA/before/multT0C_centT0C", "; multT0C; FT0C centrality (%)", {HistType::kTH2D, {centAxis, t0cAxis}});
374-
registry.add("eventQA/before/occ_mult_cent", "; occupancy; N_{ch}; centrality (%)", {HistType::kTH3D, {occAxis, nchAxis, centAxis}});
351+
if (doprocessMCGen) {
352+
registry.add("MCGen/before/phi_eta_vtxZ_gen", "; #varphi; #eta; V_{z}", {HistType::kTH3D, {phiAxis, etaAxis, vtxAxis}});
353+
registry.add("MCGen/before/pt_gen", "; #it{p}_{T}", {HistType::kTH1D, {ptAxis}});
354+
registry.addClone("MCGen/before/", "MCGen/after/");
355+
} else {
356+
registry.add("trackQA/before/phi_eta_vtxZ", "; #varphi; #eta; V_{z}", {HistType::kTH3D, {phiAxis, etaAxis, vtxAxis}});
357+
registry.add("trackQA/before/pt_dcaXY_dcaZ", "; #it{p}_{T}; DCA_#it{xy}; DCA_#it{z}", {HistType::kTH3D, {ptAxis, dcaXYAXis, dcaZAXis}});
358+
registry.add("trackQA/before/pt_phi", "; #it{p}_{T}; fmod(#varphi,#pi/9)", {HistType::kTH2D, {ptAxis, phiModAxis}});
359+
registry.add("trackQA/before/chi2prTPCcls", "#chi^{2}/cluster for the TPC track segment", {HistType::kTH1D, {{100, 0., 5.}}});
360+
registry.add("trackQA/before/chi2prITScls", "#chi^{2}/cluster for the ITS track", {HistType::kTH1D, {{100, 0., 50.}}});
361+
registry.add("trackQA/before/nTPCClusters", "Number of found TPC clusters", {HistType::kTH1D, {{100, 40, 180}}});
362+
registry.add("trackQA/before/nITSClusters", "Number of found ITS clusters", {HistType::kTH1D, {{100, 0, 20}}});
363+
registry.add("trackQA/before/nTPCCrossedRows", "Number of crossed TPC Rows", {HistType::kTH1D, {{100, 40, 180}}});
364+
registry.addClone("trackQA/before/", "trackQA/after/");
365+
registry.add("trackQA/after/pt_ref", "; #it{p}_{T}; Counts", {HistType::kTH1D, {{100, gfwMemberCache.ptreflow, gfwMemberCache.ptrefup}}});
366+
registry.add("trackQA/after/pt_poi", "; #it{p}_{T}; Counts", {HistType::kTH1D, {{100, gfwMemberCache.ptpoilow, gfwMemberCache.ptpoiup}}});
367+
registry.add("trackQA/after/Nch_corrected", "; N_{ch}; Counts", {HistType::kTH1D, {nchAxis}});
368+
registry.add("trackQA/after/Nch_uncorrected", "; N_{ch}; Counts", {HistType::kTH1D, {nchAxis}});
369+
registry.add("trackQA/after/etaNch", "; #eta; Counts", {HistType::kTH1D, {etaAxis}});
370+
registry.add("trackQA/after/etaPtPt", "; #eta; Counts", {HistType::kTH1D, {etaAxis}});
371+
372+
registry.add("eventQA/before/globalTracks_centT0C", "; FT0C centrality (%); N_{global}", {HistType::kTH2D, {centAxis, nchAxis}});
373+
registry.add("eventQA/before/PVTracks_centT0C", "; FT0C centrality (%); N_{PV}", {HistType::kTH2D, {centAxis, multpvAxis}});
374+
registry.add("eventQA/before/globalTracks_PVTracks", "; N_{PV}; N_{global}", {HistType::kTH2D, {multpvAxis, nchAxis}});
375+
registry.add("eventQA/before/globalTracks_multT0A", "; multT0A; N_{global}", {HistType::kTH2D, {t0aAxis, nchAxis}});
376+
registry.add("eventQA/before/globalTracks_multV0A", "; multV0A; N_{global}", {HistType::kTH2D, {v0aAxis, nchAxis}});
377+
registry.add("eventQA/before/multV0A_multT0A", "; multT0A; multV0A", {HistType::kTH2D, {t0aAxis, v0aAxis}});
378+
registry.add("eventQA/before/multT0C_centT0C", "; FT0C centrality (%); multT0C", {HistType::kTH2D, {centAxis, t0cAxis}});
379+
registry.add("eventQA/before/occ_mult_cent", "; occupancy; N_{ch}; centrality (%)", {HistType::kTH3D, {occAxis, nchAxis, centAxis}});
380+
}
375381
}
376382
registry.add("eventQA/before/centrality", "; centrality (%); Counts", {HistType::kTH1D, {centAxis}});
377383
registry.add("eventQA/before/multiplicity", "; N_{ch}; Counts", {HistType::kTH1D, {nchAxis}});
@@ -649,19 +655,44 @@ struct FlowGfwNonflow {
649655
template <typename TTrack>
650656
double getEfficiency(const TTrack& track, const float& centrality)
651657
{ //-1 ref, 0 ch, 1 pi, 2 ka, 3 pr, 4 k0, 5 lambda
652-
double eff = 1.;
658+
653659
if (!correctionsConfig.mEfficiency) {
654-
return eff;
660+
return 1;
655661
}
662+
663+
int bin = 0;
664+
656665
if (cfgCorrections.cfgUse2DEfficiency) {
657-
eff = dynamic_cast<TH2D*>(correctionsConfig.mEfficiency)->GetBinContent(dynamic_cast<TH2D*>(correctionsConfig.mEfficiency)->FindBin(track.pt(), centrality));
666+
auto* effHist = dynamic_cast<TH2D*>(correctionsConfig.mEfficiency);
667+
if (!effHist) {
668+
LOGF(error, "Efficiency object at %s is not a TH2D", cfgCorrections.cfgEfficiencyPath.value.c_str());
669+
return -1.;
670+
}
671+
bin = effHist->FindBin(track.pt(), centrality);
672+
if (!bin) {
673+
return -1.;
674+
}
675+
const double eff = effHist->GetBinContent(bin);
676+
if (!std::isfinite(eff) || eff <= 0.) {
677+
return -1.;
678+
}
679+
return 1. / eff;
658680
} else {
659-
eff = dynamic_cast<TH1D*>(correctionsConfig.mEfficiency)->GetBinContent(dynamic_cast<TH1D*>(correctionsConfig.mEfficiency)->FindBin(track.pt()));
660-
}
661-
if (eff == 0) {
662-
return -1.;
681+
auto* effHist = dynamic_cast<TH1D*>(correctionsConfig.mEfficiency);
682+
if (!effHist) {
683+
LOGF(error, "Efficiency object at %s is not a TH1D", cfgCorrections.cfgEfficiencyPath.value.c_str());
684+
return -1.;
685+
}
686+
bin = effHist->FindBin(track.pt());
687+
if (!bin) {
688+
return -1.;
689+
}
690+
const double eff = effHist->GetBinContent(bin);
691+
if (!std::isfinite(eff) || eff <= 0.) {
692+
return -1.;
693+
}
694+
return 1. / eff;
663695
}
664-
return 1. / eff;
665696
}
666697

667698
template <typename TCollision>
@@ -844,7 +875,7 @@ struct FlowGfwNonflow {
844875
auto val = fGFW->Calculate(corrconfigs.at(l_ind), 0, false).real() / dnx;
845876
if (std::abs(val) < 1) {
846877
fFC->FillProfile(corrconfigs.at(l_ind).Head.c_str(), centmult, val, cfgUseMultiplicityFlowWeights ? dnx : 1.0, rndm);
847-
fFCpt->fillVnPtProfiles(centmult, val, dnx, rndm, gfwMemberCache.configs.GetpTCorrMasks()[l_ind]);
878+
fFCpt->fillVnPtProfiles(static_cast<int>(l_ind), centmult, val, dnx, rndm, gfwMemberCache.configs.GetpTCorrMasks()[l_ind]);
848879
}
849880
continue;
850881
}

PWGEM/Dilepton/Tasks/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,11 @@ o2physics_add_dpl_workflow(study-dcafitter
170170
PUBLIC_LINK_LIBRARIES O2::Framework O2::DetectorsVertexing O2::DCAFitter O2Physics::AnalysisCore
171171
COMPONENT_NAME Analysis)
172172

173+
o2physics_add_dpl_workflow(test-pv
174+
SOURCES testPV.cxx
175+
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
176+
COMPONENT_NAME Analysis)
177+
173178
o2physics_add_dpl_workflow(evaluate-acceptance
174179
SOURCES evaluateAcceptance.cxx
175180
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore

0 commit comments

Comments
 (0)