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: 30 additions & 4 deletions PWGLF/Tasks/Resonances/heptaquark.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <TMath.h>
#include <TRandom3.h>
#include <fairlogger/Logger.h>
#include <iostream>

Check warning on line 23 in PWGLF/Tasks/Resonances/heptaquark.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <iterator>
#include <string>
#include <vector>
Expand Down Expand Up @@ -80,8 +80,8 @@
histos.add("h_InvMass_rotLambda", "h_InvMass_rotLambda", {HistType::kTH3F, {massAxis, ptAxis, centAxis}});
histos.add("h_InvMass_rotPhiLambda", "h_InvMass_rotPhiLambda", {HistType::kTH3F, {massAxis, ptAxis, centAxis}});

histos.add("hDalitz", "hDalitz", {HistType::kTHnSparseF, {massPPAxis, massPLAxis, massAxis, ptAxis, centAxis}});
histos.add("hDalitzRot", "hDalitzRot", {HistType::kTHnSparseF, {massPPAxis, massPLAxis, massAxis, ptAxis, centAxis}});
histos.add("hDalitz", "hDalitz", {HistType::kTHnSparseF, {massPPAxis, massPLAxis, massAxis, ptAxis, {2, -0.5f, 1.5f}, centAxis}});
histos.add("hDalitzRot", "hDalitzRot", {HistType::kTHnSparseF, {massPPAxis, massPLAxis, massAxis, ptAxis, {2, -0.5f, 1.5f}, centAxis}});
}

double massLambda = o2::constants::physics::MassLambda;
Expand All @@ -95,42 +95,42 @@
{
if (PIDStrategy == 0) {
if (TOFHit != 1) {
if (TMath::Abs(nsigmaTPC) < cutNsigmaTPC) {

Check warning on line 98 in PWGLF/Tasks/Resonances/heptaquark.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 true;
}
}
if (TOFHit == 1) {
if (TMath::Abs(nsigmaTOF) < cutNsigmaTOF) {

Check warning on line 103 in PWGLF/Tasks/Resonances/heptaquark.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 true;
}
}
}
if (PIDStrategy == 1) {
if (ptcand < 0.5) {
if (TOFHit != 1 && TMath::Abs(nsigmaTPC) < cutNsigmaTPC) {

Check warning on line 110 in PWGLF/Tasks/Resonances/heptaquark.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 true;
}
if (TOFHit == 1 && TMath::Abs(nsigmaTOF) < cutNsigmaTOF) {

Check warning on line 113 in PWGLF/Tasks/Resonances/heptaquark.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 true;
}
}
if (ptcand >= 0.5) {
if (TOFHit == 1 && TMath::Abs(nsigmaTOF) < cutNsigmaTOF) {

Check warning on line 118 in PWGLF/Tasks/Resonances/heptaquark.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 true;
}
}
}
if (PIDStrategy == 2) {
if (ptcand < 0.5) {
if (TOFHit != 1 && TMath::Abs(nsigmaTPC) < cutNsigmaTPC) {

Check warning on line 125 in PWGLF/Tasks/Resonances/heptaquark.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 true;
}
if (TOFHit == 1 && TMath::Abs(nsigmaTOF) < cutNsigmaTOF) {

Check warning on line 128 in PWGLF/Tasks/Resonances/heptaquark.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 true;
}
}
if (ptcand >= 0.5 && ptcand < 1.2) {
if (TOFHit == 1 && TMath::Abs(nsigmaTOF) < cutNsigmaTOF) {

Check warning on line 133 in PWGLF/Tasks/Resonances/heptaquark.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 true;
}
if (TOFHit != 1 && nsigmaTPC > -1.5 && nsigmaTPC < cutNsigmaTPC) {
Expand All @@ -138,7 +138,7 @@
}
}
if (ptcand >= 1.2) {
if (TOFHit == 1 && TMath::Abs(nsigmaTOF) < cutNsigmaTOF) {

Check warning on line 141 in PWGLF/Tasks/Resonances/heptaquark.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 true;
}
if (TOFHit != 1 && TMath::Abs(nsigmaTPC) < cutNsigmaTPC) {
Expand Down Expand Up @@ -172,6 +172,30 @@
return false;
}

template <typename V01, typename V02>
ROOT::Math::XYZVector getDCAofV0V0(V01 const& v01, V02 const& v02)
{
ROOT::Math::XYZVector v01pos, v02pos, v01mom, v02mom;
v01pos.SetXYZ(v01.x(), v01.y(), v01.z());
v02pos.SetXYZ(v02.x(), v02.y(), v02.z());
v01mom.SetXYZ(v01.px(), v01.py(), v01.pz());
v02mom.SetXYZ(v02.px(), v02.py(), v02.pz());

ROOT::Math::XYZVector posdiff = v02pos - v01pos;
ROOT::Math::XYZVector cross = v01mom.Cross(v02mom);
ROOT::Math::XYZVector dcaVec = (posdiff.Dot(cross) / cross.Mag2()) * cross;
return dcaVec;
}

template <typename V01, typename V02>
float getCPA(V01 const& v01, V02 const& v02)
{
ROOT::Math::XYZVector v01mom, v02mom;
v01mom.SetXYZ(v01.px() / v01.p(), v01.py() / v01.p(), v01.pz() / v01.p());
v02mom.SetXYZ(v02.px() / v02.p(), v02.py() / v02.p(), v02.pz() / v02.p());
return v01mom.Dot(v02mom);
}

ROOT::Math::PxPyPzMVector DauVec1, DauVec2;

TLorentzVector exotic, HQ1, HQ2, HQ3;
Expand Down Expand Up @@ -257,6 +281,8 @@
if (hqtrackd3.hqMass() < minLambdaMass || hqtrackd3.hqMass() > maxLambdaMass)
continue;

int isLambda = static_cast<int>(hqtrackd3.hqId() < 0);

if (hqtrackd3.hqId() > 0) {
DauVec1 = ROOT::Math::PxPyPzMVector(hqtrackd3.hqd1Px(), hqtrackd3.hqd1Py(), hqtrackd3.hqd1Pz(), massPr);
DauVec2 = ROOT::Math::PxPyPzMVector(hqtrackd3.hqd2Px(), hqtrackd3.hqd2Py(), hqtrackd3.hqd2Pz(), massPi);
Expand Down Expand Up @@ -296,7 +322,7 @@
HQ13 = HQ1 + HQ3;

histos.fill(HIST("h_InvMass_same"), exotic.M(), exotic.Pt(), collision.centrality());
histos.fill(HIST("hDalitz"), HQ12.M2(), HQ13.M2(), exotic.M(), exotic.Pt(), collision.centrality());
histos.fill(HIST("hDalitz"), HQ12.M2(), HQ13.M2(), exotic.M(), exotic.Pt(), isLambda, collision.centrality());

if (cfgRotBkg) {
for (int nr = 0; nr < cfgNRotBkg; nr++) {
Expand All @@ -319,7 +345,7 @@
histos.fill(HIST("h_InvMass_rotPhi"), exoticRot2.M(), exoticRot2.Pt(), collision.centrality());
histos.fill(HIST("h_InvMass_rotLambda"), exoticRot3.M(), exoticRot3.Pt(), collision.centrality());
histos.fill(HIST("h_InvMass_rotPhiLambda"), exoticRot23.M(), exoticRot23.Pt(), collision.centrality());
histos.fill(HIST("hDalitzRot"), HQ12Rot.M2(), HQ13Rot.M2(), exoticRot23.M(), exoticRot23.Pt(), collision.centrality());
histos.fill(HIST("hDalitzRot"), HQ12Rot.M2(), HQ13Rot.M2(), exoticRot23.M(), exoticRot23.Pt(), isLambda, collision.centrality());
}
}
}
Expand Down
Loading