Skip to content
Closed
Changes from 8 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
f4d85b8
[PWGLF] Add the PID option for using TOF
Yunseul-Bae Jun 30, 2025
2b01436
[PWGLF] Apply clang-format
Yunseul-Bae Jun 30, 2025
dd005a4
[PWGLF] Apply O2 linter
Yunseul-Bae Jun 30, 2025
063d268
[PWGLF] O2 linter
Yunseul-Bae Jun 30, 2025
cd2d1a2
Merge branch 'AliceO2Group:master' into main
Yunseul-Bae Jul 2, 2025
0eb5b09
Merge branch 'AliceO2Group:master' into main
Yunseul-Bae Jul 3, 2025
83cff21
Merge branch 'AliceO2Group:master' into main
Yunseul-Bae Jul 3, 2025
82e54a6
Merge branch 'AliceO2Group:master' into main
Yunseul-Bae Jul 3, 2025
a307d73
[PWGLF] *Debug* and Change PID select type with "switch"
Yunseul-Bae Jul 3, 2025
ab12549
[PWGEM] DielectronMC.h momentum loss of both tracks vs DCA (#11876)
feisenhu Jul 3, 2025
2e2ccdc
[PWGLF] Apply clang-format
Yunseul-Bae Jul 3, 2025
8876e54
[PWGLF] Apply clang-format
Yunseul-Bae Jul 3, 2025
e4aa4c8
[PWGHF] OmegaC task, enable running one data and one MC process funct…
fcatalan92 Jul 3, 2025
98370a5
[PWGCF] FemtoUniverse - MCTruth producer update (#11842)
kgwizdzi Jul 3, 2025
f1da368
[PWGDQ] Temporary test for issues in running in hyperloop (#11889)
lucamicheletti93 Jul 3, 2025
dcb065a
[Common] Add Oxygen and Neon to CollisionTypeHelper (#11879)
njacazio Jul 3, 2025
8ca5f35
[PWGDQ] add histograms,Cuts for Polarization (#11887)
zjxiongOvO Jul 3, 2025
a997888
[PWGLF] Optimised code (#11891)
sawankumawat Jul 3, 2025
2566e62
[PWGEM/Dilepton] add mc-tuned TPC dE/dx in MC and remove columns (#11…
dsekihat Jul 3, 2025
3635c64
[PWGHF] Σc0,++: Remove duplicated consuming of McParticles. (#11855)
mfaggin Jul 3, 2025
cec4bc8
[Common] Add time dependency study to centrality task (#11896)
jesgum Jul 3, 2025
78e4af0
[PWGJE,EMCAL-670] Add option to use Run2 alignment (#11892)
mhemmer-cern Jul 3, 2025
02aa365
[PWGEM/PhotonMeson] Add workaround for kTVXinEMC issues in data to BC…
nstrangm Jul 3, 2025
87be5da
[PWGCF,PWGHF,PWGJE] Propagate new MC flags to 2-prongs (#11782)
vkucera Jul 3, 2025
904db63
[PWGLF] Prevent fall-through in switch-case
Yunseul-Bae Jul 3, 2025
9c262af
[PWGLF] Add the PID option for using TOF
Yunseul-Bae Jun 30, 2025
e944e54
[PWGLF] Apply clang-format
Yunseul-Bae Jun 30, 2025
1c4650f
[PWGLF] Apply O2 linter
Yunseul-Bae Jun 30, 2025
c3b8b0b
[PWGLF] O2 linter
Yunseul-Bae Jun 30, 2025
220ea6c
[PWGLF] *Debug* and Change PID select type with "switch"
Yunseul-Bae Jul 3, 2025
f820baf
[PWGLF] Apply clang-format
Yunseul-Bae Jul 3, 2025
f89f182
[PWGLF] Apply clang-format
Yunseul-Bae Jul 3, 2025
acb2be8
[PWGLF] Prevent fall-through in switch-case
Yunseul-Bae Jul 3, 2025
58ad5ee
Merge branch 'main' of https://github.com/Yunseul-Bae/O2Physics
Yunseul-Bae Jul 3, 2025
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
196 changes: 106 additions & 90 deletions PWGLF/Tasks/Resonances/f0980analysis.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/Tasks/Resonances/f0980analysis.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.)

Check failure on line 1 in PWGLF/Tasks/Resonances/f0980analysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-task]

Specify task name only when it cannot be derived from the struct name. Only append to the default name.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand All @@ -8,31 +8,33 @@
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
///
/// \file f0980analysis.cxx
/// \brief f0(980) analysis in pp 13.6 TeV
/// \author Yunseul Bae (ybae@cern.ch), Junlee Kim (jikim1290@gmail.com)
/// \since 30/06/2025

/// \author Junlee Kim (jikim1290@gmail.com)

#include <Framework/Configurable.h>
#include <TLorentzVector.h>
#include "TVector2.h"
#include <vector>
#include "PWGLF/DataModel/LFResonanceTables.h"

#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/EventSelection.h"
#include "Common/DataModel/PIDResponse.h"

#include "CommonConstants/MathConstants.h"
#include "CommonConstants/PhysicsConstants.h"
#include "DataFormatsParameters/GRPObject.h"
#include "Framework/ASoAHelpers.h"
#include "Framework/AnalysisTask.h"
#include "Framework/runDataProcessing.h"
#include "PWGLF/DataModel/LFResonanceTables.h"
#include "CommonConstants/PhysicsConstants.h"
#include <Framework/Configurable.h>

#include "TVector2.h"

#include <vector>

using namespace o2;
using namespace o2::framework;
using namespace o2::framework::expressions;
using namespace o2::soa;
using namespace o2::constants::physics;

struct f0980analysis {

Check failure on line 37 in PWGLF/Tasks/Resonances/f0980analysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/struct]

Use UpperCamelCase for names of structs.
SliceCache cache;
HistogramRegistry histos{
"histos",
Expand All @@ -47,17 +49,15 @@
"Maximum transverse DCA"};
Configurable<float> cfgMaxDCAzToPVcut{"cfgMaxDCAzToPVcut", 2.0,
"Maximum longitudinal DCA"};
Configurable<float> cfgMaxTPC{"cfgMaxTPC", 5.0, "Maximum TPC PID with TOF"};
Configurable<float> cfgMaxTOF{"cfgMaxTOF", 3.0, "Maximum TOF PID with TPC"};
Configurable<float> cfgMinRap{"cfgMinRap", -0.5, "Minimum rapidity for pair"};
Configurable<float> cfgMaxRap{"cfgMaxRap", 0.5, "Maximum rapidity for pair"};
Configurable<bool> cfgFindRT{"cfgFindRT", false, "boolean for RT analysis"};

// Track selection
Configurable<bool> cfgPrimaryTrack{

Check failure on line 57 in PWGLF/Tasks/Resonances/f0980analysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
"cfgPrimaryTrack", true,
"Primary track selection"}; // kGoldenChi2 | kDCAxy | kDCAz
Configurable<bool> cfgGlobalWoDCATrack{

Check failure on line 60 in PWGLF/Tasks/Resonances/f0980analysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
"cfgGlobalWoDCATrack", true,
"Global track selection without DCA"}; // kQualityTracks (kTrackType |
// kTPCNCls | kTPCCrossedRows |
Expand All @@ -67,10 +67,10 @@
// kITSRefit | kITSHits) |
// kInAcceptanceTracks (kPtRange |
// kEtaRange)
Configurable<bool> cfgPVContributor{

Check failure on line 70 in PWGLF/Tasks/Resonances/f0980analysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
"cfgPVContributor", true,
"PV contributor track selection"}; // PV Contriuibutor
Configurable<bool> cfgGlobalTrack{

Check failure on line 73 in PWGLF/Tasks/Resonances/f0980analysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
"cfgGlobalTrack", false,
"Global track selection"}; // kGoldenChi2 | kDCAxy | kDCAz
Configurable<int> cfgTPCcluster{"cfgTPCcluster", 0, "Number of TPC cluster"};
Expand All @@ -80,9 +80,10 @@

// PID
Configurable<double> cMaxTOFnSigmaPion{"cMaxTOFnSigmaPion", 3.0, "TOF nSigma cut for Pion"}; // TOF
Configurable<double> cMaxTPCnSigmaPion{"cMaxTPCnSigmaPion", 3.0, "TPC nSigma cut for Pion"}; // TPC
Configurable<double> cMaxTPCnSigmaPion{"cMaxTPCnSigmaPion", 5.0, "TPC nSigma cut for Pion"}; // TPC
Configurable<double> cMaxTPCnSigmaPionWoTOF{"cMaxTPCnSigmaPionWoTOF", 2.0, "TPC nSigma cut without TOF for Pion"};
Configurable<double> nsigmaCutCombinedPion{"nsigmaCutCombinedPion", -999, "Combined nSigma cut for Pion"};
Configurable<int> SelectType{"SelectType", 0, "PID selection type"};
Configurable<int> selectType{"SelectType", 0, "PID selection type"};

Check failure on line 86 in PWGLF/Tasks/Resonances/f0980analysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)

// Axis
ConfigurableAxis massAxis{"massAxis", {400, 0.2, 2.2}, "Invariant mass axis"};
Expand All @@ -92,41 +93,41 @@
{
std::vector<double> lptBinning = {0, 5.0, 13.0, 20.0, 50.0, 1000.0};

AxisSpec RTAxis = {3, 0, 3};
AxisSpec LptAxis = {lptBinning}; // Minimum leading hadron pT selection
AxisSpec rtAxis = {3, 0, 3};
AxisSpec lptAxis = {lptBinning}; // Minimum leading hadron pT selection

AxisSpec PIDqaAxis = {120, -6, 6};
AxisSpec pidQaAxis = {120, -6, 6};
AxisSpec pTqaAxis = {200, 0, 20};
AxisSpec phiqaAxis = {72, 0., 2.0 * constants::math::PI};
AxisSpec EPAxis = {10, 0, constants::math::PI};
AxisSpec EPqaAxis = {200, -constants::math::PI, constants::math::PI};
AxisSpec EPresAxis = {200, -2, 2};
AxisSpec phiqaAxis = {72, 0, o2::constants::math::TWOPI};
AxisSpec epAxis = {10, 0, o2::constants::math::PI};
AxisSpec epQaAxis = {200, -o2::constants::math::PI, o2::constants::math::PI};
AxisSpec epResAxis = {200, -2, 2};

if (cfgFindRT) {
histos.add("hInvMass_f0980_US", "unlike invariant mass",
{HistType::kTHnSparseF, {massAxis, ptAxis, centAxis, RTAxis, LptAxis}});
{HistType::kTHnSparseF, {massAxis, ptAxis, centAxis, rtAxis, lptAxis}});
histos.add("hInvMass_f0980_LSpp", "++ invariant mass",
{HistType::kTHnSparseF, {massAxis, ptAxis, centAxis, RTAxis, LptAxis}});
{HistType::kTHnSparseF, {massAxis, ptAxis, centAxis, rtAxis, lptAxis}});
histos.add("hInvMass_f0980_LSmm", "-- invariant mass",
{HistType::kTHnSparseF, {massAxis, ptAxis, centAxis, RTAxis, LptAxis}});
{HistType::kTHnSparseF, {massAxis, ptAxis, centAxis, rtAxis, lptAxis}});
}
histos.add("hInvMass_f0980_US_EPA", "unlike invariant mass",
{HistType::kTHnSparseF, {massAxis, ptAxis, centAxis, EPAxis}});
{HistType::kTHnSparseF, {massAxis, ptAxis, centAxis, epAxis}});
histos.add("hInvMass_f0980_LSpp_EPA", "++ invariant mass",
{HistType::kTHnSparseF, {massAxis, ptAxis, centAxis, EPAxis}});
{HistType::kTHnSparseF, {massAxis, ptAxis, centAxis, epAxis}});
histos.add("hInvMass_f0980_LSmm_EPA", "-- invariant mass",
{HistType::kTHnSparseF, {massAxis, ptAxis, centAxis, EPAxis}});
{HistType::kTHnSparseF, {massAxis, ptAxis, centAxis, epAxis}});

histos.add("QA/hEPResAB", "", {HistType::kTH2F, {centAxis, EPresAxis}});
histos.add("QA/hEPResAC", "", {HistType::kTH2F, {centAxis, EPresAxis}});
histos.add("QA/hEPResBC", "", {HistType::kTH2F, {centAxis, EPresAxis}});
histos.add("QA/hEPResAB", "", {HistType::kTH2F, {centAxis, epResAxis}});
histos.add("QA/hEPResAC", "", {HistType::kTH2F, {centAxis, epResAxis}});
histos.add("QA/hEPResBC", "", {HistType::kTH2F, {centAxis, epResAxis}});

histos.add("QA/Nsigma_TPC", "", {HistType::kTH2F, {pTqaAxis, PIDqaAxis}});
histos.add("QA/Nsigma_TOF", "", {HistType::kTH2F, {pTqaAxis, PIDqaAxis}});
histos.add("QA/TPC_TOF", "", {HistType::kTH2F, {PIDqaAxis, PIDqaAxis}});
histos.add("QA/Nsigma_TPC", "", {HistType::kTH2F, {pTqaAxis, pidQaAxis}});
histos.add("QA/Nsigma_TOF", "", {HistType::kTH2F, {pTqaAxis, pidQaAxis}});
histos.add("QA/TPC_TOF", "", {HistType::kTH2F, {pidQaAxis, pidQaAxis}});

histos.add("QA/LTpt", "", {HistType::kTH3F, {pTqaAxis, centAxis, phiqaAxis}});
histos.add("QA/EPhist", "", {HistType::kTH2F, {centAxis, EPqaAxis}});
histos.add("QA/EPhist", "", {HistType::kTH2F, {centAxis, epQaAxis}});

if (doprocessMCLight) {
histos.add("MCL/hpT_f0980_GEN", "generated f0 signals", HistType::kTH1F,
Expand All @@ -140,21 +141,26 @@

double massPi = MassPionCharged;

int RTIndex(double pairphi, double lhphi)
constexpr float OneThird = 1.0f / 3.0f;
constexpr float PIthird = o2::constants::math::PI * OneThird;
constexpr float TWOPIthird = o2::constants::math::TWOPI * OneThird;

int rtIndex(double pairphi, double lhPhi)
{
double dphi = std::fabs(TVector2::Phi_mpi_pi(lhphi - pairphi));
if (dphi < constants::math::PI / 3.0)
double dphi = std::fabs(TVector2::Phi_mpi_pi(lhPhi - pairphi));

if (dphi < PIthird)
return 0;
if (dphi < 2.0 * constants::math::PI / 3.0 && dphi > constants::math::PI / 3.0)
if (dphi < TWOPIthird && dphi > PIthird)
return 1;
if (dphi > 2.0 * constants::math::PI / 3.0)
if (dphi > TWOPIthird)
return 2;

return -1;
}

template <typename TrackType>
bool SelTrack(const TrackType track)
bool selTrack(const TrackType track)
{
if (std::abs(track.pt()) < cfgMinPt)
return false;
Expand Down Expand Up @@ -185,35 +191,49 @@
}

template <typename TrackType>
bool SelPion(const TrackType track)
bool selPion(const TrackType track)
{
if (SelectType == 0) {
constexpr int TPCorTOF = 0;
constexpr int TPCOnly = 1;
constexpr int Combined = 2;
constexpr int Run2Like = 3;

if (selectType == TPCorTOF) {
if (std::fabs(track.tpcNSigmaPi()) >= cMaxTPCnSigmaPion || std::fabs(track.tofNSigmaPi()) >= cMaxTOFnSigmaPion)
return false;
}
if (SelectType == 1) {
if (selectType == TPConly) {
if (std::fabs(track.tpcNSigmaPi()) >= cMaxTPCnSigmaPion)
return false;
}
if (SelectType == 2) {
if (selectType == Combined) {
if (track.tpcNSigmaPi() * track.tpcNSigmaPi() + track.tofNSigmaPi() * track.tofNSigmaPi() >= nsigmaCutCombinedPion * nsigmaCutCombinedPion)
return false;
}
if (selectType == Run2Like) {
if (track.hasTOF()) {
if (std::fabs(track.tpcNSigmaPi()) >= cMaxTPCnSigmaPion || std::fabs(track.tofNSigmaPi()) >= cMaxTOFnSigmaPion)
return false;
} else if (!track.hasTOF()) {
if (std::fabs(track.tpcNSigmaPi()) >= cMaxTPCnSigmaPionWoTOF)
return false;
}
}
return true;
}

template <bool IsMC, typename CollisionType, typename TracksType>
void fillHistograms(const CollisionType& collision,
const TracksType& dTracks)
{
double LHpt = 0.;
double LHphi = 0.;
double lhPt = 0.;
double lhPhi = 0.;
double relPhi = 0.;
if (cfgFindRT) {
for (auto& trk : dTracks) {
if (trk.pt() > LHpt) {
LHpt = trk.pt();
LHphi = trk.phi();
for (const auto& trk : dTracks) {
if (trk.pt() > lhPt) {
lhPt = trk.pt();
lhPhi = trk.phi();
}
}
}
Expand All @@ -222,67 +242,64 @@
histos.fill(HIST("QA/hEPResAB"), collision.cent(), collision.evtPlResAB());
histos.fill(HIST("QA/hEPResAC"), collision.cent(), collision.evtPlResBC());
histos.fill(HIST("QA/hEPResBC"), collision.cent(), collision.evtPlResAC());
histos.fill(HIST("QA/LTpt"), LHpt, collision.cent(), LHphi);
histos.fill(HIST("QA/LTpt"), lhPt, collision.cent(), lhPhi);

TLorentzVector Pion1, Pion2, Reco;
for (auto& [trk1, trk2] :
ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<float>> pion1, pion2, reco;
for (const auto& [trk1, trk2] :
combinations(CombinationsStrictlyUpperIndexPolicy(dTracks, dTracks))) {
if (trk1.index() == trk2.index()) {
if (!SelTrack(trk1))
continue;
histos.fill(HIST("QA/Nsigma_TPC"), trk1.pt(), trk1.tpcNSigmaPi());
histos.fill(HIST("QA/Nsigma_TOF"), trk1.pt(), trk1.tofNSigmaPi());
histos.fill(HIST("QA/TPC_TOF"), trk1.tpcNSigmaPi(), trk1.tofNSigmaPi());
continue;
}

if (!SelTrack(trk1) || !SelTrack(trk2))
if (!selTrack(trk1) || !selTrack(trk2))
continue;
if (!SelPion(trk1) || !SelPion(trk2))
// TPC, TOF Nsigma distributions
histos.fill(HIST("QA/Nsigma_TPC"), trk1.pt(), trk1.tpcNSigmaPi());
histos.fill(HIST("QA/Nsigma_TOF"), trk1.pt(), trk1.tofNSigmaPi());
histos.fill(HIST("QA/TPC_TOF"), trk1.tpcNSigmaPi(), trk1.tofNSigmaPi());

if (!selPion(trk1) || !selPion(trk2))
continue;

Pion1.SetXYZM(trk1.px(), trk1.py(), trk1.pz(), massPi);
Pion2.SetXYZM(trk2.px(), trk2.py(), trk2.pz(), massPi);
Reco = Pion1 + Pion2;
pion1.SetXYZM(trk1.px(), trk1.py(), trk1.pz(), massPi);
pion2.SetXYZM(trk2.px(), trk2.py(), trk2.pz(), massPi);
reco = pion1 + pion2;

if (Reco.Rapidity() > cfgMaxRap || Reco.Rapidity() < cfgMinRap)
if (reco.Rapidity() > cfgMaxRap || reco.Rapidity() < cfgMinRap)
continue;

relPhi = TVector2::Phi_0_2pi(Reco.Phi() - collision.evtPl());
if (relPhi > constants::math::PI) {
relPhi -= constants::math::PI;
relPhi = TVector2::Phi_0_2pi(reco.Phi() - collision.evtPl());
if (relPhi > o2::constants::math::PI) {
relPhi -= o2::constants::math::PI;
}

if (trk1.sign() * trk2.sign() < 0) {
if (cfgFindRT) {
histos.fill(HIST("hInvMass_f0980_US"), Reco.M(), Reco.Pt(),
collision.cent(), RTIndex(Reco.Phi(), LHphi), LHpt);
histos.fill(HIST("hInvMass_f0980_US"), reco.M(), reco.Pt(),
collision.cent(), rtIndex(reco.Phi(), lhPhi), lhPt);
}
histos.fill(HIST("hInvMass_f0980_US_EPA"), Reco.M(), Reco.Pt(),
histos.fill(HIST("hInvMass_f0980_US_EPA"), reco.M(), reco.Pt(),
collision.cent(), relPhi);
if constexpr (IsMC) {
if (abs(trk1.pdgCode()) != 211 || abs(trk2.pdgCode()) != 211)
if (std::abs(trk1.pdgCode()) != Pdg::PiPlus || std::abs(trk2.pdgCode()) != Pdg::PiPlus)
continue;
if (trk1.motherId() != trk2.motherId())
continue;
if (abs(trk1.motherPDG()) != 9010221)
if (std::abs(trk1.motherPDG()) != Pdg::f0_980) // 9010221
continue;
histos.fill(HIST("MCL/hpT_f0980_REC"), Reco.M(), Reco.Pt(),
histos.fill(HIST("MCL/hpT_f0980_REC"), reco.M(), reco.Pt(),
collision.cent());
}
} else if (trk1.sign() > 0 && trk2.sign() > 0) {
if (cfgFindRT) {
histos.fill(HIST("hInvMass_f0980_LSpp"), Reco.M(), Reco.Pt(),
collision.cent(), RTIndex(Reco.Phi(), LHphi), LHpt);
histos.fill(HIST("hInvMass_f0980_LSpp"), reco.M(), reco.Pt(),
collision.cent(), rtIndex(reco.Phi(), lhPhi), lhPt);
}
histos.fill(HIST("hInvMass_f0980_LSpp_EPA"), Reco.M(), Reco.Pt(),
histos.fill(HIST("hInvMass_f0980_LSpp_EPA"), reco.M(), reco.Pt(),
collision.cent(), relPhi);
} else if (trk1.sign() < 0 && trk2.sign() < 0) {
if (cfgFindRT) {
histos.fill(HIST("hInvMass_f0980_LSmm"), Reco.M(), Reco.Pt(),
collision.cent(), RTIndex(Reco.Phi(), LHphi), LHpt);
histos.fill(HIST("hInvMass_f0980_LSmm"), reco.M(), reco.Pt(),
collision.cent(), rtIndex(reco.Phi(), lhPhi), lhPt);
}
histos.fill(HIST("hInvMass_f0980_LSmm_EPA"), Reco.M(), Reco.Pt(),
histos.fill(HIST("hInvMass_f0980_LSmm_EPA"), reco.M(), reco.Pt(),
collision.cent(), relPhi);
}
}
Expand All @@ -303,20 +320,19 @@
}
PROCESS_SWITCH(f0980analysis, processMCLight, "Process Event for MC", false);

void processMCTrue(aod::ResoMCParents& resoParents)
void processMCTrue(const aod::ResoMCParents& resoParents)
{

for (auto& part : resoParents) { // loop over all pre-filtered MC particles
if (abs(part.pdgCode()) != 9010221)
for (const auto& part : resoParents) { // loop over all pre-filtered MC particles
if (std::abs(part.pdgCode()) != Pdg::f0_980)
continue;
if (!part.producedByGenerator())
continue;
if (part.y() < cfgMinRap || part.y() > cfgMaxRap) {
continue;
}
bool pass = false;
if ((abs(part.daughterPDG1()) == 211 &&
abs(part.daughterPDG2()) == 211)) {
if ((std::abs(part.daughterPDG1()) == Pdg::PiPlus &&
std::abs(part.daughterPDG2()) == Pdg::PiPlus)) {
pass = true;
}
if (!pass) // If we have both decay products
Expand All @@ -331,5 +347,5 @@
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{
adaptAnalysisTask<f0980analysis>(cfgc, TaskName{"lf-f0980analysis"})};

Check failure on line 350 in PWGLF/Tasks/Resonances/f0980analysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-task]

Specified task name lf-f0980analysis produces device name lf-f0980analysis which does not match the device name f0980analysis from the struct name f0980analysis. (Matching struct name LfF0980analysis)
}
Loading