Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PWGLF] bug fix for proton PID selection in f1-proton correlation #9053

Merged
merged 3 commits into from
Dec 18, 2024
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
8 changes: 4 additions & 4 deletions PWGLF/Tasks/Resonances/f1protoncorrelation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <Math/Vector4D.h>
#include <TMath.h>
#include <fairlogger/Logger.h>
#include <iostream>

Check warning on line 22 in PWGLF/Tasks/Resonances/f1protoncorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Including iostream is discouraged. Use O2 logging instead.
#include <iterator>
#include <string>

Expand Down Expand Up @@ -105,7 +105,7 @@
// Process the data in same event
void process(aod::RedF1PEvents::iterator const& /*collision*/, aod::F1Tracks const& f1tracks, aod::ProtonTracks const& protontracks)
{
for (auto f1track : f1tracks) {

Check warning on line 108 in PWGLF/Tasks/Resonances/f1protoncorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (f1track.f1MassKaonKshort() > maxKKS0Mass) {
continue;
}
Expand Down Expand Up @@ -148,10 +148,10 @@
histos.fill(HIST("hNsigmaPionKaonTPC"), f1track.f1d1TPC(), f1track.f1d2TPC());
for (auto protontrack : protontracks) {
Proton.SetXYZM(protontrack.protonPx(), protontrack.protonPy(), protontrack.protonPz(), 0.938);
if (Proton.P() < momentumTOFProton && TMath::Abs(protontrack.protonNsigmaTPC()) > 3) {
if (Proton.P() < momentumTOFProton && TMath::Abs(protontrack.protonNsigmaTPC()) > 2.5) {

Check warning on line 151 in PWGLF/Tasks/Resonances/f1protoncorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
continue;
}
if (Proton.P() >= momentumTOFProton && protontrack.protonTOFHit() != 1 && TMath::Abs(protontrack.protonNsigmaTOF()) > 3) {
if (Proton.P() >= momentumTOFProton && (protontrack.protonTOFHit() != 1 || TMath::Abs(protontrack.protonNsigmaTOF()) > 2.5)) {

Check warning on line 154 in PWGLF/Tasks/Resonances/f1protoncorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
continue;
}
if ((f1track.f1PionIndex() == protontrack.f1ProtonIndex()) || (f1track.f1KaonIndex() == protontrack.f1ProtonIndex()) || (f1track.f1KshortPositiveIndex() == protontrack.f1ProtonIndex()) || (f1track.f1KshortNegativeIndex() == protontrack.f1ProtonIndex())) {
Expand All @@ -170,8 +170,8 @@
}
if (fillRotation) {
for (int nrotbkg = 0; nrotbkg < 9; nrotbkg++) {
auto anglestart = 5.0 * TMath::Pi() / 6.0;

Check warning on line 173 in PWGLF/Tasks/Resonances/f1protoncorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Consider using the PI constant (and its multiples and fractions) defined in o2::constants::math.
auto angleend = 7.0 * TMath::Pi() / 6.0;

Check warning on line 174 in PWGLF/Tasks/Resonances/f1protoncorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Consider using the PI constant (and its multiples and fractions) defined in o2::constants::math.
auto anglestep = (angleend - anglestart) / (1.0 * (9.0 - 1.0));
auto rotangle = anglestart + nrotbkg * anglestep;
auto rotKKPx = KaonKshortPair.Px() * std::cos(rotangle) - KaonKshortPair.Py() * std::sin(rotangle);
Expand Down Expand Up @@ -255,10 +255,10 @@
continue;
}
Proton.SetXYZM(t2.protonPx(), t2.protonPy(), t2.protonPz(), 0.938);
if (Proton.P() < momentumTOFProton && TMath::Abs(t2.protonNsigmaTPC()) > 3) {
if (Proton.P() < momentumTOFProton && TMath::Abs(t2.protonNsigmaTPC()) > 2.5) {

Check warning on line 258 in PWGLF/Tasks/Resonances/f1protoncorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
continue;
}
if (Proton.P() >= momentumTOFProton && t2.protonTOFHit() != 1 && TMath::Abs(t2.protonNsigmaTOF()) > 3) {
if (Proton.P() >= momentumTOFProton && (t2.protonTOFHit() != 1 || TMath::Abs(t2.protonNsigmaTOF()) > 2.5)) {

Check warning on line 261 in PWGLF/Tasks/Resonances/f1protoncorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
continue;
}
auto relative_momentum = getkstar(F1, Proton);
Expand All @@ -270,8 +270,8 @@
}
if (fillRotation) {
for (int nrotbkg = 0; nrotbkg < 9; nrotbkg++) {
auto anglestart = 5.0 * TMath::Pi() / 6.0;

Check warning on line 273 in PWGLF/Tasks/Resonances/f1protoncorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Consider using the PI constant (and its multiples and fractions) defined in o2::constants::math.
auto angleend = 7.0 * TMath::Pi() / 6.0;

Check warning on line 274 in PWGLF/Tasks/Resonances/f1protoncorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Consider using the PI constant (and its multiples and fractions) defined in o2::constants::math.
auto anglestep = (angleend - anglestart) / (1.0 * (9.0 - 1.0));
auto rotangle = anglestart + nrotbkg * anglestep;
auto rotKKPx = KaonKshortPair.Px() * std::cos(rotangle) - KaonKshortPair.Py() * std::sin(rotangle);
Expand Down
Loading