Skip to content

Commit 5373a33

Browse files
author
Sawan Sawan
committed
different event/signal loss method
1 parent 9da57e1 commit 5373a33

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

PWGLF/Tasks/Resonances/kstarqa.cxx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,13 @@ struct Kstarqa {
378378
hGenEvents->GetYaxis()->SetBinLabel(2, "Generated events with Mc collision V_{z} cut");
379379
hGenEvents->GetYaxis()->SetBinLabel(3, "Generated events with Mc INEL>0");
380380
hGenEvents->GetYaxis()->SetBinLabel(4, "Generated events with at least one reconstructed event");
381+
381382
hInvMass.add("CorrFactors/h2dGenKstar", "Centrality vs p_{T}", kTH2D, {{101, 0.0f, 101.0f}, ptAxis});
382383
hInvMass.add("CorrFactors/h3dGenKstarVsMultMCVsMultiplicity", "MC centrality vs centrality vs p_{T}", kTH3D, {axisNch, {101, 0.0f, 101.0f}, ptAxis});
384+
hInvMass.add("CorrFactors/hSignalLossDenominator", "Kstar generated before event selection", kTH2F, {{ptAxis}, {multiplicityAxis}});
385+
hInvMass.add("CorrFactors/hSignalLossNumerator", "Kstar generated after event selection", kTH2F, {{ptAxis}, {multiplicityAxis}});
386+
hInvMass.add("CorrFactors/MultiplicityRec", "Multiplicity in generated MC with at least 1 reconstruction", kTH1F, {multiplicityAxis});
387+
hInvMass.add("CorrFactors/MultiplicityGen", "Multiplicity in generated MC", kTH1F, {multiplicityAxis});
383388
}
384389

385390
rEventSelection.add("tracksCheckData", "No. of events in the data", kTH1I, {{10, 0, 10}});
@@ -1673,12 +1678,13 @@ struct Kstarqa {
16731678
auto multiplicityRec = -1;
16741679
bool isSelectedEvent = false;
16751680
auto multiplicity1 = -999.;
1681+
16761682
for (const auto& RecCollision : recCollisions) {
16771683
if (!RecCollision.has_mcCollision())
16781684
continue;
16791685
if (!selectionEvent(RecCollision, false)) // don't fill event cut histogram
16801686
continue;
1681-
// multiplicity1 = RecCollision.centFT0M();
1687+
16821688
const auto& mcCollisionRec = RecCollision.mcCollision_as<EventMCGenerated>();
16831689
multiplicityRec = mcCollisionRec.centFT0M();
16841690

@@ -1752,6 +1758,8 @@ struct Kstarqa {
17521758
hInvMass.fill(HIST("CorrFactors/hGenEvents"), mcCollision.multMCNParticlesEta08(), 2.5);
17531759

17541760
float multiplicity = 100.5f;
1761+
bool isSelectedEvent = false;
1762+
17551763
for (auto const& collision : collisions) {
17561764
if (!selectionEvent(collision, false)) // don't fill event cut histogram
17571765
continue;
@@ -1767,10 +1775,15 @@ struct Kstarqa {
17671775
} else {
17681776
multiplicity = collision.centFT0M(); // default
17691777
}
1778+
isSelectedEvent = true;
17701779
}
17711780

17721781
hInvMass.fill(HIST("CorrFactors/hMultiplicityVsMultMC"), multiplicity, mcCollision.multMCNParticlesEta08());
17731782
hInvMass.fill(HIST("CorrFactors/hNrecInGen"), collisions.size());
1783+
hInvMass.fill(HIST("CorrFactors/MultiplicityGen"), multiplicity);
1784+
if (isSelectedEvent) {
1785+
hInvMass.fill(HIST("CorrFactors/MultiplicityRec"), multiplicity);
1786+
}
17741787

17751788
for (const auto& mcParticle : mcParticles) {
17761789

@@ -1816,6 +1829,10 @@ struct Kstarqa {
18161829

18171830
hInvMass.fill(HIST("CorrFactors/h2dGenKstar"), multiplicity, mother.Pt());
18181831
hInvMass.fill(HIST("CorrFactors/h3dGenKstarVsMultMCVsMultiplicity"), mcCollision.multMCNParticlesEta08(), multiplicity, mother.Pt());
1832+
hInvMass.fill(HIST("CorrFactors/hSignalLossDenominator"), mother.pt(), multiplicity);
1833+
if (isSelectedEvent) {
1834+
hInvMass.fill(HIST("CorrFactors/hSignalLossNumerator"), mother.pt(), multiplicity);
1835+
}
18191836
}
18201837
}
18211838
}

0 commit comments

Comments
 (0)