Skip to content

Commit 006c86c

Browse files
SuJeong-Jialibuild
andauthored
[PWGLF] Add efficiency as a function of generated level centrality (#16639)
Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent bb5bdfb commit 006c86c

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

PWGLF/Tasks/Resonances/chk892LI.cxx

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,10 @@ struct Chk892LI {
444444
histos.add("EffKstar/genKstar_pri", "Gen primary Kstar (|y|<0.5)", HistType::kTH2F, {ptAxis, centAxis});
445445
histos.add("EffKstar/genKstar_pri_pos", "Gen primary Kstar selected by vertex position (|y|<0.5)", HistType::kTH2F, {ptAxis, centAxis});
446446
histos.add("EffKstar/recoKstar", "Kstar Reco matched (final all)", HistType::kTH2F, {ptAxis, centAxis});
447+
histos.add("EffKstar/recoKstar_vsGenMult", "Reco K* vs gen mid-rapidity multiplicity;#it{p}_{T};N_{ch}^{gen}", HistType::kTH2D, {ptAxis, genMultAxis});
448+
histos.add("EffKstar/genKstar_vsGenMult", "Gen K* vs gen mid-rapidity multiplicity;#it{p}_{T};N_{ch}^{gen}", HistType::kTH2D, {ptAxis, genMultAxis});
449+
histos.add("EffKstar/genKstar_pri_vsGenMult", "Gen primary Kstar (|y|<0.5) vs gen mid-rapidity multiplicity", HistType::kTH2D, {ptAxis, genMultAxis});
450+
histos.add("EffKstar/genKstar_pri_pos_vsGenMult", "Gen primary Kstar selected by vertex position (|y|<0.5) vs gen mid-rapidity multiplicity", HistType::kTH2D, {ptAxis, genMultAxis});
447451

448452
histos.add("Correction/sigLoss_den", "Gen Kstar (|y|<0.5) in truth class", HistType::kTH2F, {ptAxis, centAxis});
449453
histos.add("Correction/sigLoss_den_pri", "Gen primary Kstar (|y|<0.5) in truth class", HistType::kTH2F, {ptAxis, centAxis});
@@ -1084,10 +1088,18 @@ struct Chk892LI {
10841088

10851089
const float lCentrality = iter->second;
10861090

1091+
auto itGenMult = genMultByMcId.find(mcid);
1092+
if (itGenMult == genMultByMcId.end()) {
1093+
continue;
1094+
}
1095+
const int genMult = itGenMult->second;
1096+
10871097
histos.fill(HIST("EffKstar/genKstar"), part.pt(), lCentrality);
1098+
histos.fill(HIST("EffKstar/genKstar_vsGenMult"), part.pt(), genMult);
10881099

10891100
if (part.vt() == 0) {
10901101
histos.fill(HIST("EffKstar/genKstar_pri"), part.pt(), lCentrality);
1102+
histos.fill(HIST("EffKstar/genKstar_pri_vsGenMult"), part.pt(), genMult);
10911103
}
10921104

10931105
const auto mcc = part.mcCollision_as<MCTrueEventCandidates>();
@@ -1100,6 +1112,7 @@ struct Chk892LI {
11001112

11011113
if (distanceFromPV < fMaxPosPV) {
11021114
histos.fill(HIST("EffKstar/genKstar_pri_pos"), part.pt(), lCentrality);
1115+
histos.fill(HIST("EffKstar/genKstar_pri_pos_vsGenMult"), part.pt(), genMult);
11031116
}
11041117
}
11051118
} // effKstarProcessGen
@@ -1123,9 +1136,14 @@ struct Chk892LI {
11231136
if (iter == centTruthByAllowed.end()) {
11241137
continue;
11251138
}
1126-
11271139
const float lCentrality = iter->second;
11281140

1141+
auto itGenMult = genMultByMcId.find(mcid);
1142+
if (itGenMult == genMultByMcId.end()) {
1143+
continue;
1144+
}
1145+
const int genMult = itGenMult->second;
1146+
11291147
if (!SecondaryCuts.cfgByPassDauPIDSelection) {
11301148
auto posDauTrack = v0.template posTrack_as<MCTrackCandidates>();
11311149
auto negDauTrack = v0.template negTrack_as<MCTrackCandidates>();
@@ -1134,6 +1152,7 @@ struct Chk892LI {
11341152
if (!selectionPIDPion(negDauTrack))
11351153
continue;
11361154
}
1155+
11371156
if (!selectionK0s(coll, v0))
11381157
continue;
11391158

@@ -1163,6 +1182,7 @@ struct Chk892LI {
11631182

11641183
if (isTrue) {
11651184
histos.fill(HIST("EffKstar/recoKstar"), ptreco, lCentrality);
1185+
histos.fill(HIST("EffKstar/recoKstar_vsGenMult"), ptreco, genMult);
11661186
histos.fill(HIST("MCReco/hInvmass_Kstar_true"), lCentrality, ptreco, lResoKstar.M());
11671187
} else {
11681188
histos.fill(HIST("MCReco/hInvmass_Kstar_bkg"), lCentrality, ptreco, lResoKstar.M());

0 commit comments

Comments
 (0)