Skip to content

Commit 8b31d07

Browse files
authored
[PWGCF] Update lambdaR2Correlation.cxx (#10838)
1 parent fcef305 commit 8b31d07

File tree

1 file changed

+24
-80
lines changed

1 file changed

+24
-80
lines changed

PWGCF/TwoParticleCorrelations/Tasks/lambdaR2Correlation.cxx

Lines changed: 24 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,9 @@ enum DMCType {
196196
};
197197

198198
enum CorrHistDim {
199-
kOneDimCorr = 1,
200-
kTwoDimCorr,
201-
kThreeDimCorr
199+
OneDimCorr = 1,
200+
TwoDimCorr,
201+
ThreeDimCorr
202202
};
203203

204204
struct LambdaTableProducer {
@@ -251,6 +251,8 @@ struct LambdaTableProducer {
251251
Configurable<double> cLambdaMassWindow{"cLambdaMassWindow", 0.005, "Lambda Mass Window"};
252252

253253
// V0s kinmatic acceptance
254+
Configurable<float> cMinV0Mass{"cMinV0Mass", 1.10, "V0 Mass Min"};
255+
Configurable<float> cMaxV0Mass{"cMaxV0Mass", 1.12, "V0 Mass Min"};
254256
Configurable<float> cMinV0Pt{"cMinV0Pt", 0.8, "Minimum V0 pT"};
255257
Configurable<float> cMaxV0Pt{"cMaxV0Pt", 4.2, "Minimum V0 pT"};
256258
Configurable<float> cMaxV0Rap{"cMaxV0Rap", 0.5, "|rap| cut"};
@@ -262,7 +264,7 @@ struct LambdaTableProducer {
262264
Configurable<bool> cSelectPrimaryV0{"cSelectPrimaryV0", true, "Select Primary V0"};
263265
Configurable<bool> cRecPrimaryLambda{"cRecPrimaryLambda", true, "Primary Reconstructed Lambda"};
264266
Configurable<bool> cRecSecondaryLambda{"cRecSecondaryLambda", false, "Secondary Reconstructed Lambda"};
265-
Configurable<bool> cCheckRecoDauFlag{"cCheckRecoDauFlag", false, "Check for reco daughter PID"};
267+
Configurable<bool> cCheckRecoDauFlag{"cCheckRecoDauFlag", true, "Check for reco daughter PID"};
266268
Configurable<bool> cGenPrimaryLambda{"cGenPrimaryLambda", true, "Primary Generated Lambda"};
267269
Configurable<bool> cGenSecondaryLambda{"cGenSecondaryLambda", false, "Secondary Generated Lambda"};
268270
Configurable<bool> cGenDecayChannel{"cGenDecayChannel", true, "Gen Level Decay Channel Flag"};
@@ -311,8 +313,8 @@ struct LambdaTableProducer {
311313
const AxisSpec axisVz(220, -11, 11, "V_{z} (cm)");
312314
const AxisSpec axisPID(8000, -4000, 4000, "PdgCode");
313315

314-
const AxisSpec axisV0Mass(200, 1.09, 1.14, "M_{p#pi} (GeV/#it{c}^{2})");
315-
const AxisSpec axisV0Pt(84, 0.2, 4.4, "p_{T} (GeV/#it{c})");
316+
const AxisSpec axisV0Mass(140, 1.08, 1.15, "M_{p#pi} (GeV/#it{c}^{2})");
317+
const AxisSpec axisV0Pt(100., 0., 10., "p_{T} (GeV/#it{c})");
316318
const AxisSpec axisV0Rap(48, -1.2, 1.2, "y");
317319
const AxisSpec axisV0Eta(48, -1.2, 1.2, "#eta");
318320
const AxisSpec axisV0Phi(36, 0., TwoPI, "#phi (rad)");
@@ -388,7 +390,7 @@ struct LambdaTableProducer {
388390
histos.addClone("McRec/Lambda/", "McRec/AntiLambda/");
389391

390392
// MC Generated Histograms
391-
if (doprocessMCRun3 || doprocessMCRun2 || doprocessMCRecoRun3) {
393+
if (doprocessMCRun3 || doprocessMCRun2) {
392394
// McReco Histos
393395
histos.add("Tracks/h2f_tracks_pid_before_sel", "PIDs", kTH2F, {axisPID, axisV0Pt});
394396
histos.add("Tracks/h2f_tracks_pid_after_sel", "PIDs", kTH2F, {axisPID, axisV0Pt});
@@ -648,13 +650,13 @@ struct LambdaTableProducer {
648650
bool lambdaFlag = false, antiLambdaFlag = false;
649651

650652
// get v0 track as lambda
651-
if ((std::abs(v0.mLambda() - MassLambda0) < cLambdaMassWindow) && (selLambdaDauWithTpcPid<kLambda>(postrack, negtrack))) {
653+
if ((v0.mLambda() > cMinV0Mass && v0.mLambda() < cMaxV0Mass) && (selLambdaDauWithTpcPid<kLambda>(postrack, negtrack))) {
652654
lambdaFlag = true;
653655
v0type = kLambda;
654656
}
655657

656658
// get v0 track as anti-lambda
657-
if ((std::abs(v0.mAntiLambda() - MassLambda0) < cLambdaMassWindow) && (selLambdaDauWithTpcPid<kAntiLambda>(postrack, negtrack))) {
659+
if ((v0.mAntiLambda() > cMinV0Mass && v0.mAntiLambda() < cMaxV0Mass) && (selLambdaDauWithTpcPid<kAntiLambda>(postrack, negtrack))) {
658660
antiLambdaFlag = true;
659661
v0type = kAntiLambda;
660662
}
@@ -846,13 +848,13 @@ struct LambdaTableProducer {
846848
float retVal = 0.;
847849
float rap = (cDoEtaCorr) ? v0.eta() : v0.yLambda();
848850

849-
if (hist->GetDimension() == kOneDimCorr) {
851+
if (hist->GetDimension() == OneDimCorr) {
850852
histos.fill(HIST("Tracks/h1f_tracks_info"), kEffCorrPt);
851853
retVal = hist->GetBinContent(hist->FindBin(v0.pt()));
852-
} else if (hist->GetDimension() == kTwoDimCorr) {
854+
} else if (hist->GetDimension() == TwoDimCorr) {
853855
histos.fill(HIST("Tracks/h1f_tracks_info"), kEffCorrPtRap);
854856
retVal = hist->GetBinContent(hist->FindBin(v0.pt(), rap));
855-
} else if (hist->GetDimension() == kThreeDimCorr) {
857+
} else if (hist->GetDimension() == ThreeDimCorr) {
856858
histos.fill(HIST("Tracks/h1f_tracks_info"), kEffCorrPtRapPhi);
857859
retVal = hist->GetBinContent(hist->FindBin(v0.pt(), rap, v0.phi()));
858860
} else {
@@ -1211,71 +1213,6 @@ struct LambdaTableProducer {
12111213
}
12121214

12131215
PROCESS_SWITCH(LambdaTableProducer, processMCRun2, "Process for Run2 MC RecoGen", false);
1214-
1215-
// Temperory process function to check differences in way of computations (Will be deleted in future !!!)
1216-
void processMCRecoRun3(soa::Join<CollisionsRun3, aod::McCollisionLabels>::iterator const& collision,
1217-
soa::Join<aod::McCollisions, aod::McCentFT0Ms> const&,
1218-
McV0Tracks const& V0s, TracksMC const& tracks,
1219-
aod::McParticles const& mcParticles)
1220-
{
1221-
// see if reco collison pass event selection
1222-
if (!collision.has_mcCollision() || !selCollision<kRun3>(collision)) {
1223-
return;
1224-
}
1225-
1226-
// Now we have reco event
1227-
// Fill V0 Lambda Table
1228-
fillLambdaRecoTables<kRun3, kMC>(collision, V0s, tracks);
1229-
1230-
// Get the mcCollision and mcParticles associated to this reco event
1231-
auto mccol = collision.mcCollision_as<soa::Join<aod::McCollisions, aod::McCentFT0Ms>>();
1232-
auto mcparticles = mcParticles.sliceByCached(aod::mcparticle::mcCollisionId, mccol.globalIndex(), cache);
1233-
1234-
// Fill McGen Collision Table
1235-
lambdaMCGenCollisionTable(mccol.centFT0M(), mccol.posX(), mccol.posY(), mccol.posZ());
1236-
1237-
// initialize track objects
1238-
ParticleType v0Type = kLambda;
1239-
float rap = 0.;
1240-
for (auto const& mcpart : mcparticles) {
1241-
// check for Lambda first
1242-
if (mcpart.pdgCode() == kLambda0) {
1243-
v0Type = kLambda;
1244-
} else if (mcpart.pdgCode() == kLambda0Bar) {
1245-
v0Type = kAntiLambda;
1246-
} else {
1247-
continue;
1248-
}
1249-
1250-
// check for Primary Lambda/AntiLambda
1251-
if (cGenPrimaryLambda && !mcpart.isPhysicalPrimary()) {
1252-
continue;
1253-
} else if (cGenSecondaryLambda && mcpart.isPhysicalPrimary()) {
1254-
continue;
1255-
}
1256-
1257-
// Decide Eta/Rap
1258-
if (!cDoEtaAnalysis) {
1259-
rap = mcpart.y();
1260-
} else {
1261-
rap = mcpart.eta();
1262-
}
1263-
1264-
// Apply Kinematic Acceptance
1265-
if (!kinCutSelection(mcpart.pt(), std::abs(rap), cMinV0Pt, cMaxV0Pt, cMaxV0Rap)) {
1266-
continue;
1267-
}
1268-
1269-
histos.fill(HIST("Tracks/h1f_tracks_info"), kGenTotAccLambda);
1270-
1271-
// Fill Lambda McGen Table
1272-
lambdaMCGenTrackTable(lambdaMCGenCollisionTable.lastIndex(), mcpart.px(), mcpart.py(), mcpart.pz(),
1273-
mcpart.pt(), mcpart.eta(), mcpart.phi(), mcpart.y(), RecoDecay::m(mcpart.p(), mcpart.e()),
1274-
-999., 999., (int8_t)v0Type, -999., -999., 1.);
1275-
}
1276-
}
1277-
1278-
PROCESS_SWITCH(LambdaTableProducer, processMCRecoRun3, "Process for Run3 MC Reconstructed", false);
12791216
};
12801217

12811218
struct LambdaTracksExtProducer {
@@ -1521,10 +1458,14 @@ struct LambdaR2Correlation {
15211458
histos.add("Reco/h1d_n1_phi_LaP", "#rho_{1}^{#Lambda}", kTH1D, {axisPhi});
15221459
histos.add("Reco/h1d_n1_phi_LaM", "#rho_{1}^{#bar{#Lambda}}", kTH1D, {axisPhi});
15231460

1524-
// rho1 for R2 RapPhi histograms
1461+
// rho1 for R2 RapPhi
15251462
histos.add("Reco/h2d_n1_rapphi_LaP", "#rho_{1}^{#Lambda}", kTH2D, {axisRap, axisPhi});
15261463
histos.add("Reco/h2d_n1_rapphi_LaM", "#rho_{1}^{#bar{#Lambda}}", kTH2D, {axisRap, axisPhi});
15271464

1465+
// rho1 for Q_{inv}
1466+
histos.add("Reco/h2d_n1_pteta_LaP", "#rho_{1}^{#Lambda}", kTH2D, {axisPt, axisEta});
1467+
histos.add("Reco/h2d_n1_pteta_LaM", "#rho_{1}^{#bar{#Lambda}}", kTH2D, {axisPt, axisEta});
1468+
15281469
// rho2 for numerator of R2
15291470
histos.add("Reco/h2d_n2_ptpt_LaP_LaM", "#rho_{2}^{#Lambda#bar{#Lambda}}", kTH2D, {axisPt, axisPt});
15301471
histos.add("Reco/h2d_n2_ptpt_LaP_LaP", "#rho_{2}^{#Lambda#Lambda}", kTH2D, {axisPt, axisPt});
@@ -1539,12 +1480,12 @@ struct LambdaR2Correlation {
15391480
histos.add("Reco/h2d_n2_phiphi_LaP_LaP", "#rho_{2}^{#Lambda#Lambda}", kTH2D, {axisPhi, axisPhi});
15401481
histos.add("Reco/h2d_n2_phiphi_LaM_LaM", "#rho_{2}^{#bar{#Lambda}#bar{#Lambda}}", kTH2D, {axisPhi, axisPhi});
15411482

1542-
// rho2 for R2 Rap1Phi1Rap2Phi2 histograms
1483+
// rho2 for R2 Rap1Phi1Rap2Phi2
15431484
histos.add("Reco/h2d_n2_rapphi_LaP_LaM", "#rho_{2}^{#Lambda#bar{#Lambda}}", kTH2D, {axisRapPhi, axisRapPhi});
15441485
histos.add("Reco/h2d_n2_rapphi_LaP_LaP", "#rho_{2}^{#Lambda#Lambda}", kTH2D, {axisRapPhi, axisRapPhi});
15451486
histos.add("Reco/h2d_n2_rapphi_LaM_LaM", "#rho_{2}^{#bar{#Lambda}#bar{#Lambda}}", kTH2D, {axisRapPhi, axisRapPhi});
15461487

1547-
// rho2 for R2 Qinv histograms
1488+
// rho2 for R2 Qinv
15481489
histos.add("Reco/h1d_n2_qinv_LaP_LaM", "#rho_{2}^{#Lambda#bar{#Lambda}}", kTH1D, {axisQinv});
15491490
histos.add("Reco/h1d_n2_qinv_LaP_LaP", "#rho_{2}^{#Lambda#Lambda}", kTH1D, {axisQinv});
15501491
histos.add("Reco/h1d_n2_qinv_LaM_LaM", "#rho_{2}^{#bar{#Lambda}#bar{#Lambda}}", kTH1D, {axisQinv});
@@ -1620,6 +1561,9 @@ struct LambdaR2Correlation {
16201561

16211562
// Rho1 for N1RapPhi
16221563
histos.fill(HIST(SubDirRecGen[rec_gen]) + HIST("h2d_n1_rapphi_") + HIST(SubDirHist[part]), track.rap(), track.phi(), track.corrFact());
1564+
1565+
// Rho1 for Q_{inv} Bkg Estimation
1566+
histos.fill(HIST(SubDirRecGen[rec_gen]) + HIST("h2d_n1_pteta_") + HIST(SubDirHist[part]), track.pt(), track.eta(), track.corrFact());
16231567
}
16241568

16251569
// fill multiplicity histograms

0 commit comments

Comments
 (0)