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
34 changes: 24 additions & 10 deletions PWGLF/Tasks/Strangeness/lambdapolsp.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
#include <cmath>
#include <cstdlib>
#include <deque>
#include <iostream>

Check failure on line 61 in PWGLF/Tasks/Strangeness/lambdapolsp.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <iterator>
#include <set> // <<< CHANGED: for dedup sets
#include <string>
Expand Down Expand Up @@ -324,7 +324,7 @@
if (!checkwithpub) {
// histos.add("hVtxZ", "Vertex distribution in Z;Z (cm)", kTH1F, {{20, -10.0, 10.0}});
histos.add("hpRes", "hpRes", HistType::kTHnSparseF, {axisGrp.configcentAxis, thnAxisres});
histos.add("hpResSin", "hpResSin", HistType::kTHnSparseF, {axisGrp.configcentAxis, thnAxisres});
// histos.add("hpResSin", "hpResSin", HistType::kTHnSparseF, {axisGrp.configcentAxis, thnAxisres});
/*histos.add("hpCosPsiA", "hpCosPsiA", HistType::kTHnSparseF, {axisGrp.configcentAxis, thnAxisres});
histos.add("hpCosPsiC", "hpCosPsiC", HistType::kTHnSparseF, {axisGrp.configcentAxis, thnAxisres});
histos.add("hpSinPsiA", "hpSinPsiA", HistType::kTHnSparseF, {axisGrp.configcentAxis, thnAxisres});
Expand Down Expand Up @@ -356,12 +356,16 @@
if (usesubdet) {
histos.add("hSparseLambdaPolA", "hSparseLambdaPolA", HistType::kTHnSparseF, runaxes, true);
histos.add("hSparseLambdaPolC", "hSparseLambdaPolC", HistType::kTHnSparseF, runaxes, true);
histos.add("hSparseLambdaPolAwgt", "hSparseLambdaPolAwgt", HistType::kTHnSparseF, runaxes, true);
histos.add("hSparseLambdaPolCwgt", "hSparseLambdaPolCwgt", HistType::kTHnSparseF, runaxes, true);
}
histos.add("hSparseAntiLambdaPol", "hSparseAntiLambdaPol", HistType::kTHnSparseF, runaxes, true);
histos.add("hSparseAntiLambdaPolwgt", "hSparseAntiLambdaPolwgt", HistType::kTHnSparseF, runaxes, true);
if (usesubdet) {
histos.add("hSparseAntiLambdaPolA", "hSparseAntiLambdaPolA", HistType::kTHnSparseF, runaxes, true);
histos.add("hSparseAntiLambdaPolC", "hSparseAntiLambdaPolC", HistType::kTHnSparseF, runaxes, true);
histos.add("hSparseAntiLambdaPolAwgt", "hSparseAntiLambdaPolAwgt", HistType::kTHnSparseF, runaxes, true);
histos.add("hSparseAntiLambdaPolCwgt", "hSparseAntiLambdaPolCwgt", HistType::kTHnSparseF, runaxes, true);
}
histos.add("hSparseLambda_corr1a", "hSparseLambda_corr1a", HistType::kTHnSparseF, runaxes, true);
histos.add("hSparseLambda_corr1b", "hSparseLambda_corr1b", HistType::kTHnSparseF, runaxes, true);
Expand Down Expand Up @@ -389,12 +393,12 @@
template <typename Collision, typename V0>
bool SelectionV0(Collision const& collision, V0 const& candidate)
{
if (TMath::Abs(candidate.dcav0topv()) > cMaxV0DCA) {

Check failure on line 396 in PWGLF/Tasks/Strangeness/lambdapolsp.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return false;
}
const float pT = candidate.pt();
const float tranRad = candidate.v0radius();
const float dcaDaughv0 = TMath::Abs(candidate.dcaV0daughters());

Check failure on line 401 in PWGLF/Tasks/Strangeness/lambdapolsp.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
const float cpav0 = candidate.v0cosPA();

float CtauLambda = candidate.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * massLambda;
Expand All @@ -417,23 +421,23 @@
if (tranRad > ConfV0TranRadV0Max) {
return false;
}
if (analyzeLambda && TMath::Abs(CtauLambda) > cMaxV0LifeTime) {

Check failure on line 424 in PWGLF/Tasks/Strangeness/lambdapolsp.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return false;
}
if (analyzeK0s && TMath::Abs(CtauK0s) > cMaxV0LifeTime) {

Check failure on line 427 in PWGLF/Tasks/Strangeness/lambdapolsp.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return false;
}
if (analyzeLambda && TMath::Abs(candidate.yLambda()) > ConfV0Rap) {

Check failure on line 430 in PWGLF/Tasks/Strangeness/lambdapolsp.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return false;
}
if (analyzeK0s && TMath::Abs(candidate.yK0Short()) > ConfV0Rap) {

Check failure on line 433 in PWGLF/Tasks/Strangeness/lambdapolsp.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return false;
}
return true;
}

template <typename V0, typename T>
bool isSelectedV0Daughter(V0 const& candidate, T const& track, int pid)
bool isSelectedV0Daughter(V0 const& candidate, T const& track, int pid, int pid2)
{
// const auto eta = track.eta();
// const auto pt = track.pt();
Expand All @@ -451,10 +455,10 @@
return false;
}

if (pid == 0 && TMath::Abs(track.tpcNSigmaPr()) > ConfDaughPIDCuts) {

Check failure on line 458 in PWGLF/Tasks/Strangeness/lambdapolsp.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return false;
}
if (pid == 1 && TMath::Abs(track.tpcNSigmaPi()) > ConfDaughPIDCuts) {

Check failure on line 461 in PWGLF/Tasks/Strangeness/lambdapolsp.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return false;
}
if (pid == 0 && (candidate.positivept() < cfgDaughPrPt || candidate.negativept() < cfgDaughPiPt)) {
Expand All @@ -467,10 +471,10 @@
return false;
}

if (pid == 0 && (TMath::Abs(candidate.dcapostopv()) < cMinV0DCAPr || TMath::Abs(candidate.dcanegtopv()) < cMinV0DCAPi)) {
if (pid2 == 0 && (TMath::Abs(candidate.dcapostopv()) < cMinV0DCAPr || TMath::Abs(candidate.dcanegtopv()) < cMinV0DCAPi)) {

Check failure on line 474 in PWGLF/Tasks/Strangeness/lambdapolsp.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return false;
}
if (pid == 1 && (TMath::Abs(candidate.dcapostopv()) < cMinV0DCAPi || TMath::Abs(candidate.dcanegtopv()) < cMinV0DCAPr)) {
if (pid2 == 1 && (TMath::Abs(candidate.dcapostopv()) < cMinV0DCAPi || TMath::Abs(candidate.dcanegtopv()) < cMinV0DCAPr)) {
return false;
}

Expand Down Expand Up @@ -627,6 +631,8 @@
// PolA = PolA / acvalue;
// Pol = Pol / acvalue;
auto Polwgt = Pol / acvalue;
auto PolAwgt = PolA / acvalue;
auto PolCwgt = PolC / acvalue;

// Fill histograms using constructed names
if (tag2) {
Expand All @@ -642,6 +648,8 @@
if (usesubdet) {
histos.fill(HIST("hSparseAntiLambdaPolA"), candmass, candpt, PolA, centrality, desbinvalue);
histos.fill(HIST("hSparseAntiLambdaPolC"), candmass, candpt, PolC, centrality, desbinvalue);
histos.fill(HIST("hSparseAntiLambdaPolAwgt"), candmass, candpt, PolAwgt, centrality, desbinvalue);
histos.fill(HIST("hSparseAntiLambdaPolCwgt"), candmass, candpt, PolCwgt, centrality, desbinvalue);
}
histos.fill(HIST("hSparseAntiLambdaPol"), candmass, candpt, Pol, centrality, desbinvalue);
histos.fill(HIST("hSparseAntiLambdaPolwgt"), candmass, candpt, Polwgt, centrality, desbinvalue);
Expand All @@ -662,6 +670,8 @@
if (usesubdet) {
histos.fill(HIST("hSparseAntiLambdaPolA"), candmass, candpt, PolA, centrality);
histos.fill(HIST("hSparseAntiLambdaPolC"), candmass, candpt, PolC, centrality);
histos.fill(HIST("hSparseAntiLambdaPolAwgt"), candmass, candpt, PolAwgt, centrality);
histos.fill(HIST("hSparseAntiLambdaPolCwgt"), candmass, candpt, PolCwgt, centrality);
}
histos.fill(HIST("hSparseAntiLambdaPol"), candmass, candpt, Pol, centrality);
histos.fill(HIST("hSparseAntiLambdaPolwgt"), candmass, candpt, Polwgt, centrality);
Expand All @@ -685,6 +695,8 @@
if (usesubdet) {
histos.fill(HIST("hSparseLambdaPolA"), candmass, candpt, PolA, centrality, desbinvalue);
histos.fill(HIST("hSparseLambdaPolC"), candmass, candpt, PolC, centrality, desbinvalue);
histos.fill(HIST("hSparseLambdaPolAwgt"), candmass, candpt, PolAwgt, centrality, desbinvalue);
histos.fill(HIST("hSparseLambdaPolCwgt"), candmass, candpt, PolCwgt, centrality, desbinvalue);
}
histos.fill(HIST("hSparseLambdaPol"), candmass, candpt, Pol, centrality, desbinvalue);
histos.fill(HIST("hSparseLambdaPolwgt"), candmass, candpt, Polwgt, centrality, desbinvalue);
Expand All @@ -705,6 +717,8 @@
if (usesubdet) {
histos.fill(HIST("hSparseLambdaPolA"), candmass, candpt, PolA, centrality);
histos.fill(HIST("hSparseLambdaPolC"), candmass, candpt, PolC, centrality);
histos.fill(HIST("hSparseLambdaPolAwgt"), candmass, candpt, PolAwgt, centrality);
histos.fill(HIST("hSparseLambdaPolCwgt"), candmass, candpt, PolCwgt, centrality);
}
histos.fill(HIST("hSparseLambdaPol"), candmass, candpt, Pol, centrality);
histos.fill(HIST("hSparseLambdaPolwgt"), candmass, candpt, Polwgt, centrality);
Expand Down Expand Up @@ -812,7 +826,7 @@
if (!checkwithpub) {
// histos.fill(HIST("hVtxZ"), collision.posZ());
histos.fill(HIST("hpRes"), centrality, (TMath::Cos(GetPhiInRange(psiZDCA - psiZDCC))));
histos.fill(HIST("hpResSin"), centrality, (TMath::Sin(GetPhiInRange(psiZDCA - psiZDCC))));
// histos.fill(HIST("hpResSin"), centrality, (TMath::Sin(GetPhiInRange(psiZDCA - psiZDCC))));
/*histos.fill(HIST("hpCosPsiA"), centrality, (TMath::Cos(GetPhiInRange(psiZDCA))));
histos.fill(HIST("hpCosPsiC"), centrality, (TMath::Cos(GetPhiInRange(psiZDCC))));
histos.fill(HIST("hpSinPsiA"), centrality, (TMath::Sin(GetPhiInRange(psiZDCA))));
Expand Down Expand Up @@ -980,10 +994,10 @@
continue;
}

if (isSelectedV0Daughter(v0, postrack, 0) && isSelectedV0Daughter(v0, negtrack, 1)) {
if (isSelectedV0Daughter(v0, postrack, 0, 0) && isSelectedV0Daughter(v0, negtrack, 1, 0)) {
LambdaTag = 1;
}
if (isSelectedV0Daughter(v0, negtrack, 0) && isSelectedV0Daughter(v0, postrack, 1)) {
if (isSelectedV0Daughter(v0, negtrack, 0, 1) && isSelectedV0Daughter(v0, postrack, 1, 1)) {
aLambdaTag = 1;
}

Expand Down Expand Up @@ -1193,7 +1207,7 @@
if (!checkwithpub) {
// histos.fill(HIST("hVtxZ"), collision.posZ());
histos.fill(HIST("hpRes"), centrality, (TMath::Cos(GetPhiInRange(psiZDCA - psiZDCC))));
histos.fill(HIST("hpResSin"), centrality, (TMath::Sin(GetPhiInRange(psiZDCA - psiZDCC))));
// histos.fill(HIST("hpResSin"), centrality, (TMath::Sin(GetPhiInRange(psiZDCA - psiZDCC))));
/*histos.fill(HIST("hpCosPsiA"), centrality, (TMath::Cos(GetPhiInRange(psiZDCA))));
histos.fill(HIST("hpCosPsiC"), centrality, (TMath::Cos(GetPhiInRange(psiZDCC))));
histos.fill(HIST("hpSinPsiA"), centrality, (TMath::Sin(GetPhiInRange(psiZDCA))));
Expand Down Expand Up @@ -1443,7 +1457,7 @@
}

histos.fill(HIST("hpRes"), centrality, (TMath::Cos(GetPhiInRange(psiZDCA - psiZDCC))));
histos.fill(HIST("hpResSin"), centrality, (TMath::Sin(GetPhiInRange(psiZDCA - psiZDCC))));
// histos.fill(HIST("hpResSin"), centrality, (TMath::Sin(GetPhiInRange(psiZDCA - psiZDCC))));

for (const auto& v0 : groupV0) {

Expand Down Expand Up @@ -1567,7 +1581,7 @@

histos.fill(HIST("hCentrality"), centrality);
histos.fill(HIST("hpRes"), centrality, (TMath::Cos(GetPhiInRange(psiZDCA - psiZDCC))));
histos.fill(HIST("hpResSin"), centrality, (TMath::Sin(GetPhiInRange(psiZDCA - psiZDCC))));
// histos.fill(HIST("hpResSin"), centrality, (TMath::Sin(GetPhiInRange(psiZDCA - psiZDCC))));

// V0s from collision1 to match kinematics
auto v0sCol1 = V0s.sliceBy(tracksPerCollisionV0Mixed, collision1.index());
Expand Down
Loading