diff --git a/PWGHF/HFC/Tasks/taskCorrelationHfeHadrons.cxx b/PWGHF/HFC/Tasks/taskCorrelationHfeHadrons.cxx index f3eaef5e54f..a522e2832ef 100644 --- a/PWGHF/HFC/Tasks/taskCorrelationHfeHadrons.cxx +++ b/PWGHF/HFC/Tasks/taskCorrelationHfeHadrons.cxx @@ -37,6 +37,7 @@ struct HfTaskCorrelationHfeHadrons { 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})"}; + ConfigurableAxis binsPhi{"binsPhi", {100, 0.0, 7}, "#it{p_{T}}(GeV/#it{c})"}; HistogramRegistry registry{ "registry", @@ -47,11 +48,22 @@ struct HfTaskCorrelationHfeHadrons { 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 axisPhi = {binsPhi, "#it{#varphi}"}; 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("hInclusiveMixEHCorrel", "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::kTHnSparseD, {{axisPt}, {axisPt}, {axisDeltaPhi}, {axisDeltaEta}}}); + registry.add("hLikeSignMixEHCorrel", "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::kTHnSparseD, {{axisPt}, {axisPt}, {axisDeltaPhi}, {axisDeltaEta}}}); + registry.add("hUnlikeSignMixEHCorrel", "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::kTHnSparseD, {{axisPt}, {axisPt}, {axisDeltaPhi}, {axisDeltaEta}}}); + registry.add("hPhi", "phi distribution for electron", {HistType::kTH1D, {{axisPhi}}}); + registry.add("hPhiLS", "phi distribution for Like sign electron", {HistType::kTH1D, {{axisPhi}}}); + registry.add("hPhiUS", "phi distribution for Unlike sign electron", {HistType::kTH1D, {{axisPhi}}}); + + registry.add("hadronPhi", "phi distribution for hadron", {HistType::kTH1D, {{axisPhi}}}); + 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}}}); } @@ -88,6 +100,57 @@ struct HfTaskCorrelationHfeHadrons { PROCESS_SWITCH(HfTaskCorrelationHfeHadrons, process, "Process ", false); + // correlation for electron hadron + void processDataMixedEvent(aod::HfElectron const& electrons, aod::Hadron const& hadrons) + { + + for (const auto& electron : electrons) { + + double deltaPhiMix = -999; + double deltaEtaMix = -999; + registry.fill(HIST("hPhi"), electron.phiElectron()); + + if (electron.nElectronsUS() > 0) { + + registry.fill(HIST("hPhiUS"), electron.phiElectron()); + } + + if (electron.nElectronsLS() > 0) { + + registry.fill(HIST("hPhiLS"), electron.phiElectron()); + } + if (electron.poolBin() < 0) + continue; + + for (const auto& hadron : hadrons) { + if (electron.timeStamp() == hadron.timeStamp()) { + + continue; // or continue; if you're inside a loop + } + + if (hadron.poolBin() == electron.poolBin()) { + continue; + } + if (hadron.gIndexCol() == electron.gIndexCol()) { + continue; + } + + deltaPhiMix = RecoDecay::constrainAngle(electron.phiElectron() - hadron.phi(), -o2::constants::math::PIHalf); + deltaEtaMix = electron.etaElectron() - hadron.eta(); + + registry.fill(HIST("hadronPhi"), hadron.phi()); + registry.fill(HIST("hInclusiveMixEHCorrel"), electron.ptElectron(), hadron.ptH(), deltaPhiMix, deltaEtaMix); + + if (electron.nElectronsLS() > 0) { + registry.fill(HIST("hLikeSignMixEHCorrel"), electron.ptElectron(), hadron.ptH(), deltaPhiMix, deltaEtaMix); + } + if (electron.nElectronsUS() > 0) { + registry.fill(HIST("hUnlikeSignMixEHCorrel"), electron.ptElectron(), hadron.ptH(), deltaPhiMix, deltaEtaMix); + } + } + } + } + PROCESS_SWITCH(HfTaskCorrelationHfeHadrons, processDataMixedEvent, "Process offlineevent mix ", true); void processMcGen(aod::HfEHadronMcPair const& mcGenpairEntries) { double deltaPhi = -999; @@ -109,7 +172,7 @@ struct HfTaskCorrelationHfeHadrons { } } } - PROCESS_SWITCH(HfTaskCorrelationHfeHadrons, processMcGen, "Process for Mc Gen ", true); + PROCESS_SWITCH(HfTaskCorrelationHfeHadrons, processMcGen, "Process for Mc Gen ", false); }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) diff --git a/PWGHF/HFL/DataModel/ElectronSelectionTable.h b/PWGHF/HFL/DataModel/ElectronSelectionTable.h index 4906b01d229..d819332e3ba 100644 --- a/PWGHF/HFL/DataModel/ElectronSelectionTable.h +++ b/PWGHF/HFL/DataModel/ElectronSelectionTable.h @@ -93,8 +93,9 @@ DECLARE_SOA_COLUMN(TpcChi2NClTrack, tpcChi2NClTrack, float); //! Chi2 / DECLARE_SOA_COLUMN(DcaXYTrack, dcaXYTrack, float); //! dca of the electron in xy direction DECLARE_SOA_COLUMN(DcaZTrack, dcaZTrack, float); //! dca of the electron in z direction -DECLARE_SOA_COLUMN(M02El, m02El, float); //! M02 of the electron cluster -DECLARE_SOA_COLUMN(EopEl, eopEl, float); //! energy momentum ratio of the electron +DECLARE_SOA_COLUMN(EopEl, eopEl, float); //! energy momentum ratio of the electron +DECLARE_SOA_COLUMN(M02El, m02El, float); //! M02 of the electron cluster + DECLARE_SOA_COLUMN(LSMassEE, lSMassEE, std::vector); //! mass of the Like sign electron pair DECLARE_SOA_COLUMN(ULSMassEE, uLSMassEE, std::vector); //! mass of UnLike sign electron pair DECLARE_SOA_COLUMN(NElPairLS, nElPairLS, int); //! Number of Like sign electron pair diff --git a/PWGHF/HFL/TableProducer/electronSelectionWithTpcEmcal.cxx b/PWGHF/HFL/TableProducer/electronSelectionWithTpcEmcal.cxx index 358d5d3642b..c274de08037 100644 --- a/PWGHF/HFL/TableProducer/electronSelectionWithTpcEmcal.cxx +++ b/PWGHF/HFL/TableProducer/electronSelectionWithTpcEmcal.cxx @@ -85,7 +85,8 @@ struct HfElectronSelectionWithTpcEmcal { Configurable dcaZTrackMax{"dcaZTrackMax", 1.0f, "DCA Z cut"}; Configurable etaTrackMax{"etaTrackMax", 0.6f, "Eta range for electron tracks"}; Configurable etaTrackMin{"etaTrackMin", -0.6f, "Eta range for electron tracks"}; - Configurable ptTrackMin{"ptTrackMin", 3.0f, "Transverse MOmentum range for electron tracks"}; + Configurable ptTrackMin{"ptTrackMin", 3.0f, "Min Transverse MOmentum range for electron tracks"}; + Configurable ptTrackMax{"ptTrackMax", 12.0f, "Max Transverse MOmentum range for electron tracks"}; Configurable tpccrossCut{"tpccrossCut", 70, "TPC crossrows cut"}; Configurable itsChi2{"itsChi2", 36, "ITS chi2 cluster cut"}; Configurable tpcChi2NCl{"tpcChi2NCl", 4, "TPC chi2 cluster cut"}; @@ -286,7 +287,7 @@ struct HfElectronSelectionWithTpcEmcal { if ((track.phi() < phiTrackEMCalMin || track.phi() > phiTrackEMCalMax) && (track.phi() < phiTrackDCalMin || track.phi() > phiTrackDCalMax)) { return false; } - if (track.pt() < ptTrackMin) { + if (track.pt() < ptTrackMin || track.pt() > ptTrackMax) { return false; } return true; @@ -589,7 +590,7 @@ struct HfElectronSelectionWithTpcEmcal { } // Pass multiplicities and other required parameters for this electron - hfElectronSelection(electron.collisionId(), electron.globalIndex(), electron.eta(), electron.phi(), electron.pt(), electron.tpcNSigmaEl(), electron.tofNSigmaEl(), electron.tpcNClsCrossedRows(), electron.tpcCrossedRowsOverFindableCls(), electron.itsChi2NCl(), electron.tpcChi2NCl(), electron.dcaXY(), electron.dcaZ(), m02, eop, vecLSMass, vecULSMass, nElPairsLS, nElPairsUS, isEMcal); + hfElectronSelection(electron.collisionId(), electron.globalIndex(), electron.eta(), electron.phi(), electron.pt(), electron.tpcNSigmaEl(), electron.tofNSigmaEl(), electron.tpcNClsCrossedRows(), electron.tpcCrossedRowsOverFindableCls(), electron.itsChi2NCl(), electron.tpcChi2NCl(), electron.dcaXY(), electron.dcaZ(), eop, m02, vecLSMass, vecULSMass, nElPairsLS, nElPairsUS, isEMcal); } // Electron Identification template