diff --git a/PWGHF/HFL/Tasks/taskSingleElectron.cxx b/PWGHF/HFL/Tasks/taskSingleElectron.cxx index 6c4d1f76833..51aa6a948d1 100644 --- a/PWGHF/HFL/Tasks/taskSingleElectron.cxx +++ b/PWGHF/HFL/Tasks/taskSingleElectron.cxx @@ -11,7 +11,7 @@ /// /// \file taskSingleElectron.cxx /// \brief task for electrons from heavy-flavour hadron decays -/// \author Jonghan Park (Jeonbuk National University) +/// \author Jonghan Park (Jeonbuk National University), Seul I Jeong (Pusan National University) #include "Common/DataModel/EventSelection.h" #include "Common/DataModel/PIDResponseTOF.h" @@ -41,12 +41,6 @@ using namespace o2::constants::physics; using namespace o2::framework; using namespace o2::framework::expressions; -enum PdgCode { - kEta = 221, - kOmega = 223, - kEtaPrime = 331 -}; - enum SourceType { NotElec = 0, // not electron DirectCharm = 1, // electrons from prompt charm hadrons @@ -102,6 +96,9 @@ struct HfTaskSingleElectron { 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; @@ -119,7 +116,7 @@ struct HfTaskSingleElectron { 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"}; void init(InitContext const&) { @@ -163,6 +160,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}}); @@ -279,16 +277,16 @@ struct HfTaskSingleElectron { if (grmotherPdg == kPi0) { return GammaPi0; } - if (grmotherPdg == PdgCode::kEta) { + if (grmotherPdg == Pdg::kEta) { return GammaEta; } - if (grmotherPdg == PdgCode::kOmega) { + if (grmotherPdg == Pdg::kOmega) { return GammaOmega; } - if (grmotherPdg == kPhi) { + if (grmotherPdg == Pdg::kPhi) { return GammaPhi; } - if (grmotherPdg == PdgCode::kEtaPrime) { + if (grmotherPdg == Pdg::kEtaPrime) { return GammaEtaPrime; } if (grmotherPdg == kRho770_0) { @@ -320,22 +318,22 @@ struct HfTaskSingleElectron { mpt = grmotherPt; return GammaPi0; } - if (grmotherPdg == PdgCode::kEta) { + if (grmotherPdg == Pdg::kEta) { mpdg = grmotherPdg; mpt = grmotherPt; return GammaEta; } - if (grmotherPdg == PdgCode::kOmega) { + if (grmotherPdg == Pdg::kOmega) { mpdg = grmotherPdg; mpt = grmotherPt; return GammaOmega; } - if (grmotherPdg == kPhi) { + if (grmotherPdg == Pdg::kPhi) { mpdg = grmotherPdg; mpt = grmotherPt; return GammaPhi; } - if (grmotherPdg == PdgCode::kEtaPrime) { + if (grmotherPdg == Pdg::kEtaPrime) { mpdg = grmotherPdg; mpt = grmotherPt; return GammaEtaPrime; @@ -355,10 +353,10 @@ struct HfTaskSingleElectron { if (grmothersIdsVec.empty()) { static const std::map pdgToSource = { {kPi0, Pi0}, - {PdgCode::kEta, Eta}, - {PdgCode::kOmega, Omega}, - {kPhi, Phi}, - {PdgCode::kEtaPrime, EtaPrime}, + {Pdg::kEta, Eta}, + {Pdg::kOmega, Omega}, + {Pdg::kPhi, Phi}, + {Pdg::kEtaPrime, EtaPrime}, {kRho770_0, Rho0}, {kKPlus, Ke3}, {kK0Long, K0l}}; @@ -393,16 +391,16 @@ struct HfTaskSingleElectron { mpdg = motherPdg; return Pi0; } - if (motherPdg == PdgCode::kEta) { + if (motherPdg == Pdg::kEta) { return Eta; } - if (motherPdg == PdgCode::kOmega) { + if (motherPdg == Pdg::kOmega) { return Omega; } - if (motherPdg == kPhi) { + if (motherPdg == Pdg::kPhi) { return Phi; } - if (motherPdg == PdgCode::kEtaPrime) { + if (motherPdg == Pdg::kEtaPrime) { return EtaPrime; } if (motherPdg == kRho770_0) { @@ -472,6 +470,12 @@ struct HfTaskSingleElectron { 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()); @@ -539,6 +543,9 @@ 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; }