Skip to content

Commit 845ff84

Browse files
authored
Merge branch 'AliceO2Group:master' into master
2 parents 350e5d7 + 76cb914 commit 845ff84

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+2755
-1330
lines changed

EventFiltering/PWGLF/nucleiFilter.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,8 @@ struct nucleiFilter {
448448
}
449449

450450
for (const auto& v0 : v0s) {
451-
const auto& posTrack = tracks.rawIteratorAt(v0.posTrackId());
452-
const auto& negTrack = tracks.rawIteratorAt(v0.negTrackId());
451+
const auto& posTrack = v0.posTrack_as<TrackCandidates>();
452+
const auto& negTrack = v0.negTrack_as<TrackCandidates>();
453453
if ((posTrack.itsNCls() < cfgCutNclusITS || posTrack.tpcNClsFound() < cfgCutNclusTPC) &&
454454
(negTrack.itsNCls() < cfgCutNclusITS || negTrack.tpcNClsFound() < cfgCutNclusTPC)) {
455455
continue;

EventFiltering/PWGLF/strangenessFilter.cxx

Lines changed: 243 additions & 11 deletions
Large diffs are not rendered by default.

EventFiltering/filterTables.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ DECLARE_SOA_COLUMN(TrackedXi, hasTrackedXi, bool); //! at least 1
154154
DECLARE_SOA_COLUMN(TrackedOmega, hasTrackedOmega, bool); //! at least 1 tracked Omega
155155
DECLARE_SOA_COLUMN(Tracked3Body, hasTracked3Body, bool); //! at least 1 tracked 3Body
156156
DECLARE_SOA_COLUMN(OmegaHighMult, hasOmegaHighMult, bool); //! at least 1 Omega + high-mult event
157+
DECLARE_SOA_COLUMN(LambdaLambda, lambdaLambda, bool); //! at least 2 lambda satisfying selection
157158

158159
// F1-proton
159160
DECLARE_SOA_COLUMN(TriggerEventF1Proton, triggereventf1proton, bool); //! F1 - proton femto trigger event
@@ -295,7 +296,7 @@ using FullJetFilter = FullJetFilters::iterator;
295296

296297
// strangeness (lf)
297298
DECLARE_SOA_TABLE(StrangenessFilters, "AOD", "LFStrgFilters", //!
298-
filtering::Omega, filtering::hadronOmega, filtering::DoubleXi, filtering::TripleXi, filtering::QuadrupleXi, filtering::SingleXiYN, filtering::OmegaLargeRadius, filtering::TrackedXi, filtering::TrackedOmega, filtering::OmegaHighMult, filtering::DoubleOmega, filtering::OmegaXi);
299+
filtering::Omega, filtering::hadronOmega, filtering::DoubleXi, filtering::TripleXi, filtering::QuadrupleXi, filtering::SingleXiYN, filtering::OmegaLargeRadius, filtering::TrackedXi, filtering::TrackedOmega, filtering::OmegaHighMult, filtering::DoubleOmega, filtering::OmegaXi, filtering::LambdaLambda);
299300

300301
using StrangenessFilter = StrangenessFilters::iterator;
301302

PWGCF/Flow/Tasks/flowMc.cxx

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,14 @@ struct FlowMc {
6565
O2_DEFINE_CONFIGURABLE(cfgFlowEfficiency, std::string, "", "CCDB path to efficiency object")
6666
O2_DEFINE_CONFIGURABLE(cfgCentVsIPTruth, std::string, "", "CCDB path to centrality vs IP truth")
6767
O2_DEFINE_CONFIGURABLE(cfgIsGlobalTrack, bool, false, "Use global tracks instead of hasTPC&&hasITS")
68+
O2_DEFINE_CONFIGURABLE(cfgK0Lambda0Enabled, bool, false, "Add K0 and Lambda0")
6869
O2_DEFINE_CONFIGURABLE(cfgFlowCumulantEnabled, bool, false, "switch of calculating flow")
6970
O2_DEFINE_CONFIGURABLE(cfgFlowCumulantNbootstrap, int, 30, "Number of subsamples")
7071
O2_DEFINE_CONFIGURABLE(cfgTrackDensityCorrUse, bool, false, "Use track density efficiency correction")
7172
O2_DEFINE_CONFIGURABLE(cfgTrackDensityCorrSlopeFactor, float, 1.0f, "A factor to scale the track density efficiency slope")
7273
Configurable<std::vector<double>> cfgTrackDensityP0{"cfgTrackDensityP0", std::vector<double>{0.6003720411, 0.6152630970, 0.6288860646, 0.6360694031, 0.6409494798, 0.6450540203, 0.6482117301, 0.6512592056, 0.6640008690, 0.6862631416, 0.7005738691, 0.7106567432, 0.7170728333}, "parameter 0 for track density efficiency correction"};
7374
Configurable<std::vector<double>> cfgTrackDensityP1{"cfgTrackDensityP1", std::vector<double>{-1.007592e-05, -8.932635e-06, -9.114538e-06, -1.054818e-05, -1.220212e-05, -1.312304e-05, -1.376433e-05, -1.412813e-05, -1.289562e-05, -1.050065e-05, -8.635725e-06, -7.380821e-06, -6.201250e-06}, "parameter 1 for track density efficiency correction"};
75+
float maxEta = 0.8;
7476

7577
ConfigurableAxis axisB{"axisB", {100, 0.0f, 20.0f}, ""};
7678
ConfigurableAxis axisCentrality{"axisCentrality", {VARIABLE_WIDTH, 0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90}, "X axis for histograms"};
@@ -143,6 +145,16 @@ struct FlowMc {
143145
histos.add<TH2>("hEPVsPhi", "hEPVsPhi;Event Plane Angle; #varphi", HistType::kTH2D, {axisPhi, axisPhi});
144146
histos.add<TH2>("hPtNchGenerated", "Reco production; pT (GeV/c); multiplicity", HistType::kTH2D, {axisPt, axisNch});
145147
histos.add<TH2>("hPtNchGlobal", "Global production; pT (GeV/c); multiplicity", HistType::kTH2D, {axisPt, axisNch});
148+
histos.add<TH2>("hPtNchGeneratedPion", "Reco production; pT (GeV/c); multiplicity", HistType::kTH2D, {axisPt, axisNch});
149+
histos.add<TH2>("hPtNchGlobalPion", "Global production; pT (GeV/c); multiplicity", HistType::kTH2D, {axisPt, axisNch});
150+
histos.add<TH2>("hPtNchGeneratedKaon", "Reco production; pT (GeV/c); multiplicity", HistType::kTH2D, {axisPt, axisNch});
151+
histos.add<TH2>("hPtNchGlobalKaon", "Global production; pT (GeV/c); multiplicity", HistType::kTH2D, {axisPt, axisNch});
152+
histos.add<TH2>("hPtNchGeneratedProton", "Reco production; pT (GeV/c); multiplicity", HistType::kTH2D, {axisPt, axisNch});
153+
histos.add<TH2>("hPtNchGlobalProton", "Global production; pT (GeV/c); multiplicity", HistType::kTH2D, {axisPt, axisNch});
154+
histos.add<TH2>("hPtNchGeneratedK0", "Reco production; pT (GeV/c); multiplicity", HistType::kTH2D, {axisPt, axisNch});
155+
histos.add<TH2>("hPtNchGlobalK0", "Global production; pT (GeV/c); multiplicity", HistType::kTH2D, {axisPt, axisNch});
156+
histos.add<TH2>("hPtNchGeneratedLambda", "Reco production; pT (GeV/c); multiplicity", HistType::kTH2D, {axisPt, axisNch});
157+
histos.add<TH2>("hPtNchGlobalLambda", "Global production; pT (GeV/c); multiplicity", HistType::kTH2D, {axisPt, axisNch});
146158
histos.add<TH1>("hPtMCGen", "Monte Carlo Truth; pT (GeV/c);", {HistType::kTH1D, {axisPt}});
147159
histos.add<TH1>("hPtMCGlobal", "Monte Carlo Global; pT (GeV/c);", {HistType::kTH1D, {axisPt}});
148160
histos.add<TH1>("hPhiWeightedTrDen", "corrected #phi distribution, considering track density", {HistType::kTH1D, {axisPhi}});
@@ -348,7 +360,7 @@ struct FlowMc {
348360
continue;
349361
if (!mcParticle.isPhysicalPrimary())
350362
continue;
351-
if (std::fabs(mcParticle.eta()) > 0.8) // main acceptance
363+
if (std::fabs(mcParticle.eta()) > maxEta) // main acceptance
352364
continue;
353365
if (mcParticle.has_tracks()) {
354366
auto const& tracks = mcParticle.tracks_as<RecoTracks>();
@@ -388,12 +400,16 @@ struct FlowMc {
388400
for (auto const& mcParticle : mcParticles) {
389401
// focus on bulk: e, mu, pi, k, p
390402
int pdgCode = std::abs(mcParticle.pdgCode());
391-
if (pdgCode != PDG_t::kElectron && pdgCode != PDG_t::kMuonMinus && pdgCode != PDG_t::kPiPlus && pdgCode != kKPlus && pdgCode != PDG_t::kProton)
403+
bool extraPDGType = true;
404+
if (cfgK0Lambda0Enabled) {
405+
extraPDGType = (pdgCode != PDG_t::kK0Short && pdgCode != PDG_t::kLambda0);
406+
}
407+
if (extraPDGType && pdgCode != PDG_t::kElectron && pdgCode != PDG_t::kMuonMinus && pdgCode != PDG_t::kPiPlus && pdgCode != kKPlus && pdgCode != PDG_t::kProton)
392408
continue;
393409

394410
if (!mcParticle.isPhysicalPrimary())
395411
continue;
396-
if (std::fabs(mcParticle.eta()) > 0.8) // main acceptance
412+
if (std::fabs(mcParticle.eta()) > maxEta) // main acceptance
397413
continue;
398414

399415
float deltaPhi = mcParticle.phi() - mcCollision.eventPlaneAngle();
@@ -402,6 +418,16 @@ struct FlowMc {
402418
histos.fill(HIST("hBVsPtVsPhiGenerated"), imp, deltaPhi, mcParticle.pt());
403419
histos.fill(HIST("hPtNchGenerated"), mcParticle.pt(), nChGlobal);
404420
histos.fill(HIST("hPtMCGen"), mcParticle.pt());
421+
if (pdgCode == PDG_t::kPiPlus)
422+
histos.fill(HIST("hPtNchGeneratedPion"), mcParticle.pt(), nChGlobal);
423+
if (pdgCode == PDG_t::kKPlus)
424+
histos.fill(HIST("hPtNchGeneratedKaon"), mcParticle.pt(), nChGlobal);
425+
if (pdgCode == PDG_t::kProton)
426+
histos.fill(HIST("hPtNchGeneratedProton"), mcParticle.pt(), nChGlobal);
427+
if (pdgCode == PDG_t::kK0Short)
428+
histos.fill(HIST("hPtNchGeneratedK0"), mcParticle.pt(), nChGlobal);
429+
if (pdgCode == PDG_t::kLambda0)
430+
histos.fill(HIST("hPtNchGeneratedLambda"), mcParticle.pt(), nChGlobal);
405431

406432
nCh++;
407433

@@ -493,6 +519,16 @@ struct FlowMc {
493519
histos.fill(HIST("hBVsPtVsPhiGlobal"), imp, deltaPhi, mcParticle.pt(), wacc * weff);
494520
histos.fill(HIST("hPtNchGlobal"), mcParticle.pt(), nChGlobal);
495521
histos.fill(HIST("hPtMCGlobal"), mcParticle.pt());
522+
if (pdgCode == PDG_t::kPiPlus)
523+
histos.fill(HIST("hPtNchGlobalPion"), mcParticle.pt(), nChGlobal);
524+
if (pdgCode == PDG_t::kKPlus)
525+
histos.fill(HIST("hPtNchGlobalKaon"), mcParticle.pt(), nChGlobal);
526+
if (pdgCode == PDG_t::kProton)
527+
histos.fill(HIST("hPtNchGlobalProton"), mcParticle.pt(), nChGlobal);
528+
if (pdgCode == PDG_t::kK0Short)
529+
histos.fill(HIST("hPtNchGlobalK0"), mcParticle.pt(), nChGlobal);
530+
if (pdgCode == PDG_t::kLambda0)
531+
histos.fill(HIST("hPtNchGlobalLambda"), mcParticle.pt(), nChGlobal);
496532
}
497533
// if any track present, fill
498534
if (validTrack)

PWGCF/MultiparticleCorrelations/Tasks/threeParticleCorrelations.cxx

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ struct ThreeParticleCorrelations {
123123
Configurable<bool> confFilterSwitch{"confFilterSwitch", false, "Switch for the fakeV0Filter function"};
124124

125125
// Efficiency histograms
126-
TH1D** hEffPions = new TH1D*[2];
127-
TH1D** hEffKaons = new TH1D*[2];
128-
TH1D** hEffProtons = new TH1D*[2];
126+
TH2D** hEffPions = new TH2D*[2];
127+
TH2D** hEffKaons = new TH2D*[2];
128+
TH2D** hEffProtons = new TH2D*[2];
129129

130130
// Correlation variables
131131
int triggSign, assocSign;
@@ -241,12 +241,12 @@ struct ThreeParticleCorrelations {
241241
ccdb->setURL("http://alice-ccdb.cern.ch");
242242
ccdb->setCaching(true);
243243
TList* efficiencyList = ccdb->getForTimeStamp<TList>("Users/j/jstaa/Efficiency/ChargedParticles", 1);
244-
hEffPions[0] = static_cast<TH1D*>(efficiencyList->FindObject("hEfficiencyPionP"));
245-
hEffPions[1] = static_cast<TH1D*>(efficiencyList->FindObject("hEfficiencyPionN"));
246-
hEffKaons[0] = static_cast<TH1D*>(efficiencyList->FindObject("hEfficiencyKaonP"));
247-
hEffKaons[1] = static_cast<TH1D*>(efficiencyList->FindObject("hEfficiencyKaonN"));
248-
hEffProtons[0] = static_cast<TH1D*>(efficiencyList->FindObject("hEfficiencyProtonP"));
249-
hEffProtons[1] = static_cast<TH1D*>(efficiencyList->FindObject("hEfficiencyProtonN"));
244+
hEffPions[0] = static_cast<TH2D*>(efficiencyList->FindObject("hEfficiencyPionP"));
245+
hEffPions[1] = static_cast<TH2D*>(efficiencyList->FindObject("hEfficiencyPionN"));
246+
hEffKaons[0] = static_cast<TH2D*>(efficiencyList->FindObject("hEfficiencyKaonP"));
247+
hEffKaons[1] = static_cast<TH2D*>(efficiencyList->FindObject("hEfficiencyKaonN"));
248+
hEffProtons[0] = static_cast<TH2D*>(efficiencyList->FindObject("hEfficiencyProtonP"));
249+
hEffProtons[1] = static_cast<TH2D*>(efficiencyList->FindObject("hEfficiencyProtonN"));
250250
}
251251

252252
//==========================================================================================================================================================================================================================================================================
@@ -278,15 +278,15 @@ struct ThreeParticleCorrelations {
278278
rQARegistry.fill(HIST("hdEdx"), track.pt(), track.tpcSignal());
279279
rQARegistry.fill(HIST("hBeta"), track.pt(), track.beta());
280280
if (assocPID[0] == pionID) { // Pions
281-
rQARegistry.fill(HIST("hPtPion"), track.pt(), 1. / trackEff(hEffPions, track.sign(), track.pt()));
281+
rQARegistry.fill(HIST("hPtPion"), track.pt(), 1. / trackEff(hEffPions, track));
282282
rQARegistry.fill(HIST("hdEdxPion"), track.pt(), track.tpcSignal());
283283
rQARegistry.fill(HIST("hBetaPion"), track.pt(), track.beta());
284284
} else if (assocPID[0] == kaonID) { // Kaons
285-
rQARegistry.fill(HIST("hPtKaon"), track.pt(), 1. / trackEff(hEffKaons, track.sign(), track.pt()));
285+
rQARegistry.fill(HIST("hPtKaon"), track.pt(), 1. / trackEff(hEffKaons, track));
286286
rQARegistry.fill(HIST("hdEdxKaon"), track.pt(), track.tpcSignal());
287287
rQARegistry.fill(HIST("hBetaKaon"), track.pt(), track.beta());
288288
} else if (assocPID[0] == protonID) { // Protons
289-
rQARegistry.fill(HIST("hPtProton"), track.pt(), 1. / trackEff(hEffProtons, track.sign(), track.pt()));
289+
rQARegistry.fill(HIST("hPtProton"), track.pt(), 1. / trackEff(hEffProtons, track));
290290
rQARegistry.fill(HIST("hdEdxProton"), track.pt(), track.tpcSignal());
291291
rQARegistry.fill(HIST("hBetaProton"), track.pt(), track.beta());
292292
}
@@ -318,19 +318,19 @@ struct ThreeParticleCorrelations {
318318

319319
if (candMass >= MassLambda0 - 4 * dGaussSigma && candMass <= MassLambda0 + 4 * dGaussSigma) {
320320
if (assocPID[0] == pionID) { // Pions
321-
rSECorrRegistry.fill(HIST("hSameLambdaPion_SGNL"), deltaPhi, deltaEta, collision.centFT0C(), collision.posZ(), triggSign, associate.sign(), 1. / trackEff(hEffPions, associate.sign(), associate.pt()));
321+
rSECorrRegistry.fill(HIST("hSameLambdaPion_SGNL"), deltaPhi, deltaEta, collision.centFT0C(), collision.posZ(), triggSign, associate.sign(), 1. / trackEff(hEffPions, associate));
322322
} else if (assocPID[0] == kaonID) { // Kaons
323-
rSECorrRegistry.fill(HIST("hSameLambdaKaon_SGNL"), deltaPhi, deltaEta, collision.centFT0C(), collision.posZ(), triggSign, associate.sign(), 1. / trackEff(hEffKaons, associate.sign(), associate.pt()));
323+
rSECorrRegistry.fill(HIST("hSameLambdaKaon_SGNL"), deltaPhi, deltaEta, collision.centFT0C(), collision.posZ(), triggSign, associate.sign(), 1. / trackEff(hEffKaons, associate));
324324
} else if (assocPID[0] == protonID) { // Protons
325-
rSECorrRegistry.fill(HIST("hSameLambdaProton_SGNL"), deltaPhi, deltaEta, collision.centFT0C(), collision.posZ(), triggSign, associate.sign(), 1. / trackEff(hEffProtons, associate.sign(), associate.pt()));
325+
rSECorrRegistry.fill(HIST("hSameLambdaProton_SGNL"), deltaPhi, deltaEta, collision.centFT0C(), collision.posZ(), triggSign, associate.sign(), 1. / trackEff(hEffProtons, associate));
326326
}
327327
} else if (candMass >= MassLambda0 - 8 * dGaussSigma && candMass <= MassLambda0 + 8 * dGaussSigma) {
328328
if (assocPID[0] == pionID) { // Pions
329-
rSECorrRegistry.fill(HIST("hSameLambdaPion_SB"), deltaPhi, deltaEta, collision.centFT0C(), collision.posZ(), triggSign, associate.sign(), 1. / trackEff(hEffPions, associate.sign(), associate.pt()));
329+
rSECorrRegistry.fill(HIST("hSameLambdaPion_SB"), deltaPhi, deltaEta, collision.centFT0C(), collision.posZ(), triggSign, associate.sign(), 1. / trackEff(hEffPions, associate));
330330
} else if (assocPID[0] == kaonID) { // Kaons
331-
rSECorrRegistry.fill(HIST("hSameLambdaKaon_SB"), deltaPhi, deltaEta, collision.centFT0C(), collision.posZ(), triggSign, associate.sign(), 1. / trackEff(hEffKaons, associate.sign(), associate.pt()));
331+
rSECorrRegistry.fill(HIST("hSameLambdaKaon_SB"), deltaPhi, deltaEta, collision.centFT0C(), collision.posZ(), triggSign, associate.sign(), 1. / trackEff(hEffKaons, associate));
332332
} else if (assocPID[0] == protonID) { // Protons
333-
rSECorrRegistry.fill(HIST("hSameLambdaProton_SB"), deltaPhi, deltaEta, collision.centFT0C(), collision.posZ(), triggSign, associate.sign(), 1. / trackEff(hEffProtons, associate.sign(), associate.pt()));
333+
rSECorrRegistry.fill(HIST("hSameLambdaProton_SB"), deltaPhi, deltaEta, collision.centFT0C(), collision.posZ(), triggSign, associate.sign(), 1. / trackEff(hEffProtons, associate));
334334
}
335335
}
336336
}
@@ -366,19 +366,19 @@ struct ThreeParticleCorrelations {
366366

367367
if (candMass >= MassLambda0 - 4 * dGaussSigma && candMass <= MassLambda0 + 4 * dGaussSigma) {
368368
if (assocPID[0] == pionID) { // Pions
369-
rMECorrRegistry.fill(HIST("hMixLambdaPion_SGNL"), deltaPhi, deltaEta, coll_1.centFT0C(), coll_1.posZ(), triggSign, associate.sign(), 1. / trackEff(hEffPions, associate.sign(), associate.pt()));
369+
rMECorrRegistry.fill(HIST("hMixLambdaPion_SGNL"), deltaPhi, deltaEta, coll_1.centFT0C(), coll_1.posZ(), triggSign, associate.sign(), 1. / trackEff(hEffPions, associate));
370370
} else if (assocPID[0] == kaonID) { // Kaons
371-
rMECorrRegistry.fill(HIST("hMixLambdaKaon_SGNL"), deltaPhi, deltaEta, coll_1.centFT0C(), coll_1.posZ(), triggSign, associate.sign(), 1. / trackEff(hEffKaons, associate.sign(), associate.pt()));
371+
rMECorrRegistry.fill(HIST("hMixLambdaKaon_SGNL"), deltaPhi, deltaEta, coll_1.centFT0C(), coll_1.posZ(), triggSign, associate.sign(), 1. / trackEff(hEffKaons, associate));
372372
} else if (assocPID[0] == protonID) { // Protons
373-
rMECorrRegistry.fill(HIST("hMixLambdaProton_SGNL"), deltaPhi, deltaEta, coll_1.centFT0C(), coll_1.posZ(), triggSign, associate.sign(), 1. / trackEff(hEffProtons, associate.sign(), associate.pt()));
373+
rMECorrRegistry.fill(HIST("hMixLambdaProton_SGNL"), deltaPhi, deltaEta, coll_1.centFT0C(), coll_1.posZ(), triggSign, associate.sign(), 1. / trackEff(hEffProtons, associate));
374374
}
375375
} else if (candMass >= MassLambda0 - 8 * dGaussSigma && candMass <= MassLambda0 + 8 * dGaussSigma) {
376376
if (assocPID[0] == pionID) { // Pions
377-
rMECorrRegistry.fill(HIST("hMixLambdaPion_SB"), deltaPhi, deltaEta, coll_1.centFT0C(), coll_1.posZ(), triggSign, associate.sign(), 1. / trackEff(hEffPions, associate.sign(), associate.pt()));
377+
rMECorrRegistry.fill(HIST("hMixLambdaPion_SB"), deltaPhi, deltaEta, coll_1.centFT0C(), coll_1.posZ(), triggSign, associate.sign(), 1. / trackEff(hEffPions, associate));
378378
} else if (assocPID[0] == kaonID) { // Kaons
379-
rMECorrRegistry.fill(HIST("hMixLambdaKaon_SB"), deltaPhi, deltaEta, coll_1.centFT0C(), coll_1.posZ(), triggSign, associate.sign(), 1. / trackEff(hEffKaons, associate.sign(), associate.pt()));
379+
rMECorrRegistry.fill(HIST("hMixLambdaKaon_SB"), deltaPhi, deltaEta, coll_1.centFT0C(), coll_1.posZ(), triggSign, associate.sign(), 1. / trackEff(hEffKaons, associate));
380380
} else if (assocPID[0] == protonID) { // Protons
381-
rMECorrRegistry.fill(HIST("hMixLambdaProton_SB"), deltaPhi, deltaEta, coll_1.centFT0C(), coll_1.posZ(), triggSign, associate.sign(), 1. / trackEff(hEffProtons, associate.sign(), associate.pt()));
381+
rMECorrRegistry.fill(HIST("hMixLambdaProton_SB"), deltaPhi, deltaEta, coll_1.centFT0C(), coll_1.posZ(), triggSign, associate.sign(), 1. / trackEff(hEffProtons, associate));
382382
}
383383
}
384384
}
@@ -598,17 +598,18 @@ struct ThreeParticleCorrelations {
598598
return 0.1 * (grpo->getNominalL3Field()); // 1 T = 10 kG
599599
}
600600

601-
double trackEff(TH1D** efficiencies, int sign, double pT)
601+
template <class TrackCand>
602+
double trackEff(TH2D** efficiencies, const TrackCand& track)
602603
{
603604

604605
int index = -999;
605-
if (sign > 0) {
606+
if (track.sign() > 0) {
606607
index = 0;
607-
} else if (sign < 0) {
608+
} else if (track.sign() < 0) {
608609
index = 1;
609610
}
610611

611-
double efficiency = efficiencies[index]->GetBinContent(efficiencies[index]->FindBin(pT));
612+
double efficiency = efficiencies[index]->GetBinContent(efficiencies[index]->FindBin(track.pt(), track.eta()));
612613
if (efficiency > 0) {
613614
return efficiency;
614615
} else {

0 commit comments

Comments
 (0)