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
21 changes: 14 additions & 7 deletions PWGLF/DataModel/LFCKSSpinalignmentTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
namespace kshortpionevent
{
DECLARE_SOA_COLUMN(Cent, cent, float);
DECLARE_SOA_COLUMN(Posz, posz, float);
DECLARE_SOA_COLUMN(CollIndex, collIndex, float);
DECLARE_SOA_COLUMN(PsiFT0C, psiFT0C, float);
DECLARE_SOA_COLUMN(PsiFT0A, psiFT0A, float);
Expand All @@ -41,6 +42,7 @@
DECLARE_SOA_TABLE(KShortpionEvents, "AOD", "KSHORTPIONEVENT",
o2::soa::Index<>,
kshortpionevent::Cent,
kshortpionevent::Posz,
kshortpionevent::CollIndex,
kshortpionevent::PsiFT0C,
kshortpionevent::PsiFT0A,
Expand All @@ -49,7 +51,7 @@

namespace kshortpionpair
{
DECLARE_SOA_INDEX_COLUMN(KShortpionEvent, kshortpionevent);

Check failure on line 54 in PWGLF/DataModel/LFCKSSpinalignmentTables.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(V0Cospa, v0Cospa, float); //! V0 Cospa
DECLARE_SOA_COLUMN(V0Radius, v0Radius, float); //! V0 Radius
DECLARE_SOA_COLUMN(DcaPositive, dcaPositive, float); //! DCA Positive
Expand All @@ -63,15 +65,14 @@
DECLARE_SOA_COLUMN(PionBachPx, pionBachPx, float); //! Bachelor Pion Px
DECLARE_SOA_COLUMN(PionBachPy, pionBachPy, float); //! Bachelor Pion Py
DECLARE_SOA_COLUMN(PionBachPz, pionBachPz, float); //! Bachelor Pion Pz
DECLARE_SOA_COLUMN(PionBachSign, pionBachSign, int); //! Bachelor Pion Sign
DECLARE_SOA_COLUMN(PionBachTPC, pionBachTPC, float); //! Bachelor Pion nsigmatpc
DECLARE_SOA_COLUMN(PionBachTOFHit, pionBachTOFHit, int); //! Bachelor Pion tof hit availability
DECLARE_SOA_COLUMN(PionBachTOF, pionBachTOF, float); //! Bachelor Pion nsigmatof
DECLARE_SOA_COLUMN(PionBachIndex, pionBachIndex, int); //! Bachelor Pion index
DECLARE_SOA_COLUMN(PionIndex1, pionIndex1, int); //! Daughter Pion index1
DECLARE_SOA_COLUMN(PionIndex2, pionIndex2, int); //! Daughter Pion index2
} // namespace kshortpionpair
DECLARE_SOA_TABLE(KShortpionPairs, "AOD", "KSHORTPIONPAIR",
DECLARE_SOA_TABLE(KShortTracks, "AOD", "KSHORTTRACK",
o2::soa::Index<>,
kshortpionpair::KShortpionEventId,
kshortpionpair::V0Cospa,
Expand All @@ -85,17 +86,23 @@
kshortpionpair::KShortPy,
kshortpionpair::KShortPz,
kshortpionpair::KShortMass,
kshortpionpair::PionIndex1,
kshortpionpair::PionIndex2);

using KShortTrack = KShortTracks::iterator;

DECLARE_SOA_TABLE(PionTracks, "AOD", "PIONTRACK",
o2::soa::Index<>,
kshortpionpair::KShortpionEventId,
kshortpionpair::PionBachPx,
kshortpionpair::PionBachPy,
kshortpionpair::PionBachPz,
kshortpionpair::PionBachSign,
// kshortpionpair::PionBachSign,
kshortpionpair::PionBachTPC,
kshortpionpair::PionBachTOFHit,
kshortpionpair::PionBachTOF,
kshortpionpair::PionBachIndex,
kshortpionpair::PionIndex1,
kshortpionpair::PionIndex2);
kshortpionpair::PionBachIndex);

using KShortpionPair = KShortpionPairs::iterator;
using PionTrack = PionTracks::iterator;
} // namespace o2::aod
#endif // PWGLF_DATAMODEL_LFCKSSPINALIGNMENTTABLES_H_
84 changes: 46 additions & 38 deletions PWGLF/TableProducer/Resonances/cksspinalignment.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/Resonances/cksspinalignment.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 @@ -57,10 +57,11 @@
using std::array;
using namespace o2::aod::rctsel;

struct cksspinalignment {

Check failure on line 60 in PWGLF/TableProducer/Resonances/cksspinalignment.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/struct]

Use UpperCamelCase for names of structs.

Produces<aod::KShortpionEvents> kshortpionEvent;
Produces<aod::KShortpionPairs> kshortpionPair;
Produces<aod::KShortTracks> kshortTrack;
Produces<aod::PionTracks> pionTrack;

Service<o2::ccdb::BasicCCDBManager> ccdb;

Expand Down Expand Up @@ -279,14 +280,14 @@
std::vector<float> v0Lifetime = {};
// std::vector<float> armenteros = {};
std::vector<float> pionBachelorIndex = {};
std::vector<float> pionBachelorSign = {};
// std::vector<float> pionBachelorSign = {};
std::vector<float> pionBachelorTPC = {};
std::vector<float> pionBachelorTOF = {};
std::vector<float> pionBachelorTOFHit = {};

int numbV0 = 0;
auto centrality = collision.centFT0C();
// auto vz = collision.posZ();
auto vz = collision.posZ();
int occupancy = collision.trackOccupancyInTimeRange();
auto psiFT0C = collision.psiFT0C();
auto psiFT0A = collision.psiFT0A();
Expand Down Expand Up @@ -318,6 +319,8 @@

auto track1ID = track1.globalIndex();
auto track1sign = track1.sign();
if (track1sign == 0)
continue;
auto track1nsigTPC = track1.tpcNSigmaPi();
auto track1nsigTOF = -999.9;
auto track1TOFHit = -1;
Expand All @@ -327,52 +330,57 @@
histos.fill(HIST("hTrkSelInfo"), 4.5);
}
pionbach = ROOT::Math::PxPyPzMVector(track1.px(), track1.py(), track1.pz(), o2::constants::physics::MassPionCharged);
for (const auto& v0 : V0s) {
histos.fill(HIST("hV0Info"), 0.5);
auto [kshortTag, isValid] = getK0sTags(v0, collision);
if (kshortTag && isValid) {
histos.fill(HIST("hV0Info"), 1.5);
auto postrack1 = v0.template posTrack_as<AllTrackCandidates>();
auto negtrack1 = v0.template negTrack_as<AllTrackCandidates>();
positiveIndex.push_back(postrack1.globalIndex());
negativeIndex.push_back(negtrack1.globalIndex());
v0Cospa.push_back(v0.v0cosPA());
v0Radius.push_back(v0.v0radius());
dcaPositive.push_back(std::abs(v0.dcapostopv()));
dcaNegative.push_back(std::abs(v0.dcanegtopv()));
dcaBetweenDaughter.push_back(std::abs(v0.dcaV0daughters()));
v0Lifetime.push_back(v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * (o2::constants::physics::MassK0));
// armenteros.push_back((v0.qtarm() / std::abs(v0.alpha())));

pion = ROOT::Math::PxPyPzMVector(v0.pxpos(), v0.pypos(), v0.pzpos(), o2::constants::physics::MassPionCharged);
antiPion = ROOT::Math::PxPyPzMVector(v0.pxneg(), v0.pyneg(), v0.pzneg(), o2::constants::physics::MassPionCharged);
kshort = pion + antiPion;
// chargedkstar = kshort + pionbach;
kshortMother.push_back(kshort);
// chargedkstarMother.push_back(chargedkstar);
pionBachelor.push_back(pionbach);
pionBachelorIndex.push_back(track1ID);
pionBachelorSign.push_back(track1sign);
pionBachelorTPC.push_back(track1nsigTPC);
pionBachelorTOF.push_back(track1nsigTOF);
pionBachelorTOFHit.push_back(track1TOFHit);
histos.fill(HIST("hKShortMass"), kshort.M());
}
numbV0 = numbV0 + 1;
pionBachelor.push_back(pionbach);
pionBachelorIndex.push_back(track1ID);
// pionBachelorSign.push_back(track1sign);
pionBachelorTPC.push_back(track1nsigTPC);
pionBachelorTOF.push_back(track1nsigTOF);
pionBachelorTOFHit.push_back(track1TOFHit);
}
for (const auto& v0 : V0s) {
histos.fill(HIST("hV0Info"), 0.5);
auto [kshortTag, isValid] = getK0sTags(v0, collision);
if (kshortTag && isValid) {
histos.fill(HIST("hV0Info"), 1.5);
auto postrack1 = v0.template posTrack_as<AllTrackCandidates>();
auto negtrack1 = v0.template negTrack_as<AllTrackCandidates>();
positiveIndex.push_back(postrack1.globalIndex());
negativeIndex.push_back(negtrack1.globalIndex());
v0Cospa.push_back(v0.v0cosPA());
v0Radius.push_back(v0.v0radius());
dcaPositive.push_back(std::abs(v0.dcapostopv()));
dcaNegative.push_back(std::abs(v0.dcanegtopv()));
dcaBetweenDaughter.push_back(std::abs(v0.dcaV0daughters()));
v0Lifetime.push_back(v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * (o2::constants::physics::MassK0));
// armenteros.push_back((v0.qtarm() / std::abs(v0.alpha())));

pion = ROOT::Math::PxPyPzMVector(v0.pxpos(), v0.pypos(), v0.pzpos(), o2::constants::physics::MassPionCharged);
antiPion = ROOT::Math::PxPyPzMVector(v0.pxneg(), v0.pyneg(), v0.pzneg(), o2::constants::physics::MassPionCharged);
kshort = pion + antiPion;
// chargedkstar = kshort + pionbach;
kshortMother.push_back(kshort);
// chargedkstarMother.push_back(chargedkstar);
histos.fill(HIST("hKShortMass"), kshort.M());
}
numbV0 = numbV0 + 1;
}
if (numbV0 > 1 && v0Cospa.size() > 1) {
histos.fill(HIST("hEvtSelInfo"), 3.5);
kshortpionEvent(centrality, collision.index(), psiFT0C, psiFT0A, psiTPC);
kshortpionEvent(centrality, vz, collision.index(), psiFT0C, psiFT0A, psiTPC);
auto indexEvent = kshortpionEvent.lastIndex();
//// Fill track table for Charged KStar//////////////////
for (auto icks = kshortMother.begin(); icks != kshortMother.end(); ++icks) {
auto iter = std::distance(kshortMother.begin(), icks);
kshortDummy = kshortMother.at(iter);
// chargedkstarDummy = chargedkstarMother.at(iter);
pionDummy = pionBachelor.at(iter);

kshortpionPair(indexEvent, v0Cospa.at(iter), v0Radius.at(iter), dcaPositive.at(iter), dcaNegative.at(iter), dcaBetweenDaughter.at(iter), v0Lifetime.at(iter), kshortDummy.Px(), kshortDummy.Py(), kshortDummy.Pz(), kshortDummy.M(), pionDummy.Px(), pionDummy.Py(), pionDummy.Pz(), pionBachelorSign.at(iter), pionBachelorTPC.at(iter), pionBachelorTOFHit.at(iter), pionBachelorTOF.at(iter), pionBachelorIndex.at(iter), positiveIndex.at(iter), negativeIndex.at(iter));
kshortTrack(indexEvent, v0Cospa.at(iter), v0Radius.at(iter), dcaPositive.at(iter), dcaNegative.at(iter), dcaBetweenDaughter.at(iter), v0Lifetime.at(iter), kshortDummy.Px(), kshortDummy.Py(), kshortDummy.Pz(), kshortDummy.M(), positiveIndex.at(iter), negativeIndex.at(iter));
}
for (auto ipi = pionBachelor.begin(); ipi != pionBachelor.end(); ++ipi) {
auto iterpi = std::distance(pionBachelor.begin(), ipi);
pionDummy = pionBachelor.at(iterpi);

pionTrack(indexEvent, pionDummy.Px(), pionDummy.Py(), pionDummy.Pz(), pionBachelorTPC.at(iterpi), pionBachelorTOFHit.at(iterpi), pionBachelorTOF.at(iterpi), pionBachelorIndex.at(iterpi));
}
}
}
Expand Down
7 changes: 6 additions & 1 deletion PWGLF/Tasks/Resonances/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(cksspinalignder
SOURCES cksspinalignder.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(k892analysis
SOURCES k892analysis.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
Expand Down Expand Up @@ -54,7 +59,7 @@
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(lambda1520analysisinoo

Check failure on line 62 in PWGLF/Tasks/Resonances/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name lambda1520analysisinoo does not match its file name lambda1520analysisinOO.cxx. (Matches lambda1520analysisinoo.cxx.)
SOURCES lambda1520analysisinOO.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)
Expand All @@ -64,7 +69,7 @@
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(k1analysismicro

Check failure on line 72 in PWGLF/Tasks/Resonances/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name k1analysismicro does not match its file name k1AnalysisMicro.cxx. (Matches k1analysismicro.cxx.)
SOURCES k1AnalysisMicro.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)
Expand All @@ -84,12 +89,12 @@
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(lambda1520spherocityanalysis

Check failure on line 92 in PWGLF/Tasks/Resonances/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name lambda1520spherocityanalysis does not match its file name lambda1520SpherocityAnalysis.cxx. (Matches lambda1520spherocityanalysis.cxx.)
SOURCES lambda1520SpherocityAnalysis.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(delta-analysis

Check failure on line 97 in PWGLF/Tasks/Resonances/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name delta-analysis does not match its file name deltaanalysis.cxx. (Matches deltaAnalysis.cxx.)
SOURCES deltaanalysis.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)
Expand All @@ -99,7 +104,7 @@
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(phi-analysis-thnsparse

Check failure on line 107 in PWGLF/Tasks/Resonances/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name phi-analysis-thnsparse does not match its file name phianalysisTHnSparse.cxx. (Matches phiAnalysisThnsparse.cxx.)
SOURCES phianalysisTHnSparse.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)
Expand All @@ -114,12 +119,12 @@
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(lambda1520-pbpb

Check failure on line 122 in PWGLF/Tasks/Resonances/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name lambda1520-pbpb does not match its file name lambda1520_PbPb.cxx. (Matches lambda1520Pbpb.cxx.)
SOURCES lambda1520_PbPb.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(kshortkshort

Check failure on line 127 in PWGLF/Tasks/Resonances/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name kshortkshort does not match its file name higherMassResonances.cxx. (Matches kshortkshort.cxx.)
SOURCES higherMassResonances.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)
Expand Down Expand Up @@ -237,4 +242,4 @@
o2physics_add_dpl_workflow(phioo
SOURCES phiOO.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)
COMPONENT_NAME Analysis)
Loading
Loading