Skip to content
Merged
Show file tree
Hide file tree
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
9 changes: 7 additions & 2 deletions PWGLF/DataModel/LFSpincorrelationTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

namespace lambdapair
{
DECLARE_SOA_INDEX_COLUMN(LambdaEvent, lambdaevent);

Check failure on line 38 in PWGLF/DataModel/LFSpincorrelationTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(V0Status, v0Status, int); //! Lambda or Anti-Lambda status
DECLARE_SOA_COLUMN(DoubleStatus, doubleStatus, bool); //! Double status
DECLARE_SOA_COLUMN(V0Cospa, v0Cospa, float); //! V0 Cospa
Expand All @@ -52,6 +52,8 @@
DECLARE_SOA_COLUMN(ProtonPhi, protonPhi, float); //! Proton Phi
DECLARE_SOA_COLUMN(ProtonIndex, protonIndex, int); //! Proton index
DECLARE_SOA_COLUMN(PionIndex, pionIndex, int); //! Pion index
DECLARE_SOA_COLUMN(DcaV0ToPV, dcaV0ToPV, float); //! DCA of V0 to primary vertex

} // namespace lambdapair
DECLARE_SOA_TABLE(LambdaPairs, "AOD", "LAMBDAPAIR",
o2::soa::Index<>,
Expand All @@ -71,7 +73,8 @@
lambdapair::ProtonEta,
lambdapair::ProtonPhi,
lambdapair::ProtonIndex,
lambdapair::PionIndex);
lambdapair::PionIndex,
lambdapair::DcaV0ToPV);

using LambdaPair = LambdaPairs::iterator;

Expand All @@ -88,7 +91,7 @@

namespace lambdapairmc
{
DECLARE_SOA_INDEX_COLUMN(LambdaEventmc, lambdaeventmc);

Check failure on line 94 in PWGLF/DataModel/LFSpincorrelationTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(V0Statusmc, v0Statusmc, int); //! Lambda or Anti-Lambda status in montecarlo
DECLARE_SOA_COLUMN(DoubleStatusmc, doubleStatusmc, bool); //! Double status in montecarlo
DECLARE_SOA_COLUMN(V0Cospamc, v0Cospamc, float); //! V0 Cospa in montecarlo
Expand All @@ -105,6 +108,7 @@
DECLARE_SOA_COLUMN(ProtonPhimc, protonPhimc, float); //! Proton Phi in montecarlo
DECLARE_SOA_COLUMN(ProtonIndexmc, protonIndexmc, int); //! Proton index in montecarlo
DECLARE_SOA_COLUMN(PionIndexmc, pionIndexmc, int); //! Pion index in montecarlo
DECLARE_SOA_COLUMN(DcaV0ToPVmc, dcaV0ToPVmc, float); //! DCA of V0 to primary vertex
} // namespace lambdapairmc
DECLARE_SOA_TABLE(LambdaPairmcs, "AOD", "LAMBDAPAIRMC",
o2::soa::Index<>,
Expand All @@ -124,7 +128,8 @@
lambdapairmc::ProtonEtamc,
lambdapairmc::ProtonPhimc,
lambdapairmc::ProtonIndexmc,
lambdapairmc::PionIndexmc);
lambdapairmc::PionIndexmc,
lambdapairmc::DcaV0ToPVmc);

using LambdaPairmc = LambdaPairmcs::iterator;

Expand Down
13 changes: 10 additions & 3 deletions PWGLF/TableProducer/Strangeness/lambdaspincorrelation.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGLF/TableProducer/Strangeness/lambdaspincorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -298,6 +298,7 @@
std::vector<int> positiveIndex = {};
std::vector<int> negativeIndex = {};
std::vector<float> dcaBetweenDaughter = {};
std::vector<float> dcaV0ToPV = {};
int numbV0 = 0;
// LOGF(info, "event collisions: (%d)", collision.index());
auto centrality = collision.centFT0C();
Expand Down Expand Up @@ -355,6 +356,7 @@
positiveIndex.push_back(postrack1.globalIndex());
negativeIndex.push_back(negtrack1.globalIndex());
v0Cospa.push_back(v0.v0cosPA());
dcaV0ToPV.push_back(std::abs(v0.dcav0topv()));
v0Radius.push_back(v0.v0radius());
dcaPositive.push_back(std::abs(v0.dcapostopv()));
dcaNegative.push_back(std::abs(v0.dcanegtopv()));
Expand Down Expand Up @@ -391,7 +393,7 @@
lambdaDummy = lambdaMother.at(i5);
protonDummy = protonDaughter.at(i5);
pionDummy = pionDaughter.at(i5);
lambdaPair(indexEvent, v0Status.at(i5), doubleStatus.at(i5), v0Cospa.at(i5), v0Radius.at(i5), dcaPositive.at(i5), dcaNegative.at(i5), dcaBetweenDaughter.at(i5), lambdaDummy.Pt(), lambdaDummy.Eta(), lambdaDummy.Phi(), lambdaDummy.M(), protonDummy.Pt(), protonDummy.Eta(), protonDummy.Phi(), positiveIndex.at(i5), negativeIndex.at(i5));
lambdaPair(indexEvent, v0Status.at(i5), doubleStatus.at(i5), v0Cospa.at(i5), v0Radius.at(i5), dcaPositive.at(i5), dcaNegative.at(i5), dcaBetweenDaughter.at(i5), lambdaDummy.Pt(), lambdaDummy.Eta(), lambdaDummy.Phi(), lambdaDummy.M(), protonDummy.Pt(), protonDummy.Eta(), protonDummy.Phi(), positiveIndex.at(i5), negativeIndex.at(i5), dcaV0ToPV.at(i5));
}
}
}
Expand All @@ -410,6 +412,7 @@
std::vector<int> positiveIndex = {};
std::vector<int> negativeIndex = {};
std::vector<float> dcaBetweenDaughter = {};
std::vector<float> dcaV0ToPV = {};
int numbV0 = 0;
// LOGF(info, "event collisions: (%d)", collision.index());
auto centrality = collision.centFT0C();
Expand Down Expand Up @@ -444,7 +447,7 @@
}
if (lambdaTag && aLambdaTag) {
doubleStatus.push_back(true);
if (std::abs(v0.mLambda() - 1.1154) < std::abs(v0.mAntiLambda() - 1.1154)) {

Check failure on line 450 in PWGLF/TableProducer/Strangeness/lambdaspincorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-mass]

Avoid hard-coded particle masses. Use o2::constants::physics::Mass... instead.
lambdaTag = true;
aLambdaTag = false;
} else {
Expand All @@ -470,6 +473,7 @@
dcaPositive.push_back(std::abs(v0.dcapostopv()));
dcaNegative.push_back(std::abs(v0.dcanegtopv()));
dcaBetweenDaughter.push_back(std::abs(v0.dcaV0daughters()));
dcaV0ToPV.push_back(std::abs(v0.dcav0topv()));
if (lambdaTag) {
v0Status.push_back(0);
proton = ROOT::Math::PxPyPzMVector(v0.pxpos(), v0.pypos(), v0.pzpos(), o2::constants::physics::MassProton);
Expand Down Expand Up @@ -502,7 +506,7 @@
lambdaDummy = lambdaMother.at(i5);
protonDummy = protonDaughter.at(i5);
pionDummy = pionDaughter.at(i5);
lambdaPairmc(indexEvent, v0Status.at(i5), doubleStatus.at(i5), v0Cospa.at(i5), v0Radius.at(i5), dcaPositive.at(i5), dcaNegative.at(i5), dcaBetweenDaughter.at(i5), lambdaDummy.Pt(), lambdaDummy.Eta(), lambdaDummy.Phi(), lambdaDummy.M(), protonDummy.Pt(), protonDummy.Eta(), protonDummy.Phi(), positiveIndex.at(i5), negativeIndex.at(i5));
lambdaPairmc(indexEvent, v0Status.at(i5), doubleStatus.at(i5), v0Cospa.at(i5), v0Radius.at(i5), dcaPositive.at(i5), dcaNegative.at(i5), dcaBetweenDaughter.at(i5), lambdaDummy.Pt(), lambdaDummy.Eta(), lambdaDummy.Phi(), lambdaDummy.M(), protonDummy.Pt(), protonDummy.Eta(), protonDummy.Phi(), positiveIndex.at(i5), negativeIndex.at(i5), dcaV0ToPV.at(i5));
}
}
}
Expand Down Expand Up @@ -530,6 +534,7 @@
std::vector<int> positiveIndex = {};
std::vector<int> negativeIndex = {};
std::vector<float> dcaBetweenDaughter = {};
std::vector<float> dcaV0ToPV = {};
int numbV0 = 0;

auto centrality = collision.centFT0C();
Expand Down Expand Up @@ -610,6 +615,7 @@
negativeIndex.push_back(negtrack1.globalIndex());

v0Cospa.push_back(v0.v0cosPA());
dcaV0ToPV.push_back(std::abs(v0.dcav0topv()));
v0Radius.push_back(v0.v0radius());
dcaPositive.push_back(std::abs(v0.dcapostopv()));
dcaNegative.push_back(std::abs(v0.dcanegtopv()));
Expand Down Expand Up @@ -695,7 +701,8 @@
protonDummy.Eta(),
protonDummy.Phi(),
positiveIndex.at(i5),
negativeIndex.at(i5));
negativeIndex.at(i5),
dcaV0ToPV.at(i5));
}
}
}
Expand Down
Loading
Loading