diff --git a/PWGHF/HFC/DataModel/CorrelationTables.h b/PWGHF/HFC/DataModel/CorrelationTables.h index 0ffeeea8868..50b2431a040 100644 --- a/PWGHF/HFC/DataModel/CorrelationTables.h +++ b/PWGHF/HFC/DataModel/CorrelationTables.h @@ -470,6 +470,29 @@ DECLARE_SOA_TABLE(DmesonSelection, "AOD", "DINCOLL", // Selection of D meson in aod::hf_selection_dmeson_collision::DmesonSel); // Note: definition of columns and tables for Electron Hadron correlation pairs +namespace hf_electron +{ +DECLARE_SOA_COLUMN(PhiElectron, phiElectron, float); //! Phi of electron +DECLARE_SOA_COLUMN(EtaElectron, etaElectron, float); //! Eta of electron +DECLARE_SOA_COLUMN(PtElectron, ptElectron, float); //! Transverse momentum of electron +DECLARE_SOA_COLUMN(NElectronsLS, nElectronsLS, int); //! number of like-sign +DECLARE_SOA_COLUMN(NElectronsUS, nElectronsUS, int); //! number of Unlike-sign +DECLARE_SOA_COLUMN(PoolBin, poolBin, int); //! Pool Bin of event defined using zvtx and multiplicit +DECLARE_SOA_COLUMN(GIndexCol, gIndexCol, int); //! Global index for the collision +DECLARE_SOA_COLUMN(TimeStamp, timeStamp, int64_t); //! Timestamp for the collision + +} // namespace hf_electron + +DECLARE_SOA_TABLE(HfElectron, "AOD", "HFELECTRON", //! Hf Electron properties + aod::hf_electron::PhiElectron, + aod::hf_electron::EtaElectron, + aod::hf_electron::PtElectron, + aod::hf_electron::NElectronsLS, + aod::hf_electron::NElectronsUS, + aod::hf_electron::PoolBin, + aod::hf_electron::GIndexCol, + aod::hf_electron::TimeStamp); + namespace hf_correlation_electron_hadron { DECLARE_SOA_COLUMN(DeltaPhi, deltaPhi, float); //! DeltaPhi between Electron and Hadrons @@ -477,8 +500,8 @@ DECLARE_SOA_COLUMN(DeltaEta, deltaEta, float); //! DeltaEta between Electron DECLARE_SOA_COLUMN(PtElectron, ptElectron, float); //! Transverse momentum of Electron DECLARE_SOA_COLUMN(PtHadron, ptHadron, float); //! Transverse momentum of Hadron; DECLARE_SOA_COLUMN(PoolBin, poolBin, int); //! Pool Bin of event defined using zvtx and multiplicity -DECLARE_SOA_COLUMN(IsLSEHCorr, isLSEHCorr, int); //! like sign Electron hadron coorelation -DECLARE_SOA_COLUMN(IsULSEHCorr, isULSEHCorr, int); //! unLike sign Electron hadron coorelation +DECLARE_SOA_COLUMN(NPairsLS, nPairsLS, int); //! number of like-sign electron-hadron pairs +DECLARE_SOA_COLUMN(NPairsUS, nPairsUS, int); //! number of unlike-sign electron-hadron pairs } // namespace hf_correlation_electron_hadron DECLARE_SOA_TABLE(HfEHadronPair, "AOD", "HFEHADRONPAIR", //! Hfe-Hadrons pairs Informations hf_correlation_electron_hadron::DeltaPhi, @@ -486,8 +509,8 @@ DECLARE_SOA_TABLE(HfEHadronPair, "AOD", "HFEHADRONPAIR", //! Hfe-Hadrons pairs I hf_correlation_electron_hadron::PtElectron, hf_correlation_electron_hadron::PtHadron, hf_correlation_electron_hadron::PoolBin, - hf_correlation_electron_hadron::IsLSEHCorr, - hf_correlation_electron_hadron::IsULSEHCorr); + hf_correlation_electron_hadron::NPairsLS, + hf_correlation_electron_hadron::NPairsUS); // Note: definition of columns and tables for Electron Hadron correlation pairs for MC Gen namespace hf_correlation_mcgenelectron_hadron diff --git a/PWGHF/HFC/TableProducer/correlatorHfeHadrons.cxx b/PWGHF/HFC/TableProducer/correlatorHfeHadrons.cxx index 2a463696be2..25b5d476269 100644 --- a/PWGHF/HFC/TableProducer/correlatorHfeHadrons.cxx +++ b/PWGHF/HFC/TableProducer/correlatorHfeHadrons.cxx @@ -47,6 +47,8 @@ struct HfCorrelatorHfeHadrons { Produces entryElectronHadronPair; Produces entryElectronHadronPairmcGen; + Produces entryElectron; + Produces entryHadron; // Configurables // Event Selection Configurable zPvPosMax{"zPvPosMax", 10., "Maximum z of the primary vertex (cm)"}; @@ -78,37 +80,36 @@ struct HfCorrelatorHfeHadrons { ConfigurableAxis binsDeltaEta{"binsDeltaEta", {30, -1.8, 1.8}, "#it{#Delta#eta}"}; ConfigurableAxis binsDeltaPhi{"binsDeltaPhi", {32, -o2::constants::math::PIHalf, 3. * o2::constants::math::PIHalf}, "#it{#Delta#varphi}"}; - ConfigurableAxis binsP{"binsP", {50, 0.0, 50}, "#it{p_{T}}(GeV/#it{c})"}; - - HistogramConfigSpec hCorrelSpec{HistType::kTHnSparseD, {{binsP}, {binsP}, {binsDeltaPhi}, {binsDeltaEta}}}; + ConfigurableAxis binsPt{"binsPt", {50, 0.0, 50}, "#it{p_{T}}(GeV/#it{c})"}; + ConfigurableAxis binsPoolBin{"binsPoolBin", {9, 0., 9.}, "PoolBin"}; HistogramRegistry registry{ "registry", - {{"hInclusiveEHCorrel", "Sparse for Delta phi and Delta eta Inclusive Electron with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", hCorrelSpec}, - {"hLSEHCorrel", "Sparse for Delta phi and Delta eta Like sign Electron pair with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", hCorrelSpec}, - {"hULSEHCorrel", "Sparse for Delta phi and Delta eta UnLike sign Electron pair with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", hCorrelSpec}, - {"hMCgenNonHfEHCorrel", "Sparse for Delta phi and Delta eta Non Hf for McGen Inclusive Electron with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", hCorrelSpec}, - {"hMCgenInclusiveEHCorrl", "Sparse for Delta phi and Delta eta for McGen Electron pair with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", hCorrelSpec}, - {"hptElectron", "hptElectron", {HistType::kTH1F, {{binsP}}}}, - - {"hMixEventInclusiveEHCorrl", "Sparse for mix event Delta phi and Delta eta Inclusive Electron with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", hCorrelSpec}, - {"hMixEventLSEHCorrel", "Sparse for mix event Delta phi and Delta eta Like sign Electron pair with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", hCorrelSpec}, - {"hMixEventULSEHCorrel", "Sparse for mix event Delta phi and Delta eta Unlike sign Electron pair with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", hCorrelSpec}, - {"hMixEventMcGenInclusiveEHCorrl", "Sparse for mix event Delta phi and Delta eta Mc gen Inclusive Electron with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", hCorrelSpec}, - {"hMixEventMcGenNonHfEHCorrl", "Sparse for mix event Delta phi and Delta eta Mc gen Inclusive Electron with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", hCorrelSpec}}}; + {}}; void init(InitContext&) { - registry.get(HIST("hInclusiveEHCorrel"))->Sumw2(); - registry.get(HIST("hLSEHCorrel"))->Sumw2(); - registry.get(HIST("hULSEHCorrel"))->Sumw2(); - registry.get(HIST("hMCgenInclusiveEHCorrl"))->Sumw2(); - registry.get(HIST("hMCgenNonHfEHCorrel"))->Sumw2(); - registry.get(HIST("hMixEventInclusiveEHCorrl"))->Sumw2(); - registry.get(HIST("hMixEventLSEHCorrel"))->Sumw2(); - registry.get(HIST("hMixEventULSEHCorrel"))->Sumw2(); - registry.get(HIST("hMixEventMcGenInclusiveEHCorrl"))->Sumw2(); - registry.get(HIST("hMixEventMcGenNonHfEHCorrl"))->Sumw2(); + AxisSpec axisDeltaEta = {binsDeltaEta, "#Delta #eta = #eta_{Electron}- #eta_{Hadron}"}; + AxisSpec axisDeltaPhi = {binsDeltaPhi, "#Delta #varphi = #varphi_{Electron}- #varphi_{Hadron}"}; + AxisSpec axisPt = {binsPt, "#it{p_{T}}(GeV/#it{c})"}; + AxisSpec axisPoolBin = {binsPoolBin, "PoolBin"}; + + registry.add("hInclusiveEHCorrel", "Sparse for Delta phi and Delta eta Inclusive Electron with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", {HistType::kTHnSparseF, {{axisPt}, {axisPt}, {axisDeltaPhi}, {axisDeltaEta}}}); + registry.add("hLSEHCorrel", "Sparse for Delta phi and Delta eta Like sign Electron pair with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", {HistType::kTHnSparseF, {{axisPt}, {axisPt}, {axisDeltaPhi}, {axisDeltaEta}}}); + registry.add("hULSEHCorrel", "Sparse for Delta phi and Delta eta UnLike sign Electron pair with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", {HistType::kTHnSparseF, {{axisPt}, {axisPt}, {axisDeltaPhi}, {axisDeltaEta}}}); + registry.add("hMCgenNonHfEHCorrel", "Sparse for Delta phi and Delta eta for McGen Non Hf Electron with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", {HistType::kTHnSparseF, {{axisPt}, {axisPt}, {axisDeltaPhi}, {axisDeltaEta}}}); + registry.add("hMCgenInclusiveEHCorrl", "Sparse for Delta phi and Delta eta for McGen Electron pair with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", {HistType::kTHnSparseF, {{axisPt}, {axisPt}, {axisDeltaPhi}, {axisDeltaEta}}}); + registry.add("hptElectron", "hptElectron", {HistType::kTH1D, {axisPt}}); + + registry.add("hMixEventInclusiveEHCorrl", "Sparse for mix event Delta phi and Delta eta Inclusive Electron with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", {HistType::kTHnSparseF, {{axisPt}, {axisPt}, {axisDeltaPhi}, {axisDeltaEta}}}); + registry.add("hMixEventLSEHCorrel", "Sparse for mix event Delta phi and Delta eta Like sign Electron pair with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", {HistType::kTHnSparseF, {{axisPt}, {axisPt}, {axisDeltaPhi}, {axisDeltaEta}}}); + registry.add("hMixEventULSEHCorrel", "Sparse for mix event Delta phi and Delta eta Unlike sign Electron pair with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", {HistType::kTHnSparseF, {{axisPt}, {axisPt}, {axisDeltaPhi}, {axisDeltaEta}}}); + registry.add("hMixEventMcGenInclusiveEHCorrl", "Sparse for mix event Delta phi and Delta eta Mc gen Inclusive Electron with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", {HistType::kTHnSparseF, {{axisPt}, {axisPt}, {axisDeltaPhi}, {axisDeltaEta}}}); + registry.add("hMixEventMcGenNonHfEHCorrl", "Sparse for mix event Delta phi and Delta eta Mc gen Non Hf Inclusive Electron with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", {HistType::kTHnSparseF, {{axisPt}, {axisPt}, {axisDeltaPhi}, {axisDeltaEta}}}); + registry.add("hElectronBin", "Electron bin", {HistType::kTH1D, {axisPoolBin}}); + registry.add("hLSElectronBin", "Electron bin", {HistType::kTH1D, {axisPoolBin}}); + registry.add("hULSElectronBin", "Electron bin", {HistType::kTH1D, {axisPoolBin}}); + registry.add("hTracksBin", "Particles associated pool bin", {HistType::kTH1D, {axisPoolBin}}); } // Associated Hadron Selection Cut @@ -132,18 +133,22 @@ struct HfCorrelatorHfeHadrons { } // Electron-hadron Correlation - template - void fillCorrelation(CollisionType const& collision, ElectronType const& electron, TracksType const& tracks) + template + void fillCorrelation(CollisionType const& collision, ElectronType const& electron, TracksType const& tracks, BcType const&) { if (!(isRun3 ? collision.sel8() : (collision.sel7() && collision.alias_bit(kINT7)))) return; int poolBin = corrBinning.getBin(std::make_tuple(collision.posZ(), collision.multFV0M())); + auto bc = collision.template bc_as(); + int gCollisionId = collision.globalIndex(); + int64_t timeStamp = bc.timestamp(); // Construct Deta Phi between electrons and hadrons double ptElectron = -999; double phiElectron = -999; double etaElectron = -999; + int nElectron = 0; for (const auto& eTrack : electron) { ptElectron = eTrack.ptTrack(); @@ -155,51 +160,76 @@ struct HfCorrelatorHfeHadrons { double ptHadron = -999; double etaHadron = -999; double phiHadron = -999; + if (!eTrack.isEmcal()) { continue; } registry.fill(HIST("hptElectron"), ptElectron); + int nElectronLS = 0; + int nElectronUS = 0; + if (eTrack.nElPairLS() > 0) { + for (int i = 0; i < eTrack.nElPairLS(); ++i) { - for (const auto& hTrack : tracks) { - if (hTrack.globalIndex() == eTrack.trackId()) { - continue; + ++nElectronLS; + registry.fill(HIST("hLSElectronBin"), poolBin); } + } + if (eTrack.nElPairUS() > 0) { + for (int i = 0; i < eTrack.nElPairUS(); ++i) { + ++nElectronUS; + registry.fill(HIST("hULSElectronBin"), poolBin); + } + } + + registry.fill(HIST("hElectronBin"), poolBin); + entryElectron(phiElectron, etaElectron, ptElectron, nElectronLS, nElectronUS, poolBin, gCollisionId, timeStamp); + + for (const auto& hTrack : tracks) { // Apply Hadron cut if (!selAssoHadron(hTrack)) { continue; } - - ptHadron = hTrack.pt(); - phiHadron = hTrack.phi(); - etaHadron = hTrack.eta(); + if (nElectron == 0) { + registry.fill(HIST("hTracksBin"), poolBin); + entryHadron(phiHadron, etaHadron, ptHadron, poolBin, gCollisionId, timeStamp); + } + if (hTrack.globalIndex() == eTrack.trackId()) { + continue; + } if (ptCondition && (ptElectron < ptHadron)) { continue; } + ptHadron = hTrack.pt(); + phiHadron = hTrack.phi(); + etaHadron = hTrack.eta(); deltaPhi = RecoDecay::constrainAngle(phiElectron - phiHadron, -o2::constants::math::PIHalf); deltaEta = etaElectron - etaHadron; registry.fill(HIST("hInclusiveEHCorrel"), ptElectron, ptHadron, deltaPhi, deltaEta); - int isLSElectroncorr = 0; - int isULSElectroncorr = 0; - if (eTrack.isLSElectron() > 0) { - for (int i = 0; i < eTrack.isLSElectron(); ++i) { + int nElHadLSCorr = 0; + int nElHadUSCorr = 0; + if (eTrack.nElPairLS() > 0) { + for (int i = 0; i < eTrack.nElPairLS(); ++i) { + + ++nElHadLSCorr; registry.fill(HIST("hLSEHCorrel"), ptElectron, ptHadron, deltaPhi, deltaEta); - ++isLSElectroncorr; } } - if (eTrack.isULSElectron() > 0) { - for (int i = 0; i < eTrack.isULSElectron(); ++i) { + if (eTrack.nElPairUS() > 0) { + for (int i = 0; i < eTrack.nElPairUS(); ++i) { registry.fill(HIST("hULSEHCorrel"), ptElectron, ptHadron, deltaPhi, deltaEta); - ++isULSElectroncorr; + ++nElHadUSCorr; } } - entryElectronHadronPair(deltaPhi, deltaEta, ptElectron, ptHadron, poolBin, isLSElectroncorr, isULSElectroncorr); - } - } + entryElectronHadronPair(deltaPhi, deltaEta, ptElectron, ptHadron, poolBin, nElHadLSCorr, nElHadUSCorr); + + } // end Hadron Track loop + nElectron++; + } // end Electron loop } // mix event electron-hadron correlation @@ -241,23 +271,23 @@ struct HfCorrelatorHfeHadrons { deltaEtaMix = etaElectronMix - etaHadronMix; registry.fill(HIST("hMixEventInclusiveEHCorrl"), ptElectronMix, ptHadronMix, deltaPhiMix, deltaEtaMix); - int isLSElectroncorr = 0; - int isULSElectroncorr = 0; - if (t1.isLSElectron() > 0) { - for (int i = 0; i < t1.isLSElectron(); ++i) { + int nElHadLSCorr = 0; + int nElHadUSCorr = 0; + if (t1.nElPairLS() > 0) { + for (int i = 0; i < t1.nElPairLS(); ++i) { registry.fill(HIST("hMixEventLSEHCorrel"), ptElectronMix, ptHadronMix, deltaPhiMix, deltaEtaMix); - ++isLSElectroncorr; + ++nElHadLSCorr; } } - if (t1.isULSElectron() > 0) { - for (int i = 0; i < t1.isULSElectron(); ++i) { + if (t1.nElPairUS() > 0) { + for (int i = 0; i < t1.nElPairUS(); ++i) { registry.fill(HIST("hMixEventULSEHCorrel"), ptElectronMix, ptHadronMix, deltaPhiMix, deltaEtaMix); - ++isULSElectroncorr; + ++nElHadUSCorr; } } - entryElectronHadronPair(deltaPhiMix, deltaEtaMix, ptElectronMix, ptHadronMix, poolBin, isLSElectroncorr, isULSElectroncorr); + entryElectronHadronPair(deltaPhiMix, deltaEtaMix, ptElectronMix, ptHadronMix, poolBin, nElHadLSCorr, nElHadUSCorr); } } @@ -265,12 +295,12 @@ struct HfCorrelatorHfeHadrons { void processData(TableCollision const& collision, aod::HfCorrSelEl const& electron, - TableTracks const& tracks) + TableTracks const& tracks, aod::BCsWithTimestamps const& bc) { - fillCorrelation(collision, electron, tracks); + fillCorrelation(collision, electron, tracks, bc); } - PROCESS_SWITCH(HfCorrelatorHfeHadrons, processData, "Process for Data", false); + PROCESS_SWITCH(HfCorrelatorHfeHadrons, processData, "Process for Data", true); // ======= Process starts for McRec, Same event ============ @@ -278,7 +308,7 @@ struct HfCorrelatorHfeHadrons { aod::HfCorrSelEl const& mcElectron, McTableTracks const& mcTracks) { - fillCorrelation(mcCollision, mcElectron, mcTracks); + fillCorrelation(mcCollision, mcElectron, mcTracks, 0); } PROCESS_SWITCH(HfCorrelatorHfeHadrons, processMcRec, "Process MC Reco mode", false); @@ -339,7 +369,7 @@ struct HfCorrelatorHfeHadrons { } } } - PROCESS_SWITCH(HfCorrelatorHfeHadrons, processMcGen, "Process MC Gen mode", true); + PROCESS_SWITCH(HfCorrelatorHfeHadrons, processMcGen, "Process MC Gen mode", false); // ====================== Implement Event mixing on Data =============================== // ====================== Implement Event mixing on Data =================================== diff --git a/PWGHF/HFC/Tasks/taskCorrelationHfeHadrons.cxx b/PWGHF/HFC/Tasks/taskCorrelationHfeHadrons.cxx index 44db8479632..94786e27372 100644 --- a/PWGHF/HFC/Tasks/taskCorrelationHfeHadrons.cxx +++ b/PWGHF/HFC/Tasks/taskCorrelationHfeHadrons.cxx @@ -31,23 +31,25 @@ struct HfTaskCorrelationHfeHadrons { // Deltaphi binning Configurable nBinsDeltaPhi{"nBinsDeltaPhi", 32, "Bins for #Delta#varphi bins"}; - HistogramConfigSpec hCorrelSpec{HistType::kTHnSparseD, {{30, 0., 30.}, {20, 0., 20.}, {nBinsDeltaPhi, -o2::constants::math::PIHalf, 3. * o2::constants::math::PIHalf}, {50, -1.8, 1.8}}}; + ConfigurableAxis binsDeltaEta{"binsDeltaEta", {30, -1.8, 1.8}, "#it{#Delta#eta}"}; + ConfigurableAxis binsDeltaPhi{"binsDeltaPhi", {32, -o2::constants::math::PIHalf, 3. * o2::constants::math::PIHalf}, "#it{#Delta#varphi}"}; + ConfigurableAxis binsPt{"binsPt", {50, 0.0, 50}, "#it{p_{T}}(GeV/#it{c})"}; HistogramRegistry registry{ "registry", - {{"hInclusiveEHCorrel", "Sparse for Delta phi and Delta eta Inclusive Electron with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", hCorrelSpec}, - {"hLikeSignEHCorrel", "Sparse for Delta phi and Delta eta Likesign Electronpair with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", hCorrelSpec}, - {"hUnLikeSignEHCorrel", "Sparse for Delta phi and Delta eta UnlikeSign Electron pair with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", hCorrelSpec}, - {"hMcGenInclusiveEHCorrel", "Sparse for Delta phi and Delta eta McGen Inclusive Electron with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", hCorrelSpec}, - {"hMcGenNonHfEHCorrel", "Sparse for Delta phi and Delta eta McGen Non HF Electron with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", hCorrelSpec}}}; + {}}; void init(InitContext&) { - registry.get(HIST("hInclusiveEHCorrel"))->Sumw2(); - registry.get(HIST("hLikeSignEHCorrel"))->Sumw2(); - registry.get(HIST("hUnLikeSignEHCorrel"))->Sumw2(); - registry.get(HIST("hMcGenInclusiveEHCorrel"))->Sumw2(); - registry.get(HIST("hMcGenNonHfEHCorrel"))->Sumw2(); + AxisSpec axisDeltaEta = {binsDeltaEta, "#Delta #eta = #eta_{Electron}- #eta_{Hadron}"}; + AxisSpec axisDeltaPhi = {binsDeltaPhi, "#Delta #varphi = #varphi_{Electron}- #varphi_{Hadron}"}; + AxisSpec axisPt = {binsPt, "#it{p_{T}}(GeV/#it{c})"}; + + registry.add("hInclusiveEHCorrel", "Sparse for Delta phi and Delta eta Inclusive Electron with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", {HistType::kTHnSparseF, {{axisPt}, {axisPt}, {axisDeltaPhi}, {axisDeltaEta}}}); + registry.add("hLikeSignEHCorrel", "Sparse for Delta phi and Delta eta Like sign Electron pair with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", {HistType::kTHnSparseF, {{axisPt}, {axisPt}, {axisDeltaPhi}, {axisDeltaEta}}}); + registry.add("hUnLikeSignEHCorrel", "Sparse for Delta phi and Delta eta UnLike sign Electron pair with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", {HistType::kTHnSparseF, {{axisPt}, {axisPt}, {axisDeltaPhi}, {axisDeltaEta}}}); + registry.add("hMcGenInclusiveEHCorrel", "Sparse for Delta phi and Delta eta for McGen Inclusive Electron with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", {HistType::kTHnSparseF, {{axisPt}, {axisPt}, {axisDeltaPhi}, {axisDeltaEta}}}); + registry.add("hMcGenNonHfEHCorrel", "Sparse for Delta phi and Delta eta for McGen NonHeavy flavour Electron pair with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", {HistType::kTHnSparseF, {{axisPt}, {axisPt}, {axisDeltaPhi}, {axisDeltaEta}}}); } // correlation for electron hadron @@ -66,14 +68,14 @@ struct HfTaskCorrelationHfeHadrons { ptHadron = pairEntry.ptHadron(); registry.fill(HIST("hInclusiveEHCorrel"), ptElectron, ptHadron, deltaPhi, deltaEta); - if (pairEntry.isLSEHCorr() > 0) { - for (int i = 0; i < pairEntry.isLSEHCorr(); ++i) { + if (pairEntry.nPairsLS() > 0) { + for (int i = 0; i < pairEntry.nPairsLS(); ++i) { registry.fill(HIST("hLikeSignEHCorrel"), ptElectron, ptHadron, deltaPhi, deltaEta); } } - if (pairEntry.isULSEHCorr() > 0) { - for (int i = 0; i < pairEntry.isULSEHCorr(); ++i) { + if (pairEntry.nPairsUS() > 0) { + for (int i = 0; i < pairEntry.nPairsLS(); ++i) { registry.fill(HIST("hUnlikeSignEHCorrel"), ptElectron, ptHadron, deltaPhi, deltaEta); } diff --git a/PWGHF/HFL/DataModel/ElectronSelectionTable.h b/PWGHF/HFL/DataModel/ElectronSelectionTable.h index 0afb342831a..e590ee1d94d 100644 --- a/PWGHF/HFL/DataModel/ElectronSelectionTable.h +++ b/PWGHF/HFL/DataModel/ElectronSelectionTable.h @@ -51,7 +51,6 @@ DECLARE_SOA_COLUMN(DeltaPhiMatch, deltaPhiMatch, float); //! dPhi matched track DECLARE_SOA_COLUMN(IsEmcal, isEmcal, bool); //! electron information with Emcal } // namespace hf_sel_electron DECLARE_SOA_TABLE(HfSelEl, "AOD", "HFSELEL", //! Electron Informations - o2::soa::Index<>, hf_sel_electron::CollisionId, hf_sel_electron::TrackId, hf_sel_electron::EtaTrack, @@ -83,13 +82,12 @@ DECLARE_SOA_COLUMN(PhiTrack, phiTrack, float); //! azimuth of th DECLARE_SOA_COLUMN(PtTrack, ptTrack, float); //! transverse momentum of the electron track DECLARE_SOA_COLUMN(TpcNSigmaElTrack, tpcNSigmaElTrack, float); //! tpcNSigma of the electron track(TPC PID) DECLARE_SOA_COLUMN(TofNSigmaElTrack, tofNSigmaElTrack, float); //! tofNSigma of the electron track(TOF PID) -DECLARE_SOA_COLUMN(IsLSElectron, isLSElectron, int); //! Like sign electron information -DECLARE_SOA_COLUMN(IsULSElectron, isULSElectron, int); //! Unlike sign electron information +DECLARE_SOA_COLUMN(NElPairLS, nElPairLS, int); //! Number of Like sign electron pair +DECLARE_SOA_COLUMN(NElPairUS, nElPairUS, int); //! Number of UnLike sign electron pair DECLARE_SOA_COLUMN(IsEmcal, isEmcal, bool); //! electron information } // namespace hf_corr_sel_electron DECLARE_SOA_TABLE(HfCorrSelEl, "AOD", "HfCORRSELEL", //! Electron Informations - o2::soa::Index<>, hf_corr_sel_electron::CollisionId, hf_corr_sel_electron::TrackId, hf_corr_sel_electron::EtaTrack, @@ -97,8 +95,8 @@ DECLARE_SOA_TABLE(HfCorrSelEl, "AOD", "HfCORRSELEL", //! Electron Informations hf_corr_sel_electron::PtTrack, hf_corr_sel_electron::TpcNSigmaElTrack, hf_corr_sel_electron::TofNSigmaElTrack, - hf_corr_sel_electron::IsLSElectron, - hf_corr_sel_electron::IsULSElectron, + hf_corr_sel_electron::NElPairLS, + hf_corr_sel_electron::NElPairUS, hf_corr_sel_electron::IsEmcal); // definition of columns and tables for Mc Gen HfElectron Selection @@ -114,7 +112,6 @@ DECLARE_SOA_COLUMN(IsNonHfeMc, isNonHfeMc, bool); //! Non-Heavy flavour elect } // namespace hf_mcgen_sel_electron DECLARE_SOA_TABLE(HfMcGenSelEl, "AOD", "HFMCGENSELEL", //! Electron Informations - o2::soa::Index<>, hf_mcgen_sel_electron::McCollisionId, hf_mcgen_sel_electron::TrackId, hf_mcgen_sel_electron::EtaTrackMc, diff --git a/PWGHF/HFL/TableProducer/electronSelectionWithTpcEmcal.cxx b/PWGHF/HFL/TableProducer/electronSelectionWithTpcEmcal.cxx index 971200a7105..ae8be97b6b9 100644 --- a/PWGHF/HFL/TableProducer/electronSelectionWithTpcEmcal.cxx +++ b/PWGHF/HFL/TableProducer/electronSelectionWithTpcEmcal.cxx @@ -50,6 +50,12 @@ struct HfElectronSelectionWithTpcEmcal { Produces electronSel; Produces hfElectronSelection; Produces hfGenElectronSel; + + enum EMCalRegion { + NoAcceptance = 0, + EMCalAcceptance = 1, + DCalAcceptance = 2 + }; // Configurables // EMCal Cluster information KFParticle kfNonHfe; @@ -137,64 +143,67 @@ struct HfElectronSelectionWithTpcEmcal { ConfigurableAxis binsDeltaPhi{"binsDeltaPhi", {20, -0.2, 0.2}, "Track Cluser Match #Delta #varphi"}; ConfigurableAxis binsMass{"binsMass", {100, 0.0, 2.0}, "Mass (GeV/#it{c}^{2}); entries"}; - HistogramConfigSpec hEmcClusterEnergySpec{HistType::kTH1F, {{binsEmcEnergy}}}; - HistogramConfigSpec hEmcClusterEtaPhiSpec{HistType::kTH2F, {{binsEta}, {binsPhi}}}; - HistogramConfigSpec hEmcClusterEnergyCellSpec{HistType::kTH2F, {{binsEmcEnergy}, {binsEmcClsNCells}}}; - HistogramConfigSpec hEmcClusterEnergyTimeSpec{HistType::kTH2F, {{binsEmcEnergy}, {binsEmcClsTime}}}; - - HistogramConfigSpec hDeltaPhiDeltaEtaEmcClusterTrackTime{HistType::kTH3F, {{binsDeltaEta}, {binsDeltaPhi}, {binsEmcClsTime}}}; - HistogramConfigSpec hAfterMatchEoPSigamSpec{HistType::kTHnSparseD, {{binsEoP}, {binsPt}, {binsnSigma}, {binsM02}, {binsM20}}}; - - HistogramConfigSpec hTrackEnergyLossSpec{HistType::kTH3F, {{binsdEdx}, {binsPt}, {binsPassEMcal}}}; - - HistogramConfigSpec hTracknSigmaSpec{HistType::kTH3F, {{binsnSigma}, {binsPt}, {binsPassEMcal}}}; - HistogramRegistry registry{ "registry", - {{"hNevents", "No of events", {HistType::kTH1F, {{3, 1, 4}}}}, - {"hZvertex", "z vertex", {HistType::kTH1F, {{binsPosZ}}}}, - {"hLikeMass", "Like mass", {HistType::kTH1F, {{binsMass}}}}, - {"hUnLikeMass", "unLike mass", {HistType::kTH1F, {{binsMass}}}}, - {"hLikeSignPt", "Like sign Momentum ", {HistType::kTH1F, {{binsPt}}}}, - {"hUnLikeSignPt", "UnLike sign Momentum", {HistType::kTH1F, {{binsPt}}}}, - {"hMcgenInElectron", "Mc Gen Inclusive Electron", {HistType::kTH1F, {{binsPt}}}}, - {"hMcgenAllNonHfeElectron", "Mc Gen All NonHf Electron", {HistType::kTH1F, {{binsPt}}}}, - {"hMcgenNonHfeElectron", "Mc Gen NonHf Electron with mother", {HistType::kTH1F, {{binsPt}}}}, - {"hPi0eEmbTrkPt", "Mc Gen Pi0 mother NonHf Electron", {HistType::kTH1F, {{binsPt}}}}, - - {"hEtaeEmbTrkPt", "Mc Gen Eta mother NonHf Electron", {HistType::kTH1F, {{binsPt}}}}, - {"hEmcClusterM02", "m02", {HistType::kTH1F, {{binsM02}}}}, - {"hEmcClusterM20", "m20", {HistType::kTH1F, {{binsM20}}}}, - {"hTrackEtaPhi", "TPC EtaPhi Info; #eta;#varphi;passEMcal;", {HistType::kTH3F, {{binsEta}, {binsPhi}, {binsPassEMcal}}}}, - {"hTrackEnergyLossVsP", " TPC Energy loss info vs P; dE/dx;#it{p} (GeV#it{/c});passEMcal;", hTrackEnergyLossSpec}, - {"hTrackEnergyLossVsPt", " TPC Energy loss info vs Pt; dE/dx;#it{p}_{T} (GeV#it{/c});passEMcal;", hTrackEnergyLossSpec}, - {"hTracknSigmaVsP", " TPC nSigma info vs P; n#sigma;#it{p} (GeV#it{/c});passEMcal;", hTracknSigmaSpec}, - {"hTracknSigmaVsPt", " TPC nSigma info vs Pt; n#sigma;#it{p}_{T} (GeV#it{/c});passEMcal;", hTracknSigmaSpec}, - {"hEmcClusterEnergy", "EMCal Cluster Info before match Energy; Energy (GeV)", hEmcClusterEnergySpec}, - {"hEmcClusterEtaPhi", "EMCal Cluster Info before match Eta and Phi; #eta;#varphi;", hEmcClusterEtaPhiSpec}, - {"hEmcClusterEnergyCell", "EMCal Cluster Info before match Energy vs nCells; Energy (GeV);ncell;", hEmcClusterEnergyCellSpec}, - {"hEmcClusterEnergyTime", "EMCal Cluster Info before match Energy vs time; Energy (GeV); sec;", hEmcClusterEnergyTimeSpec}, - {"hEmcClusterAfterMatchEnergy", "EMCal Cluster Info After match Energy; Energy (GeV)", hEmcClusterEnergySpec}, - {"hEmcClusterAfterMatchEtaPhi", "EMCal Cluster Info After match Eta and Phi; #eta;#varphi;", hEmcClusterEtaPhiSpec}, - {"hEmcClusterAfterMatchEnergyCells", "EMCal Cluster Info After match Energy vs nCells; Energy (GeV);ncell;", hEmcClusterEnergyCellSpec}, - {"hEmcClusterAfterMatchEnergyTime", "EMCal Cluster Info After match Energy vs time; Energy (GeV); sec;", hEmcClusterEnergyTimeSpec}, - - {"hAfterMatchSigmaVsEoP", "PID Info after match EoP vs Sigma ; E/P;#it{p}_{T} (GeV#it{/c});n#sigma; m02; m20;", hAfterMatchEoPSigamSpec}, - {"hAfterMatchEoPVsP", "PID Info after match EoP vs P; E/P;#it{p} (GeV#it{/c});", {HistType::kTH2F, {{binsEoP}, {binsPt}}}}, - {"hAfterMatchSigmaVsP", "PID Info after match Sigma vs Momentum ; n#sigma; #it{p} (GeV#it{/c}; ", {HistType::kTH2F, {{binsnSigma}, {binsPt}}}}, - {"hAfterMatchEtaPhi", "PID Info after match Eta vs Phi ; #eta; #varphi; ", {HistType::kTH2F, {{binsEta}, {binsPhi}}}}, - {"hAfterMatchEnergyLossVsP", "PID Info after match Energy loss info vs P ; dE/dx;#it{p} (GeV#it{/c});; ", {HistType::kTH2F, {{binsdEdx}, {binsPt}}}}, - {"hAfterMatchEnergyLossVsPt", "PID Info after match Energy loss info vs Pt ;dE/dx;#it{p}_{T} (GeV#it{/c}); ", {HistType::kTH2F, {{binsdEdx}, {binsPt}}}}, - - {"hAfterPIDEtaPhi", "PID Info after PID Cuts Eta vs Phi ; #eta; #varphi; ", {HistType::kTH2F, {{binsEta}, {binsPhi}}}}, - {"hEPRatioAfterPID", "E/P Ratio after PID Cuts apply only trackwodca filter", {HistType::kTH2F, {{binsPt}, {binsEmcEnergy}}}}, - {"hPIDAfterPIDCuts", "PID Info after PID cuts; E/P;#it{p}_{T} (GeV#it{/c});n#sigma;m02; m20;", hAfterMatchEoPSigamSpec}, - {"hEmcClsTrkEtaPhiDiffTime", "EmcClsTrkEtaPhiDiffTime;#Delta#eta;#Delta#varphi;Sec;", hDeltaPhiDeltaEtaEmcClusterTrackTime}}}; + {}}; void init(o2::framework::InitContext&) { - registry.get(HIST("hAfterMatchSigmaVsEoP"))->Sumw2(); - registry.get(HIST("hPIDAfterPIDCuts"))->Sumw2(); + AxisSpec axisPosZ = {binsPosZ, "Pos Z"}; + AxisSpec axisMass = {binsMass, "Mass (GeV/#it{c}^{2}); entries"}; + AxisSpec axisPt = {binsPt, "#it{p_{T}}(GeV/#it{c})"}; + AxisSpec axisEta = {binsEta, "#it{#eta}"}; + AxisSpec axisPhi = {binsPhi, "#it{#varphi}"}; + AxisSpec axisdEdx = {binsdEdx, "dE/dX"}; + AxisSpec axisnSigma = {binsnSigma, "it{#sigma_{TPC}}"}; + AxisSpec axisM02 = {binsM02, "M02; entries"}; + AxisSpec axisM20 = {binsM20, "M20; entries"}; + AxisSpec axisEoP = {binsEoP, "E/p"}; + AxisSpec axisEmcEnergy = {binsEmcEnergy, "Cluster Energy (GeV/#it{c}^{2})"}; + AxisSpec axisEmcClsNCells = {binsEmcClsNCells, "nCell"}; + AxisSpec axisEmcClsTime = {binsEmcClsTime, "Cluster Time"}; + AxisSpec axisPassEMcal = {binsPassEMcal, "Pass EMcal"}; + AxisSpec axisDeltaEta = {binsDeltaEta, "#Delta #eta = #eta_{trk}- #eta_{cluster}"}; + AxisSpec axisDeltaPhi = {binsDeltaPhi, "#Delta #varphi = #varphi_{trk}- #varphi_{cluster}"}; + + registry.add("hZvertex", "z vertex", {HistType::kTH1D, {axisPosZ}}); + registry.add("hNevents", "No of events", {HistType::kTH1D, {{3, 1, 4}}}); + registry.add("hLikeMass", "Like mass", {HistType::kTH1D, {{axisMass}}}); + registry.add("hUnLikeMass", "unLike mass", {HistType::kTH1D, {{axisMass}}}); + registry.add("hLikeSignPt", "Like sign Momentum ", {HistType::kTH1D, {{axisPt}}}); + registry.add("hUnLikeSignPt", "UnLike sign Momentum", {HistType::kTH1D, {{axisPt}}}); + registry.add("hMcgenInElectron", "Mc Gen Inclusive Electron", {HistType::kTH1D, {{axisPt}}}); + registry.add("hMcgenAllNonHfeElectron", "Mc Gen All NonHf Electron", {HistType::kTH1D, {{axisPt}}}); + registry.add("hMcgenNonHfeElectron", "Mc Gen NonHf Electron with mother", {HistType::kTH1D, {{axisPt}}}); + registry.add("hPi0eEmbTrkPt", "Mc Gen Pi0 mother NonHf Electron", {HistType::kTH1D, {{axisPt}}}); + + registry.add("hEtaeEmbTrkPt", "Mc Gen Eta mother NonHf Electron", {HistType::kTH1D, {{axisPt}}}); + registry.add("hEmcClusterM02", "m02", {HistType::kTH1D, {{axisM02}}}); + registry.add("hEmcClusterM20", "m20", {HistType::kTH1D, {{axisM20}}}); + registry.add("hTrackEtaPhi", "TPC EtaPhi Info; #eta;#varphi;passEMcal;", {HistType::kTH3F, {{axisEta}, {axisPhi}, {axisPassEMcal}}}); + registry.add("hTrackEnergyLossVsP", " TPC Energy loss info vs P; dE/dx;#it{p} (GeV#it{/c});passEMcal;", {HistType::kTH3F, {{axisdEdx}, {axisPt}, {axisPassEMcal}}}); + registry.add("hTrackEnergyLossVsPt", "TPC Energy loss info vs Pt; dE/dx;#it{p}_{T} (GeV#it{/c});passEMcal;", {HistType::kTH3F, {{axisdEdx}, {axisPt}, {axisPassEMcal}}}); + registry.add("hTracknSigmaVsP", " TPC nSigma info vs P; n#sigma;#it{p} (GeV#it{/c});passEMcal;", {HistType::kTH3F, {{axisnSigma}, {axisPt}, {axisPassEMcal}}}); + registry.add("hTracknSigmaVsPt", " TPC nSigma info vs Pt; n#sigma;#it{p}_{T} (GeV#it{/c});passEMcal;", {HistType::kTH3F, {{axisnSigma}, {axisPt}, {axisPassEMcal}}}); + registry.add("hEmcClusterEnergy", "EMCal Cluster Info before match Energy; Energy (GeV); entries;", {HistType::kTH1D, {{axisEmcEnergy}}}); + registry.add("hEmcClusterEtaPhi", "EMCal Cluster Info before match Eta and Phi; #eta;#varphi;", {HistType::kTH2F, {{axisEta}, {axisPhi}}}); + registry.add("hEmcClusterEnergyCell", "EMCal Cluster Info before match Energy vs nCells; Energy (GeV);ncell;", {HistType::kTH2F, {{axisEmcEnergy}, {axisEmcClsNCells}}}); + registry.add("hEmcClusterEnergyTime", "EMCal Cluster Info before match Energy vs time; Energy (GeV); sec;", {HistType::kTH2F, {{axisEmcEnergy}, {axisEmcClsTime}}}); + registry.add("hEmcClusterAfterMatchEnergy", "EMCal Cluster Info After match Energy; Energy (GeV); entries;", {HistType::kTH1D, {{axisEmcEnergy}}}); + registry.add("hEmcClusterAfterMatchEtaPhi", "EMCal Cluster Info After match Eta and Phi; #eta;#varphi;", {HistType::kTH2F, {{axisEta}, {axisPhi}}}); + registry.add("hEmcClusterAfterMatchEnergyCells", "EMCal Cluster Info After match Energy vs nCells; Energy (GeV);ncell;", {HistType::kTH2F, {{axisEmcEnergy}, {axisEmcClsNCells}}}); + registry.add("hEmcClusterAfterMatchEnergyTime", "EMCal Cluster Info After match Energy vs time; Energy (GeV); sec;", {HistType::kTH2F, {{axisEmcEnergy}, {axisEmcClsTime}}}); + registry.add("hAfterMatchSigmaVsEoP", "PID Info after match EoP vs Sigma ; E/P;#it{p}_{T} (GeV#it{/c});n#sigma; m02; m20;", {HistType::kTHnSparseF, {{axisEoP}, {axisPt}, {axisnSigma}, {axisM02}, {axisM20}}}); + registry.add("hAfterMatchEoPVsP", "PID Info after match EoP vs P; E/P;#it{p} (GeV#it{/c});", {HistType::kTH2F, {{axisEoP}, {axisPt}}}); + registry.add("hAfterMatchSigmaVsP", "PID Info after match Sigma vs Momentum ; n#sigma; #it{p} (GeV#it{/c}; ", {HistType::kTH2F, {{axisnSigma}, {axisPt}}}); + registry.add("hAfterMatchEtaPhi", "PID Info after match Eta vs Phi ; #eta; #varphi; ", {HistType::kTH2F, {{axisEta}, {axisPhi}}}); + registry.add("hAfterMatchEnergyLossVsP", "PID Info after match Energy loss info vs P ; dE/dx;#it{p} (GeV#it{/c});; ", {HistType::kTH2F, {{axisdEdx}, {axisPt}}}); + registry.add("hAfterMatchEnergyLossVsPt", "PID Info after match Energy loss info vs Pt ;dE/dx;#it{p}_{T} (GeV#it{/c}); ", {HistType::kTH2F, {{axisdEdx}, {axisPt}}}); + + registry.add("hAfterPIDEtaPhi", "PID Info after PID Cuts Eta vs Phi ; #eta; #varphi; ", {HistType::kTH2F, {{axisEta}, {axisPhi}}}); + registry.add("hEPRatioAfterPID", "E/P Ratio after PID Cuts apply only trackwodca filter", {HistType::kTH2F, {{axisPt}, {axisEmcEnergy}}}); + registry.add("hPIDAfterPIDCuts", "PID Info after PID cuts; E/P;#it{p}_{T} (GeV#it{/c});n#sigma;m02; m20;", {HistType::kTHnSparseF, {{binsEoP}, {binsPt}, {binsnSigma}, {binsM02}, {binsM20}}}); + registry.add("hEmcClsTrkEtaPhiDiffTime", "EmcClsTrkEtaPhiDiffTime;#Delta#eta;#Delta#varphi;Sec;", {HistType::kTH3F, {{binsDeltaEta}, {binsDeltaPhi}, {binsEmcClsTime}}}); } // Track Selection Cut template @@ -261,8 +270,8 @@ struct HfElectronSelectionWithTpcEmcal { template void nonHfe(ElectronType const& electron, TracksType const& tracks, bool isEMcal) { - int isLSElectronFound = 0; - int isULSElectronFound = 0; + int nElPairsLS = 0; + int nElPairsUS = 0; bool isLSElectron = false; bool isULSElectron = false; float invMassElectron = 0.; @@ -331,7 +340,7 @@ struct HfElectronSelectionWithTpcEmcal { // for like charge if (isLSElectron && (invMassElectron <= invariantMass)) { massLike = invMassElectron; - ++isLSElectronFound; + ++nElPairsLS; if (isEMcal) { registry.fill(HIST("hLikeSignPt"), electron.pt()); } @@ -339,14 +348,14 @@ struct HfElectronSelectionWithTpcEmcal { // for unlike charge if (isULSElectron && (invMassElectron <= invariantMass)) { massUnLike = invMassElectron; - ++isULSElectronFound; + ++nElPairsUS; if (isEMcal) { registry.fill(HIST("hUnLikeSignPt"), electron.pt()); } } } // Pass multiplicities and other required parameters for this electron - hfElectronSelection(electron.collisionId(), electron.globalIndex(), electron.eta(), electron.phi(), electron.pt(), electron.tpcNSigmaEl(), electron.tofNSigmaEl(), isLSElectronFound, isULSElectronFound, isEMcal); + hfElectronSelection(electron.collisionId(), electron.globalIndex(), electron.eta(), electron.phi(), electron.pt(), electron.tpcNSigmaEl(), electron.tofNSigmaEl(), nElPairsLS, nElPairsUS, isEMcal); } // Electron Identification template @@ -371,7 +380,7 @@ struct HfElectronSelectionWithTpcEmcal { registry.fill(HIST("hEmcClusterM20"), emcClusterBefore.m20()); } } - int passEMCal; + EMCalRegion passEMCal = NoAcceptance; float phiTrack = -999; float etaTrack = -999; float pTrack = -999; @@ -392,12 +401,11 @@ struct HfElectronSelectionWithTpcEmcal { if (!selTracks(track)) { continue; } - passEMCal = 0; - if ((phiTrack > phiTrackEMCalMin && phiTrack < phiTrackEMCalMax) && (etaTrack > etaTrackMin && etaTrack < etaTrackMax)) - passEMCal = 1; // EMcal acceptance passed + passEMCal = EMCalAcceptance; // EMcal acceptance passed if ((phiTrack > phiTrackDCalMin && phiTrack < phiTrackDCalMax) && ((etaTrack > etaTrackDCalPositiveMin && etaTrack < etaTrackDCalPositiveMax) || (etaTrack > etaTrackDCalNegativeMin && etaTrack < etaTrackDCalNegativeMax))) - passEMCal = 2; // Dcal acceptance passed + passEMCal = DCalAcceptance; // Dcal acceptance passed + if (fillTrackInfo) { registry.fill(HIST("hTrackEtaPhi"), etaTrack, phiTrack, passEMCal); // track etaphi infor after filter bit registry.fill(HIST("hTrackEnergyLossVsP"), track.tpcSignal(), pTrack, passEMCal); // track etaphi infor after filter bit