Skip to content

Commit 6767378

Browse files
MaximVirtaMaxim Virtaalibuild
authored
[PWGCF] Implementation of pt & spectral weights added for the v0 correlations (#17514)
Co-authored-by: Maxim Virta <maximus@Maxims-MacBook-Pro.local> Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent d560e21 commit 6767378

1 file changed

Lines changed: 74 additions & 31 deletions

File tree

PWGCF/GenericFramework/Tasks/flowGfwV02.cxx

Lines changed: 74 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,12 @@ struct FlowGfwV02 {
424424
registry.add("analysis/charged/ptA", "", {HistType::kTProfile3D, {bsAxis, centAxis, nchAxis}});
425425
registry.add("analysis/charged/ptB", "", {HistType::kTProfile3D, {bsAxis, centAxis, nchAxis}});
426426
registry.add("analysis/charged/ptAB", "", {HistType::kTProfile3D, {bsAxis, centAxis, nchAxis}});
427+
if (cfgUseMultiplicityFracWeights) {
428+
registry.add("analysis/charged/nchA2pc", "", {HistType::kTProfile3D, {bsAxis, ptAxis, centAxis}});
429+
registry.add("analysis/charged/nchB2pc", "", {HistType::kTProfile3D, {bsAxis, ptAxis, centAxis}});
430+
registry.add("analysis/charged/ptA2pc", "", {HistType::kTProfile3D, {bsAxis, centAxis, nchAxis}});
431+
registry.add("analysis/charged/ptB2pc", "", {HistType::kTProfile3D, {bsAxis, centAxis, nchAxis}});
432+
}
427433

428434
registry.addClone("analysis/charged/", "analysis/pion/");
429435
registry.addClone("analysis/charged/", "analysis/kaon/");
@@ -835,14 +841,15 @@ struct FlowGfwV02 {
835841
template <DataType dt>
836842
void fillOutputContainers(const float& centmult, const int& multiplicity, const double& rndm, const int& /*run*/ = 0)
837843
{
844+
double threshold = 1.01;
838845
for (uint l_ind = 0; l_ind < corrconfigs.size(); ++l_ind) {
839846
if (!corrconfigs.at(l_ind).pTDif) {
840847
auto dnx = fGFW->Calculate(corrconfigs.at(l_ind), 0, kTRUE).real();
841848
if (dnx == 0)
842849
continue;
843850
auto val = fGFW->Calculate(corrconfigs.at(l_ind), 0, kFALSE).real() / dnx;
844851

845-
if (std::abs(val) < 1) {
852+
if (std::abs(val) < threshold) {
846853
fFC->FillProfile(corrconfigs.at(l_ind).Head.c_str(), centmult, val, (cfgUseMultiplicityFlowWeights) ? dnx : 1.0, rndm);
847854
}
848855
continue;
@@ -865,7 +872,6 @@ struct FlowGfwV02 {
865872
ebyeWeight *= pidStates.hPtMid[PidCharged]->Integral();
866873
}
867874
double ptFraction = 0;
868-
double threshold = 1.01;
869875
int normIndex = (cfgNormalizeByCharged) ? PidCharged : pidInd; // Configured to normalize by charged particles or the selected particle
870876
if (pidStates.hPtMid[normIndex]->Integral() > 0) {
871877
ptFraction = pidStates.hPtMid[pidInd]->GetBinContent(i) / pidStates.hPtMid[normIndex]->Integral();
@@ -888,60 +894,98 @@ struct FlowGfwV02 {
888894
if (!(pidStates.hPtForward[normIndex]->Integral() > 0) || !(pidStates.hPtBackward[normIndex]->Integral() > 0)) {
889895
continue; // Forward or backward pT distribution is not defined
890896
}
897+
double WeightA = 1.0;
898+
double WeightB = 1.0;
899+
if (cfgUseMultiplicityFracWeights) {
900+
WeightA = pidStates.hPtForward[PidCharged]->Integral();
901+
WeightB = pidStates.hPtBackward[PidCharged]->Integral();
902+
}
891903
for (int i = 1; i <= fSecondAxis->GetNbins(); i++) {
892904
ptFractionForward = pidStates.hPtForward[pid]->GetBinContent(i) / pidStates.hPtForward[normIndex]->Integral();
893905
ptFractionBackward = pidStates.hPtBackward[pid]->GetBinContent(i) / pidStates.hPtBackward[normIndex]->Integral();
894906
v0corrAB = ptFractionForward * ptMeanBackward;
895907
v0corrBA = ptFractionBackward * ptMeanForward;
896908
switch (pid) {
897909
case PidCharged:
898-
registry.fill(HIST("analysis/charged/v0AB"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, v0corrAB);
899-
registry.fill(HIST("analysis/charged/v0BA"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, v0corrBA);
900-
registry.fill(HIST("analysis/charged/nchA"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, ptFractionForward);
901-
registry.fill(HIST("analysis/charged/nchB"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, ptFractionBackward);
910+
registry.fill(HIST("analysis/charged/v0AB"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, v0corrAB, WeightA * WeightB);
911+
registry.fill(HIST("analysis/charged/v0BA"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, v0corrBA, WeightA * WeightB);
912+
registry.fill(HIST("analysis/charged/nchA"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, ptFractionForward, WeightA);
913+
registry.fill(HIST("analysis/charged/nchB"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, ptFractionBackward, WeightB);
914+
if (cfgUseMultiplicityFracWeights) {
915+
registry.fill(HIST("analysis/charged/nchA2pc"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, ptFractionForward, WeightA * WeightB);
916+
registry.fill(HIST("analysis/charged/nchB2pc"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, ptFractionBackward, WeightA * WeightB);
917+
}
902918
break;
903919
case PidPions:
904-
registry.fill(HIST("analysis/pion/v0AB"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, v0corrAB);
905-
registry.fill(HIST("analysis/pion/v0BA"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, v0corrBA);
906-
registry.fill(HIST("analysis/pion/nchA"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, ptFractionForward);
907-
registry.fill(HIST("analysis/pion/nchB"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, ptFractionBackward);
920+
registry.fill(HIST("analysis/pion/v0AB"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, v0corrAB, WeightA * WeightB);
921+
registry.fill(HIST("analysis/pion/v0BA"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, v0corrBA, WeightA * WeightB);
922+
registry.fill(HIST("analysis/pion/nchA"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, ptFractionForward, WeightA);
923+
registry.fill(HIST("analysis/pion/nchB"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, ptFractionBackward, WeightB);
924+
if (cfgUseMultiplicityFracWeights) {
925+
registry.fill(HIST("analysis/pion/nchA2pc"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, ptFractionForward, WeightA * WeightB);
926+
registry.fill(HIST("analysis/pion/nchB2pc"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, ptFractionBackward, WeightA * WeightB);
927+
}
908928
break;
909929
case PidKaons:
910-
registry.fill(HIST("analysis/kaon/v0AB"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, v0corrAB);
911-
registry.fill(HIST("analysis/kaon/v0BA"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, v0corrBA);
912-
registry.fill(HIST("analysis/kaon/nchA"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, ptFractionForward);
913-
registry.fill(HIST("analysis/kaon/nchB"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, ptFractionBackward);
930+
registry.fill(HIST("analysis/kaon/v0AB"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, v0corrAB, WeightA * WeightB);
931+
registry.fill(HIST("analysis/kaon/v0BA"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, v0corrBA, WeightA * WeightB);
932+
registry.fill(HIST("analysis/kaon/nchA"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, ptFractionForward, WeightA);
933+
registry.fill(HIST("analysis/kaon/nchB"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, ptFractionBackward, WeightB);
934+
if (cfgUseMultiplicityFracWeights) {
935+
registry.fill(HIST("analysis/kaon/nchA2pc"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, ptFractionForward, WeightA * WeightB);
936+
registry.fill(HIST("analysis/kaon/nchB2pc"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, ptFractionBackward, WeightA * WeightB);
937+
}
914938
break;
915939
case PidProtons:
916-
registry.fill(HIST("analysis/proton/v0AB"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, v0corrAB);
917-
registry.fill(HIST("analysis/proton/v0BA"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, v0corrBA);
918-
registry.fill(HIST("analysis/proton/nchA"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, ptFractionForward);
919-
registry.fill(HIST("analysis/proton/nchB"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, ptFractionBackward);
940+
registry.fill(HIST("analysis/proton/v0AB"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, v0corrAB, WeightA * WeightB);
941+
registry.fill(HIST("analysis/proton/v0BA"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, v0corrBA, WeightA * WeightB);
942+
registry.fill(HIST("analysis/proton/nchA"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, ptFractionForward, WeightA);
943+
registry.fill(HIST("analysis/proton/nchB"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, ptFractionBackward, WeightB);
944+
if (cfgUseMultiplicityFracWeights) {
945+
registry.fill(HIST("analysis/proton/nchA2pc"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, ptFractionForward, WeightA * WeightB);
946+
registry.fill(HIST("analysis/proton/nchB2pc"), bootstrap, fSecondAxis->GetBinCenter(i), centmult, ptFractionBackward, WeightA * WeightB);
947+
}
920948
break;
921949
default:
922950
break;
923951
}
924952
}
925953
switch (pid) {
926954
case PidCharged:
927-
registry.fill(HIST("analysis/charged/ptA"), bootstrap, centmult, multiplicity, ptMeanForward);
928-
registry.fill(HIST("analysis/charged/ptB"), bootstrap, centmult, multiplicity, ptMeanBackward);
929-
registry.fill(HIST("analysis/charged/ptAB"), bootstrap, centmult, multiplicity, ptMeanForward * ptMeanBackward);
955+
registry.fill(HIST("analysis/charged/ptA"), bootstrap, centmult, multiplicity, ptMeanForward, WeightA);
956+
registry.fill(HIST("analysis/charged/ptB"), bootstrap, centmult, multiplicity, ptMeanBackward, WeightB);
957+
if (cfgUseMultiplicityFracWeights) {
958+
registry.fill(HIST("analysis/charged/ptA2pc"), bootstrap, centmult, multiplicity, ptMeanForward, WeightA * WeightB);
959+
registry.fill(HIST("analysis/charged/ptB2pc"), bootstrap, centmult, multiplicity, ptMeanBackward, WeightA * WeightB);
960+
}
961+
registry.fill(HIST("analysis/charged/ptAB"), bootstrap, centmult, multiplicity, ptMeanForward * ptMeanBackward, WeightA * WeightB);
930962
break;
931963
case PidPions:
932-
registry.fill(HIST("analysis/pion/ptA"), bootstrap, centmult, multiplicity, ptMeanForward);
933-
registry.fill(HIST("analysis/pion/ptB"), bootstrap, centmult, multiplicity, ptMeanBackward);
934-
registry.fill(HIST("analysis/pion/ptAB"), bootstrap, centmult, multiplicity, ptMeanForward * ptMeanBackward);
964+
registry.fill(HIST("analysis/pion/ptA"), bootstrap, centmult, multiplicity, ptMeanForward, WeightA);
965+
registry.fill(HIST("analysis/pion/ptB"), bootstrap, centmult, multiplicity, ptMeanBackward, WeightB);
966+
if (cfgUseMultiplicityFracWeights) {
967+
registry.fill(HIST("analysis/pion/ptA2pc"), bootstrap, centmult, multiplicity, ptMeanForward, WeightA * WeightB);
968+
registry.fill(HIST("analysis/pion/ptB2pc"), bootstrap, centmult, multiplicity, ptMeanBackward, WeightA * WeightB);
969+
}
970+
registry.fill(HIST("analysis/pion/ptAB"), bootstrap, centmult, multiplicity, ptMeanForward * ptMeanBackward, WeightA * WeightB);
935971
break;
936972
case PidKaons:
937-
registry.fill(HIST("analysis/kaon/ptA"), bootstrap, centmult, multiplicity, ptMeanForward);
938-
registry.fill(HIST("analysis/kaon/ptB"), bootstrap, centmult, multiplicity, ptMeanBackward);
939-
registry.fill(HIST("analysis/kaon/ptAB"), bootstrap, centmult, multiplicity, ptMeanForward * ptMeanBackward);
973+
registry.fill(HIST("analysis/kaon/ptA"), bootstrap, centmult, multiplicity, ptMeanForward, WeightA);
974+
registry.fill(HIST("analysis/kaon/ptB"), bootstrap, centmult, multiplicity, ptMeanBackward, WeightB);
975+
if (cfgUseMultiplicityFracWeights) {
976+
registry.fill(HIST("analysis/kaon/ptA2pc"), bootstrap, centmult, multiplicity, ptMeanForward, WeightA * WeightB);
977+
registry.fill(HIST("analysis/kaon/ptB2pc"), bootstrap, centmult, multiplicity, ptMeanBackward, WeightA * WeightB);
978+
}
979+
registry.fill(HIST("analysis/kaon/ptAB"), bootstrap, centmult, multiplicity, ptMeanForward * ptMeanBackward, WeightA * WeightB);
940980
break;
941981
case PidProtons:
942-
registry.fill(HIST("analysis/proton/ptA"), bootstrap, centmult, multiplicity, ptMeanForward);
943-
registry.fill(HIST("analysis/proton/ptB"), bootstrap, centmult, multiplicity, ptMeanBackward);
944-
registry.fill(HIST("analysis/proton/ptAB"), bootstrap, centmult, multiplicity, ptMeanForward * ptMeanBackward);
982+
registry.fill(HIST("analysis/proton/ptA"), bootstrap, centmult, multiplicity, ptMeanForward, WeightA);
983+
registry.fill(HIST("analysis/proton/ptB"), bootstrap, centmult, multiplicity, ptMeanBackward, WeightB);
984+
if (cfgUseMultiplicityFracWeights) {
985+
registry.fill(HIST("analysis/proton/ptA2pc"), bootstrap, centmult, multiplicity, ptMeanForward, WeightA * WeightB);
986+
registry.fill(HIST("analysis/proton/ptB2pc"), bootstrap, centmult, multiplicity, ptMeanBackward, WeightA * WeightB);
987+
}
988+
registry.fill(HIST("analysis/proton/ptAB"), bootstrap, centmult, multiplicity, ptMeanForward * ptMeanBackward, WeightA * WeightB);
945989
break;
946990
default:
947991
break;
@@ -958,7 +1002,6 @@ struct FlowGfwV02 {
9581002
double ptFraction = 0;
9591003
if (pidStates.hPtMid[PidCharged]->Integral() > 0) {
9601004
ptFraction = pidStates.hPtMid[PidCharged]->GetBinContent(i) / pidStates.hPtMid[PidCharged]->Integral();
961-
double threshold = 1.01;
9621005
if (std::abs(val) < threshold)
9631006
registry.fill(HIST("v02pt"), fSecondAxis->GetBinCenter(i), centmult, multiplicity, val * ptFraction, (cfgUseMultiplicityFlowWeights) ? dnx : 1.0);
9641007
registry.fill(HIST("nchMid"), fSecondAxis->GetBinCenter(i), centmult, multiplicity, ptFraction);

0 commit comments

Comments
 (0)