Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
0558894
Add DeltaEta and Deltaphi from Emcal correction table
rashigupt Aug 2, 2025
ae540ff
remove some condition on Hadron table for event mix
rashigupt Aug 2, 2025
d76d2a6
Update correlatorHfeHadrons.cxx
rashigupt Aug 2, 2025
0789651
Update correlatorHfeHadrons.cxx
rashigupt Aug 2, 2025
046b5bc
Addsome cut in Hadron Table
rashigupt Aug 13, 2025
d1bf746
Update correlatorHfeHadrons.cxx
rashigupt Aug 13, 2025
8b339d1
Update correlatorHfeHadrons.cxx
rashigupt Aug 13, 2025
b1b707c
Merge branch 'master' into rashi
rashigupt Aug 13, 2025
87f9321
Update correlatorHfeHadrons.cxx
rashigupt Aug 13, 2025
2bebe35
add Mc gen for non hf
rashigupt Sep 11, 2025
67283a1
Add mc gen for hadron
rashigupt Sep 11, 2025
6118361
Update correlatorHfeHadrons.cxx
rashigupt Sep 11, 2025
b05e432
Update correlatorHfeHadrons.cxx
rashigupt Sep 11, 2025
a1ce8ee
Update electronSelectionWithTpcEmcal.cxx
rashigupt Sep 11, 2025
5bc5cd5
Update electronSelectionWithTpcEmcal.cxx
rashigupt Sep 12, 2025
ca7b9fa
Update correlatorHfeHadrons.cxx
rashigupt Sep 12, 2025
bbd3102
add Mc gen for non hf
rashigupt Sep 12, 2025
c1c1c41
Update correlatorHfeHadrons.cxx
rashigupt Sep 12, 2025
37b3c19
add Mc gen for non hf
rashigupt Sep 15, 2025
b513806
Add mc gen for hadron
rashigupt Sep 15, 2025
5024759
Update electronSelectionWithTpcEmcal.cxx
rashigupt Sep 15, 2025
b9593e9
Add Tof information Correlation without Emcal
rashigupt Sep 15, 2025
dbdb07a
Update electronSelectionWithTpcEmcal.cxx
rashigupt Sep 15, 2025
03f9111
Merge branch 'master' into rashi
rashigupt Sep 15, 2025
693d314
Update correlatorHfeHadrons.cxx
rashigupt Sep 15, 2025
9ea1b12
Update electronSelectionWithTpcEmcal.cxx
rashigupt Sep 15, 2025
7e8e23e
TRandom3: stack object instead of global
rashigupt Sep 16, 2025
3749947
Rename binsnSigma to binsNSigma to follow camelCase convention
rashigupt Sep 16, 2025
7e4da8e
remove build error
rashigupt Sep 18, 2025
3a0e9f1
use brace and reduce if condition
rashigupt Sep 18, 2025
53dde2b
properly define gmother in MC Gen
rashigupt Sep 27, 2025
152de4b
remove error
rashigupt Sep 27, 2025
75fcf88
Merge branch 'master' into rashi
rashigupt Sep 27, 2025
69b14b4
remove clang error
rashigupt Sep 27, 2025
3353dbd
add BCsWithTimestamps table in MC reconstruction
rashigupt Oct 5, 2025
7645784
Adjust processMcRec arguments to follow O2 guideline
rashigupt Oct 5, 2025
0b9db5c
Add non Hfe Invariant mass on table
rashigupt Oct 12, 2025
67914ee
Add invariant mass column
rashigupt Oct 12, 2025
989856b
Add invariant mass condion to find the electron with TPC and TOF
rashigupt Oct 12, 2025
6b1d442
Add mass invariant condirtion
rashigupt Oct 12, 2025
da54e19
Merge branch 'master' into rashi
rashigupt Oct 12, 2025
821588b
remove O2 linter error
rashigupt Oct 12, 2025
8a43ff4
remove clang error
rashigupt Oct 12, 2025
5d48835
remove O2 inter erro
rashigupt Oct 12, 2025
fdb7010
correct invariant mass column
rashigupt Oct 19, 2025
1521439
data Pocessing on by default
rashigupt Oct 19, 2025
9a0ef35
correct invariant mass name
rashigupt Oct 19, 2025
e4ea74a
correcct mass name
rashigupt Oct 19, 2025
0ea47ce
update mass name
rashigupt Oct 21, 2025
d2238c4
remove casting
rashigupt Oct 21, 2025
a551de2
update mass name
rashigupt Oct 21, 2025
efe2811
Add a refrence to emcal region
rashigupt Oct 21, 2025
8306c17
update mass name
rashigupt Oct 21, 2025
3887836
Merge branch 'AliceO2Group:master' into rashi
rashigupt Oct 21, 2025
abbaf76
Correct Emcal ref in configurable
rashigupt Oct 27, 2025
4e230c1
Fix singular/plural usage in variable naming
rashigupt Oct 27, 2025
f871be3
use BCType instead of aod::BCsWithTimestamps
rashigupt Oct 31, 2025
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
66 changes: 47 additions & 19 deletions PWGHF/HFC/TableProducer/correlatorHfeHadrons.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ struct HfCorrelatorHfeHadrons {
Configurable<bool> isRun3{"isRun3", true, "Data is from Run3 or Run2"};

Configurable<int> numberEventsMixed{"numberEventsMixed", 5, "number of events mixed in ME process"};
Configurable<float> invMassEEMax{"invMassEEMax", 0.14f, "max Invariant Mass for Photonic electron"};
// Associated Hadron selection
Configurable<float> ptTrackMin{"ptTrackMin", 0.1f, "Transverse momentum range for associated hadron tracks"};
Configurable<float> etaTrackMax{"etaTrackMax", 0.8f, "Eta range for associated hadron tracks"};
Expand Down Expand Up @@ -106,6 +107,7 @@ struct HfCorrelatorHfeHadrons {
ConfigurableAxis binsPt{"binsPt", {50, 0.0, 50}, "#it{p_{T}}(GeV/#it{c})"};
ConfigurableAxis binsPoolBin{"binsPoolBin", {9, 0., 9.}, "PoolBin"};
ConfigurableAxis binsNSigma{"binsNSigma", {30, -15., 15.}, "#it{#sigma_{TPC}}"};
ConfigurableAxis binsMass{"binsMass", {100, 0.0, 2.0}, "Mass (GeV/#it{c}^{2}); entries"};

HistogramRegistry registry{
"registry",
Expand All @@ -117,11 +119,17 @@ struct HfCorrelatorHfeHadrons {
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 axisMass = {binsMass, "Mass (GeV/#it{c}^{2}); entries"};

AxisSpec const axisPoolBin = {binsPoolBin, "PoolBin"};
AxisSpec axisNSigma = {binsNSigma, "it{#sigma_{TPC}}"};

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("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}}});
Expand Down Expand Up @@ -168,13 +176,13 @@ struct HfCorrelatorHfeHadrons {

// Electron-hadron Correlation
template <typename TracksType, typename ElectronType, typename CollisionType, typename BcType>
void fillCorrelation(CollisionType const& collision, ElectronType const& electron, TracksType const& tracks, BcType const&)
void fillCorrelation(CollisionType const& collision, ElectronType const& electrons, 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.multFT0M()));
auto bc = collision.template bc_as<aod::BCsWithTimestamps>();
auto bc = collision.template bc_as<BcType>();
int gCollisionId = collision.globalIndex();
int64_t timeStamp = bc.timestamp();

Expand Down Expand Up @@ -205,7 +213,7 @@ struct HfCorrelatorHfeHadrons {
double phiElectron = -999;
double etaElectron = -999;

for (const auto& eTrack : electron) {
for (const auto& eTrack : electrons) {
ptElectron = eTrack.ptTrack();
phiElectron = eTrack.phiTrack();
etaElectron = eTrack.etaTrack();
Expand Down Expand Up @@ -237,18 +245,32 @@ 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();

++nElectronLS;
registry.fill(HIST("hLSElectronBin"), poolBin);
registry.fill(HIST("hLikeMass"), massLike);

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();

++nElectronUS;
registry.fill(HIST("hULSElectronBin"), poolBin);
registry.fill(HIST("hUnLikeMass"), massUnLike);

if (massUnLike <= invMassEEMax) {
++nElectronUS;
registry.fill(HIST("hLikeSignPt"), eTrack.ptTrack());
}
}
}

Expand Down Expand Up @@ -281,16 +303,18 @@ struct HfCorrelatorHfeHadrons {
int nElHadUSCorr = 0;
if (eTrack.nElPairLS() > 0) {
for (int i = 0; i < eTrack.nElPairLS(); ++i) {

++nElHadLSCorr;
registry.fill(HIST("hLSEHCorrel"), ptElectron, ptHadron, deltaPhi, deltaEta);
if (eTrack.invariantMassEE() <= invMassEEMax) {
++nElHadLSCorr;
registry.fill(HIST("hLSEHCorrel"), ptElectron, ptHadron, deltaPhi, deltaEta);
}
}
}
if (eTrack.nElPairUS() > 0) {
for (int i = 0; i < eTrack.nElPairUS(); ++i) {

registry.fill(HIST("hULSEHCorrel"), ptElectron, ptHadron, deltaPhi, deltaEta);
++nElHadUSCorr;
if (eTrack.invariantMassEE() <= invMassEEMax) {
registry.fill(HIST("hULSEHCorrel"), ptElectron, ptHadron, deltaPhi, deltaEta);
++nElHadUSCorr;
}
}
}
entryElectronHadronPair(deltaPhi, deltaEta, ptElectron, ptHadron, poolBin, nElHadLSCorr, nElHadUSCorr);
Expand Down Expand Up @@ -363,26 +387,28 @@ struct HfCorrelatorHfeHadrons {
// ======= Process starts for Data, Same event ============

void processData(TableCollision const& collision,
aod::HfCorrSelEl const& electron,
TableTracks const& tracks, aod::BCsWithTimestamps const& bc)
aod::HfCorrSelEl const& electrons,
TableTracks const& tracks,
aod::BCsWithTimestamps const& bcs)
{
fillCorrelation(collision, electron, tracks, bc);
fillCorrelation(collision, electrons, tracks, bcs);
}

PROCESS_SWITCH(HfCorrelatorHfeHadrons, processData, "Process for Data", true);

// ======= Process starts for McRec, Same event ============

void processMcRec(McTableCollision const& mcCollision,
aod::HfCorrSelEl const& mcElectron,
McTableTracks const& mcTracks)
aod::HfCorrSelEl const& mcElectrons,
McTableTracks const& mcTracks,
aod::BCsWithTimestamps const& bcs)
{
fillCorrelation(mcCollision, mcElectron, mcTracks, 0);
fillCorrelation(mcCollision, mcElectrons, mcTracks, bcs);
}

PROCESS_SWITCH(HfCorrelatorHfeHadrons, processMcRec, "Process MC Reco mode", false);

void processMcGen(McGenTableCollision const& mcCollision, aod::McParticles const& mcParticles, aod::HfMcGenSelEl const& electron)
void processMcGen(McGenTableCollision const& mcCollision, aod::McParticles const& mcParticles, aod::HfMcGenSelEl const& electrons)
{

BinningTypeMcGen const corrBinningMcGen{{zBins, multBinsMcGen}, true};
Expand All @@ -407,7 +433,7 @@ struct HfCorrelatorHfeHadrons {
double phiElectron = 0;
double etaElectron = 0;

for (const auto& electronMc : electron) {
for (const auto& electronMc : electrons) {
double ptHadron = 0;
double phiHadron = 0;
double etaHadron = 0;
Expand Down Expand Up @@ -486,6 +512,7 @@ struct HfCorrelatorHfeHadrons {
}
}
PROCESS_SWITCH(HfCorrelatorHfeHadrons, processMcRecMixedEvent, "Process Mixed Event MC Reco mode", false);

void processMcGenMixedEvent(McGenTableCollisions const& mcCollision, aod::HfMcGenSelEl const& electrons, aod::McParticles const& mcParticles)
{

Expand Down Expand Up @@ -539,6 +566,7 @@ struct HfCorrelatorHfeHadrons {
}
PROCESS_SWITCH(HfCorrelatorHfeHadrons, processMcGenMixedEvent, "Process Mixed Event MC Gen mode", false);
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{
Expand Down
2 changes: 2 additions & 0 deletions PWGHF/HFL/DataModel/ElectronSelectionTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ 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(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 @@ -98,6 +99,7 @@ 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::NElPairLS,
hf_corr_sel_electron::NElPairUS,
hf_corr_sel_electron::IsEmcal);
Expand Down
15 changes: 10 additions & 5 deletions PWGHF/HFL/TableProducer/electronSelectionWithTpcEmcal.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ struct HfElectronSelectionWithTpcEmcal {
Produces<aod::HfCorrSelEl> hfElectronSelection;
Produces<aod::HfMcGenSelEl> hfGenElectronSel;

// select the emcal or dcal acceptance
enum EMCalRegion {
NoAcceptance = 0,
EMCalAcceptance = 1,
Expand All @@ -71,6 +72,10 @@ struct HfElectronSelectionWithTpcEmcal {
KFParticle kfNonHfe;
Configurable<bool> fillEmcClusterInfo{"fillEmcClusterInfo", true, "Fill histograms with EMCal cluster info before and after track match"};
Configurable<bool> fillTrackInfo{"fillTrackInfo", true, "Fill histograms with Track Information info before track match"};
Configurable<bool> skipNoEmcClusters{"skipNoEmcClusters", false, "Skip events with no EMCal clusters"};

// select the emcal or dcal acceptance
Configurable<int> emcalRegion{"emcalRegion", 0, "Select EMCal region for filling histograms (see EMCalRegion enum)"};

// Event Selection
Configurable<float> zPvPosMax{"zPvPosMax", 10., "Maximum z of the primary vertex (cm)"};
Expand Down Expand Up @@ -138,7 +143,6 @@ struct HfElectronSelectionWithTpcEmcal {
PresliceUnsorted<o2::aod::EMCALMatchedTracks> perClusterMatchedTracks = o2::aod::emcalmatchedtrack::trackId;

// configurable axis

ConfigurableAxis binsPosZ{"binsPosZ", {100, -10., 10.}, "primary vertex z coordinate"};
ConfigurableAxis binsEta{"binsEta", {100, -2.0, 2.}, "#it{#eta}"};
ConfigurableAxis binsPhi{"binsPhi", {32, 0.0, o2::constants::math::TwoPI}, "#it{#varphi}"};
Expand Down Expand Up @@ -181,6 +185,7 @@ struct HfElectronSelectionWithTpcEmcal {
AxisSpec axisDeltaPhi = {binsDeltaPhi, "#Delta #varphi = #varphi_{trk}- #varphi_{cluster}"};

registry.add("hZvertex", "z vertex", {HistType::kTH1D, {axisPosZ}});
registry.add("hNeventsAfterPassEmcal", "No of events pass the Emcal", {HistType::kTH1D, {{3, 1, 4}}});
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}}});
Expand Down Expand Up @@ -370,7 +375,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(), nElPairsLS, nElPairsUS, isEMcal);
hfElectronSelection(electron.collisionId(), electron.globalIndex(), electron.eta(), electron.phi(), electron.pt(), electron.tpcNSigmaEl(), electron.tofNSigmaEl(), invMassElectron, nElPairsLS, nElPairsUS, isEMcal);
}
// Electron Identification
template <bool IsMc, typename TracksType, typename EmcClusterType, typename MatchType, typename CollisionType, typename ParticleType>
Expand All @@ -380,14 +385,14 @@ struct HfElectronSelectionWithTpcEmcal {
return;
}

registry.fill(HIST("hNevents"), 1);
registry.fill(HIST("hNevents"), emcalRegion.value);

// skip events with no clusters
if (emcClusters.size() == 0) {
if (emcClusters.size() == 0 && skipNoEmcClusters) {
return;
}
registry.fill(HIST("hZvertex"), collision.posZ());

registry.fill(HIST("hNeventsAfterPassEmcal"), static_cast<int>(emcalRegion));
/////////////////////////////////
// EMCal cluster info before match ///
///////////////////////////////
Expand Down
Loading