Skip to content
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
8281156
Add new variable in THnSparse
skundu692 Apr 14, 2025
d702f82
Merge branch 'master' of https://github.com/AliceO2Group/O2Physics in…
skundu692 Apr 17, 2025
3faf128
Add deep angle information
skundu692 Apr 17, 2025
88b072c
Merge branch 'master' of https://github.com/AliceO2Group/O2Physics in…
skundu692 Apr 22, 2025
1fc5843
Optimized PID selection
skundu692 Apr 22, 2025
e59b85f
Add delta mass variable
skundu692 Apr 22, 2025
d62372a
Merge branch 'master' of https://github.com/AliceO2Group/O2Physics in…
skundu692 Apr 23, 2025
d114165
Fix bug related to daughter index
skundu692 Apr 23, 2025
64dbb89
Merge branch 'master' of https://github.com/AliceO2Group/O2Physics in…
skundu692 Apr 24, 2025
c29d245
Add strangeness helper in filter and fix daughter index check
skundu692 Apr 24, 2025
c07f7a2
Merge branch 'master' of https://github.com/AliceO2Group/O2Physics in…
skundu692 Apr 28, 2025
c6da28f
Fix indexing issue of BC
skundu692 Apr 28, 2025
84894ae
Remove unuse variable
skundu692 Apr 28, 2025
9730f54
Merge branch 'master' of https://github.com/AliceO2Group/O2Physics in…
skundu692 Apr 29, 2025
cfa3e43
Add new process function to optimize double phi selection
skundu692 Apr 29, 2025
70da5e8
Merge branch 'master' of https://github.com/AliceO2Group/O2Physics in…
skundu692 Apr 30, 2025
da13db5
Add wrong sign background
skundu692 Apr 30, 2025
5a7d0bf
Merge branch 'master' of https://github.com/AliceO2Group/O2Physics in…
skundu692 May 2, 2025
33055be
Optimized kaon PID to improve Phi meson purity
skundu692 May 2, 2025
5719297
Merge branch 'master' of https://github.com/AliceO2Group/O2Physics in…
skundu692 May 3, 2025
120c02f
Add new thnsparse to fill frame dependent variable
skundu692 May 3, 2025
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
70 changes: 70 additions & 0 deletions PWGLF/Tasks/Strangeness/taskLambdaSpinCorr.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,19 @@ struct LfTaskLambdaSpinCorr {
histos.add("hSparseLambdaLambda", "hSparseLambdaLambda", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, thnAxisInvMasspair}, true);
histos.add("hSparseLambdaAntiLambda", "hSparseLambdaAntiLambda", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, thnAxisInvMasspair}, true);
histos.add("hSparseAntiLambdaAntiLambda", "hSparseAntiLambdaAntiLambda", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, thnAxisInvMasspair}, true);

///////// along quantization axes///////////
histos.add("hSparseLambdaLambdaQA", "hSparseLambdaLambdaQA", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, thnAxisInvMasspair}, true);
histos.add("hSparseLambdaAntiLambdaQA", "hSparseLambdaAntiLambdaQA", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, thnAxisInvMasspair}, true);
histos.add("hSparseAntiLambdaAntiLambdaQA", "hSparseAntiLambdaAntiLambdaQA", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, thnAxisInvMasspair}, true);
if (fillGEN) {
histos.add("hSparseLambdaLambdaMC", "hSparseLambdaLambdaMC", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, thnAxisInvMasspair}, true);
histos.add("hSparseLambdaAntiLambdaMC", "hSparseLambdaAntiLambdaMC", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, thnAxisInvMasspair}, true);
histos.add("hSparseAntiLambdaAntiLambdaMC", "hSparseAntiLambdaAntiLambdaMC", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, thnAxisInvMasspair}, true);

histos.add("hSparseLambdaLambdaMCQA", "hSparseLambdaLambdaMCQA", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, thnAxisInvMasspair}, true);
histos.add("hSparseLambdaAntiLambdaMCQA", "hSparseLambdaAntiLambdaMCQA", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, thnAxisInvMasspair}, true);
histos.add("hSparseAntiLambdaAntiLambdaMCQA", "hSparseAntiLambdaAntiLambdaMCQA", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, thnAxisInvMasspair}, true);
}
}

Expand Down Expand Up @@ -262,6 +271,58 @@ struct LfTaskLambdaSpinCorr {
}
}

void fillHistograms2(bool tag1, bool tag2, bool tag3, bool tag4, const ROOT::Math::PxPyPzMVector& particlepair,
const ROOT::Math::PxPyPzMVector& particle1, const ROOT::Math::PxPyPzMVector& particle2,
const ROOT::Math::PxPyPzMVector& daughpart1, const ROOT::Math::PxPyPzMVector& daughpart2,
double centrality, bool datatype)
{

ROOT::Math::Boost boostPairToCM{particlepair.BoostToCM()}; // boosting vector for pair CM
// Boosting both Lambdas to Lambda-Lambda pair rest frame
auto lambda1CM = boostPairToCM(particle1);
auto lambda2CM = boostPairToCM(particle2);

// Step 2: Boost Each Lambda to its Own Rest Frame
ROOT::Math::Boost boostLambda1ToCM{lambda1CM.BoostToCM()};
ROOT::Math::Boost boostLambda2ToCM{lambda2CM.BoostToCM()};

ROOT::Math::XYZVector quantizationAxis = lambda1CM.Vect().Unit(); // Unit vector along Lambda1's direction in pair rest frame

// Also boost the daughter protons to the same frame
auto proton1pairCM = boostPairToCM(daughpart1); // proton1 to pair CM
auto proton2pairCM = boostPairToCM(daughpart2); // proton2 to pair CM

// Boost protons into their respective Lambda rest frames
auto proton1LambdaRF = boostLambda1ToCM(proton1pairCM);
auto proton2LambdaRF = boostLambda2ToCM(proton2pairCM);

double cosTheta1 = proton1LambdaRF.Vect().Unit().Dot(quantizationAxis);
double cosTheta2 = proton2LambdaRF.Vect().Unit().Dot(quantizationAxis);

double cosThetaDiff = cosTheta1 * cosTheta2;

auto lowptcut = 0.5;
auto highptcut = 10.0;

if (datatype == 1) {
if (tag1 && tag3)
histos.fill(HIST("hSparseLambdaLambdaMCQA"), particle1.M(), particle2.M(), cosThetaDiff, centrality, particlepair.M());
if (tag1 && tag4)
histos.fill(HIST("hSparseLambdaAntiLambdaMCQA"), particle1.M(), particle2.M(), cosThetaDiff, centrality, particlepair.M());
if (tag2 && tag4)
histos.fill(HIST("hSparseAntiLambdaAntiLambdaMCQA"), particle1.M(), particle2.M(), cosThetaDiff, centrality, particlepair.M());
} else {
if (particle1.Pt() > lowptcut && particle1.Pt() < highptcut && particle2.Pt() > lowptcut && particle2.Pt() < highptcut) {
if (tag1 && tag3)
histos.fill(HIST("hSparseLambdaLambdaQA"), particle1.M(), particle2.M(), cosThetaDiff, centrality, particlepair.M());
if (tag1 && tag4)
histos.fill(HIST("hSparseLambdaAntiLambdaQA"), particle1.M(), particle2.M(), cosThetaDiff, centrality, particlepair.M());
if (tag2 && tag4)
histos.fill(HIST("hSparseAntiLambdaAntiLambdaQA"), particle1.M(), particle2.M(), cosThetaDiff, centrality, particlepair.M());
}
}
}

std::tuple<int, int, bool> getLambdaTags(const auto& v0, const auto& collision)
{
auto postrack = v0.template posTrack_as<AllTrackCandidates>();
Expand Down Expand Up @@ -444,6 +505,7 @@ struct LfTaskLambdaSpinCorr {
tagb = 0;
tagb2 = 0;
fillHistograms(taga, tagb, taga2, tagb2, lambdaLambdapair, lambdadummy, lambdadummy2, proton, proton2, centrality, 0);
fillHistograms2(taga, tagb, taga2, tagb2, lambdaLambdapair, lambdadummy, lambdadummy2, proton, proton2, centrality, 0);
}

tagb2 = aLambdaTag2;
Expand All @@ -453,6 +515,7 @@ struct LfTaskLambdaSpinCorr {
tagb = 0;
taga2 = 0;
fillHistograms(taga, tagb, taga2, tagb2, lambdaAntiLambdapair, lambdadummy, antiLambdadummy2, proton, antiProton2, centrality, 0);
fillHistograms2(taga, tagb, taga2, tagb2, lambdaAntiLambdapair, lambdadummy, antiLambdadummy2, proton, antiProton2, centrality, 0);
}

tagb = aLambdaTag;
Expand All @@ -463,6 +526,7 @@ struct LfTaskLambdaSpinCorr {
taga = 0;
taga2 = 0;
fillHistograms(taga, tagb, taga2, tagb2, antiLambdaAntiLambdapair, antiLambdadummy, antiLambdadummy2, antiProton, antiProton2, centrality, 0);
fillHistograms2(taga, tagb, taga2, tagb2, antiLambdaAntiLambdapair, antiLambdadummy, antiLambdadummy2, antiProton, antiProton2, centrality, 0);
}
}
}
Expand Down Expand Up @@ -565,6 +629,7 @@ struct LfTaskLambdaSpinCorr {
tagb = 0;
tagb2 = 0;
fillHistograms(taga, tagb, taga2, tagb2, lambdaLambdapair, lambdadummy, lambdadummy2, proton, proton2, centrality, 0);
fillHistograms2(taga, tagb, taga2, tagb2, lambdaLambdapair, lambdadummy, lambdadummy2, proton, proton2, centrality, 0);
}

tagb2 = aLambdaTag2;
Expand All @@ -574,6 +639,7 @@ struct LfTaskLambdaSpinCorr {
tagb = 0;
taga2 = 0;
fillHistograms(taga, tagb, taga2, tagb2, lambdaAntiLambdapair, lambdadummy, antiLambdadummy2, proton, antiProton2, centrality, 0);
fillHistograms2(taga, tagb, taga2, tagb2, lambdaAntiLambdapair, lambdadummy, antiLambdadummy2, proton, antiProton2, centrality, 0);
}

tagb = aLambdaTag;
Expand All @@ -584,6 +650,7 @@ struct LfTaskLambdaSpinCorr {
taga = 0;
taga2 = 0;
fillHistograms(taga, tagb, taga2, tagb2, antiLambdaAntiLambdapair, antiLambdadummy, antiLambdadummy2, antiProton, antiProton2, centrality, 0);
fillHistograms2(taga, tagb, taga2, tagb2, antiLambdaAntiLambdapair, antiLambdadummy, antiLambdadummy2, antiProton, antiProton2, centrality, 0);
}
}
}
Expand Down Expand Up @@ -690,16 +757,19 @@ struct LfTaskLambdaSpinCorr {
if (tagamc && taga2mc) {
lambdaLambdapairmc = lambdadummymc + lambdadummy2mc;
fillHistograms(tagamc, tagbmc, taga2mc, tagb2mc, lambdaLambdapairmc, lambdadummymc, lambdadummy2mc, protonmc, proton2mc, centrality, 1);
fillHistograms2(tagamc, tagbmc, taga2mc, tagb2mc, lambdaLambdapairmc, lambdadummymc, lambdadummy2mc, protonmc, proton2mc, centrality, 1);
}

if (tagamc && tagb2mc) {
lambdaAntiLambdapairmc = lambdadummymc + antiLambdadummy2mc;
fillHistograms(tagamc, tagbmc, taga2mc, tagb2mc, lambdaAntiLambdapairmc, lambdadummymc, antiLambdadummy2mc, protonmc, antiProton2mc, centrality, 1);
fillHistograms2(tagamc, tagbmc, taga2mc, tagb2mc, lambdaAntiLambdapairmc, lambdadummymc, antiLambdadummy2mc, protonmc, antiProton2mc, centrality, 1);
}

if (tagbmc && tagb2mc) {
antiLambdaAntiLambdapairmc = antiLambdadummymc + antiLambdadummy2mc;
fillHistograms(tagamc, tagbmc, taga2mc, tagb2mc, antiLambdaAntiLambdapairmc, antiLambdadummymc, antiLambdadummy2mc, antiProtonmc, antiProton2mc, centrality, 1);
fillHistograms2(tagamc, tagbmc, taga2mc, tagb2mc, antiLambdaAntiLambdapairmc, antiLambdadummymc, antiLambdadummy2mc, antiProtonmc, antiProton2mc, centrality, 1);
}
}
}
Expand Down
Loading