Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 18 additions & 34 deletions PWGHF/HFC/TableProducer/correlatorHfeHadrons.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,6 @@ struct HfCorrelatorHfeHadrons {
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("hTpcTofNSigmaVsPt", " TPC and TOF nSigma info vs pt; n#sigma; n#sigma;#it{pt} (GeV/#it{c});", {HistType::kTH3F, {{axisNSigma}, {axisNSigma}, {axisPt}}});

// After electron selection Information
registry.add("hTofNSigmaVsPt", " TOF nSigma info vs pt; n#sigma;#it{pt} (GeV/#it{c});", {HistType::kTH2F, {{axisNSigma}, {axisPt}}});
registry.add("hTpcNSigmaVsPt", " TPC nSigma info vs pt; n#sigma;#it{pt} (GeV/#it{c});", {HistType::kTH2F, {{axisNSigma}, {axisPt}}});

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}}});
Expand Down Expand Up @@ -231,17 +226,7 @@ struct HfCorrelatorHfeHadrons {
if (eTrack.isEmcal() && requireEmcal) {
acceptElectron = true;
} else if (!eTrack.isEmcal() && !requireEmcal) {

registry.fill(HIST("hTpcTofNSigmaVsPt"), eTrack.tofNSigmaElTrack(), eTrack.tpcNSigmaElTrack(), eTrack.ptTrack());

// After electron selection Information
if (std::abs(eTrack.tofNSigmaElTrack()) < tofNSigmaEl && eTrack.tpcNSigmaElTrack() > tpcNsigmaElectronMin &&
eTrack.tpcNSigmaElTrack() < tpcNsigmaElectronMax) {

registry.fill(HIST("hTofNSigmaVsPt"), eTrack.tofNSigmaElTrack(), eTrack.ptTrack());
registry.fill(HIST("hTpcNSigmaVsPt"), eTrack.tpcNSigmaElTrack(), eTrack.ptTrack());
acceptElectron = true;
}
acceptElectron = true;
}

if (!acceptElectron) {
Expand All @@ -251,31 +236,33 @@ struct HfCorrelatorHfeHadrons {
registry.fill(HIST("hptElectron"), ptElectron);
int nElectronLS = 0;
int nElectronUS = 0;
float massLike = 0;
float massUnLike = 0;
if (eTrack.nElPairLS() > 0) {
for (int i = 0; i < eTrack.nElPairLS(); ++i) {
massLike = eTrack.invariantMassEE();

auto spanLS = eTrack.lSMassEE();
auto spanUS = eTrack.uLSMassEE();

if (!spanLS.empty()) {
for (size_t i = 0; i < spanLS.size(); ++i) {
float massLike = spanLS[i]; // <-- access i-th element

registry.fill(HIST("hLSElectronBin"), poolBin);
registry.fill(HIST("hLikeMass"), massLike);
registry.fill(HIST("hLikeSignPt"), eTrack.ptTrack());

if (massLike <= invMassEEMax) {
++nElectronLS;
registry.fill(HIST("hLikeSignPt"), eTrack.ptTrack());
}
}
}
if (eTrack.nElPairUS() > 0) {
for (int i = 0; i < eTrack.nElPairUS(); ++i) {
massUnLike = eTrack.invariantMassEE();
if (!spanUS.empty()) {
for (size_t i = 0; i < spanUS.size(); ++i) {
float massUnLike = spanUS[i]; // <-- access i-th element

registry.fill(HIST("hULSElectronBin"), poolBin);
registry.fill(HIST("hUnLikeMass"), massUnLike);
registry.fill(HIST("hUnLikeSignPt"), eTrack.ptTrack());

if (massUnLike <= invMassEEMax) {
++nElectronUS;
registry.fill(HIST("hLikeSignPt"), eTrack.ptTrack());
}
}
}
Expand Down Expand Up @@ -309,18 +296,15 @@ struct HfCorrelatorHfeHadrons {
int nElHadUSCorr = 0;
if (eTrack.nElPairLS() > 0) {
for (int i = 0; i < eTrack.nElPairLS(); ++i) {
if (eTrack.invariantMassEE() <= invMassEEMax) {
++nElHadLSCorr;
registry.fill(HIST("hLSEHCorrel"), ptElectron, ptHadron, deltaPhi, deltaEta);
}
++nElHadLSCorr;
registry.fill(HIST("hLSEHCorrel"), ptElectron, ptHadron, deltaPhi, deltaEta);
}
}
if (eTrack.nElPairUS() > 0) {
for (int i = 0; i < eTrack.nElPairUS(); ++i) {
if (eTrack.invariantMassEE() <= invMassEEMax) {
registry.fill(HIST("hULSEHCorrel"), ptElectron, ptHadron, deltaPhi, deltaEta);
++nElHadUSCorr;
}

registry.fill(HIST("hULSEHCorrel"), ptElectron, ptHadron, deltaPhi, deltaEta);
++nElHadUSCorr;
}
}
entryElectronHadronPair(deltaPhi, deltaEta, ptElectron, ptHadron, poolBin, nElHadLSCorr, nElHadUSCorr);
Expand Down
7 changes: 5 additions & 2 deletions PWGHF/HFL/DataModel/ElectronSelectionTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <Framework/AnalysisDataModel.h>

#include <cstdint>
#include <vector>

namespace o2::aod
{
Expand Down Expand Up @@ -85,7 +86,8 @@ 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(InvariantMassEE, invariantMassEE, float); //! invariant mass of the non-Hfelectron
DECLARE_SOA_COLUMN(LSMassEE, lSMassEE, std::vector<float>); //! mass of the Like sign electron pair
DECLARE_SOA_COLUMN(ULSMassEE, uLSMassEE, std::vector<float>); //! mass of UnLike sign electron pair
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
Expand All @@ -99,7 +101,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::InvariantMassEE,
hf_corr_sel_electron::LSMassEE,
hf_corr_sel_electron::ULSMassEE,
hf_corr_sel_electron::NElPairLS,
hf_corr_sel_electron::NElPairUS,
hf_corr_sel_electron::IsEmcal);
Expand Down
28 changes: 22 additions & 6 deletions PWGHF/HFL/TableProducer/electronSelectionWithTpcEmcal.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include <array>
#include <cmath>
#include <cstdint>
#include <vector>

using namespace o2;
using namespace o2::constants::physics;
Expand Down Expand Up @@ -123,6 +124,7 @@ struct HfElectronSelectionWithTpcEmcal {
Configurable<float> m20EmcClusterElectronMin{"m20EmcClusterElectronMin", 0.0f, "min Electron EMCal Cluster M20"};
Configurable<float> tpcNsigmaElectronMin{"tpcNsigmaElectronMin", -0.5f, "min Electron TPCnsigma"};
Configurable<float> tpcNsigmaElectronMax{"tpcNsigmaElectronMax", 3.0f, "max Electron TPCnsigma"};
Configurable<float> tofNSigmaEl{"tofNSigmaEl", 3.0, "Sigma cut for electrons not in EMCal"};
Configurable<int> pdgCodeCharmMin{"pdgCodeCharmMin", 400, "Min Charm Hadron PdgCode"};
Configurable<int> pdgCodeCharmMax{"pdgCodeCharmMax", 600, "Max Charm Hadron PdgCode"};
Configurable<int> pdgCodeBeautyMin{"pdgCodeBeautyMin", 4000, "Min beauty Hadron PdgCode"};
Expand Down Expand Up @@ -224,6 +226,8 @@ struct HfElectronSelectionWithTpcEmcal {

registry.add("hPIDAfterPIDCuts", "PID Info after PID cuts; E/P;#it{p}_{T} (GeV#it{/c});n#sigma;m02; m20;", {HistType::kTHnSparseF, {{axisEoP}, {axisPt}, {axisnSigma}, {axisM02}, {axisM20}}});
registry.add("hEmcClsTrkEtaPhiDiffTime", "EmcClsTrkEtaPhiDiffTime;#Delta#eta;#Delta#varphi;Sec;", {HistType::kTH3F, {{axisDeltaEta}, {axisDeltaPhi}, {axisEmcClsTime}}});
registry.add("hTofNSigmaVsPt", " TOF nSigma vs pt; n#sigma;#it{pt} (GeV/#it{c});", {HistType::kTH2F, {{axisnSigma}, {axisPt}}});
registry.add("hTpcNSigmaVsPt", " TPC nSigma vs pt; n#sigma;#it{pt} (GeV/#it{c});", {HistType::kTH2F, {{axisnSigma}, {axisPt}}});
}
// Track Selection Cut
template <typename T>
Expand Down Expand Up @@ -292,12 +296,11 @@ struct HfElectronSelectionWithTpcEmcal {
{
int nElPairsLS = 0;
int nElPairsUS = 0;
bool isLSElectron = false;
bool isULSElectron = false;
float invMassElectron = 0.;
float massLike = 0;
float massUnLike = 0;

std::vector<float> vecLSMass;
std::vector<float> vecULSMass;
for (const auto& pTrack : tracks) {
if (pTrack.globalIndex() == electron.globalIndex()) {
continue;
Expand Down Expand Up @@ -339,10 +342,12 @@ struct HfElectronSelectionWithTpcEmcal {
}

invMassElectron = RecoDecay::m(std::array{pTrack.pVector(), electron.pVector()}, std::array{MassElectron, MassElectron});

bool isLSElectron = false;
bool isULSElectron = false;
// for like charge
if (pTrack.sign() == electron.sign()) {
massLike = invMassElectron;
vecLSMass.push_back(massLike);
isLSElectron = true;
if (isEMcal) {
registry.fill(HIST("hLikeMass"), massLike);
Expand All @@ -351,6 +356,7 @@ struct HfElectronSelectionWithTpcEmcal {
// for unlike charge
if (pTrack.sign() != electron.sign()) {
massUnLike = invMassElectron;
vecULSMass.push_back(massUnLike);
isULSElectron = true;
if (isEMcal) {
registry.fill(HIST("hUnLikeMass"), massUnLike);
Expand All @@ -375,7 +381,8 @@ 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(), invMassElectron, nElPairsLS, nElPairsUS, isEMcal);
// Pass multiplicities and other required parameters for this electron
hfElectronSelection(electron.collisionId(), electron.globalIndex(), electron.eta(), electron.phi(), electron.pt(), electron.tpcNSigmaEl(), electron.tofNSigmaEl(), vecLSMass, vecULSMass, nElPairsLS, nElPairsUS, isEMcal);
}
// Electron Identification
template <bool IsMc, typename TracksType, typename EmcClusterType, typename MatchType, typename CollisionType, typename ParticleType>
Expand Down Expand Up @@ -525,13 +532,22 @@ struct HfElectronSelectionWithTpcEmcal {

nonHfe(matchTrack, tracks, true);

electronSel(track.collisionId(), matchTrack.globalIndex(), etaMatchTrack, phiMatchTrack, ptMatchTrack, pMatchTrack, trackRapidity, matchTrack.dcaXY(), matchTrack.dcaZ(), matchTrack.tpcNSigmaEl(), matchTrack.tofNSigmaEl(),
///////////////// NonHf electron Selection without Emcal ////////////////////////
electronSel(track.collisionId(), track.globalIndex(), etaTrack, phiTrack, ptTrack, pTrack, trackRapidity, dcaxyTrack, dcazTrack, track.tpcNSigmaEl(), track.tofNSigmaEl(),
eMatchEmcCluster, etaMatchEmcCluster, phiMatchEmcCluster, m02MatchEmcCluster, m20MatchEmcCluster, cellEmcCluster, timeEmcCluster, deltaEtaMatch, deltaPhiMatch, isEMcal);
}
/// Electron information without Emcal and use TPC and TOF
if (isEMcal) {
continue;
}
if (std::abs(track.tofNSigmaEl()) > tofNSigmaEl)
continue;
registry.fill(HIST("hTofNSigmaVsPt"), track.tofNSigmaEl(), track.pt());
registry.fill(HIST("hTpcNSigmaVsPt"), track.tpcNSigmaEl(), track.pt());

if ((track.tpcNSigmaEl() < tpcNsigmaElectronMin || track.tpcNSigmaEl() > tpcNsigmaElectronMax))
continue;

nonHfe(track, tracks, false);
///////////////// NonHf electron Selection without Emcal ////////////////////////
electronSel(track.collisionId(), track.globalIndex(), etaTrack, phiTrack, ptTrack, pTrack, trackRapidity, dcaxyTrack, dcazTrack, track.tpcNSigmaEl(), track.tofNSigmaEl(),
Expand Down
Loading