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
85 changes: 44 additions & 41 deletions PWGLF/TableProducer/Strangeness/cascadeflow.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@
resolution.add("QVectorsSpecPlane", "QVectorsSpecPlane", HistType::kTH2F, {axisQVsNorm, CentAxis});

histos.add("hNEvents", "hNEvents", {HistType::kTH1F, {{10, 0.f, 10.f}}});
for (Int_t n = 1; n <= histos.get<TH1>(HIST("hNEvents"))->GetNbinsX(); n++) {

Check failure on line 642 in PWGLF/TableProducer/Strangeness/cascadeflow.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
histos.get<TH1>(HIST("hNEvents"))->GetXaxis()->SetBinLabel(n, hNEventsLabels[n - 1]);
}
histos.add("hEventVertexZ", "hEventVertexZ", kTH1F, {{120, -12., 12.}});
Expand Down Expand Up @@ -777,11 +777,11 @@
histosMCGen.add("hGenOmegaY", "hGenOmegaY", HistType::kTH1F, {{100, -1, 1}});
histosMCGen.add("hZvertexGen", "hZvertexGen", HistType::kTH1F, {{100, -20, 20}});
histosMCGen.add("hNEventsMC", "hNEventsMC", {HistType::kTH1F, {{6, 0.f, 6.f}}});
for (Int_t n = 1; n <= histosMCGen.get<TH1>(HIST("hNEventsMC"))->GetNbinsX(); n++) {

Check failure on line 780 in PWGLF/TableProducer/Strangeness/cascadeflow.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
histosMCGen.get<TH1>(HIST("hNEventsMC"))->GetXaxis()->SetBinLabel(n, hNEventsLabelsMC[n - 1]);
}
histosMCGen.add("hNCascGen", "hNCascGen", {HistType::kTH1F, {{8, 0.f, 8.f}}});
for (Int_t n = 1; n <= histosMCGen.get<TH1>(HIST("hNCascGen"))->GetNbinsX(); n++) {

Check failure on line 784 in PWGLF/TableProducer/Strangeness/cascadeflow.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
histosMCGen.get<TH1>(HIST("hNCascGen"))->GetXaxis()->SetBinLabel(n, hNCascLabelsMC[n - 1]);
}

Expand Down Expand Up @@ -1200,14 +1200,14 @@

// select only events used for the calibration of the event plane
if (isGoodEventEP) {
if (std::abs(coll.qvecFT0CRe()) > 990 || std::abs(coll.qvecFT0CIm()) > 990 || std::abs(coll.qvecBNegRe()) > 990 || std::abs(coll.qvecBNegIm()) > 990 || std::abs(coll.qvecBPosRe()) > 990 || std::abs(coll.qvecBPosIm()) > 990) {

Check failure on line 1203 in PWGLF/TableProducer/Strangeness/cascadeflow.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.
return;
}
}

// event has FT0C event plane
bool hasEventPlane = 0;
if (std::abs(coll.qvecFT0CRe()) < 990 && std::abs(coll.qvecFT0CIm()) < 990)

Check failure on line 1210 in PWGLF/TableProducer/Strangeness/cascadeflow.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.
hasEventPlane = 1;

histos.fill(HIST("hNEvents"), 9.5);
Expand Down Expand Up @@ -1244,7 +1244,7 @@
int counter = 0;
IsCascAccepted(casc, negExtra, posExtra, bachExtra, counter);
histos.fill(HIST("hCascade"), counter);

// ML selections
bool isSelectedCasc[nParticles]{false, false};

Expand Down Expand Up @@ -1467,7 +1467,7 @@

// select only events used for the calibration of the event plane
if (isGoodEventEP) {
if (std::abs(coll.qvecFT0CRe()) > 990 || std::abs(coll.qvecFT0CIm()) > 990 || std::abs(coll.qvecBNegRe()) > 990 || std::abs(coll.qvecBNegIm()) > 990 || std::abs(coll.qvecBPosRe()) > 990 || std::abs(coll.qvecBPosIm()) > 990) {

Check failure on line 1470 in PWGLF/TableProducer/Strangeness/cascadeflow.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.
return;
}
}
Expand Down Expand Up @@ -1506,11 +1506,13 @@
int counterALambda = 0;
bool isLambdaCandidate = 0;
bool isALambdaCandidate = 0;
if (isLambdaAccepted(negExtra, posExtra, counterLambda)) isLambdaCandidate = 1;
if (isAntiLambdaAccepted(negExtra, posExtra, counterALambda)) isALambdaCandidate = 1;
if (isLambdaAccepted(negExtra, posExtra, counterLambda))
isLambdaCandidate = 1;
if (isAntiLambdaAccepted(negExtra, posExtra, counterALambda))
isALambdaCandidate = 1;
histos.fill(HIST("hLambdaDauSel"), counterLambda);
histos.fill(HIST("hALambdaDauSel"), counterALambda);

// pt cut
if (v0.pt() < V0Configs.MinPtV0 || v0.pt() > V0Configs.MaxPtV0) {
continue;
Expand All @@ -1527,26 +1529,28 @@
isSelectedV0[1] = true;

int chargeIndex = -1;
if (isSelectedV0[0] && !isSelectedV0[1]) { //Lambdas
histos.fill(HIST("hLambdaCandidate"), 0);
chargeIndex = 0;
if (isSelectedV0[0] && !isSelectedV0[1]) { // Lambdas
histos.fill(HIST("hLambdaCandidate"), 0);
chargeIndex = 0;
}
if (isSelectedV0[1] && !isSelectedV0[0]) { //AntiLambdas
histos.fill(HIST("hLambdaCandidate"), 1);
chargeIndex = 1;
if (isSelectedV0[1] && !isSelectedV0[0]) { // AntiLambdas
histos.fill(HIST("hLambdaCandidate"), 1);
chargeIndex = 1;
}
if (isSelectedV0[0] && isSelectedV0[1]) {
histos.fill(HIST("hLambdaCandidate"), 2);
if (v0.mLambda() > V0Configs.MinMassLambda && v0.mLambda() < V0Configs.MaxMassLambda && v0.mAntiLambda() > V0Configs.MinMassLambda && v0.mAntiLambda() < V0Configs.MaxMassLambda) {
histos.fill(HIST("hLambdaCandidate"), 3);
continue; //in case of ambiguity between Lambda and AntiLambda, I skip the particle
}
if (v0.mLambda() > V0Configs.MinMassLambda && v0.mLambda() < V0Configs.MaxMassLambda) chargeIndex = 0;
else if (v0.mAntiLambda() > V0Configs.MinMassLambda && v0.mAntiLambda() < V0Configs.MaxMassLambda) chargeIndex = 1;
else {
histos.fill(HIST("hLambdaCandidate"), 4);
continue; //in case of ambiguity between Lambda and AntiLambda, I skip the particle
}
histos.fill(HIST("hLambdaCandidate"), 2);
if (v0.mLambda() > V0Configs.MinMassLambda && v0.mLambda() < V0Configs.MaxMassLambda && v0.mAntiLambda() > V0Configs.MinMassLambda && v0.mAntiLambda() < V0Configs.MaxMassLambda) {
histos.fill(HIST("hLambdaCandidate"), 3);
continue; // in case of ambiguity between Lambda and AntiLambda, I skip the particle
}
if (v0.mLambda() > V0Configs.MinMassLambda && v0.mLambda() < V0Configs.MaxMassLambda)
chargeIndex = 0;
else if (v0.mAntiLambda() > V0Configs.MinMassLambda && v0.mAntiLambda() < V0Configs.MaxMassLambda)
chargeIndex = 1;
else {
histos.fill(HIST("hLambdaCandidate"), 4);
continue; // in case of ambiguity between Lambda and AntiLambda, I skip the particle
}
}
if (!isSelectedV0[0] && !isSelectedV0[1])
continue;
Expand Down Expand Up @@ -1583,14 +1587,13 @@
double cos2ThetaLambda = 0;
double cosThetaLambda = 0;
if (chargeIndex == 0) {
pzs2Lambda = cosThetaStarProton[0] * std::sin(2 * (v0.phi() - psiT0C)) / lambdav2::AlphaLambda[0] / meanCos2ThetaProtonFromLambda;
cos2ThetaLambda = cosThetaStarProton[0] * cosThetaStarProton[0];
cosThetaLambda = cosThetaStarProton[0] / cascadev2::AlphaLambda[0] / meanCos2ThetaProtonFromLambda;
}
else {
pzs2Lambda = cosThetaStarProton[1] * std::sin(2 * (v0.phi() - psiT0C)) / lambdav2::AlphaLambda[1] / meanCos2ThetaProtonFromLambda;
cos2ThetaLambda = cosThetaStarProton[1] * cosThetaStarProton[1];
cosThetaLambda = cosThetaStarProton[1] / cascadev2::AlphaLambda[1] / meanCos2ThetaProtonFromLambda;
pzs2Lambda = cosThetaStarProton[0] * std::sin(2 * (v0.phi() - psiT0C)) / lambdav2::AlphaLambda[0] / meanCos2ThetaProtonFromLambda;
cos2ThetaLambda = cosThetaStarProton[0] * cosThetaStarProton[0];
cosThetaLambda = cosThetaStarProton[0] / cascadev2::AlphaLambda[0] / meanCos2ThetaProtonFromLambda;
} else {
pzs2Lambda = cosThetaStarProton[1] * std::sin(2 * (v0.phi() - psiT0C)) / lambdav2::AlphaLambda[1] / meanCos2ThetaProtonFromLambda;
cos2ThetaLambda = cosThetaStarProton[1] * cosThetaStarProton[1];
cosThetaLambda = cosThetaStarProton[1] / cascadev2::AlphaLambda[1] / meanCos2ThetaProtonFromLambda;
}

histos.fill(HIST("hv2CEPvsFT0C"), coll.centFT0C(), v2CEP);
Expand All @@ -1599,19 +1602,19 @@
histos.fill(HIST("hlambdaminuspsiT0C"), lambdaminuspsiT0C);

if (fillingConfigs.isFillTHNLambda) {
if (fillingConfigs.isFillTHN_V2)
histos.get<THn>(HIST("hLambdaV2"))->Fill(coll.centFT0C(), chargeIndex, v0.pt(), v0.mLambda(), v2CEP);
if (fillingConfigs.isFillTHN_Pz){
histos.get<THn>(HIST("hLambdaPzs2"))->Fill(coll.centFT0C(), chargeIndex, v0.pt(), v0.mLambda(), pzs2Lambda);
}
if (fillingConfigs.isFillTHN_Acc)
histos.get<THn>(HIST("hLambdaCos2Theta"))->Fill(coll.centFT0C(), chargeIndex, v0.eta(), v0.pt(), v0.mLambda(), cos2ThetaLambda);
if (fillingConfigs.isFillTHN_V2)
histos.get<THn>(HIST("hLambdaV2"))->Fill(coll.centFT0C(), chargeIndex, v0.pt(), v0.mLambda(), v2CEP);
if (fillingConfigs.isFillTHN_Pz) {
histos.get<THn>(HIST("hLambdaPzs2"))->Fill(coll.centFT0C(), chargeIndex, v0.pt(), v0.mLambda(), pzs2Lambda);
}
if (fillingConfigs.isFillTHN_Acc)
histos.get<THn>(HIST("hLambdaCos2Theta"))->Fill(coll.centFT0C(), chargeIndex, v0.eta(), v0.pt(), v0.mLambda(), cos2ThetaLambda);
}
if (fillingConfigs.isFillTHNLambda_PzVsPsi) {
if (fillingConfigs.isFillTHN_Pz)
histos.get<THn>(HIST("hLambdaPzVsPsi"))->Fill(coll.centFT0C(), chargeIndex, v0.pt(), v0.mLambda(), cosThetaLambda, 2 * lambdaminuspsiT0C);
if (fillingConfigs.isFillTHN_Acc)
histos.get<THn>(HIST("hLambdaCos2ThetaVsPsi"))->Fill(coll.centFT0C(), chargeIndex, v0.eta(), v0.pt(), v0.mLambda(), cos2ThetaLambda, 2 * lambdaminuspsiT0C);
if (fillingConfigs.isFillTHN_Pz)
histos.get<THn>(HIST("hLambdaPzVsPsi"))->Fill(coll.centFT0C(), chargeIndex, v0.pt(), v0.mLambda(), cosThetaLambda, 2 * lambdaminuspsiT0C);
if (fillingConfigs.isFillTHN_Acc)
histos.get<THn>(HIST("hLambdaCos2ThetaVsPsi"))->Fill(coll.centFT0C(), chargeIndex, v0.eta(), v0.pt(), v0.mLambda(), cos2ThetaLambda, 2 * lambdaminuspsiT0C);
}
}
}
Expand All @@ -1625,14 +1628,14 @@

// select only events used for the calibration of the event plane
if (isGoodEventEP) {
if (std::abs(coll.qvecFT0CRe()) > 990 || std::abs(coll.qvecFT0CIm()) > 990 || std::abs(coll.qvecBNegRe()) > 990 || std::abs(coll.qvecBNegIm()) > 990 || std::abs(coll.qvecBPosRe()) > 990 || std::abs(coll.qvecBPosIm()) > 990) {

Check failure on line 1631 in PWGLF/TableProducer/Strangeness/cascadeflow.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.
return;
}
}

// event has FT0C event plane
bool hasEventPlane = 0;
if (std::abs(coll.qvecFT0CRe()) < 990 && std::abs(coll.qvecFT0CIm()) < 990)

Check failure on line 1638 in PWGLF/TableProducer/Strangeness/cascadeflow.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.
hasEventPlane = 1;

// event has spectator plane
Expand Down Expand Up @@ -1681,7 +1684,7 @@
int counter = 0;
IsCascAccepted(casc, negExtra, posExtra, bachExtra, counter);
histos.fill(HIST("hCascade"), counter);

// ML selections
bool isSelectedCasc[nParticles]{false, false};

Expand Down Expand Up @@ -1807,9 +1810,9 @@
// true reco cascades before applying any selection
if (std::abs(pdgCode) == PDG_t::kXiMinus && std::abs(cascMC.pdgCodeV0()) == PDG_t::kLambda0 && std::abs(cascMC.pdgCodeBachelor()) == PDG_t::kPiPlus) {
histos.fill(HIST("hXiPtvsCent"), coll.centFT0C(), casc.pt());
if (std::abs(casc.eta()) < 0.8)

Check failure on line 1813 in PWGLF/TableProducer/Strangeness/cascadeflow.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.
histos.fill(HIST("hXiPtvsCentEta08"), coll.centFT0C(), casc.pt());
if (std::abs(XiY) < 0.5)

Check failure on line 1815 in PWGLF/TableProducer/Strangeness/cascadeflow.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.
histos.fill(HIST("hXiPtvsCentY05"), coll.centFT0C(), casc.pt());
} else if (std::abs(pdgCode) == PDG_t::kOmegaMinus && std::abs(cascMC.pdgCodeV0()) == PDG_t::kLambda0 && std::abs(cascMC.pdgCodeBachelor()) == PDG_t::kKPlus) {
histos.fill(HIST("hOmegaPtvsCent"), coll.centFT0C(), casc.pt());
Expand Down
Loading