Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 54 additions & 2 deletions PWGLF/Tasks/Resonances/kstarqa.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ struct Kstarqa {

rEventSelection.add("hEventCut", "No. of event after cuts", kTH1D, {{20, 0, 20}});
std::shared_ptr<TH1> hEventSelection = rEventSelection.get<TH1>(HIST("hEventCut"));
rEventSelection.add("hEventCutMC", "No. of event after cuts in MC", kTH1D, {{10, 0, 10}});
std::shared_ptr<TH1> hEventSelectionMC = rEventSelection.get<TH1>(HIST("hEventCutMC"));
rEventSelection.add("hTrackCut", "No. of tracks after cuts", kTH1D, {{20, 0, 20}});
std::shared_ptr<TH1> hTrackSelection = rEventSelection.get<TH1>(HIST("hTrackCut"));

Expand All @@ -242,11 +244,24 @@ struct Kstarqa {
std::string("IsGoodITSLayersAll") + check(configGp.isGoodITSLayersAll.value),
std::string("isVertexITSTPC") + check(configGp.isVertexITSTPC.value),
};

std::vector<std::string> eveCutLabelsMC = {
"All Events",
"RecCollision",
"TimeFrameBorder",
"ITSROFrameBorder",
"Vz",
"TriggerTVX"};

// assign labels
for (size_t i = 0; i < eveCutLabels.size(); ++i) {
hEventSelection->GetXaxis()->SetBinLabel(i + 1, eveCutLabels[i].c_str());
}

for (size_t i = 0; i < eveCutLabelsMC.size(); ++i) {
hEventSelectionMC->GetXaxis()->SetBinLabel(i + 1, eveCutLabelsMC[i].c_str());
}

std::vector<std::string> trackCutLabels = {
"All Tracks",
std::string("GlobalTracks") + check(configGp.isGlobalTracks.value),
Expand Down Expand Up @@ -350,6 +365,7 @@ struct Kstarqa {

if (doprocessEvtLossSigLossMC || doprocessEvtLossSigLossMCPhi) {
hInvMass.add("MCcorrections/hSignalLossDenominator", "Kstar generated before event selection", kTH2F, {{ptAxis}, {multiplicityAxis}});
hInvMass.add("MCcorrections/hSignalLossDenominatorRec", "Kstar generated before event selection", kTH2F, {{ptAxis}, {multiplicityAxis}});
hInvMass.add("MCcorrections/hSignalLossNumerator", "Kstar generated after event selection", kTH2F, {{ptAxis}, {multiplicityAxis}});
hInvMass.add("MCcorrections/hSignalLossNumeratorINEL", "Kstar generated after event selection", kTH2F, {{ptAxis}, {multiplicityAxis}});
hInvMass.add("MCcorrections/hImpactParameterRec", "Impact parameter in reconstructed MC", kTH1F, {impactParAxis});
Expand Down Expand Up @@ -1914,6 +1930,7 @@ struct Kstarqa {
{
// auto multiplicityRec = -1;
bool isSelectedEvent = false;
bool isRecCollision = false;
bool isSelectedEventINEL = false;
auto multiplicity1 = -999.;

Expand All @@ -1927,6 +1944,8 @@ struct Kstarqa {
for (const auto& RecCollision : recCollisions) {
if (!RecCollision.has_mcCollision())
continue;
isRecCollision = true;

if (!selectionEvent(RecCollision, false)) // don't fill event cut histogram
continue;

Expand Down Expand Up @@ -1962,15 +1981,44 @@ struct Kstarqa {
if (configGp.isNoITSROFrameBorder && !RecCollision.selection_bit(aod::evsel::kNoITSROFrameBorder))
continue;

if (configGp.isSel8 && !RecCollision.sel8())
continue;
// if (configGp.isSel8 && !RecCollision.sel8())
// continue;

if (rctCut.requireRCTFlagChecker && !rctChecker(RecCollision))
continue;

isSelectedEventINEL = true;
}

for (const auto& RecCollision : recCollisions) {
rEventSelection.fill(HIST("hEventSelectionMC"), 0.5);

if (!RecCollision.has_mcCollision())
continue;

rEventSelection.fill(HIST("hEventSelectionMC"), 1.5);

if (configGp.isNoTimeFrameBorder && !RecCollision.selection_bit(aod::evsel::kNoTimeFrameBorder))
continue;

rEventSelection.fill(HIST("hEventSelectionMC"), 2.5);

if (configGp.isNoITSROFrameBorder && !RecCollision.selection_bit(aod::evsel::kNoITSROFrameBorder))
continue;

rEventSelection.fill(HIST("hEventSelectionMC"), 3.5);

if (std::abs(RecCollision.posZ()) > configGp.cutzvertex)
continue;

rEventSelection.fill(HIST("hEventSelectionMC"), 4.5);

if (configGp.isTriggerTVX && !RecCollision.selection_bit(aod::evsel::kIsTriggerTVX))
continue;

rEventSelection.fill(HIST("hEventSelectionMC"), 5.5);
}

bool isINELgt0true = false;

if (pwglf::isINELgtNmc(mcParticles, 0, pdgDB)) {
Expand Down Expand Up @@ -2003,6 +2051,10 @@ struct Kstarqa {
continue;

hInvMass.fill(HIST("MCcorrections/hSignalLossDenominator"), mcPart.pt(), multiplicityGen);
if (isRecCollision) {
hInvMass.fill(HIST("MCcorrections/hSignalLossDenominatorRec"), mcPart.pt(), multiplicityGen);
}

if (isSelectedEvent) {
hInvMass.fill(HIST("MCcorrections/hSignalLossNumerator"), mcPart.pt(), multiplicityGen);
}
Expand Down
Loading