diff --git a/PWGHF/HFL/Tasks/taskSingleElectron.cxx b/PWGHF/HFL/Tasks/taskSingleElectron.cxx index 6c4d1f76833..40cc4c06fa1 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,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,27 +87,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,10 +132,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&) { @@ -137,7 +161,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 +190,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}}); @@ -227,9 +255,11 @@ 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 @@ -237,7 +267,8 @@ struct HfTaskSingleElectron { 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()) { @@ -250,7 +281,8 @@ struct HfTaskSingleElectron { } 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,9 +290,12 @@ 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(); @@ -451,7 +486,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 +503,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()); @@ -480,8 +525,7 @@ struct HfTaskSingleElectron { PROCESS_SWITCH(HfTaskSingleElectron, processData, "For real data", true); void processMc(soa::Filtered::iterator const& collision, - McTracksEl const& tracks, - aod::McParticles const&) + McTracksEl const& tracks, aod::McParticles const&) { float const flagAnalysedEvt = 0.5; @@ -506,7 +550,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 +584,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()); @@ -558,6 +609,5 @@ struct HfTaskSingleElectron { WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { - return WorkflowSpec{ - adaptAnalysisTask(cfgc)}; + return WorkflowSpec{adaptAnalysisTask(cfgc)}; }