Skip to content

Commit 9bab3f6

Browse files
committed
Added the THnSparse for MC Closure test
1 parent 5b21f91 commit 9bab3f6

1 file changed

Lines changed: 26 additions & 2 deletions

File tree

PWGLF/Tasks/Resonances/chargedkstaranalysis.cxx

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ struct Chargedkstaranalysis {
9494
Preslice<aod::Tracks> perCollision = aod::track::collisionId;
9595
Preslice<aod::McParticles> perMCCollision = o2::aod::mcparticle::mcCollisionId;
9696
bool currentIsGen = false;
97+
bool mcClosure = false;
9798
struct : ConfigurableGroup {
9899
ConfigurableAxis cfgvtxbins{"cfgvtxbins", {VARIABLE_WIDTH, -10.0f, -8.f, -6.f, -4.f, -2.f, 0.f, 2.f, 4.f, 6.f, 8.f, 10.f}, "Mixing bins - z-vertex"};
99100
ConfigurableAxis cfgmultbins{"cfgmultbins", {VARIABLE_WIDTH, 0., 1., 5., 10., 30., 50., 70., 100., 110.}, "Mixing bins - multiplicity"};
@@ -226,6 +227,7 @@ struct Chargedkstaranalysis {
226227
// MC configurables
227228
struct : ConfigurableGroup {
228229
Configurable<bool> doBkgMc{"doBkgMc", false, "Apply rotation in MC"};
230+
Configurable<bool> doMcClosure{"doMcClosure", true, "Do MC Closure Study in MC"};
229231
} mcCfgs;
230232

231233
/// Track selections
@@ -562,9 +564,12 @@ struct Chargedkstaranalysis {
562564
if (!helicityCfgs.qAOptimisation) {
563565
histosMc.add("h3ChaKstarInvMassDSMcGen", "h3ChaKstarInvMassDSMcGen", kTHnSparseF, {centAxis, ptAxis, invMassAxisReso, thnAxisPOL}, true);
564566
histosMc.add("h3ChaKstarInvMassDSMcRec", "h3ChaKstarInvMassDSMcRec", kTHnSparseF, {centAxis, ptAxis, invMassAxisReso, thnAxisPOL}, true);
567+
histosMc.add("h3ChaKstarInvMassDSMcRecClosure", "h3ChaKstarInvMassDSMcRecClosure", kTHnSparseF, {centAxis, ptAxis, invMassAxisReso, thnAxisPOL}, true);
568+
565569
if (mcCfgs.doBkgMc) {
566570
histosMc.add("h3ChaKstarInvMassRotMcGen", "h3ChaKstarInvMassRotMcGen", kTHnSparseF, {centAxis, ptAxis, invMassAxisReso, thnAxisPOL}, true);
567571
histosMc.add("h3ChaKstarInvMassRotMcRec", "h3ChaKstarInvMassRotMcRec", kTHnSparseF, {centAxis, ptAxis, invMassAxisReso, thnAxisPOL}, true);
572+
histosMc.add("h3ChaKstarInvMassRotMcRecClosure", "h3ChaKstarInvMassRotMcRecClosure", kTHnSparseF, {centAxis, ptAxis, invMassAxisReso, thnAxisPOL}, true);
568573
}
569574
}
570575

@@ -790,9 +795,17 @@ struct Chargedkstaranalysis {
790795
}
791796
} else {
792797
if (isRot) {
793-
histosMc.fill(HIST("h3ChaKstarInvMassRotMcRec"), multiplicity, mother.Pt(), mother.M(), cosTheta);
798+
if (!mcClosure) {
799+
histosMc.fill(HIST("h3ChaKstarInvMassRotMcRec"), multiplicity, mother.Pt(), mother.M(), cosTheta);
800+
} else {
801+
histosMc.fill(HIST("h3ChaKstarInvMassRotMcRecClosure"), multiplicity, mother.Pt(), mother.M(), cosTheta);
802+
}
794803
} else {
795-
histosMc.fill(HIST("h3ChaKstarInvMassDSMcRec"), multiplicity, mother.Pt(), mother.M(), cosTheta);
804+
if (!mcClosure) {
805+
histosMc.fill(HIST("h3ChaKstarInvMassDSMcGen"), multiplicity, mother.Pt(), mother.M(), cosTheta);
806+
} else {
807+
histosMc.fill(HIST("h3ChaKstarInvMassDSMcRecClosure"), multiplicity, mother.Pt(), mother.M(), cosTheta);
808+
}
796809
}
797810
}
798811
}
@@ -1466,6 +1479,17 @@ struct Chargedkstaranalysis {
14661479
const double yreco = lResoKstar.Rapidity();
14671480
if (std::abs(yreco) > kstarCutCfgs.cKstarMaxRap)
14681481
continue;
1482+
1483+
if (mcCfgs.doMcClosure) {
1484+
// For MC clousre test
1485+
mcClosure = true;
1486+
if (helicityCfgs.cCosWithKShot) {
1487+
fillInvMass(lResoKstar, lCentrality, lResoSecondary, lDecayDaughter_bach, eventCutCfgs.confIsMix);
1488+
} else {
1489+
fillInvMass(lResoKstar, lCentrality, lDecayDaughter_bach, lResoSecondary, eventCutCfgs.confIsMix);
1490+
}
1491+
}
1492+
mcClosure = false;
14691493
// Since we are doing the MC study and we know about the PDG code of each particle let's try to check the things which we have
14701494
if (!v0.has_mcParticle() || !bTrack.has_mcParticle())
14711495
continue;

0 commit comments

Comments
 (0)