Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
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
67 changes: 65 additions & 2 deletions PWGHF/HFC/Tasks/taskCorrelationHfeHadrons.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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}}});
}

Expand Down Expand Up @@ -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;
Expand All @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions PWGHF/HFL/DataModel/ElectronSelectionTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<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
Expand Down
7 changes: 4 additions & 3 deletions PWGHF/HFL/TableProducer/electronSelectionWithTpcEmcal.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ struct HfElectronSelectionWithTpcEmcal {
Configurable<float> dcaZTrackMax{"dcaZTrackMax", 1.0f, "DCA Z cut"};
Configurable<float> etaTrackMax{"etaTrackMax", 0.6f, "Eta range for electron tracks"};
Configurable<float> etaTrackMin{"etaTrackMin", -0.6f, "Eta range for electron tracks"};
Configurable<float> ptTrackMin{"ptTrackMin", 3.0f, "Transverse MOmentum range for electron tracks"};
Configurable<float> ptTrackMin{"ptTrackMin", 3.0f, "Min Transverse MOmentum range for electron tracks"};
Configurable<float> ptTrackMax{"ptTrackMax", 12.0f, "Max Transverse MOmentum range for electron tracks"};
Configurable<float> tpccrossCut{"tpccrossCut", 70, "TPC crossrows cut"};
Configurable<float> itsChi2{"itsChi2", 36, "ITS chi2 cluster cut"};
Configurable<float> tpcChi2NCl{"tpcChi2NCl", 4, "TPC chi2 cluster cut"};
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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 <bool IsMc, typename TracksType, typename EmcClusterType, typename MatchType, typename CollisionType, typename ParticleType>
Expand Down
Loading