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
17 changes: 9 additions & 8 deletions PWGLF/Tasks/Strangeness/lambdaJetpolarization.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
///

/// \author Youpeng Su (yousu@cern.ch)
#include <iostream>

Check failure on line 14 in PWGLF/Tasks/Strangeness/lambdaJetpolarization.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <string>
#include <vector>
#include <cmath>
Expand Down Expand Up @@ -134,6 +134,7 @@
const AxisSpec invMassLambdaAxis{200, 1.09, 1.14, "m_{p#pi} (GeV/#it{c}^{2})"};

ConfigurableAxis TProfile2DaxisPt{"#it{p}_{T} (GeV/#it{c})", {VARIABLE_WIDTH, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.2, 3.7, 4.2, 5, 6, 8, 10, 12}, "pt axis for histograms"};
ConfigurableAxis TProfile2DaxisMass{"Mass p#pi (GeV/#it{c^{2}})", {VARIABLE_WIDTH, 1.10068, 1.10668, 1.11068, 1.11268, 1.11368, 1.11468, 1.11568, 1.11668, 1.11768, 1.11868, 1.12068, 1.12468, 1.13068}, "Mass axis for histograms"};

registry.add("hMassLambda", "hMassLambda", {HistType::kTH1F, {{200, 0.9f, 1.2f}}});
registry.add("V0pTInLab", "V0pTInLab", kTH1F, {axisPT});
Expand Down Expand Up @@ -253,13 +254,13 @@
registryData.add("profileAntiLambda", "Invariant Mass vs sin(phi)", {HistType::kTProfile, {{200, 0.9, 1.2}}});
registryData.add("hAntiLambdamassandSinPhi", "hAntiLambdaPhiandSinPhi", kTH2F, {{200, -TMath::Pi() / 2, TMath::Pi() / 2}, {200, -1, 1}});

registryData.add("TProfile2DLambdaPtMassSinPhi", "", kTProfile2D, {invMassLambdaAxis, TProfile2DaxisPt});
registryData.add("TProfile2DAntiLambdaPtMassSinPhi", "", kTProfile2D, {invMassLambdaAxis, TProfile2DaxisPt});
registryData.add("TProfile2DLambdaPtMassSintheta", "", kTProfile2D, {invMassLambdaAxis, TProfile2DaxisPt});
registryData.add("TProfile2DAntiLambdaPtMassSintheta", "", kTProfile2D, {invMassLambdaAxis, TProfile2DaxisPt});
registryData.add("TProfile2DLambdaPtMassSinPhi", "", kTProfile2D, {TProfile2DaxisMass, TProfile2DaxisPt});
registryData.add("TProfile2DAntiLambdaPtMassSinPhi", "", kTProfile2D, {TProfile2DaxisMass, TProfile2DaxisPt});
registryData.add("TProfile2DLambdaPtMassSintheta", "", kTProfile2D, {TProfile2DaxisMass, TProfile2DaxisPt});
registryData.add("TProfile2DAntiLambdaPtMassSintheta", "", kTProfile2D, {TProfile2DaxisMass, TProfile2DaxisPt});

registryData.add("TProfile2DLambdaPtMassCosSquareTheta", "", kTProfile2D, {invMassLambdaAxis, TProfile2DaxisPt});
registryData.add("TProfile2DAntiLambdaPtMassCosSquareTheta", "", kTProfile2D, {invMassLambdaAxis, TProfile2DaxisPt});
registryData.add("TProfile2DLambdaPtMassCosSquareTheta", "", kTProfile2D, {TProfile2DaxisMass, TProfile2DaxisPt});
registryData.add("TProfile2DAntiLambdaPtMassCosSquareTheta", "", kTProfile2D, {TProfile2DaxisMass, TProfile2DaxisPt});

registryData.add("hNEvents", "hNEvents", {HistType::kTH1I, {{10, 0.f, 10.f}}});
registryData.get<TH1>(HIST("hNEvents"))->GetXaxis()->SetBinLabel(1, "all");
Expand Down Expand Up @@ -317,8 +318,8 @@

TMatrixD LorentzTransInV0frame(double ELambda, double Lambdapx, double Lambdapy, double Lambdapz)
{
double PLambda = sqrt(Lambdapx * Lambdapx + Lambdapy * Lambdapy + Lambdapz * Lambdapz);

Check failure on line 321 in PWGLF/Tasks/Strangeness/lambdaJetpolarization.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
double LambdaMass = sqrt(ELambda * ELambda - PLambda * PLambda);

Check failure on line 322 in PWGLF/Tasks/Strangeness/lambdaJetpolarization.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
double Alpha = 1 / (LambdaMass * (ELambda + LambdaMass));
TMatrixD matrixLabToLambda(4, 4);
matrixLabToLambda(0, 0) = ELambda / LambdaMass;
Expand Down Expand Up @@ -385,10 +386,10 @@
registry.fill(HIST("V0protonpxInLab"), candidate.v0protonpx());
registry.fill(HIST("V0protonpyInLab"), candidate.v0protonpy());
registry.fill(HIST("V0protonpzInLab"), candidate.v0protonpz());
double protonsinPhiInLab = candidate.v0protonpy() / sqrt(candidate.v0protonpx() * candidate.v0protonpx() + candidate.v0protonpy() * candidate.v0protonpy());

Check failure on line 389 in PWGLF/Tasks/Strangeness/lambdaJetpolarization.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
registry.fill(HIST("V0protonphiInLab"), protonsinPhiInLab);
double PLambda = sqrt(candidate.v0px() * candidate.v0px() + candidate.v0py() * candidate.v0py() + candidate.v0pz() * candidate.v0pz());

Check failure on line 391 in PWGLF/Tasks/Strangeness/lambdaJetpolarization.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
double ELambda = sqrt(candidate.v0Lambdamass() * candidate.v0Lambdamass() + PLambda * PLambda);

Check failure on line 392 in PWGLF/Tasks/Strangeness/lambdaJetpolarization.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
TMatrixD pLabV0(4, 1);
pLabV0(0, 0) = ELambda;
pLabV0(1, 0) = candidate.v0px();
Expand All @@ -401,17 +402,17 @@
registry.fill(HIST("V0pzInRest_frame"), V0InV0(3, 0));
}
for (auto& candidate : myv0s) {
double PLambda = sqrt(candidate.v0px() * candidate.v0px() + candidate.v0py() * candidate.v0py() + candidate.v0pz() * candidate.v0pz());

Check failure on line 405 in PWGLF/Tasks/Strangeness/lambdaJetpolarization.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
double ELambda = sqrt(candidate.v0Lambdamass() * candidate.v0Lambdamass() + PLambda * PLambda);

Check failure on line 406 in PWGLF/Tasks/Strangeness/lambdaJetpolarization.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
TMatrixD pLabproton(4, 1);
double protonE = sqrt(massPr * massPr + candidate.v0protonpx() * candidate.v0protonpx() + candidate.v0protonpy() * candidate.v0protonpy() + candidate.v0protonpz() * candidate.v0protonpz());

Check failure on line 408 in PWGLF/Tasks/Strangeness/lambdaJetpolarization.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
pLabproton(0, 0) = protonE;
pLabproton(1, 0) = candidate.v0protonpx();
pLabproton(2, 0) = candidate.v0protonpy();
pLabproton(3, 0) = candidate.v0protonpz();
TMatrixD protonInV0(4, 1);
protonInV0 = LorentzTransInV0frame(ELambda, candidate.v0px(), candidate.v0py(), candidate.v0pz()) * pLabproton;
double protonMassInV0 = sqrt(protonInV0(0, 0) * protonInV0(0, 0) - protonInV0(1, 0) * protonInV0(1, 0) - protonInV0(2, 0) * protonInV0(2, 0) - protonInV0(3, 0) * protonInV0(3, 0));

Check failure on line 415 in PWGLF/Tasks/Strangeness/lambdaJetpolarization.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
registry.fill(HIST("V0protonMassInRest_frame"), protonMassInV0);
registry.fill(HIST("V0protonpxInRest_frame"), protonInV0(1, 0));
registry.fill(HIST("V0protonpyInRest_frame"), protonInV0(2, 0));
Expand Down Expand Up @@ -1024,7 +1025,7 @@

registryData.fill(HIST("TProfile2DLambdaPtMassSinPhi"), candidate.mLambda(), candidate.pt(), protonInJetV0(2, 0) / sqrt(protonInJetV0(1, 0) * protonInJetV0(1, 0) + protonInJetV0(2, 0) * protonInJetV0(2, 0)));
registryData.fill(HIST("TProfile2DLambdaPtMassSintheta"), candidate.mLambda(), candidate.pt(), (4.0 / TMath::Pi()) * protonSinThetainJetV0);
registryData.fill(HIST("TProfile2DLambdaPtMassCosSquareTheta"), candidate.mLambda(), candidate.pt(), protonCosThetainJetV0 * protonCosThetainJetV0 / 3.0);
registryData.fill(HIST("TProfile2DLambdaPtMassCosSquareTheta"), candidate.mLambda(), candidate.pt(), 3.0 * protonCosThetainJetV0 * protonCosThetainJetV0);
}
if (passedAntiLambdaSelection(candidate, pos, neg)) {
registryData.fill(HIST("hMassAntiLambda"), candidate.mAntiLambda());
Expand Down Expand Up @@ -1056,7 +1057,7 @@
double AntiprotonSinThetainJetV0 = AntiprotonPtinJetV0 / AntiprotonPinJetV0;
registryData.fill(HIST("TProfile2DAntiLambdaPtMassSinPhi"), candidate.mAntiLambda(), candidate.pt(), AntiprotonInJetV0(2, 0) / sqrt(AntiprotonInJetV0(1, 0) * AntiprotonInJetV0(1, 0) + AntiprotonInJetV0(2, 0) * AntiprotonInJetV0(2, 0)));
registryData.fill(HIST("TProfile2DAntiLambdaPtMassSintheta"), candidate.mAntiLambda(), candidate.pt(), (4.0 / TMath::Pi()) * AntiprotonSinThetainJetV0);
registryData.fill(HIST("TProfile2DAntiLambdaPtMassCosSquareTheta"), candidate.mAntiLambda(), candidate.pt(), AntiprotonCosThetainJetV0 * AntiprotonCosThetainJetV0 / 3.0);
registryData.fill(HIST("TProfile2DAntiLambdaPtMassCosSquareTheta"), candidate.mAntiLambda(), candidate.pt(), 3.0 * AntiprotonCosThetainJetV0 * AntiprotonCosThetainJetV0);
}
}

Expand Down
Loading