Skip to content

Commit 091d9d8

Browse files
MaximVirtaMaxim Virta
andauthored
[PWGCF] Optional weights for fraction added (#16584)
Co-authored-by: Maxim Virta <maximus@Maxims-MacBook-Pro.local>
1 parent 514674e commit 091d9d8

1 file changed

Lines changed: 4 additions & 14 deletions

File tree

PWGCF/GenericFramework/Tasks/flowGfwV02.cxx

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ struct FlowGfwV02 {
120120
O2_DEFINE_CONFIGURABLE(cfgGetNsigmaQA, bool, true, "Get QA histograms for selection of pions, kaons, and protons")
121121
O2_DEFINE_CONFIGURABLE(cfgGetdEdx, bool, true, "Get dEdx histograms for pions, kaons, and protons")
122122
O2_DEFINE_CONFIGURABLE(cfgUseMultiplicityFlowWeights, bool, true, "Enable or disable the use of multiplicity-based event weighting");
123+
O2_DEFINE_CONFIGURABLE(cfgUseMultiplicityFracWeights, bool, false, "Enable or disable the use of multiplicity-based event weighting for pT fraction");
123124
O2_DEFINE_CONFIGURABLE(cfgNormalizeByCharged, bool, true, "Enable or disable the normalization by charged particles");
124125
O2_DEFINE_CONFIGURABLE(cfgConsistentEventFlag, int, 15, "Flag for consistent event selection");
125126
O2_DEFINE_CONFIGURABLE(cfgMultCut, bool, true, "Use additional event cut on mult correlations");
@@ -804,17 +805,6 @@ struct FlowGfwV02 {
804805
return PidCharged;
805806
}
806807

807-
GFW::CorrConfig getRelevantCorrName(const int& pidInd)
808-
{
809-
if (pidInd == PidPions)
810-
return fGFW->GetCorrelatorConfig("piP {2} refN {-2}", "PiGap22", kFALSE);
811-
if (pidInd == PidKaons)
812-
return fGFW->GetCorrelatorConfig("kaP {2} refN {-2}", "KaGap22", kFALSE);
813-
if (pidInd == PidProtons)
814-
return fGFW->GetCorrelatorConfig("prP {2} refN {-2}", "PrGap22", kFALSE);
815-
return fGFW->GetCorrelatorConfig("refP {2} refN {-2}", "ChGap22", kFALSE);
816-
}
817-
818808
template <DataType dt>
819809
void fillOutputContainers(const float& centmult, const double& rndm, const int& /*run*/ = 0)
820810
{
@@ -834,9 +824,6 @@ struct FlowGfwV02 {
834824
// Fill pt profiles for different particles
835825
int pidInd = getPIDIndex(corrconfigs.at(l_ind).Head.c_str());
836826

837-
// Find the corresponding non-pT-differential correlation configuration
838-
GFW::CorrConfig corrName = getRelevantCorrName(pidInd); // May be used later for QA
839-
840827
auto dnx = fGFW->Calculate(corrconfigs.at(0), 0, kTRUE).real();
841828
if (dnx == 0)
842829
continue;
@@ -847,6 +834,9 @@ struct FlowGfwV02 {
847834
ebyeWeight = 1.0;
848835
val = 1.0;
849836
}
837+
if (cfgUseMultiplicityFracWeights && pidStates.hPtMid[PidCharged]->Integral() > 0) {
838+
ebyeWeight *= pidStates.hPtMid[PidCharged]->Integral();
839+
}
850840
double ptFraction = 0;
851841
int normIndex = (cfgNormalizeByCharged) ? PidCharged : pidInd; // Configured to normalize by charged particles or the selected particle
852842
if (pidStates.hPtMid[normIndex]->Integral() > 0) {

0 commit comments

Comments
 (0)