Skip to content
Closed
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
35 changes: 17 additions & 18 deletions PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@

#include <Math/GenVector/Boost.h>
#include <Math/Vector4D.h>
#include <TDatabasePDG.h> // FIXME

Check failure on line 43 in PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/database]

Do not use TDatabasePDG directly. Use o2::constants::physics::Mass... or Service<o2::framework::O2DatabasePDG> instead.
#include <TMath.h>
#include <TPDGCode.h> // FIXME

#include <fairlogger/Logger.h>

#include <iostream>

Check failure on line 49 in PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <iterator>
#include <map>
#include <string>
Expand Down Expand Up @@ -163,7 +163,7 @@
{"hInvMassf1kstar", "hInvMassf1kstar", {HistType::kTH3F, {{400, 1.1f, 1.9f}, {100, 0.0f, 10.0f}, {8, 0.0f, 0.8f}}}},
{"hkstarDist", "hkstarDist", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}},
{"hDCAxy", "hDCAxy", {HistType::kTH3F, {{100, -0.05f, 0.05f}, {5, -2.5, 2.5}, {40, 0.0, 4.0}}}},
{"hDCAz", "hDCAz", {HistType::kTH3F, {{100, -0.05f, 0.05f}, {2, 0, 2}, {40, 0.0, 4.0}}}},
{"hDCAz", "hDCAz", {HistType::kTH3F, {{100, -0.05f, 0.05f}, {2, 0, 2}, {40, 0.0, 4.0}}}},
{"hPhi", "hPhi", {HistType::kTH1F, {{1400, -7.0f, 7.0f}}}},
{"hPhiSphero", "hPhiSphero", {HistType::kTH1F, {{1400, -7.0f, 7.0f}}}},
{"hEta", "hEta", {HistType::kTH1F, {{20, -1.0f, 1.0f}}}},
Expand Down Expand Up @@ -369,17 +369,16 @@
return false;
}


const float nsTPC = nsigmaTPC;
const float nsTOF = nsigmaTOF;
const float comb = std::sqrt(nsTPC * nsTPC + nsTOF * nsTOF);
return (comb < 2.5);
}

template <typename Collision, typename V0>
bool SelectionV0(Collision const& collision, V0 const& candidate)
{
if (fabs(candidate.dcav0topv()) > cMaxV0DCA) {

Check failure on line 381 in PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return false;
}

Expand All @@ -389,7 +388,7 @@
const float dcaDaughv0 = candidate.dcaV0daughters();
const float cpav0 = candidate.v0cosPA();

float CtauK0s = candidate.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * TDatabasePDG::Instance()->GetParticle(kK0Short)->Mass(); // FIXME: Get from the common header

Check failure on line 391 in PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/database]

Do not use TDatabasePDG directly. Use o2::constants::physics::Mass... or Service<o2::framework::O2DatabasePDG> instead.
float lowmasscutks0 = 0.497 - 2.0 * cSigmaMassKs0;
float highmasscutks0 = 0.497 + 2.0 * cSigmaMassKs0;

Expand All @@ -413,7 +412,7 @@
return false;
}
}
if (fabs(CtauK0s) > cMaxV0LifeTime || candidate.mK0Short() < lowmasscutks0 || candidate.mK0Short() > highmasscutks0) {

Check failure on line 415 in PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return false;
}
return true;
Expand Down Expand Up @@ -516,10 +515,10 @@

std::vector<double> BBProton, BBAntiproton, BBPion, BBAntipion, BBKaon, BBAntikaon;
ROOT::Math::PtEtaPhiMVector F1Vector, F1VectorDummy, F1d1dummy, F1d2dummy, F1d3dummy, KKs0Vector, ProtonVectorDummy, ProtonVectorDummy2;
double massPi = TDatabasePDG::Instance()->GetParticle(kPiPlus)->Mass(); // FIXME: Get from the common header

Check failure on line 518 in PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/database]

Do not use TDatabasePDG directly. Use o2::constants::physics::Mass... or Service<o2::framework::O2DatabasePDG> instead.
double massKa = TDatabasePDG::Instance()->GetParticle(kKPlus)->Mass(); // FIXME: Get from the common header

Check failure on line 519 in PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/database]

Do not use TDatabasePDG directly. Use o2::constants::physics::Mass... or Service<o2::framework::O2DatabasePDG> instead.
double massPr = TDatabasePDG::Instance()->GetParticle(kProton)->Mass(); // FIXME: Get from the common header

Check failure on line 520 in PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/database]

Do not use TDatabasePDG directly. Use o2::constants::physics::Mass... or Service<o2::framework::O2DatabasePDG> instead.
double massK0s = TDatabasePDG::Instance()->GetParticle(kK0Short)->Mass(); // FIXME: Get from the common header

Check failure on line 521 in PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/database]

Do not use TDatabasePDG directly. Use o2::constants::physics::Mass... or Service<o2::framework::O2DatabasePDG> instead.

double massF1{0.};
double masskKs0{0.};
Expand Down Expand Up @@ -865,7 +864,7 @@
K0Cpa.push_back(std::abs(v0.v0cosPA()));
K0radius.push_back(std::abs(v0.v0radius()));
K0DcaBetweenDaughters.push_back(std::abs(v0.dcaV0daughters()));
K0LifeTime.push_back(std::abs(v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * TDatabasePDG::Instance()->GetParticle(kK0Short)->Mass()));

Check failure on line 867 in PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/database]

Do not use TDatabasePDG directly. Use o2::constants::physics::Mass... or Service<o2::framework::O2DatabasePDG> instead.
K0Dca.push_back(std::abs(v0.dcav0topv()));
}

Expand Down Expand Up @@ -987,23 +986,23 @@
qaRegistry.fill(HIST("hEventstat"), 0.5);
if (keepEventF1Proton) {
for (auto iproton = protons.begin(); iproton != protons.end(); ++iproton) {
auto i6 = std::distance(protons.begin(), iproton);
ProtonVectorDummy2 = protons.at(i6);
if (std::abs(ProtonDcaxy.at(i6)) < 0.05 && std::abs(ProtonDcaz.at(i6)) < 0.05) {
if (ProtonTOFHit.at(i6) && ProtonVectorDummy2.P() > 0.7) {
qaRegistry.fill(HIST("hNsigmaPtprotonTPC"),ProtonTPCNsigma.at(i6), ProtonTOFNsigma.at(i6), ProtonVectorDummy2.Pt());
}
if (ProtonVectorDummy2.P() < 0.7) {
qaRegistry.fill(HIST("hNsigmaPtprotonTPC"),ProtonTPCNsigma.at(i6), 4.999, ProtonVectorDummy2.Pt());
}
}
if (passProtonPID(ProtonTPCNsigma.at(i6), ProtonTOFNsigma.at(i6), ProtonTOFHit.at(i6), ProtonVectorDummy2)) {
qaRegistry.fill(HIST("hDCAxy"), ProtonDcaxy.at(i6), ProtonCharge.at(i6), ProtonVectorDummy2.Pt());
qaRegistry.fill(HIST("hDCAz"), ProtonDcaz.at(i6), ProtonCharge.at(i6), ProtonVectorDummy2.Pt());
}
auto i6 = std::distance(protons.begin(), iproton);
ProtonVectorDummy2 = protons.at(i6);
if (std::abs(ProtonDcaxy.at(i6)) < 0.05 && std::abs(ProtonDcaz.at(i6)) < 0.05) {
if (ProtonTOFHit.at(i6) && ProtonVectorDummy2.P() > 0.7) {
qaRegistry.fill(HIST("hNsigmaPtprotonTPC"), ProtonTPCNsigma.at(i6), ProtonTOFNsigma.at(i6), ProtonVectorDummy2.Pt());
}
if (ProtonVectorDummy2.P() < 0.7) {
qaRegistry.fill(HIST("hNsigmaPtprotonTPC"), ProtonTPCNsigma.at(i6), 4.999, ProtonVectorDummy2.Pt());
}
}
if (passProtonPID(ProtonTPCNsigma.at(i6), ProtonTOFNsigma.at(i6), ProtonTOFHit.at(i6), ProtonVectorDummy2)) {
qaRegistry.fill(HIST("hDCAxy"), ProtonDcaxy.at(i6), ProtonCharge.at(i6), ProtonVectorDummy2.Pt());
qaRegistry.fill(HIST("hDCAz"), ProtonDcaz.at(i6), ProtonCharge.at(i6), ProtonVectorDummy2.Pt());
}
}
}

if (numberF1 > 0 && (f1resonance.size() == f1signal.size()) && (f1resonance.size() == f1kaonkshortmass.size()) && (f1resonance.size() == f1resonanced1.size()) && (f1resonance.size() == f1resonanced2.size()) && (f1resonance.size() == f1resonanced3.size())) {
qaRegistry.fill(HIST("hEventstat"), 1.5);
if (keepEventF1Proton) {
Expand Down
8 changes: 5 additions & 3 deletions PWGLF/Tasks/Resonances/f1protoncorrelation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,8 @@ struct f1protoncorrelation {
Kaon.SetXYZM(f1track.f1d2Px(), f1track.f1d2Py(), f1track.f1d2Pz(), 0.493);
Kshort.SetXYZM(f1track.f1d3Px(), f1track.f1d3Py(), f1track.f1d3Pz(), 0.497);
KaonKshortPair = Kaon + Kshort;
if (F1.Pt() < lowPtF1 || F1.Pt() > 50.0) continue;
if (F1.Pt() < lowPtF1 || F1.Pt() > 50.0)
continue;
std::vector<int> activeSys;
activeSys.reserve((size_t)nSysTotal);

Expand Down Expand Up @@ -1055,7 +1056,7 @@ struct f1protoncorrelation {
histos.fill(HIST("hPhaseSpaceProtonKaonSame"), Proton.Eta() - Kaon.Eta(), PhiAtSpecificRadiiTPC(Proton, Kaon, protontrack.protonCharge(), kaonCharge, bz, bz), relative_momentum); // Phase Space Proton kaon
if (pionCharge == protontrack.protonCharge())
histos.fill(HIST("hPhaseSpaceProtonPionSame"), Proton.Eta() - Pion.Eta(), PhiAtSpecificRadiiTPC(Proton, Pion, protontrack.protonCharge(), pionCharge, bz, bz), relative_momentum); // Phase Space Proton Pion
histos.fill(HIST("h2SameEventf1pptCorrelation"), F1.M(), relative_momentum, Proton.Pt());
histos.fill(HIST("h2SameEventf1pptCorrelation"), F1.M(), relative_momentum, Proton.Pt());
}
activePair.push_back(sysId);
}
Expand Down Expand Up @@ -1119,7 +1120,8 @@ struct f1protoncorrelation {
Kshort.SetXYZM(t1.f1d3Px(), t1.f1d3Py(), t1.f1d3Pz(), 0.497);
KaonKshortPair = Kaon + Kshort;
Proton.SetXYZM(t2.protonPx(), t2.protonPy(), t2.protonPz(), 0.938);
if (F1.Pt() < lowPtF1 || F1.Pt() > 50.0) continue;
if (F1.Pt() < lowPtF1 || F1.Pt() > 50.0)
continue;
auto relative_momentum = getkstar(F1, Proton);
auto mT = getmT(F1, Proton);
// sys list for this (F1, p) pair
Expand Down
Loading