From 0283af3636f7a405b021832ddc21dec938124cb9 Mon Sep 17 00:00:00 2001 From: Biao Zhang Date: Wed, 2 Jun 2021 17:56:46 +0200 Subject: [PATCH 1/3] jpsi for run5 --- Analysis/Tasks/PWGHF/CMakeLists.txt | 2 +- .../PWGHF/HFJpsiToEECandidateSelector.cxx | 82 ++++++++++++++++--- Analysis/Tasks/PWGHF/taskJpsi.cxx | 14 ++-- 3 files changed, 80 insertions(+), 18 deletions(-) diff --git a/Analysis/Tasks/PWGHF/CMakeLists.txt b/Analysis/Tasks/PWGHF/CMakeLists.txt index 37517c72640bf..7f3cd73c73cfb 100644 --- a/Analysis/Tasks/PWGHF/CMakeLists.txt +++ b/Analysis/Tasks/PWGHF/CMakeLists.txt @@ -70,7 +70,7 @@ o2_add_dpl_workflow(hf-lc-candidate-selector o2_add_dpl_workflow(hf-jpsi-toee-candidate-selector SOURCES HFJpsiToEECandidateSelector.cxx - PUBLIC_LINK_LIBRARIES O2::Framework O2::AnalysisDataModel O2::AnalysisCore O2::DetectorsVertexing + PUBLIC_LINK_LIBRARIES O2::Framework O2::AnalysisDataModel O2::AnalysisCore O2::DetectorsVertexing O2::ALICE3Analysis COMPONENT_NAME Analysis) o2_add_dpl_workflow(hf-xic-topkpi-candidate-selector diff --git a/Analysis/Tasks/PWGHF/HFJpsiToEECandidateSelector.cxx b/Analysis/Tasks/PWGHF/HFJpsiToEECandidateSelector.cxx index 13afe1ffe232d..f01b48ce4ca73 100644 --- a/Analysis/Tasks/PWGHF/HFJpsiToEECandidateSelector.cxx +++ b/Analysis/Tasks/PWGHF/HFJpsiToEECandidateSelector.cxx @@ -20,12 +20,33 @@ #include "AnalysisDataModel/HFSecondaryVertex.h" #include "AnalysisDataModel/HFCandidateSelectionTables.h" #include "AnalysisCore/TrackSelectorPID.h" +#include "ALICE3Analysis/RICH.h" using namespace o2; using namespace o2::framework; using namespace o2::aod::hf_cand_prong2; using namespace o2::analysis::hf_cuts_jpsi_toee; +namespace o2::aod +{ + +namespace indices +{ +DECLARE_SOA_INDEX_COLUMN(Track, track); +DECLARE_SOA_INDEX_COLUMN(RICH, rich); +} // namespace indices + +DECLARE_SOA_INDEX_TABLE_USER(RICHTracksIndex, Tracks, "RICHTRK", indices::TrackId, indices::RICHId); +} // namespace o2::aod + +struct RICHindexbuilder { + Builds ind; + void init(o2::framework::InitContext&) + { + } +}; + + /// Struct for applying J/ψ → e+ e− selection cuts struct HFJpsiToEECandidateSelector { Produces hfSelJpsiToEECandidate; @@ -36,6 +57,15 @@ struct HFJpsiToEECandidateSelector { Configurable d_pidTPCMinpT{"d_pidTPCMinpT", 0.15, "Lower bound of track pT for TPC PID"}; Configurable d_pidTPCMaxpT{"d_pidTPCMaxpT", 10., "Upper bound of track pT for TPC PID"}; Configurable d_nSigmaTPC{"d_nSigmaTPC", 3., "Nsigma cut on TPC only"}; + + Configurable d_pidTOFMinpT{"d_pidTOFMinpT", 0.15, "Lower bound of track pT for TOF PID"}; + Configurable d_pidTOFMaxpT{"d_pidTOFMaxpT", 5., "Upper bound of track pT for TOF PID"}; + Configurable d_nSigmaTOF{"d_nSigmaTOF", 3., "Nsigma cut on TOF only"}; + + Configurable d_pidRICHMinpT{"d_pidRICHMinpT", 0.15, "Lower bound of track pT for RICH PID"}; + Configurable d_pidRICHMaxpT{"d_pidRICHMaxpT", 10., "Upper bound of track pT for RICH PID"}; + Configurable d_nSigmaRICH{"d_nSigmaRICH", 3., "Nsigma cut on RICH only"}; + Configurable d_nSigmaTOFCombined{"d_nSigmaTOFCombined", 5., "Nsigma cut on TOF combined with TPC"}; //Configurable d_TPCNClsFindablePIDCut{"d_TPCNClsFindablePIDCut", 70., "Lower bound of TPC findable clusters for good PID"}; // topological cuts Configurable> pTBins{"pTBins", std::vector{hf_cuts_jpsi_toee::pTBins_v}, "pT bin limits"}; @@ -97,18 +127,28 @@ struct HFJpsiToEECandidateSelector { return true; } + template + bool validRICHPID(const T& track) + { + if (TMath::Abs(track.pt()) < d_pidRICHMinpT || TMath::Abs(track.pt()) >= d_pidRICHMaxpT) { + return false; + } + return true; + } + - void process(aod::HfCandProng2 const& candidates, aod::BigTracksPID const&) + using Trks = soa::Join; + void process(aod::HfCandProng2 const& candidates, const Trks& tracks,aod::RICHs const&) { TrackSelectorPID selectorElectron(kElectron); - selectorElectron.setRangePtTPC(d_pidTPCMinpT, d_pidTPCMaxpT); - selectorElectron.setRangeNSigmaTPC(-d_nSigmaTPC, d_nSigmaTPC); - + selectorElectron.setRangePtTOF(d_pidTOFMinpT, d_pidTOFMaxpT); + selectorElectron.setRangeNSigmaTOF(-d_nSigmaTOF, d_nSigmaTOF); + selectorElectron.setRangeNSigmaTOFCondTPC(-d_nSigmaTOFCombined, d_nSigmaTOFCombined); // looping over 2-prong candidates for (auto& candidate : candidates) { - auto trackPos = candidate.index0_as(); // positive daughter - auto trackNeg = candidate.index1_as(); // negative daughter + auto trackPos = candidate.index0_as(); // positive daughter + auto trackNeg = candidate.index1_as(); // negative daughter if (!(candidate.hfflag() & 1 << DecayType::JpsiToEE)) { hfSelJpsiToEECandidate(0); @@ -132,11 +172,33 @@ struct HFJpsiToEECandidateSelector { } // track-level PID selection - if (selectorElectron.getStatusTrackPIDTPC(trackPos) == TrackSelectorPID::Status::PIDRejected || - selectorElectron.getStatusTrackPIDTPC(trackNeg) == TrackSelectorPID::Status::PIDRejected) { + if (selectorElectron.getStatusTrackPIDTOF(trackPos) == TrackSelectorPID::Status::PIDRejected || + selectorElectron.getStatusTrackPIDTOF(trackNeg) == TrackSelectorPID::Status::PIDRejected) { hfSelJpsiToEECandidate(0); - continue; + continue; } + + bool pidrichPos = validRICHPID(trackPos); + bool pidrichNeg = validRICHPID(trackNeg); + if (pidrichPos && pidrichNeg) { + // LOGF(info, "both good rich tracks"); + } + + // LOGF(info, "cut %f, val pos %f, val neg %f", d_nSigmaRICH, trackPos.rich().richNsigmaEl(), trackNeg.rich().richNsigmaEl()); + if (pidrichPos && pidrichNeg) { + bool selpidrichPos = abs(trackPos.rich().richNsigmaEl()) < d_nSigmaRICH; + bool selpidrichNeg = abs(trackNeg.rich().richNsigmaEl()) < d_nSigmaRICH; +// LOGF(info, "pos %d, neg %d", selpidrichPos, selpidrichNeg); + bool selpidrich = selpidrichPos && selpidrichNeg; + if (selpidrich) { +// LOGF(info, "both sel rich tracks"); + } + if (!selpidrich) { + hfSelJpsiToEECandidate(0); +// LOGF(info, "not selectedtracks"); + continue; + } + } hfSelJpsiToEECandidate(1); } @@ -145,6 +207,6 @@ struct HFJpsiToEECandidateSelector { WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { - return WorkflowSpec{ + return WorkflowSpec{adaptAnalysisTask(cfgc), adaptAnalysisTask(cfgc, TaskName{"hf-jpsi-toee-candidate-selector"})}; } diff --git a/Analysis/Tasks/PWGHF/taskJpsi.cxx b/Analysis/Tasks/PWGHF/taskJpsi.cxx index fe395c8dcf6a7..38510ecba43c9 100644 --- a/Analysis/Tasks/PWGHF/taskJpsi.cxx +++ b/Analysis/Tasks/PWGHF/taskJpsi.cxx @@ -38,9 +38,9 @@ void customize(std::vector& workflowOptions) struct TaskJpsi { HistogramRegistry registry{ "registry", - {{"hptcand", "2-prong candidates;candidate #it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}}, - {"hptprong0", "2-prong candidates;prong 0 #it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}}, - {"hptprong1", "2-prong candidates;prong 1 #it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}}}}; + {{"hptcand", "2-prong candidates;candidate #it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 20.}}}}, + {"hptprong0", "2-prong candidates;prong 0 #it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 20.}}}}, + {"hptprong1", "2-prong candidates;prong 1 #it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 20.}}}}}}; Configurable d_selectionFlagJpsi{"d_selectionFlagJpsi", 1, "Selection Flag for Jpsi"}; Configurable cutYCandMax{"cutYCandMax", -1., "max. cand. rapidity"}; @@ -96,10 +96,10 @@ struct TaskJpsi { struct TaskJpsiMC { HistogramRegistry registry{ "registry", - {{"hPtRecSig", "2-prong candidates (rec. matched);#it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}}, - {"hPtRecBg", "2-prong candidates (rec. unmatched);#it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}}, - {"hPtGen", "2-prong candidates (gen. matched);#it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}}, - {"hPtGenSig", "2-prong candidates (rec. matched);#it{p}_{T}^{gen.} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}}, + {{"hPtRecSig", "2-prong candidates (rec. matched);#it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 20.}}}}, + {"hPtRecBg", "2-prong candidates (rec. unmatched);#it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 20.}}}}, + {"hPtGen", "2-prong candidates (gen. matched);#it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 20.}}}}, + {"hPtGenSig", "2-prong candidates (rec. matched);#it{p}_{T}^{gen.} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 20.}}}}, {"hCPARecSig", "2-prong candidates (rec. matched);cosine of pointing angle;entries", {HistType::kTH1F, {{110, -1.1, 1.1}}}}, {"hCPARecBg", "2-prong candidates (rec. unmatched);cosine of pointing angle;entries", {HistType::kTH1F, {{110, -1.1, 1.1}}}}, {"hEtaRecSig", "2-prong candidates (rec. matched);#it{#eta};entries", {HistType::kTH1F, {{100, -2., 2.}}}}, From b2932af826a5d7d2501e0aa89af2166276d0307a Mon Sep 17 00:00:00 2001 From: Biao Zhang Date: Thu, 3 Jun 2021 19:00:45 +0200 Subject: [PATCH 2/3] jpsi for run5 --- .../PWGHF/HFJpsiToEECandidateSelector.cxx | 157 ++++++++++-------- 1 file changed, 89 insertions(+), 68 deletions(-) diff --git a/Analysis/Tasks/PWGHF/HFJpsiToEECandidateSelector.cxx b/Analysis/Tasks/PWGHF/HFJpsiToEECandidateSelector.cxx index f01b48ce4ca73..be4f49f394861 100644 --- a/Analysis/Tasks/PWGHF/HFJpsiToEECandidateSelector.cxx +++ b/Analysis/Tasks/PWGHF/HFJpsiToEECandidateSelector.cxx @@ -15,61 +15,75 @@ /// \author Nima Zardoshti , CERN /// \author Vít Kučera , CERN -#include "Framework/runDataProcessing.h" -#include "Framework/AnalysisTask.h" -#include "AnalysisDataModel/HFSecondaryVertex.h" -#include "AnalysisDataModel/HFCandidateSelectionTables.h" -#include "AnalysisCore/TrackSelectorPID.h" #include "ALICE3Analysis/RICH.h" +#include "AnalysisCore/TrackSelectorPID.h" +#include "AnalysisDataModel/HFCandidateSelectionTables.h" +#include "AnalysisDataModel/HFSecondaryVertex.h" +#include "Framework/AnalysisTask.h" +#include "Framework/runDataProcessing.h" using namespace o2; using namespace o2::framework; using namespace o2::aod::hf_cand_prong2; using namespace o2::analysis::hf_cuts_jpsi_toee; -namespace o2::aod -{ +namespace o2::aod { -namespace indices -{ +namespace indices { DECLARE_SOA_INDEX_COLUMN(Track, track); DECLARE_SOA_INDEX_COLUMN(RICH, rich); } // namespace indices -DECLARE_SOA_INDEX_TABLE_USER(RICHTracksIndex, Tracks, "RICHTRK", indices::TrackId, indices::RICHId); +DECLARE_SOA_INDEX_TABLE_USER(RICHTracksIndex, Tracks, "RICHTRK", + indices::TrackId, indices::RICHId); } // namespace o2::aod struct RICHindexbuilder { Builds ind; - void init(o2::framework::InitContext&) - { - } + void init(o2::framework::InitContext &) {} }; - /// Struct for applying J/ψ → e+ e− selection cuts struct HFJpsiToEECandidateSelector { Produces hfSelJpsiToEECandidate; - Configurable d_pTCandMin{"d_pTCandMin", 0., "Lower bound of candidate pT"}; - Configurable d_pTCandMax{"d_pTCandMax", 50., "Upper bound of candidate pT"}; + Configurable d_pTCandMin{"d_pTCandMin", 0., + "Lower bound of candidate pT"}; + Configurable d_pTCandMax{"d_pTCandMax", 50., + "Upper bound of candidate pT"}; // TPC - Configurable d_pidTPCMinpT{"d_pidTPCMinpT", 0.15, "Lower bound of track pT for TPC PID"}; - Configurable d_pidTPCMaxpT{"d_pidTPCMaxpT", 10., "Upper bound of track pT for TPC PID"}; + Configurable d_pidTPCMinpT{"d_pidTPCMinpT", 0.15, + "Lower bound of track pT for TPC PID"}; + Configurable d_pidTPCMaxpT{"d_pidTPCMaxpT", 10., + "Upper bound of track pT for TPC PID"}; Configurable d_nSigmaTPC{"d_nSigmaTPC", 3., "Nsigma cut on TPC only"}; - - Configurable d_pidTOFMinpT{"d_pidTOFMinpT", 0.15, "Lower bound of track pT for TOF PID"}; - Configurable d_pidTOFMaxpT{"d_pidTOFMaxpT", 5., "Upper bound of track pT for TOF PID"}; + + Configurable d_pidTOFMinpT{"d_pidTOFMinpT", 0.15, + "Lower bound of track pT for TOF PID"}; + Configurable d_pidTOFMaxpT{"d_pidTOFMaxpT", 5., + "Upper bound of track pT for TOF PID"}; Configurable d_nSigmaTOF{"d_nSigmaTOF", 3., "Nsigma cut on TOF only"}; - Configurable d_pidRICHMinpT{"d_pidRICHMinpT", 0.15, "Lower bound of track pT for RICH PID"}; - Configurable d_pidRICHMaxpT{"d_pidRICHMaxpT", 10., "Upper bound of track pT for RICH PID"}; - Configurable d_nSigmaRICH{"d_nSigmaRICH", 3., "Nsigma cut on RICH only"}; - Configurable d_nSigmaTOFCombined{"d_nSigmaTOFCombined", 5., "Nsigma cut on TOF combined with TPC"}; - //Configurable d_TPCNClsFindablePIDCut{"d_TPCNClsFindablePIDCut", 70., "Lower bound of TPC findable clusters for good PID"}; + Configurable d_pidRICHMinpT{"d_pidRICHMinpT", 0.15, + "Lower bound of track pT for RICH PID"}; + Configurable d_pidRICHMaxpT{"d_pidRICHMaxpT", 10., + "Upper bound of track pT for RICH PID"}; + Configurable d_nSigmaRICH{"d_nSigmaRICH", 3., + "Nsigma cut on RICH only"}; + Configurable d_nSigmaTOFCombined{ + "d_nSigmaTOFCombined", 5., "Nsigma cut on TOF combined with TPC"}; + // Configurable + // d_TPCNClsFindablePIDCut{"d_TPCNClsFindablePIDCut", 70., "Lower bound of TPC + // findable clusters for good PID"}; // topological cuts - Configurable> pTBins{"pTBins", std::vector{hf_cuts_jpsi_toee::pTBins_v}, "pT bin limits"}; - Configurable> cuts{"Jpsi_to_ee_cuts", {hf_cuts_jpsi_toee::cuts[0], npTBins, nCutVars, pTBinLabels, cutVarLabels}, "Jpsi candidate selection per pT bin"}; + Configurable> pTBins{ + "pTBins", std::vector{hf_cuts_jpsi_toee::pTBins_v}, + "pT bin limits"}; + Configurable> cuts{ + "Jpsi_to_ee_cuts", + {hf_cuts_jpsi_toee::cuts[0], npTBins, nCutVars, pTBinLabels, + cutVarLabels}, + "Jpsi candidate selection per pT bin"}; /* /// Selection on goodness of daughter tracks @@ -92,8 +106,8 @@ struct HFJpsiToEECandidateSelector { /// \param trackElectron is the track with the electron hypothesis /// \return true if candidate passes all cuts template - bool selectionTopol(const T1& candidate, const T2& trackPositron, const T2& trackElectron) - { + bool selectionTopol(const T1 &candidate, const T2 &trackPositron, + const T2 &trackElectron) { auto candpT = candidate.pt(); auto pTBin = findBin(pTBins, candpT); if (pTBin == -1) { @@ -106,46 +120,49 @@ struct HFJpsiToEECandidateSelector { } // cut on invariant mass - if (std::abs(InvMassJpsiToEE(candidate) - RecoDecay::getMassPDG(pdg::Code::kJpsi)) > cuts->get(pTBin, "m")) { + if (std::abs(InvMassJpsiToEE(candidate) - + RecoDecay::getMassPDG(pdg::Code::kJpsi)) > + cuts->get(pTBin, "m")) { return false; } // cut on daughter pT - if (trackElectron.pt() < cuts->get(pTBin, "pT El") || trackPositron.pt() < cuts->get(pTBin, "pT El")) { + if (trackElectron.pt() < cuts->get(pTBin, "pT El") || + trackPositron.pt() < cuts->get(pTBin, "pT El")) { return false; } // cut on daughter DCA - need to add secondary vertex constraint here - if (std::abs(trackElectron.dcaPrim0()) > cuts->get(pTBin, "DCA_xy") || std::abs(trackPositron.dcaPrim0()) > cuts->get(pTBin, "DCA_xy")) { + if (std::abs(trackElectron.dcaPrim0()) > cuts->get(pTBin, "DCA_xy") || + std::abs(trackPositron.dcaPrim0()) > cuts->get(pTBin, "DCA_xy")) { return false; } // cut on daughter DCA - need to add secondary vertex constraint here - if (std::abs(trackElectron.dcaPrim1()) > cuts->get(pTBin, "DCA_z") || std::abs(trackPositron.dcaPrim1()) > cuts->get(pTBin, "DCA_z")) { + if (std::abs(trackElectron.dcaPrim1()) > cuts->get(pTBin, "DCA_z") || + std::abs(trackPositron.dcaPrim1()) > cuts->get(pTBin, "DCA_z")) { return false; } return true; } - template - bool validRICHPID(const T& track) - { - if (TMath::Abs(track.pt()) < d_pidRICHMinpT || TMath::Abs(track.pt()) >= d_pidRICHMaxpT) { + template bool validRICHPID(const T &track) { + if (track.pt() < d_pidRICHMinpT || track.pt() >= d_pidRICHMaxpT) { return false; } return true; } - using Trks = soa::Join; - void process(aod::HfCandProng2 const& candidates, const Trks& tracks,aod::RICHs const&) - { + void process(aod::HfCandProng2 const &candidates, const Trks &tracks, + aod::RICHs const &) { TrackSelectorPID selectorElectron(kElectron); selectorElectron.setRangePtTOF(d_pidTOFMinpT, d_pidTOFMaxpT); selectorElectron.setRangeNSigmaTOF(-d_nSigmaTOF, d_nSigmaTOF); - selectorElectron.setRangeNSigmaTOFCondTPC(-d_nSigmaTOFCombined, d_nSigmaTOFCombined); + selectorElectron.setRangeNSigmaTOFCondTPC(-d_nSigmaTOFCombined, + d_nSigmaTOFCombined); // looping over 2-prong candidates - for (auto& candidate : candidates) { + for (auto &candidate : candidates) { auto trackPos = candidate.index0_as(); // positive daughter auto trackNeg = candidate.index1_as(); // negative daughter @@ -163,8 +180,9 @@ struct HFJpsiToEECandidateSelector { } */ - // implement filter bit 4 cut - should be done before this task at the track selection level - // need to add special cuts (additional cuts on decay length and d0 norm) + // implement filter bit 4 cut - should be done before this task at the + // track selection level need to add special cuts (additional cuts on + // decay length and d0 norm) if (!selectionTopol(candidate, trackPos, trackNeg)) { hfSelJpsiToEECandidate(0); @@ -172,41 +190,44 @@ struct HFJpsiToEECandidateSelector { } // track-level PID selection - if (selectorElectron.getStatusTrackPIDTOF(trackPos) == TrackSelectorPID::Status::PIDRejected || - selectorElectron.getStatusTrackPIDTOF(trackNeg) == TrackSelectorPID::Status::PIDRejected) { + if (selectorElectron.getStatusTrackPIDTOF(trackPos) == + TrackSelectorPID::Status::PIDRejected || + selectorElectron.getStatusTrackPIDTOF(trackNeg) == + TrackSelectorPID::Status::PIDRejected) { hfSelJpsiToEECandidate(0); - continue; + continue; } - + bool pidrichPos = validRICHPID(trackPos); bool pidrichNeg = validRICHPID(trackNeg); if (pidrichPos && pidrichNeg) { - // LOGF(info, "both good rich tracks"); - } + // LOGF(info, "both good rich tracks"); + } - // LOGF(info, "cut %f, val pos %f, val neg %f", d_nSigmaRICH, trackPos.rich().richNsigmaEl(), trackNeg.rich().richNsigmaEl()); - if (pidrichPos && pidrichNeg) { - bool selpidrichPos = abs(trackPos.rich().richNsigmaEl()) < d_nSigmaRICH; - bool selpidrichNeg = abs(trackNeg.rich().richNsigmaEl()) < d_nSigmaRICH; -// LOGF(info, "pos %d, neg %d", selpidrichPos, selpidrichNeg); - bool selpidrich = selpidrichPos && selpidrichNeg; - if (selpidrich) { -// LOGF(info, "both sel rich tracks"); - } - if (!selpidrich) { - hfSelJpsiToEECandidate(0); -// LOGF(info, "not selectedtracks"); - continue; - } + // LOGF(info, "cut %f, val pos %f, val neg %f", d_nSigmaRICH, + // trackPos.rich().richNsigmaEl(), trackNeg.rich().richNsigmaEl()); + if (pidrichPos && pidrichNeg) { + bool selpidrichPos = abs(trackPos.rich().richNsigmaEl()) < d_nSigmaRICH; + bool selpidrichNeg = abs(trackNeg.rich().richNsigmaEl()) < d_nSigmaRICH; + // LOGF(info, "pos %d, neg %d", selpidrichPos, selpidrichNeg); + bool selpidrich = selpidrichPos && selpidrichNeg; + if (selpidrich) { + // LOGF(info, "both sel rich tracks"); + } + if (!selpidrich) { + hfSelJpsiToEECandidate(0); + // LOGF(info, "not selectedtracks"); + continue; } + } hfSelJpsiToEECandidate(1); } } }; -WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) -{ +WorkflowSpec defineDataProcessing(ConfigContext const &cfgc) { return WorkflowSpec{adaptAnalysisTask(cfgc), - adaptAnalysisTask(cfgc, TaskName{"hf-jpsi-toee-candidate-selector"})}; + adaptAnalysisTask( + cfgc, TaskName{"hf-jpsi-toee-candidate-selector"})}; } From 9dde1df8e8161f8c19b35e9ef9d574be56e153aa Mon Sep 17 00:00:00 2001 From: Biao Zhang Date: Thu, 3 Jun 2021 19:09:27 +0200 Subject: [PATCH 3/3] clean --- .../PWGHF/HFJpsiToEECandidateSelector.cxx | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/Analysis/Tasks/PWGHF/HFJpsiToEECandidateSelector.cxx b/Analysis/Tasks/PWGHF/HFJpsiToEECandidateSelector.cxx index be4f49f394861..440913f408a3f 100644 --- a/Analysis/Tasks/PWGHF/HFJpsiToEECandidateSelector.cxx +++ b/Analysis/Tasks/PWGHF/HFJpsiToEECandidateSelector.cxx @@ -85,21 +85,6 @@ struct HFJpsiToEECandidateSelector { cutVarLabels}, "Jpsi candidate selection per pT bin"}; - /* - /// Selection on goodness of daughter tracks - /// \note should be applied at candidate selection - /// \param track is daughter track - /// \return true if track is good - template - bool daughterSelection(const T& track) - { - if (track.tpcNClsFound() == 0) { - return false; //is it clusters findable or found - need to check - } - return true; - } - */ - /// Conjugate-independent topological cuts /// \param candidate is candidate /// \param trackPositron is the track with the positron hypothesis @@ -172,15 +157,6 @@ struct HFJpsiToEECandidateSelector { continue; } - /* - // daughter track validity selection - if (!daughterSelection(trackPos) || !daughterSelection(trackNeg)) { - hfSelJpsiToEECandidate(0); - continue; - } - */ - - // implement filter bit 4 cut - should be done before this task at the // track selection level need to add special cuts (additional cuts on // decay length and d0 norm)