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
3 changes: 3 additions & 0 deletions PWGLF/DataModel/LFHyperNucleiKinkTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ namespace o2::aod

namespace hyperkink
{
DECLARE_SOA_COLUMN(MagPolarity, magPolarity, int8_t); //! Magnetic field polarity
DECLARE_SOA_COLUMN(XPV, xPV, float); //! Primary vertex of the candidate (x direction)
DECLARE_SOA_COLUMN(YPV, yPV, float); //! Primary vertex of the candidate (y direction)
DECLARE_SOA_COLUMN(ZPV, zPV, float); //! Primary vertex of the candidate (z direction)
Expand Down Expand Up @@ -82,6 +83,7 @@ DECLARE_SOA_COLUMN(UpdatePzMothPV, updatePzMothPV, float); //! updated pz o

DECLARE_SOA_TABLE(HypKinkCand, "AOD", "HYPKINKCANDS",
o2::soa::Index<>,
hyperkink::MagPolarity,
hyperkink::XPV, hyperkink::YPV, hyperkink::ZPV,
hyperkink::XSV, hyperkink::YSV, hyperkink::ZSV,
hyperkink::IsMatter,
Expand All @@ -96,6 +98,7 @@ DECLARE_SOA_TABLE(HypKinkCand, "AOD", "HYPKINKCANDS",

DECLARE_SOA_TABLE(MCHypKinkCand, "AOD", "MCHYPKINKCANDS",
o2::soa::Index<>,
hyperkink::MagPolarity,
hyperkink::XPV, hyperkink::YPV, hyperkink::ZPV,
hyperkink::XSV, hyperkink::YSV, hyperkink::ZSV,
hyperkink::IsMatter,
Expand Down
8 changes: 8 additions & 0 deletions PWGLF/TableProducer/Common/kinkBuilder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
struct kinkBuilder {

enum PartType { kSigmaMinus = 0,
kHypertriton,
kHyperhelium4sigma };

Produces<aod::KinkCands> outputDataTable;
Expand Down Expand Up @@ -161,6 +162,11 @@
mothMass = o2::constants::physics::MassSigmaMinus;
chargedDauMass = o2::constants::physics::MassPiMinus;
neutDauMass = o2::constants::physics::MassNeutron;
} else if (hypoMoth == kHypertriton) {
charge = 1;
mothMass = o2::constants::physics::MassHyperTriton;
chargedDauMass = o2::constants::physics::MassTriton;
neutDauMass = o2::constants::physics::MassPi0;
} else if (hypoMoth == kHyperhelium4sigma) {
charge = 2;
mothMass = o2::constants::physics::MassHyperHelium4;
Expand Down Expand Up @@ -199,6 +205,8 @@
AxisSpec massAxis(100, 1.1, 1.4, "m (GeV/#it{c}^{2})");
if (hypoMoth == kSigmaMinus) {
massAxis = AxisSpec{100, 1.1, 1.4, "m (GeV/#it{c}^{2})"};
} else if (hypoMoth == kHypertriton) {
massAxis = AxisSpec{100, 2.94, 3.2, "m (GeV/#it{c}^{2})"};
} else if (hypoMoth == kHyperhelium4sigma) {
massAxis = AxisSpec{100, 3.85, 4.25, "m (GeV/#it{c}^{2})"};
}
Expand All @@ -209,7 +217,7 @@
h2ClsMapPtMoth = qaRegistry.add<TH2>("h2ClsMapPtMoth", "; p_{T} (GeV/#it{c}); ITS cluster map", HistType::kTH2F, {ptAxis, itsClusterMapAxis});
h2ClsMapPtDaug = qaRegistry.add<TH2>("h2ClsMapPtDaug", "; p_{T} (GeV/#it{c}); ITS cluster map", HistType::kTH2F, {ptAxis, itsClusterMapAxis});

for (int i = 0; i < 5; i++) {

Check failure on line 220 in PWGLF/TableProducer/Common/kinkBuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
mBBparamsDaug[i] = cfgBetheBlochParams->get("Daughter", Form("p%i", i));
}
mBBparamsDaug[5] = cfgBetheBlochParams->get("Daughter", "resolution");
Expand All @@ -218,8 +226,8 @@
template <typename T>
bool selectMothTrack(const T& candidate)
{
if (candidate.has_collision() && candidate.hasITS() && !candidate.hasTPC() && !candidate.hasTOF() && candidate.itsNCls() < 6 &&

Check failure on line 229 in PWGLF/TableProducer/Common/kinkBuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
candidate.itsNClsInnerBarrel() == 3 && candidate.itsChi2NCl() < 36 && candidate.pt() > minPtMoth) {

Check failure on line 230 in PWGLF/TableProducer/Common/kinkBuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return true;
}
return false;
Expand All @@ -237,8 +245,8 @@
}

bool isGoodTPCCand = false;
if (candidate.itsNClsInnerBarrel() == 0 && candidate.itsNCls() < 4 &&

Check failure on line 248 in PWGLF/TableProducer/Common/kinkBuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
candidate.tpcNClsCrossedRows() > 0.8 * candidate.tpcNClsFindable() && candidate.tpcNClsFound() > nTPCClusMinDaug) {

Check failure on line 249 in PWGLF/TableProducer/Common/kinkBuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
isGoodTPCCand = true;
}

Expand Down Expand Up @@ -349,13 +357,13 @@

// get last layer hitted by the mother and the first layer hitted by the daughter
int lastLayerMoth = 0, firstLayerDaug = 0;
for (int i = 0; i < 7; i++) {

Check failure on line 360 in PWGLF/TableProducer/Common/kinkBuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
if (trackMoth.itsClusterMap() & (1 << i)) {
lastLayerMoth = i;
}
}

for (int i = 0; i < 7; i++) {

Check failure on line 366 in PWGLF/TableProducer/Common/kinkBuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
if (trackDaug.itsClusterMap() & (1 << i)) {
firstLayerDaug = i;
break;
Expand All @@ -370,13 +378,13 @@
continue;
}

for (int i = 0; i < 3; i++) {

Check failure on line 381 in PWGLF/TableProducer/Common/kinkBuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
kinkCand.decVtx[i] -= kinkCand.primVtx[i];
}

propMothTrack.getPxPyPzGlo(kinkCand.momMoth);
propDaugTrack.getPxPyPzGlo(kinkCand.momDaug);
for (int i = 0; i < 3; i++) {

Check failure on line 387 in PWGLF/TableProducer/Common/kinkBuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
kinkCand.momMoth[i] *= charge;
kinkCand.momDaug[i] *= charge;
}
Expand All @@ -386,7 +394,7 @@
kinkCand.kinkAngle = std::acos(spKink / (pMoth * pDaug));

std::array<float, 3> neutDauMom{0.f, 0.f, 0.f};
for (int i = 0; i < 3; i++) {

Check failure on line 397 in PWGLF/TableProducer/Common/kinkBuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
neutDauMom[i] = kinkCand.momMoth[i] - kinkCand.momDaug[i];
}

Expand Down
4 changes: 2 additions & 2 deletions PWGLF/TableProducer/Nuspex/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ o2physics_add_dpl_workflow(nuclei-flow-trees
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DetectorsBase O2Physics::EventFilteringUtils
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(hyperhelium4sigma-reco-task
SOURCES hyperhelium4sigmaRecoTask.cxx
o2physics_add_dpl_workflow(hyperkink-reco-task
SOURCES hyperkinkRecoTask.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

Expand Down
Loading
Loading