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
18 changes: 4 additions & 14 deletions PWGCF/GenericFramework/Tasks/flowGfwV02.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
O2_DEFINE_CONFIGURABLE(cfgGetNsigmaQA, bool, true, "Get QA histograms for selection of pions, kaons, and protons")
O2_DEFINE_CONFIGURABLE(cfgGetdEdx, bool, true, "Get dEdx histograms for pions, kaons, and protons")
O2_DEFINE_CONFIGURABLE(cfgUseMultiplicityFlowWeights, bool, true, "Enable or disable the use of multiplicity-based event weighting");
O2_DEFINE_CONFIGURABLE(cfgUseMultiplicityFracWeights, bool, false, "Enable or disable the use of multiplicity-based event weighting for pT fraction");
O2_DEFINE_CONFIGURABLE(cfgNormalizeByCharged, bool, true, "Enable or disable the normalization by charged particles");
O2_DEFINE_CONFIGURABLE(cfgConsistentEventFlag, int, 15, "Flag for consistent event selection");
O2_DEFINE_CONFIGURABLE(cfgMultCut, bool, true, "Use additional event cut on mult correlations");
Expand Down Expand Up @@ -613,7 +614,7 @@
}
if (cfgPIDEfficiency) {
const std::array<std::string, 4> pidStrings = {"ch", "pi", "ka", "pr"};
for (int i = 1; i < 4; i++) {

Check failure on line 617 in PWGCF/GenericFramework/Tasks/flowGfwV02.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.

cfg.mEfficiency[i] = ccdb->getForTimeStamp<TH1D>(cfgEfficiency.value + pidStrings[i], timestamp);
if (cfg.mEfficiency[i] == nullptr) {
Expand Down Expand Up @@ -804,17 +805,6 @@
return PidCharged;
}

GFW::CorrConfig getRelevantCorrName(const int& pidInd)
{
if (pidInd == PidPions)
return fGFW->GetCorrelatorConfig("piP {2} refN {-2}", "PiGap22", kFALSE);
if (pidInd == PidKaons)
return fGFW->GetCorrelatorConfig("kaP {2} refN {-2}", "KaGap22", kFALSE);
if (pidInd == PidProtons)
return fGFW->GetCorrelatorConfig("prP {2} refN {-2}", "PrGap22", kFALSE);
return fGFW->GetCorrelatorConfig("refP {2} refN {-2}", "ChGap22", kFALSE);
}

template <DataType dt>
void fillOutputContainers(const float& centmult, const double& rndm, const int& /*run*/ = 0)
{
Expand All @@ -834,9 +824,6 @@
// Fill pt profiles for different particles
int pidInd = getPIDIndex(corrconfigs.at(l_ind).Head.c_str());

// Find the corresponding non-pT-differential correlation configuration
GFW::CorrConfig corrName = getRelevantCorrName(pidInd); // May be used later for QA

auto dnx = fGFW->Calculate(corrconfigs.at(0), 0, kTRUE).real();
if (dnx == 0)
continue;
Expand All @@ -847,11 +834,14 @@
ebyeWeight = 1.0;
val = 1.0;
}
if (cfgUseMultiplicityFracWeights && pidStates.hPtMid[PidCharged]->Integral() > 0) {
ebyeWeight *= pidStates.hPtMid[PidCharged]->Integral();
}
double ptFraction = 0;
int normIndex = (cfgNormalizeByCharged) ? PidCharged : pidInd; // Configured to normalize by charged particles or the selected particle
if (pidStates.hPtMid[normIndex]->Integral() > 0) {
ptFraction = pidStates.hPtMid[pidInd]->GetBinContent(i) / pidStates.hPtMid[normIndex]->Integral();
if (std::abs(val) < 1.01)

Check failure on line 844 in PWGCF/GenericFramework/Tasks/flowGfwV02.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
fFC->FillProfile(Form("%s_pt_%i", corrconfigs.at(l_ind).Head.c_str(), i), centmult, val * ptFraction, ebyeWeight, rndm);
}
}
Expand Down Expand Up @@ -908,11 +898,11 @@
AcceptedTracks acceptedTracks{0, 0, 0, 0};
for (const auto& track : tracks) {
processTrack(track, vtxz, xaxis.multiplicity, run, acceptedTracks);
if (track.eta() > -0.4 && track.eta() < 0.4)

Check failure on line 901 in PWGCF/GenericFramework/Tasks/flowGfwV02.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
pidStates.hPtMid[PidCharged]->Fill(track.pt(), getEfficiency(track, PidCharged));
// If PID is identified, fill pt spectrum for the corresponding particle
int pidInd = getNsigmaPID(track);
if (pidInd != -1 && track.eta() > -0.4 && track.eta() < 0.4) {

Check failure on line 905 in PWGCF/GenericFramework/Tasks/flowGfwV02.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
if (cfgPIDEfficiency)
pidStates.hPtMid[pidInd]->Fill(track.pt(), getEfficiency(track, pidInd));
else
Expand Down
Loading