From f29788b160180cb5949e4b349cbc0e1419bf9167 Mon Sep 17 00:00:00 2001 From: Seul I Jeong Date: Tue, 3 Feb 2026 11:48:58 +0900 Subject: [PATCH 1/2] added dcaHadron Histogram --- PWGHF/HFL/Tasks/taskSingleElectron.cxx | 169 +++++++++++++++---------- 1 file changed, 104 insertions(+), 65 deletions(-) diff --git a/PWGHF/HFL/Tasks/taskSingleElectron.cxx b/PWGHF/HFL/Tasks/taskSingleElectron.cxx index 6c4d1f76833..e1c9ae06fb8 100644 --- a/PWGHF/HFL/Tasks/taskSingleElectron.cxx +++ b/PWGHF/HFL/Tasks/taskSingleElectron.cxx @@ -1,6 +1,6 @@ // Copyright 2019-2020 CERN and copyright holders of ALICE O2. -// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. -// All rights not expressly granted are reserved. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright +// holders. All rights not expressly granted are reserved. // // This software is distributed under the terms of the GNU General Public // License v3 (GPL Version 3), copied verbatim in the file "COPYING". @@ -12,6 +12,7 @@ /// \file taskSingleElectron.cxx /// \brief task for electrons from heavy-flavour hadron decays /// \author Jonghan Park (Jeonbuk National University) +/// \author Seul I Jeong (Pusan National University) #include "Common/DataModel/EventSelection.h" #include "Common/DataModel/PIDResponseTOF.h" @@ -41,11 +42,7 @@ using namespace o2::constants::physics; using namespace o2::framework; using namespace o2::framework::expressions; -enum PdgCode { - kEta = 221, - kOmega = 223, - kEtaPrime = 331 -}; +enum PdgCode { kEta = 221, kOmega = 223, kEtaPrime = 331 }; enum SourceType { NotElec = 0, // not electron @@ -88,27 +85,44 @@ struct HfTaskSingleElectron { Configurable ptTrackMax{"ptTrackMax", 10., "max pt cut"}; Configurable ptTrackMin{"ptTrackMin", 0.5, "min pt cut"}; Configurable etaTrackMax{"etaTrackMax", 0.8, "eta cut"}; - Configurable tpcNCrossedRowMin{"tpcNCrossedRowMin", 70, "max of TPC n cluster crossed rows"}; - Configurable tpcNClsFoundOverFindableMin{"tpcNClsFoundOverFindableMin", 0.8, "min # of TPC found/findable clusters"}; - Configurable tpcChi2perNClMax{"tpcChi2perNClMax", 4., "min # of tpc chi2 per clusters"}; - Configurable itsIBClsMin{"itsIBClsMin", 3, "min # of its clusters in IB"}; - Configurable itsChi2perNClMax{"itsChi2perNClMax", 6., "min # of tpc chi2 per clusters"}; + Configurable tpcNCrossedRowMin{"tpcNCrossedRowMin", 70, + "max of TPC n cluster crossed rows"}; + Configurable tpcNClsFoundOverFindableMin{ + "tpcNClsFoundOverFindableMin", 0.8, + "min # of TPC found/findable clusters"}; + Configurable tpcChi2perNClMax{"tpcChi2perNClMax", 4., + "min # of tpc chi2 per clusters"}; + Configurable itsIBClsMin{"itsIBClsMin", 3, + "min # of its clusters in IB"}; + Configurable itsChi2perNClMax{"itsChi2perNClMax", 6., + "min # of tpc chi2 per clusters"}; Configurable dcaxyMax{"dcaxyMax", 1., "max of track dca in xy"}; Configurable dcazMax{"dcazMax", 2., "max of track dca in z"}; Configurable tofNSigmaMax{"tofNSigmaMax", 3., "max of tof nsigma"}; Configurable tpcNSigmaMin{"tpcNSigmaMin", -1., "min of tpc nsigma"}; Configurable tpcNSigmaMax{"tpcNSigmaMax", 3., "max of tpc nsigma"}; - Configurable nBinsP{"nBinsP", 1500, "number of bins of particle momentum"}; + Configurable nBinsP{"nBinsP", 1500, + "number of bins of particle momentum"}; Configurable nBinsPt{"nBinsPt", 100, "N bins in pT histo"}; + Configurable tpcNSigmaHadronMax{"tpcNSigmaHadronMax", -3, + "max of tpc hadron nsigma"}; + Configurable tpcNSigmaHadronMin{"tpcNSigmaHadronMin", -5, + "min of tpc hadron nsigma"}; + // SliceCache SliceCache cache; // using declarations using MyCollisions = soa::Join; - using TracksEl = soa::Join; - using McTracksEl = soa::Join; + using TracksEl = + soa::Join; + using McTracksEl = + soa::Join; // Filter Filter collZFilter = nabs(aod::collision::posZ) < posZMax; @@ -116,13 +130,18 @@ struct HfTaskSingleElectron { // Partition // ConfigurableAxis - ConfigurableAxis axisPtEl{"axisPtEl", {VARIABLE_WIDTH, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.f, 1.1f, 1.2f, 1.3f, 1.4f, 1.5f, 1.75f, 2.0f, 2.25f, 2.5f, 2.75f, 3.f, 3.5f, 4.0f, 5.0f, 6.0f, 8.0f, 10.0f}, "electron pt bins"}; + ConfigurableAxis axisPtEl{ + "axisPtEl", + {VARIABLE_WIDTH, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.f, 1.1f, + 1.2f, 1.3f, 1.4f, 1.5f, 1.75f, 2.0f, 2.25f, 2.5f, + 2.75f, 3.f, 3.5f, 4.0f, 5.0f, 6.0f, 8.0f, 10.0f}, + "electron pt bins"}; // Histogram registry - HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject}; + HistogramRegistry histos{ + "histos", {}, OutputObjHandlingPolicy::AnalysisObject}; - void init(InitContext const&) - { + void init(InitContext const &) { // AxisSpec const AxisSpec axisEvt{4, 0., 4., "nEvents"}; const AxisSpec axisNCont{100, 0., 100., "nCont"}; @@ -137,7 +156,10 @@ struct HfTaskSingleElectron { histos.add("nEvents", "Number of events", kTH1D, {{1, 0., 1.}}); histos.add("VtxZ", "VtxZ; cm; entries", kTH1D, {axisPosZ}); histos.add("etaTrack", "etaTrack; #eta; entries", kTH1D, {axisEta}); - histos.add("ptTrack", "#it{p}_{T} distribution of selected tracks; #it{p}_{T} (GeV/#it{c}); entries", kTH1D, {axisPt}); + histos.add("ptTrack", + "#it{p}_{T} distribution of selected tracks; #it{p}_{T} " + "(GeV/#it{c}); entries", + kTH1D, {axisPt}); // QA plots for trigger track selection histos.add("tpcNClsTrack", "tpcNClsTrack", kTH1D, {{200, 0, 200}}); @@ -163,6 +185,7 @@ struct HfTaskSingleElectron { histos.add("dcaCharm", "", kTH2D, {{axisPtEl}, {axisTrackIp}}); histos.add("dcaDalitz", "", kTH2D, {{axisPtEl}, {axisTrackIp}}); histos.add("dcaConv", "", kTH2D, {{axisPtEl}, {axisTrackIp}}); + histos.add("dcaHadron", "", kTH2D, {{axisPtEl}, {axisTrackIp}}); // QA plots for MC histos.add("hPdgC", "", kTH1D, {{10001, -0.5, 10000.5}}); @@ -171,9 +194,7 @@ struct HfTaskSingleElectron { histos.add("hPdgCo", "", kTH1D, {{10001, -0.5, 10000.5}}); } - template - bool trackSel(const TrackType& track) - { + template bool trackSel(const TrackType &track) { if ((track.pt() > ptTrackMax) || (track.pt() < ptTrackMin)) { return false; } @@ -213,8 +234,7 @@ struct HfTaskSingleElectron { } template - int getElecSource(const TrackType& track, double& mpt, int& mpdg) - { + int getElecSource(const TrackType &track, double &mpt, int &mpdg) { auto mcpart = track.mcParticle(); if (std::abs(mcpart.pdgCode()) != kElectron) { return NotElec; @@ -227,30 +247,34 @@ struct HfTaskSingleElectron { int grmotherPt = -999; int ggrmotherPt = -999.; // mother, grand mother, grand grand mother pt - auto partMother = mcpart.template mothers_as(); // first mother particle of electron - auto partMotherCopy = partMother; // copy of the first mother - auto mctrack = partMother; // will change all the time + auto partMother = + mcpart.template mothers_as(); // first mother particle + // of electron + auto partMotherCopy = partMother; // copy of the first mother + auto mctrack = partMother; // will change all the time motherPt = partMother.front().pt(); // first mother pt motherPdg = std::abs(partMother.front().pdgCode()); // first mother pdg - mpt = motherPt; // copy of first mother pt - mpdg = motherPdg; // copy of first mother pdg + mpt = motherPt; // copy of first mother pt + mpdg = motherPdg; // copy of first mother pdg // check if electron from charm hadrons - if ((static_cast(motherPdg / 100.) % 10) == kCharm || (static_cast(motherPdg / 1000.) % 10) == kCharm) { + if ((static_cast(motherPdg / 100.) % 10) == kCharm || + (static_cast(motherPdg / 1000.) % 10) == kCharm) { // iterate until B hadron is found as an ancestor while (partMother.size()) { mctrack = partMother.front().template mothers_as(); if (mctrack.size()) { - auto const& grmothersIdsVec = mctrack.front().mothersIds(); + auto const &grmothersIdsVec = mctrack.front().mothersIds(); if (grmothersIdsVec.empty()) { return DirectCharm; } grmotherPt = mctrack.front().pt(); grmotherPdg = std::abs(mctrack.front().pdgCode()); - if ((static_cast(grmotherPdg / 100.) % 10) == kBottom || (static_cast(grmotherPdg / 1000.) % 10) == kBottom) { + if ((static_cast(grmotherPdg / 100.) % 10) == kBottom || + (static_cast(grmotherPdg / 1000.) % 10) == kBottom) { mpt = grmotherPt; mpdg = grmotherPdg; return BeautyCharm; @@ -258,12 +282,15 @@ struct HfTaskSingleElectron { } partMother = mctrack; } - } else if ((static_cast(motherPdg / 100.) % 10) == kBottom || (static_cast(motherPdg / 1000.) % 10) == kBottom) { // check if electron from beauty hadrons + } else if ((static_cast(motherPdg / 100.) % 10) == kBottom || + (static_cast(motherPdg / 1000.) % 10) == + kBottom) { // check if electron from beauty hadrons return DirectBeauty; - } else if (motherPdg == kGamma) { // check if electron from photon conversion + } else if (motherPdg == + kGamma) { // check if electron from photon conversion mctrack = partMother.front().template mothers_as(); if (mctrack.size()) { - auto const& grmothersIdsVec = mctrack.front().mothersIds(); + auto const &grmothersIdsVec = mctrack.front().mothersIds(); if (grmothersIdsVec.empty()) { return DirectGamma; } @@ -274,7 +301,7 @@ struct HfTaskSingleElectron { partMother = mctrack; mctrack = partMother.front().template mothers_as(); if (mctrack.size()) { - auto const& ggrmothersIdsVec = mctrack.front().mothersIds(); + auto const &ggrmothersIdsVec = mctrack.front().mothersIds(); if (ggrmothersIdsVec.empty()) { if (grmotherPdg == kPi0) { return GammaPi0; @@ -351,17 +378,17 @@ struct HfTaskSingleElectron { } else { // check if electron from Dalitz decays mctrack = partMother.front().template mothers_as(); if (mctrack.size()) { - auto const& grmothersIdsVec = mctrack.front().mothersIds(); + auto const &grmothersIdsVec = mctrack.front().mothersIds(); if (grmothersIdsVec.empty()) { static const std::map pdgToSource = { - {kPi0, Pi0}, - {PdgCode::kEta, Eta}, - {PdgCode::kOmega, Omega}, - {kPhi, Phi}, - {PdgCode::kEtaPrime, EtaPrime}, - {kRho770_0, Rho0}, - {kKPlus, Ke3}, - {kK0Long, K0l}}; + {kPi0, Pi0}, + {PdgCode::kEta, Eta}, + {PdgCode::kOmega, Omega}, + {kPhi, Phi}, + {PdgCode::kEtaPrime, EtaPrime}, + {kRho770_0, Rho0}, + {kKPlus, Ke3}, + {kK0Long, K0l}}; auto it = pdgToSource.find(motherPdg); if (it != pdgToSource.end()) { @@ -421,9 +448,8 @@ struct HfTaskSingleElectron { return Else; } - void processData(soa::Filtered::iterator const& collision, - TracksEl const& tracks) - { + void processData(soa::Filtered::iterator const &collision, + TracksEl const &tracks) { float const flagAnalysedEvt = 0.5; if (!collision.sel8()) { @@ -437,7 +463,7 @@ struct HfTaskSingleElectron { histos.fill(HIST("VtxZ"), collision.posZ()); histos.fill(HIST("nEvents"), flagAnalysedEvt); - for (const auto& track : tracks) { + for (const auto &track : tracks) { if (!trackSel(track)) { continue; @@ -451,7 +477,8 @@ struct HfTaskSingleElectron { histos.fill(HIST("ptTrack"), track.pt()); histos.fill(HIST("tpcNClsTrack"), track.tpcNClsCrossedRows()); - histos.fill(HIST("tpcFoundFindableTrack"), track.tpcCrossedRowsOverFindableCls()); + histos.fill(HIST("tpcFoundFindableTrack"), + track.tpcCrossedRowsOverFindableCls()); histos.fill(HIST("tpcChi2Track"), track.tpcChi2NCl()); histos.fill(HIST("itsIBClsTrack"), track.itsNClsInnerBarrel()); histos.fill(HIST("itsChi2Track"), track.itsChi2NCl()); @@ -467,11 +494,20 @@ struct HfTaskSingleElectron { } histos.fill(HIST("tofNSigPtQA"), track.pt(), track.tofNSigmaEl()); histos.fill(HIST("tpcNSigPAfterTofCut"), track.p(), track.tpcNSigmaEl()); - histos.fill(HIST("tpcNSigPtAfterTofCut"), track.pt(), track.tpcNSigmaEl()); + histos.fill(HIST("tpcNSigPtAfterTofCut"), track.pt(), + track.tpcNSigmaEl()); - if (track.tpcNSigmaEl() < tpcNSigmaMin || track.tpcNSigmaEl() > tpcNSigmaMax) { + if (track.tpcNSigmaEl() < tpcNSigmaMin || + track.tpcNSigmaEl() > tpcNSigmaMax) { continue; } + + if (track.tpcNSigmaEl() < tpcNSigmaHadronMax && + track.tpcNSigmaEl() > tpcNSigmaHadronMin) { + + histos.fill(HIST("dcaHadron"), track.pt(), track.dcaXY()); + } + histos.fill(HIST("tpcNSigPtQA"), track.pt(), track.tpcNSigmaEl()); histos.fill(HIST("dcaTrack"), track.pt(), track.dcaXY()); @@ -479,10 +515,8 @@ struct HfTaskSingleElectron { } PROCESS_SWITCH(HfTaskSingleElectron, processData, "For real data", true); - void processMc(soa::Filtered::iterator const& collision, - McTracksEl const& tracks, - aod::McParticles const&) - { + void processMc(soa::Filtered::iterator const &collision, + McTracksEl const &tracks, aod::McParticles const &) { float const flagAnalysedEvt = 0.5; if (!collision.sel8()) { @@ -496,7 +530,7 @@ struct HfTaskSingleElectron { histos.fill(HIST("VtxZ"), collision.posZ()); histos.fill(HIST("nEvents"), flagAnalysedEvt); - for (const auto& track : tracks) { + for (const auto &track : tracks) { if (!trackSel(track)) { continue; @@ -506,7 +540,8 @@ struct HfTaskSingleElectron { histos.fill(HIST("ptTrack"), track.pt()); histos.fill(HIST("tpcNClsTrack"), track.tpcNClsCrossedRows()); - histos.fill(HIST("tpcFoundFindableTrack"), track.tpcCrossedRowsOverFindableCls()); + histos.fill(HIST("tpcFoundFindableTrack"), + track.tpcCrossedRowsOverFindableCls()); histos.fill(HIST("tpcChi2Track"), track.tpcChi2NCl()); histos.fill(HIST("itsIBClsTrack"), track.itsNClsInnerBarrel()); histos.fill(HIST("dcaXYTrack"), track.dcaXY()); @@ -539,13 +574,19 @@ struct HfTaskSingleElectron { histos.fill(HIST("dcaDalitz"), track.pt(), track.dcaXY()); } + if (track.tpcNSigmaEl() < tpcNSigmaHadronMax && + track.tpcNSigmaEl() > tpcNSigmaHadronMin) + histos.fill(HIST("dcaHadron"), track.pt(), track.dcaXY()); + if (std::abs(track.tofNSigmaEl()) > tofNSigmaMax) { continue; } histos.fill(HIST("tofNSigPtQA"), track.pt(), track.tofNSigmaEl()); - histos.fill(HIST("tpcNSigPtAfterTofCut"), track.pt(), track.tpcNSigmaEl()); + histos.fill(HIST("tpcNSigPtAfterTofCut"), track.pt(), + track.tpcNSigmaEl()); - if (track.tpcNSigmaEl() < tpcNSigmaMin || track.tpcNSigmaEl() > tpcNSigmaMax) { + if (track.tpcNSigmaEl() < tpcNSigmaMin || + track.tpcNSigmaEl() > tpcNSigmaMax) { continue; } histos.fill(HIST("tpcNSigPtQA"), track.pt(), track.tpcNSigmaEl()); @@ -556,8 +597,6 @@ struct HfTaskSingleElectron { PROCESS_SWITCH(HfTaskSingleElectron, processMc, "For real data", false); }; -WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) -{ - return WorkflowSpec{ - adaptAnalysisTask(cfgc)}; +WorkflowSpec defineDataProcessing(ConfigContext const &cfgc) { + return WorkflowSpec{adaptAnalysisTask(cfgc)}; } From a51e81a4d1a13f3113929ccd4d9ae5269bc0259e Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Tue, 3 Feb 2026 04:37:20 +0000 Subject: [PATCH 2/2] Please consider the following formatting changes --- PWGHF/HFL/Tasks/taskSingleElectron.cxx | 97 ++++++++++++++------------ 1 file changed, 54 insertions(+), 43 deletions(-) diff --git a/PWGHF/HFL/Tasks/taskSingleElectron.cxx b/PWGHF/HFL/Tasks/taskSingleElectron.cxx index e1c9ae06fb8..40cc4c06fa1 100644 --- a/PWGHF/HFL/Tasks/taskSingleElectron.cxx +++ b/PWGHF/HFL/Tasks/taskSingleElectron.cxx @@ -42,7 +42,9 @@ using namespace o2::constants::physics; using namespace o2::framework; using namespace o2::framework::expressions; -enum PdgCode { kEta = 221, kOmega = 223, kEtaPrime = 331 }; +enum PdgCode { kEta = 221, + kOmega = 223, + kEtaPrime = 331 }; enum SourceType { NotElec = 0, // not electron @@ -88,8 +90,8 @@ struct HfTaskSingleElectron { Configurable tpcNCrossedRowMin{"tpcNCrossedRowMin", 70, "max of TPC n cluster crossed rows"}; Configurable tpcNClsFoundOverFindableMin{ - "tpcNClsFoundOverFindableMin", 0.8, - "min # of TPC found/findable clusters"}; + "tpcNClsFoundOverFindableMin", 0.8, + "min # of TPC found/findable clusters"}; Configurable tpcChi2perNClMax{"tpcChi2perNClMax", 4., "min # of tpc chi2 per clusters"}; Configurable itsIBClsMin{"itsIBClsMin", 3, @@ -117,12 +119,12 @@ struct HfTaskSingleElectron { // using declarations using MyCollisions = soa::Join; using TracksEl = - soa::Join; + soa::Join; using McTracksEl = - soa::Join; + soa::Join; // Filter Filter collZFilter = nabs(aod::collision::posZ) < posZMax; @@ -131,17 +133,20 @@ struct HfTaskSingleElectron { // ConfigurableAxis ConfigurableAxis axisPtEl{ - "axisPtEl", - {VARIABLE_WIDTH, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.f, 1.1f, - 1.2f, 1.3f, 1.4f, 1.5f, 1.75f, 2.0f, 2.25f, 2.5f, - 2.75f, 3.f, 3.5f, 4.0f, 5.0f, 6.0f, 8.0f, 10.0f}, - "electron pt bins"}; + "axisPtEl", + {VARIABLE_WIDTH, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.f, 1.1f, + 1.2f, 1.3f, 1.4f, 1.5f, 1.75f, 2.0f, 2.25f, 2.5f, + 2.75f, 3.f, 3.5f, 4.0f, 5.0f, 6.0f, 8.0f, 10.0f}, + "electron pt bins"}; // Histogram registry HistogramRegistry histos{ - "histos", {}, OutputObjHandlingPolicy::AnalysisObject}; + "histos", + {}, + OutputObjHandlingPolicy::AnalysisObject}; - void init(InitContext const &) { + void init(InitContext const&) + { // AxisSpec const AxisSpec axisEvt{4, 0., 4., "nEvents"}; const AxisSpec axisNCont{100, 0., 100., "nCont"}; @@ -194,7 +199,9 @@ struct HfTaskSingleElectron { histos.add("hPdgCo", "", kTH1D, {{10001, -0.5, 10000.5}}); } - template bool trackSel(const TrackType &track) { + template + bool trackSel(const TrackType& track) + { if ((track.pt() > ptTrackMax) || (track.pt() < ptTrackMin)) { return false; } @@ -234,7 +241,8 @@ struct HfTaskSingleElectron { } template - int getElecSource(const TrackType &track, double &mpt, int &mpdg) { + int getElecSource(const TrackType& track, double& mpt, int& mpdg) + { auto mcpart = track.mcParticle(); if (std::abs(mcpart.pdgCode()) != kElectron) { return NotElec; @@ -248,15 +256,15 @@ struct HfTaskSingleElectron { int ggrmotherPt = -999.; // mother, grand mother, grand grand mother pt auto partMother = - mcpart.template mothers_as(); // first mother particle - // of electron - auto partMotherCopy = partMother; // copy of the first mother - auto mctrack = partMother; // will change all the time + mcpart.template mothers_as(); // first mother particle + // of electron + auto partMotherCopy = partMother; // copy of the first mother + auto mctrack = partMother; // will change all the time motherPt = partMother.front().pt(); // first mother pt motherPdg = std::abs(partMother.front().pdgCode()); // first mother pdg - mpt = motherPt; // copy of first mother pt - mpdg = motherPdg; // copy of first mother pdg + mpt = motherPt; // copy of first mother pt + mpdg = motherPdg; // copy of first mother pdg // check if electron from charm hadrons if ((static_cast(motherPdg / 100.) % 10) == kCharm || @@ -266,7 +274,7 @@ struct HfTaskSingleElectron { while (partMother.size()) { mctrack = partMother.front().template mothers_as(); if (mctrack.size()) { - auto const &grmothersIdsVec = mctrack.front().mothersIds(); + auto const& grmothersIdsVec = mctrack.front().mothersIds(); if (grmothersIdsVec.empty()) { return DirectCharm; @@ -284,13 +292,13 @@ struct HfTaskSingleElectron { } } else if ((static_cast(motherPdg / 100.) % 10) == kBottom || (static_cast(motherPdg / 1000.) % 10) == - kBottom) { // check if electron from beauty hadrons + kBottom) { // check if electron from beauty hadrons return DirectBeauty; } else if (motherPdg == kGamma) { // check if electron from photon conversion mctrack = partMother.front().template mothers_as(); if (mctrack.size()) { - auto const &grmothersIdsVec = mctrack.front().mothersIds(); + auto const& grmothersIdsVec = mctrack.front().mothersIds(); if (grmothersIdsVec.empty()) { return DirectGamma; } @@ -301,7 +309,7 @@ struct HfTaskSingleElectron { partMother = mctrack; mctrack = partMother.front().template mothers_as(); if (mctrack.size()) { - auto const &ggrmothersIdsVec = mctrack.front().mothersIds(); + auto const& ggrmothersIdsVec = mctrack.front().mothersIds(); if (ggrmothersIdsVec.empty()) { if (grmotherPdg == kPi0) { return GammaPi0; @@ -378,17 +386,17 @@ struct HfTaskSingleElectron { } else { // check if electron from Dalitz decays mctrack = partMother.front().template mothers_as(); if (mctrack.size()) { - auto const &grmothersIdsVec = mctrack.front().mothersIds(); + auto const& grmothersIdsVec = mctrack.front().mothersIds(); if (grmothersIdsVec.empty()) { static const std::map pdgToSource = { - {kPi0, Pi0}, - {PdgCode::kEta, Eta}, - {PdgCode::kOmega, Omega}, - {kPhi, Phi}, - {PdgCode::kEtaPrime, EtaPrime}, - {kRho770_0, Rho0}, - {kKPlus, Ke3}, - {kK0Long, K0l}}; + {kPi0, Pi0}, + {PdgCode::kEta, Eta}, + {PdgCode::kOmega, Omega}, + {kPhi, Phi}, + {PdgCode::kEtaPrime, EtaPrime}, + {kRho770_0, Rho0}, + {kKPlus, Ke3}, + {kK0Long, K0l}}; auto it = pdgToSource.find(motherPdg); if (it != pdgToSource.end()) { @@ -448,8 +456,9 @@ struct HfTaskSingleElectron { return Else; } - void processData(soa::Filtered::iterator const &collision, - TracksEl const &tracks) { + void processData(soa::Filtered::iterator const& collision, + TracksEl const& tracks) + { float const flagAnalysedEvt = 0.5; if (!collision.sel8()) { @@ -463,7 +472,7 @@ struct HfTaskSingleElectron { histos.fill(HIST("VtxZ"), collision.posZ()); histos.fill(HIST("nEvents"), flagAnalysedEvt); - for (const auto &track : tracks) { + for (const auto& track : tracks) { if (!trackSel(track)) { continue; @@ -515,8 +524,9 @@ struct HfTaskSingleElectron { } PROCESS_SWITCH(HfTaskSingleElectron, processData, "For real data", true); - void processMc(soa::Filtered::iterator const &collision, - McTracksEl const &tracks, aod::McParticles const &) { + void processMc(soa::Filtered::iterator const& collision, + McTracksEl const& tracks, aod::McParticles const&) + { float const flagAnalysedEvt = 0.5; if (!collision.sel8()) { @@ -530,7 +540,7 @@ struct HfTaskSingleElectron { histos.fill(HIST("VtxZ"), collision.posZ()); histos.fill(HIST("nEvents"), flagAnalysedEvt); - for (const auto &track : tracks) { + for (const auto& track : tracks) { if (!trackSel(track)) { continue; @@ -597,6 +607,7 @@ struct HfTaskSingleElectron { PROCESS_SWITCH(HfTaskSingleElectron, processMc, "For real data", false); }; -WorkflowSpec defineDataProcessing(ConfigContext const &cfgc) { +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ return WorkflowSpec{adaptAnalysisTask(cfgc)}; }