Skip to content

Commit 61fabe9

Browse files
rashiguptrashi234
andauthored
[PWGHF] Add MC efficiency calculation and extend electron–hadron correlation table (#15735)
Co-authored-by: rashi.gupta@cern.ch <rashi.gupta@cern.ch>
1 parent 26be464 commit 61fabe9

File tree

4 files changed

+394
-208
lines changed

4 files changed

+394
-208
lines changed

PWGHF/HFC/DataModel/CorrelationTables.h

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -519,22 +519,57 @@ DECLARE_SOA_TABLE(HfElectron, "AOD", "HFELECTRON", //! Hf Electron properties
519519
aod::hf_electron::PoolBin,
520520
aod::hf_electron::GIndexCol,
521521
aod::hf_electron::TimeStamp);
522-
522+
// Note: definition of columns and tables for Electron Hadron correlation pairs for Data
523523
namespace hf_correlation_electron_hadron
524524
{
525-
DECLARE_SOA_COLUMN(DeltaPhi, deltaPhi, float); //! DeltaPhi between Electron and Hadrons
526-
DECLARE_SOA_COLUMN(DeltaEta, deltaEta, float); //! DeltaEta between Electron and Hadrons
527-
DECLARE_SOA_COLUMN(PtElectron, ptElectron, float); //! Transverse momentum of Electron
528-
DECLARE_SOA_COLUMN(PtHadron, ptHadron, float); //! Transverse momentum of Hadron;
529-
DECLARE_SOA_COLUMN(PoolBin, poolBin, int); //! Pool Bin of event defined using zvtx and multiplicity
530-
DECLARE_SOA_COLUMN(NPairsLS, nPairsLS, int); //! number of like-sign electron-hadron pairs
531-
DECLARE_SOA_COLUMN(NPairsUS, nPairsUS, int); //! number of unlike-sign electron-hadron pairs
525+
DECLARE_SOA_COLUMN(DeltaPhi, deltaPhi, float); //! DeltaPhi between Electron and Hadrons
526+
DECLARE_SOA_COLUMN(DeltaEta, deltaEta, float); //! DeltaEta between Electron and Hadrons
527+
DECLARE_SOA_COLUMN(PtElectron, ptElectron, float); //! Transverse momentum of Electron
528+
DECLARE_SOA_COLUMN(PtHadron, ptHadron, float); //! Transverse momentum of Hadron;
529+
DECLARE_SOA_COLUMN(EopElectron, eopElectron, float); //! enery momentum ratio for Electron
530+
DECLARE_SOA_COLUMN(M02Electron, m02Electron, float); //! M02 of Electron
531+
DECLARE_SOA_COLUMN(TpcNSigmaEle, tpcNSigmaEle, float); //! TPCn Sigma of Electron
532+
DECLARE_SOA_COLUMN(TofNSigmaEle, tofNSigmaEle, float); //! TOFn Sigma of Electron
533+
534+
DECLARE_SOA_COLUMN(TpcNClsCrRowsEle, tpcNClsCrRowsEle, float); //! tpcNClsCrossedRows for Electron
535+
DECLARE_SOA_COLUMN(TpcCrRowsRatioEle, tpcCrRowsRatioEle, float); //! Ratio crossed rows over findable clusters electron track
536+
DECLARE_SOA_COLUMN(ItsChi2NClEle, itsChi2NClEle, float); //! itsChi2NCl of Electron
537+
DECLARE_SOA_COLUMN(TpcChi2NClEle, tpcChi2NClEle, float); //! TPC Chi2NCl of electron;
538+
DECLARE_SOA_COLUMN(DcaXYEle, dcaXYEle, float); //! DCAXY of Electron
539+
DECLARE_SOA_COLUMN(DcaZEle, dcaZEle, float); //! DCAZ of Electron
540+
541+
DECLARE_SOA_COLUMN(TpcNClsCrRowsHad, tpcNClsCrRowsHad, float); //! tpcNClsCrossedRows for Hadron
542+
DECLARE_SOA_COLUMN(TpcCrRowsRatioHad, tpcCrRowsRatioHad, float); //! Ratio crossed rows over findable clusters Hadron track
543+
DECLARE_SOA_COLUMN(ItsChi2NClHad, itsChi2NClHad, float); //! itsChi2NCl of Hadron
544+
DECLARE_SOA_COLUMN(TpcChi2NClHad, tpcChi2NClHad, float); //! TPC Chi2NCl of Hadron;
545+
DECLARE_SOA_COLUMN(DcaXYHad, dcaXYHad, float); //! DCAXY of Hadron
546+
DECLARE_SOA_COLUMN(DcaZHad, dcaZHad, float); //! DCAZ of Hadron
547+
548+
DECLARE_SOA_COLUMN(PoolBin, poolBin, int); //! Pool Bin of event defined using zvtx and multiplicity
549+
DECLARE_SOA_COLUMN(NPairsLS, nPairsLS, int); //! number of like-sign electron-hadron pairs
550+
DECLARE_SOA_COLUMN(NPairsUS, nPairsUS, int); //! number of unlike-sign electron-hadron pairs
532551
} // namespace hf_correlation_electron_hadron
533552
DECLARE_SOA_TABLE(HfEHadronPair, "AOD", "HFEHADRONPAIR", //! Hfe-Hadrons pairs Informations
534553
hf_correlation_electron_hadron::DeltaPhi,
535554
hf_correlation_electron_hadron::DeltaEta,
536555
hf_correlation_electron_hadron::PtElectron,
537556
hf_correlation_electron_hadron::PtHadron,
557+
hf_correlation_electron_hadron::EopElectron,
558+
hf_correlation_electron_hadron::M02Electron,
559+
hf_correlation_electron_hadron::TpcNSigmaEle,
560+
hf_correlation_electron_hadron::TofNSigmaEle,
561+
hf_correlation_electron_hadron::TpcNClsCrRowsEle,
562+
hf_correlation_electron_hadron::TpcCrRowsRatioEle,
563+
hf_correlation_electron_hadron::ItsChi2NClEle,
564+
hf_correlation_electron_hadron::TpcChi2NClEle,
565+
hf_correlation_electron_hadron::DcaXYEle,
566+
hf_correlation_electron_hadron::DcaZEle,
567+
hf_correlation_electron_hadron::TpcNClsCrRowsHad,
568+
hf_correlation_electron_hadron::TpcCrRowsRatioHad,
569+
hf_correlation_electron_hadron::ItsChi2NClHad,
570+
hf_correlation_electron_hadron::TpcChi2NClHad,
571+
hf_correlation_electron_hadron::DcaXYHad,
572+
hf_correlation_electron_hadron::DcaZHad,
538573
hf_correlation_electron_hadron::PoolBin,
539574
hf_correlation_electron_hadron::NPairsLS,
540575
hf_correlation_electron_hadron::NPairsUS);

PWGHF/HFC/TableProducer/correlatorHfeHadrons.cxx

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,7 @@ using namespace o2::framework::expressions;
4949
using namespace o2::soa;
5050
using namespace o2::aod::hf_sel_electron;
5151

52-
const std::vector<double> zBins{VARIABLE_WIDTH, -10.0, -2.5, 2.5, 10.0};
53-
const std::vector<double> multBins{VARIABLE_WIDTH, 0., 200., 500.0, 5000.};
54-
const std::vector<double> multBinsMcGen{VARIABLE_WIDTH, 0., 20., 50.0, 500.}; // In MCGen multiplicity is defined by counting primaries
5552
using BinningType = ColumnBinningPolicy<aod::collision::PosZ, aod::mult::MultFT0M<aod::mult::MultFT0A, aod::mult::MultFT0C>>;
56-
const BinningType corrBinning{{zBins, multBins}, true};
5753

5854
using BinningTypeMcGen = ColumnBinningPolicy<aod::mccollision::PosZ, o2::aod::mult::MultMCFT0A>;
5955

@@ -75,6 +71,16 @@ struct HfCorrelatorHfeHadrons {
7571
Configurable<float> etaTrackMin{"etaTrackMin", -0.8f, "Eta range for associated hadron tracks"};
7672
Configurable<float> dcaXYTrackMax{"dcaXYTrackMax", 0.5f, "DCA XY cut"};
7773
Configurable<float> dcaZTrackMax{"dcaZTrackMax", 1.0f, "DCA Z cut"};
74+
Configurable<float> tpccrossCut{"tpccrossCut", 70, "TPC crossrows cut"};
75+
Configurable<float> itsChi2{"itsChi2", 36, "ITS chi2 cluster cut"};
76+
Configurable<float> tpcChi2NCl{"tpcChi2NCl", 4, "TPC chi2 cluster cut"};
77+
Configurable<float> tpccrOverFindableRatio{"tpccrOverFindableRatio", 0.8f, "TPC chi2 cluster cut"};
78+
Configurable<bool> isDefault{"isDefault", true, "Default cut"};
79+
Configurable<bool> csyTPCcr{"csyTPCcr", true, "tpc crossed rows"};
80+
Configurable<bool> csyTPCcrOverFindableRatio{"csyTPCcrOverFindableRatio", true, "tpc crossed rows over findable cluster"};
81+
Configurable<bool> csyITSchi{"csyITSchi", true, "ITS chi2"};
82+
Configurable<bool> csyTPCchi{"csyTPCchi", true, "TPC chi2"};
83+
7884
Configurable<bool> requireEmcal{"requireEmcal", true, "Require electron to be in EMCal"};
7985

8086
// Sigma cut for non-EMCal electrons
@@ -103,6 +109,10 @@ struct HfCorrelatorHfeHadrons {
103109
Preslice<aod::Tracks> perCol = aod::track::collisionId;
104110
Preslice<aod::HfSelEl> perCollision = aod::hf_sel_electron::collisionId;
105111

112+
ConfigurableAxis zPoolBins{"zPoolBins", {VARIABLE_WIDTH, -10.0f, -2.5f, 2.5f, 10.0f}, "z vertex position pools"};
113+
ConfigurableAxis multPoolBins{"multPoolBins", {VARIABLE_WIDTH, 0.0f, 2000.0f, 6000.0f, 10000.0f}, "event multiplicity pools (FT0M)"};
114+
ConfigurableAxis multPoolBinsMcGen{"multPoolBinsMcGen", {VARIABLE_WIDTH, 0.0f, 20.0f, 50.0f, 500.0f}, "Mixing bins - MC multiplicity"}; // In MCGen multiplicity is defined by counting tracks
115+
106116
ConfigurableAxis binsPosZ{"binsPosZ", {100, -10., 10.}, "primary vertex z coordinate"};
107117
ConfigurableAxis binsDeltaEta{"binsDeltaEta", {30, -1.8, 1.8}, "#it{#Delta#eta}"};
108118
ConfigurableAxis binsDeltaPhi{"binsDeltaPhi", {32, -o2::constants::math::PIHalf, 3. * o2::constants::math::PIHalf}, "#it{#Delta#varphi}"};
@@ -111,6 +121,7 @@ struct HfCorrelatorHfeHadrons {
111121
ConfigurableAxis binsNSigma{"binsNSigma", {30, -15., 15.}, "#it{#sigma_{TPC}}"};
112122
ConfigurableAxis binsMass{"binsMass", {100, 0.0, 2.0}, "Mass (GeV/#it{c}^{2}); entries"};
113123

124+
BinningType corrBinning{{zPoolBins, multPoolBins}, true};
114125
HistogramRegistry registry{
115126
"registry",
116127
{}};
@@ -171,7 +182,19 @@ struct HfCorrelatorHfeHadrons {
171182
template <typename T>
172183
bool selAssoHadron(T const& track)
173184
{
174-
if (!track.isGlobalTrackWoDCA()) {
185+
if (isDefault && !track.isGlobalTrackWoDCA()) {
186+
return false;
187+
}
188+
if (csyTPCcr && track.tpcNClsCrossedRows() < tpccrossCut) {
189+
return false;
190+
}
191+
if (csyTPCcrOverFindableRatio && track.tpcCrossedRowsOverFindableCls() < tpccrOverFindableRatio) {
192+
return false;
193+
}
194+
if (csyITSchi && track.itsChi2NCl() > itsChi2) {
195+
return false;
196+
}
197+
if (csyTPCchi && track.tpcChi2NCl() > tpcChi2NCl) {
175198
return false;
176199
}
177200

@@ -261,6 +284,7 @@ struct HfCorrelatorHfeHadrons {
261284
ptElectron = eTrack.ptTrack();
262285
phiElectron = eTrack.phiTrack();
263286
etaElectron = eTrack.etaTrack();
287+
264288
bool acceptElectron = false;
265289

266290
double deltaPhi = -999;
@@ -353,7 +377,7 @@ struct HfCorrelatorHfeHadrons {
353377
++nElHadUSCorr;
354378
}
355379
}
356-
entryElectronHadronPair(deltaPhi, deltaEta, ptElectron, ptHadron, poolBin, nElHadLSCorr, nElHadUSCorr);
380+
entryElectronHadronPair(deltaPhi, deltaEta, ptElectron, ptHadron, eTrack.eopEl(), eTrack.m02El(), eTrack.tpcNSigmaElTrack(), eTrack.tofNSigmaElTrack(), eTrack.tpcNClsCrRowsTrack(), eTrack.tpcCrRowsRatioTrack(), eTrack.itsChi2NClTrack(), eTrack.tpcChi2NClTrack(), eTrack.dcaXYTrack(), eTrack.dcaZTrack(), hTrack.tpcNClsCrossedRows(), hTrack.tpcCrossedRowsOverFindableCls(), hTrack.itsChi2NCl(), hTrack.tpcChi2NCl(), hTrack.dcaXY(), hTrack.dcaZ(), poolBin, nElHadLSCorr, nElHadUSCorr);
357381

358382
} // end Hadron Track loop
359383

@@ -416,7 +440,7 @@ struct HfCorrelatorHfeHadrons {
416440
++nElHadUSCorr;
417441
}
418442
}
419-
entryElectronHadronPair(deltaPhiMix, deltaEtaMix, ptElectronMix, ptHadronMix, poolBin, nElHadLSCorr, nElHadUSCorr);
443+
entryElectronHadronPair(deltaPhiMix, deltaEtaMix, ptElectronMix, ptHadronMix, t1.eopEl(), t1.m02El(), t1.tpcNSigmaElTrack(), t1.tofNSigmaElTrack(), t1.tpcNClsCrRowsTrack(), t1.tpcCrRowsRatioTrack(), t1.itsChi2NClTrack(), t1.tpcChi2NClTrack(), t1.dcaXYTrack(), t1.dcaZTrack(), t2.tpcNClsCrossedRows(), t2.tpcCrossedRowsOverFindableCls(), t2.itsChi2NCl(), t2.tpcChi2NCl(), t2.dcaXY(), t2.dcaZ(), poolBin, nElHadLSCorr, nElHadUSCorr);
420444
}
421445
}
422446

@@ -447,7 +471,7 @@ struct HfCorrelatorHfeHadrons {
447471
void processMcGen(McGenTableCollision const& mcCollision, aod::McParticles const& mcParticles, aod::HfMcGenSelEl const& electrons)
448472
{
449473

450-
BinningTypeMcGen const corrBinningMcGen{{zBins, multBinsMcGen}, true};
474+
BinningTypeMcGen const corrBinningMcGen{{zPoolBins, multPoolBinsMcGen}, true};
451475
int poolBin = corrBinningMcGen.getBin(std::make_tuple(mcCollision.posZ(), mcCollision.multMCFT0A()));
452476

453477
for (const auto& particleMc : mcParticles) {
@@ -566,7 +590,7 @@ struct HfCorrelatorHfeHadrons {
566590
void processMcGenMixedEvent(McGenTableCollisions const& mcCollision, aod::HfMcGenSelEl const& electrons, aod::McParticles const& mcParticles)
567591
{
568592

569-
BinningTypeMcGen const corrBinningMcGen{{zBins, multBinsMcGen}, true};
593+
BinningTypeMcGen const corrBinningMcGen{{zPoolBins, multPoolBinsMcGen}, true};
570594

571595
auto tracksTuple = std::make_tuple(electrons, mcParticles);
572596
Pair<McGenTableCollisions, aod::HfMcGenSelEl, aod::McParticles, BinningTypeMcGen> const pairMcGen{corrBinningMcGen, 5, -1, mcCollision, tracksTuple, &cache};

PWGHF/HFL/DataModel/ElectronSelectionTable.h

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,27 @@ DECLARE_SOA_TABLE(HfSelEl, "AOD", "HFSELEL", //! Electron Informations
7979
// definition of columns and tables for HfcorrElectron Selection
8080
namespace hf_corr_sel_electron
8181
{
82-
DECLARE_SOA_INDEX_COLUMN(Collision, collision); //! collisioniD of the electron track
83-
DECLARE_SOA_INDEX_COLUMN(Track, track); //! trackid of of the electron track
84-
DECLARE_SOA_COLUMN(EtaTrack, etaTrack, float); //! pseudorapidity of the electron track
85-
DECLARE_SOA_COLUMN(PhiTrack, phiTrack, float); //! azimuth of the electron track
86-
DECLARE_SOA_COLUMN(PtTrack, ptTrack, float); //! transverse momentum of the electron track
87-
DECLARE_SOA_COLUMN(TpcNSigmaElTrack, tpcNSigmaElTrack, float); //! tpcNSigma of the electron track(TPC PID)
88-
DECLARE_SOA_COLUMN(TofNSigmaElTrack, tofNSigmaElTrack, float); //! tofNSigma of the electron track(TOF PID)
89-
DECLARE_SOA_COLUMN(LSMassEE, lSMassEE, std::vector<float>); //! mass of the Like sign electron pair
90-
DECLARE_SOA_COLUMN(ULSMassEE, uLSMassEE, std::vector<float>); //! mass of UnLike sign electron pair
91-
DECLARE_SOA_COLUMN(NElPairLS, nElPairLS, int); //! Number of Like sign electron pair
92-
DECLARE_SOA_COLUMN(NElPairUS, nElPairUS, int); //! Number of UnLike sign electron pair
93-
DECLARE_SOA_COLUMN(IsEmcal, isEmcal, bool); //! electron information
82+
DECLARE_SOA_INDEX_COLUMN(Collision, collision); //! collisioniD of the electron track
83+
DECLARE_SOA_INDEX_COLUMN(Track, track); //! trackid of of the electron track
84+
DECLARE_SOA_COLUMN(EtaTrack, etaTrack, float); //! pseudorapidity of the electron track
85+
DECLARE_SOA_COLUMN(PhiTrack, phiTrack, float); //! azimuth of the electron track
86+
DECLARE_SOA_COLUMN(PtTrack, ptTrack, float); //! transverse momentum of the electron track
87+
DECLARE_SOA_COLUMN(TpcNSigmaElTrack, tpcNSigmaElTrack, float); //! tpcNSigma of the electron track(TPC PID)
88+
DECLARE_SOA_COLUMN(TofNSigmaElTrack, tofNSigmaElTrack, float); //! tofNSigma of the electron track(TOF PID)
89+
DECLARE_SOA_COLUMN(TpcNClsCrRowsTrack, tpcNClsCrRowsTrack, float); //! Number of crossed TPC Rows in electron track
90+
DECLARE_SOA_COLUMN(TpcCrRowsRatioTrack, tpcCrRowsRatioTrack, float); //! Ratio crossed rows over findable clusters electron track
91+
DECLARE_SOA_COLUMN(ItsChi2NClTrack, itsChi2NClTrack, float); //! Chi2 / cluster for the ITS electron track
92+
DECLARE_SOA_COLUMN(TpcChi2NClTrack, tpcChi2NClTrack, float); //! Chi2 / cluster for the TPC electron track
93+
DECLARE_SOA_COLUMN(DcaXYTrack, dcaXYTrack, float); //! dca of the electron in xy direction
94+
DECLARE_SOA_COLUMN(DcaZTrack, dcaZTrack, float); //! dca of the electron in z direction
95+
96+
DECLARE_SOA_COLUMN(M02El, m02El, float); //! M02 of the electron cluster
97+
DECLARE_SOA_COLUMN(EopEl, eopEl, float); //! energy momentum ratio of the electron
98+
DECLARE_SOA_COLUMN(LSMassEE, lSMassEE, std::vector<float>); //! mass of the Like sign electron pair
99+
DECLARE_SOA_COLUMN(ULSMassEE, uLSMassEE, std::vector<float>); //! mass of UnLike sign electron pair
100+
DECLARE_SOA_COLUMN(NElPairLS, nElPairLS, int); //! Number of Like sign electron pair
101+
DECLARE_SOA_COLUMN(NElPairUS, nElPairUS, int); //! Number of UnLike sign electron pair
102+
DECLARE_SOA_COLUMN(IsEmcal, isEmcal, bool); //! electron information
94103
} // namespace hf_corr_sel_electron
95104

96105
DECLARE_SOA_TABLE(HfCorrSelEl, "AOD", "HfCORRSELEL", //! Electron Informations
@@ -101,6 +110,14 @@ DECLARE_SOA_TABLE(HfCorrSelEl, "AOD", "HfCORRSELEL", //! Electron Informations
101110
hf_corr_sel_electron::PtTrack,
102111
hf_corr_sel_electron::TpcNSigmaElTrack,
103112
hf_corr_sel_electron::TofNSigmaElTrack,
113+
hf_corr_sel_electron::TpcNClsCrRowsTrack,
114+
hf_corr_sel_electron::TpcCrRowsRatioTrack,
115+
hf_corr_sel_electron::ItsChi2NClTrack,
116+
hf_corr_sel_electron::TpcChi2NClTrack,
117+
hf_corr_sel_electron::DcaXYTrack,
118+
hf_corr_sel_electron::DcaZTrack,
119+
hf_corr_sel_electron::EopEl,
120+
hf_corr_sel_electron::M02El,
104121
hf_corr_sel_electron::LSMassEE,
105122
hf_corr_sel_electron::ULSMassEE,
106123
hf_corr_sel_electron::NElPairLS,

0 commit comments

Comments
 (0)