Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 21 additions & 12 deletions PWGCF/Flow/Tasks/flowTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ using namespace o2::framework;
using namespace o2::framework::expressions;

#define O2_DEFINE_CONFIGURABLE(NAME, TYPE, DEFAULT, HELP) Configurable<TYPE> NAME{#NAME, DEFAULT, HELP};
static constexpr double LongArrayDouble[4][2] = {{-2.0, -2.0}, {-2.0, -2.0}, {-2.0, -2.0}, {-2.0, -2.0}};

struct FlowTask {

Expand All @@ -73,8 +74,7 @@ struct FlowTask {
O2_DEFINE_CONFIGURABLE(cfgCutPtMax, float, 10.0f, "Maximal pT for all tracks")
O2_DEFINE_CONFIGURABLE(cfgCutEta, float, 0.8f, "Eta range for tracks")
O2_DEFINE_CONFIGURABLE(cfgEtaPtPt, float, 0.4, "eta range for pt-pt correlations")
O2_DEFINE_CONFIGURABLE(cfgEtaSubPtPt, float, 0.8, "eta range for subevent pt-pt correlations")
O2_DEFINE_CONFIGURABLE(cfgEtaGapPtPt, float, 0.2, "eta gap for pt-pt correlations, cfgEtaGapPtPt<|eta|<cfgEtaSubPtPt")
Configurable<LabeledArray<double>> cfgPtPtGaps{"cfgPtPtGaps", {LongArrayDouble[0], 4, 2, {"subevent 1", "subevent 2", "subevent 3", "subevent 4"}, {"etamin", "etamax"}}, "{etamin,etamax} for all ptpt-subevents"};
O2_DEFINE_CONFIGURABLE(cfgEtaGapPtPtEnabled, bool, false, "switch of subevent pt-pt correlations")
O2_DEFINE_CONFIGURABLE(cfgCutChi2prTPCcls, float, 2.5f, "max chi2 per TPC clusters")
O2_DEFINE_CONFIGURABLE(cfgCutTPCclu, float, 50.0f, "minimum TPC clusters")
Expand Down Expand Up @@ -219,6 +219,7 @@ struct FlowTask {
std::vector<GFW::CorrConfig> corrconfigsPtVn;
TAxis* fPtAxis;
TRandom3* fRndm = new TRandom3(0);
std::vector<std::pair<double, double>> etagapsPtPt;
std::vector<std::vector<std::shared_ptr<TProfile>>> bootstrapArray;
int lastRunNumber = -1;
std::vector<int> runNumbers;
Expand Down Expand Up @@ -553,8 +554,17 @@ struct FlowTask {
fFCpt->setUseCentralMoments(cfgUseCentralMoments);
fFCpt->setUseGapMethod(true);
fFCpt->initialise(axisIndependent, cfgMpar, gfwConfigs, cfgNbootstrap);
if (cfgEtaGapPtPtEnabled)
fFCpt->initialiseSubevent(axisIndependent, cfgMpar, cfgNbootstrap);
if (cfgEtaGapPtPtEnabled) {
for (int i = 0; i < 4; ++i) { // o2-linter: disable=magic-number (maximum of 4 subevents)
if (cfgPtPtGaps->getData()[i][0] < -1. || cfgPtPtGaps->getData()[i][1] < -1.)
continue;
etagapsPtPt.push_back(std::make_pair(cfgPtPtGaps->getData()[i][0], cfgPtPtGaps->getData()[i][1]));
}
for (const auto& [etamin, etamax] : etagapsPtPt) {
LOGF(info, "pt-pt subevent: {%.1f,%.1f}", etamin, etamax);
}
fFCpt->initialiseSubevent(axisIndependent, cfgMpar, etagapsPtPt.size(), cfgNbootstrap);
}
for (auto i = 0; i < gfwConfigs.GetSize(); ++i) {
corrconfigsPtVn.push_back(fGFW->GetCorrelatorConfig(gfwConfigs.GetCorrs()[i], gfwConfigs.GetHeads()[i], gfwConfigs.GetpTDifs()[i]));
}
Expand All @@ -563,7 +573,7 @@ struct FlowTask {
fFCptgen->setUseGapMethod(true);
fFCptgen->initialise(axisIndependent, cfgMpar, gfwConfigs, cfgNbootstrap);
if (cfgEtaGapPtPtEnabled)
fFCptgen->initialiseSubevent(axisIndependent, cfgMpar, cfgNbootstrap);
fFCptgen->initialiseSubevent(axisIndependent, cfgMpar, etagapsPtPt.size(), cfgNbootstrap);
}
fGFW->CreateRegions();

Expand Down Expand Up @@ -703,14 +713,13 @@ struct FlowTask {
if (std::abs(track.eta()) < cfgEtaPtPt) {
(dt == kGen) ? fFCptgen->fill(1., track.pt()) : fFCpt->fill(weff, track.pt());
}
if (std::abs(track.eta()) < cfgEtaSubPtPt) {
if (cfgEtaGapPtPtEnabled) {
if (track.eta() < -1. * cfgEtaGapPtPt) {
(dt == kGen) ? fFCptgen->fillSub1(1., track.pt()) : fFCpt->fillSub1(weff, track.pt());
}
if (track.eta() > cfgEtaGapPtPt) {
(dt == kGen) ? fFCptgen->fillSub2(1., track.pt()) : fFCpt->fillSub2(weff, track.pt());
std::size_t index = 0;
if (cfgEtaGapPtPtEnabled) {
for (const auto& [etamin, etamax] : etagapsPtPt) {
if (etamin < track.eta() && track.eta() < etamax) {
(dt == kGen) ? fFCptgen->fillSub(1., track.pt(), index) : fFCpt->fillSub(weff, track.pt(), index);
}
++index;
}
}
}
Expand Down
Loading