Skip to content

Commit e516373

Browse files
authored
DPG: K0s resolution study, new histograms, fixes; PWGLF: cascqa remove ev. sels (#5610)
* fix * fix rel. pt reso histogram * new histograms for pulls * fix name * these cuts now in sel8 * fix variables
1 parent bf19da3 commit e516373

File tree

2 files changed

+62
-50
lines changed

2 files changed

+62
-50
lines changed

DPG/Tasks/AOTTrack/V0Cascades/perfK0sResolution.cxx

Lines changed: 53 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ using SelectedCollisions = soa::Join<aod::Collisions, aod::EvSels>;
3535
struct perfK0sResolution {
3636
// Configurable bins
3737
ConfigurableAxis mBins{"mBins", {200, 0.4f, 0.6f}, "Mass binning"};
38-
ConfigurableAxis pTBins{"pTBins", {200, 0.f, 10.f}, "pT binning"};
38+
ConfigurableAxis pTBins{"pTBins", {240, 0.f, 12.f}, "pT binning"};
39+
ConfigurableAxis invpTBins{"invpTBins", {240, 0.f, 12.f}, "inverse pT binning"};
3940
ConfigurableAxis pTResBins{"pTResBins", {200, -1.2f, 1.2f}, "pT resolution binning"};
4041
ConfigurableAxis pTResRelBins{"pTResRelBins", {200, -0.2f, 0.2f}, "pT relative resolution binning"};
4142
ConfigurableAxis invpTResBins{"invpTResBins", {200, -1.2f, 1.2f}, "inv pT resolution binning"};
43+
ConfigurableAxis invpTResNormBins{"invpTResNormBins", {200, -4.f, 4.f}, "inv pT normalised resolution binning"};
4244
ConfigurableAxis etaBins{"etaBins", {2, -1.f, 1.f}, "eta binning"};
4345
ConfigurableAxis etaBinsDauthers{"etaBinsDauthers", {100, -1.f, 1.f}, "eta binning for daughters"};
4446
ConfigurableAxis phiBins{"phiBins", {100, 0.f, 6.28f}, "phi binning"};
@@ -99,9 +101,11 @@ struct perfK0sResolution {
99101
const AxisSpec statAxis{5, 0, 5, ""};
100102
const AxisSpec mAxis{mBins, "#it{m} (GeV/#it{c}^{2})"};
101103
const AxisSpec pTAxis{pTBins, "#it{p}_{T} (GeV/#it{c})"};
104+
const AxisSpec invpTAxis{invpTBins, "1/#it{p}_{T}^{MC} (GeV/#it{c})^{-1}"};
102105
const AxisSpec pTResAxis{pTResBins, "#Delta#it{p}_{T} (GeV/#it{c})"};
103106
const AxisSpec pTResRelAxis{pTResRelBins, "(#it{p}_{T}^{rec} - #it{p}_{T}^{MC})/#it{p}_{T}^{MC}"};
104107
const AxisSpec invpTResAxis{invpTResBins, "1/#it{p}_{T}-1/#it{p}_{T}^{MC} (GeV/#it{c})^{-1}"};
108+
const AxisSpec invpTResNormAxis{invpTResNormBins, "(1/#it{p}_{T}-1/#it{p}_{T}^{MC})/#sigma_{1/#it{p}_{T}}"};
105109
const AxisSpec relpTResAxis{relpTResBins, "#sigma(#it{p}_{T})/#it{p}_{T}"};
106110
const AxisSpec etaAxis{etaBins, "#eta"};
107111
const AxisSpec etaAxisPosD{etaBinsDauthers, "#eta pos."};
@@ -119,15 +123,28 @@ struct perfK0sResolution {
119123
rK0sDauResolution.add("h2_massPosPtRes", "h2_massPosPtRes", {HistType::kTH2F, {mAxis, pTResAxis}});
120124
rK0sDauResolution.add("h2_massNegPtRes", "h2_massNegPtRes", {HistType::kTH2F, {mAxis, pTResAxis}});
121125

122-
rK0sDauResolution.add("h2_genPtPosPtRes", "h2_genPtPosPtRes", {HistType::kTH2F, {pTResRelAxis, pTAxis}});
123-
rK0sDauResolution.add("h2_genPxPosPxRes", "h2_genPxPosPxRes", {HistType::kTH2F, {pTResRelAxis, pTAxis}});
124-
rK0sDauResolution.add("h2_genPyPosPyRes", "h2_genPyPosPyRes", {HistType::kTH2F, {pTResRelAxis, pTAxis}});
125-
rK0sDauResolution.add("h2_genPzPosPzRes", "h2_genPzPosPzRes", {HistType::kTH2F, {pTResRelAxis, pTAxis}});
126+
rK0sDauResolution.add("h2_genPtPosPtResNorm", "h2_genPtPosPtResNorm", {HistType::kTH2F, {pTResRelAxis, pTAxis}});
127+
rK0sDauResolution.add("h2_genPxPosPxResNorm", "h2_genPxPosPxResNorm", {HistType::kTH2F, {pTResRelAxis, pTAxis}});
128+
rK0sDauResolution.add("h2_genPyPosPyResNorm", "h2_genPyPosPyResNorm", {HistType::kTH2F, {pTResRelAxis, pTAxis}});
129+
rK0sDauResolution.add("h2_genPzPosPzResNorm", "h2_genPzPosPzResNorm", {HistType::kTH2F, {pTResRelAxis, pTAxis}});
126130

127-
rK0sDauResolution.add("h2_genPtNegPtRes", "h2_genPtNegPtRes", {HistType::kTH2F, {pTResRelAxis, pTAxis}});
128-
rK0sDauResolution.add("h2_genPxNegPxRes", "h2_genPxNegPxRes", {HistType::kTH2F, {pTResRelAxis, pTAxis}});
129-
rK0sDauResolution.add("h2_genPyNegPyRes", "h2_genPyNegPyRes", {HistType::kTH2F, {pTResRelAxis, pTAxis}});
130-
rK0sDauResolution.add("h2_genPzNegPzRes", "h2_genPzNegPzRes", {HistType::kTH2F, {pTResRelAxis, pTAxis}});
131+
rK0sDauResolution.add("h2_genPtNegPtResNorm", "h2_genPtNegPtResNorm", {HistType::kTH2F, {pTResRelAxis, pTAxis}});
132+
rK0sDauResolution.add("h2_genPxNegPxResNorm", "h2_genPxNegPxResNorm", {HistType::kTH2F, {pTResRelAxis, pTAxis}});
133+
rK0sDauResolution.add("h2_genPyNegPyResNorm", "h2_genPyNegPyResNorm", {HistType::kTH2F, {pTResRelAxis, pTAxis}});
134+
rK0sDauResolution.add("h2_genPzNegPzResNorm", "h2_genPzNegPzResNorm", {HistType::kTH2F, {pTResRelAxis, pTAxis}});
135+
136+
rK0sDauResolution.add("h2_genPtPosPtRes", "h2_genPtPosPtRes", {HistType::kTH2F, {pTResAxis, pTAxis}});
137+
rK0sDauResolution.add("h2_genPxPosPxRes", "h2_genPxPosPxRes", {HistType::kTH2F, {pTResAxis, pTAxis}});
138+
rK0sDauResolution.add("h2_genPyPosPyRes", "h2_genPyPosPyRes", {HistType::kTH2F, {pTResAxis, pTAxis}});
139+
rK0sDauResolution.add("h2_genPzPosPzRes", "h2_genPzPosPzRes", {HistType::kTH2F, {pTResAxis, pTAxis}});
140+
141+
rK0sDauResolution.add("h2_genPtNegPtRes", "h2_genPtNegPtRes", {HistType::kTH2F, {pTResAxis, pTAxis}});
142+
rK0sDauResolution.add("h2_genPxNegPxRes", "h2_genPxNegPxRes", {HistType::kTH2F, {pTResAxis, pTAxis}});
143+
rK0sDauResolution.add("h2_genPyNegPyRes", "h2_genPyNegPyRes", {HistType::kTH2F, {pTResAxis, pTAxis}});
144+
rK0sDauResolution.add("h2_genPzNegPzRes", "h2_genPzNegPzRes", {HistType::kTH2F, {pTResAxis, pTAxis}});
145+
146+
rK0sDauResolution.add("h2_genPtPosPulls", "h2_GenPtPosPulls", {HistType::kTH2F, {invpTResNormAxis, invpTAxis}});
147+
rK0sDauResolution.add("h2_genPtNegPulls", "h2_GenPtNegPulls", {HistType::kTH2F, {invpTResNormAxis, invpTAxis}});
131148

132149
rK0sDauResolution.add("h2_PosRelPtRes", "h2_PosRelPtRes", {HistType::kTH2F, {pTAxis, relpTResAxis}});
133150
rK0sDauResolution.add("h2_NegRelPtRes", "h2_NegRelPtRes", {HistType::kTH2F, {pTAxis, relpTResAxis}});
@@ -434,9 +451,6 @@ struct perfK0sResolution {
434451
o2::base::Propagator::Instance()->propagateToDCABxByBz(mVtx, mTrackParCovNeg, 2.f, matCorr, &mDcaInfoCovNeg);
435452
}
436453

437-
bool daughtersHaveMCParticles = false;
438-
bool daughtersCorrRec = false;
439-
440454
void processMC(soa::Filtered<SelectedCollisions>::iterator const& collision,
441455
soa::Filtered<soa::Join<aod::V0Datas, aod::V0Covs, aod::V0DauCovs, aod::McV0Labels>> const& fullV0s,
442456
PIDTracksIUMC const&,
@@ -445,6 +459,8 @@ struct perfK0sResolution {
445459
{
446460
rK0sResolution.fill(HIST("h1_stats"), 0.5);
447461
for (auto& v0 : fullV0s) {
462+
bool daughtersHaveMCParticles = false;
463+
bool daughtersCorrRec = false;
448464
rK0sResolution.fill(HIST("h1_stats"), 1.5);
449465
const auto& posTrack = v0.posTrack_as<PIDTracksIUMC>();
450466
const auto& negTrack = v0.negTrack_as<PIDTracksIUMC>();
@@ -489,18 +505,32 @@ struct perfK0sResolution {
489505

490506
// QA of correctly reconstructed V0 daughters
491507
if (daughtersCorrRec) {
492-
rK0sDauResolution.fill(HIST("h2_genPtPosPtRes"), (v0.positivept() - posTrack.mcParticle().pt()) / posTrack.mcParticle().pt(), posTrack.mcParticle().pt());
493-
rK0sDauResolution.fill(HIST("h2_genPxPosPxRes"), (v0.pxpos() - posTrack.mcParticle().px()) / posTrack.mcParticle().px(), posTrack.mcParticle().px());
494-
rK0sDauResolution.fill(HIST("h2_genPyPosPyRes"), (v0.pypos() - posTrack.mcParticle().py()) / posTrack.mcParticle().py(), posTrack.mcParticle().py());
495-
rK0sDauResolution.fill(HIST("h2_genPzPosPzRes"), (v0.pzpos() - posTrack.mcParticle().pz()) / posTrack.mcParticle().pz(), posTrack.mcParticle().pz());
496-
497-
rK0sDauResolution.fill(HIST("h2_genPtNegPtRes"), (v0.negativept() - negTrack.mcParticle().pt()) / negTrack.mcParticle().pt(), negTrack.mcParticle().pt());
498-
rK0sDauResolution.fill(HIST("h2_genPxNegPxRes"), (v0.pxneg() - negTrack.mcParticle().px()) / negTrack.mcParticle().px(), negTrack.mcParticle().px());
499-
rK0sDauResolution.fill(HIST("h2_genPyNegPyRes"), (v0.pyneg() - negTrack.mcParticle().py()) / negTrack.mcParticle().py(), negTrack.mcParticle().py());
500-
rK0sDauResolution.fill(HIST("h2_genPzNegPzRes"), (v0.pzneg() - negTrack.mcParticle().pz()) / negTrack.mcParticle().pz(), negTrack.mcParticle().pz());
508+
rK0sDauResolution.fill(HIST("h2_genPtPosPtResNorm"), (v0.positivept() - posTrack.mcParticle().pt()) / posTrack.mcParticle().pt(), posTrack.mcParticle().pt());
509+
rK0sDauResolution.fill(HIST("h2_genPxPosPxResNorm"), (v0.pxpos() - posTrack.mcParticle().px()) / posTrack.mcParticle().px(), posTrack.mcParticle().px());
510+
rK0sDauResolution.fill(HIST("h2_genPyPosPyResNorm"), (v0.pypos() - posTrack.mcParticle().py()) / posTrack.mcParticle().py(), posTrack.mcParticle().py());
511+
rK0sDauResolution.fill(HIST("h2_genPzPosPzResNorm"), (v0.pzpos() - posTrack.mcParticle().pz()) / posTrack.mcParticle().pz(), posTrack.mcParticle().pz());
512+
513+
rK0sDauResolution.fill(HIST("h2_genPtNegPtResNorm"), (v0.negativept() - negTrack.mcParticle().pt()) / negTrack.mcParticle().pt(), negTrack.mcParticle().pt());
514+
rK0sDauResolution.fill(HIST("h2_genPxNegPxResNorm"), (v0.pxneg() - negTrack.mcParticle().px()) / negTrack.mcParticle().px(), negTrack.mcParticle().px());
515+
rK0sDauResolution.fill(HIST("h2_genPyNegPyResNorm"), (v0.pyneg() - negTrack.mcParticle().py()) / negTrack.mcParticle().py(), negTrack.mcParticle().py());
516+
rK0sDauResolution.fill(HIST("h2_genPzNegPzResNorm"), (v0.pzneg() - negTrack.mcParticle().pz()) / negTrack.mcParticle().pz(), negTrack.mcParticle().pz());
517+
518+
rK0sDauResolution.fill(HIST("h2_genPtPosPtRes"), (v0.positivept() - posTrack.mcParticle().pt()), posTrack.mcParticle().pt());
519+
rK0sDauResolution.fill(HIST("h2_genPxPosPxRes"), (v0.pxpos() - posTrack.mcParticle().px()), posTrack.mcParticle().px());
520+
rK0sDauResolution.fill(HIST("h2_genPyPosPyRes"), (v0.pypos() - posTrack.mcParticle().py()), posTrack.mcParticle().py());
521+
rK0sDauResolution.fill(HIST("h2_genPzPosPzRes"), (v0.pzpos() - posTrack.mcParticle().pz()), posTrack.mcParticle().pz());
522+
523+
rK0sDauResolution.fill(HIST("h2_genPtNegPtRes"), (v0.negativept() - negTrack.mcParticle().pt()), negTrack.mcParticle().pt());
524+
rK0sDauResolution.fill(HIST("h2_genPxNegPxRes"), (v0.pxneg() - negTrack.mcParticle().px()), negTrack.mcParticle().px());
525+
rK0sDauResolution.fill(HIST("h2_genPyNegPyRes"), (v0.pyneg() - negTrack.mcParticle().py()), negTrack.mcParticle().py());
526+
rK0sDauResolution.fill(HIST("h2_genPzNegPzRes"), (v0.pzneg() - negTrack.mcParticle().pz()), negTrack.mcParticle().pz());
501527

502528
rK0sDauResolution.fill(HIST("h2_massPosPtRes"), mass, v0.positivept() - posTrack.mcParticle().pt());
503529
rK0sDauResolution.fill(HIST("h2_massNegPtRes"), mass, v0.negativept() - negTrack.mcParticle().pt());
530+
531+
rK0sDauResolution.fill(HIST("h2_genPtPosPulls"), (1. / v0.positivept() - 1. / posTrack.mcParticle().pt()) / (RecoDecay::sqrtSumOfSquares(v0.covMatPosDau()[9], v0.covMatPosDau()[14]) / RecoDecay::sq(v0.positivept())), 1. / posTrack.mcParticle().pt());
532+
rK0sDauResolution.fill(HIST("h2_genPtNegPulls"), (1. / v0.negativept() - 1. / negTrack.mcParticle().pt()) / (RecoDecay::sqrtSumOfSquares(v0.covMatNegDau()[9], v0.covMatNegDau()[14]) / RecoDecay::sq(v0.negativept())), 1. / negTrack.mcParticle().pt());
533+
504534
if (useMultidimHisto) {
505535
rK0sResolution.fill(HIST("thn_mass"), mass, v0.pt(), v0.eta(), v0.phi(), posTrack.eta(), negTrack.eta(),
506536
1. / v0.positivept() - 1. / posTrack.mcParticle().pt(),
@@ -510,8 +540,8 @@ struct perfK0sResolution {
510540
}
511541

512542
// QA of seleted V0s
513-
rK0sDauResolution.fill(HIST("h2_PosRelPtRes"), v0.positivept(), RecoDecay::sqrtSumOfSquares(v0.covMatPosDau()[9], v0.covMatPosDau()[14]), v0.positivept());
514-
rK0sDauResolution.fill(HIST("h2_NegRelPtRes"), v0.negativept(), RecoDecay::sqrtSumOfSquares(v0.covMatNegDau()[9], v0.covMatNegDau()[14]), v0.positivept());
543+
rK0sDauResolution.fill(HIST("h2_PosRelPtRes"), v0.positivept(), RecoDecay::sqrtSumOfSquares(v0.covMatPosDau()[9], v0.covMatPosDau()[14]) / v0.positivept());
544+
rK0sDauResolution.fill(HIST("h2_NegRelPtRes"), v0.negativept(), RecoDecay::sqrtSumOfSquares(v0.covMatNegDau()[9], v0.covMatNegDau()[14]) / v0.negativept());
515545
rK0sResolution.fill(HIST("h2_masspT"), mass, v0.pt());
516546
rK0sResolution.fill(HIST("h2_masseta"), mass, v0.eta());
517547
rK0sResolution.fill(HIST("h2_massphi"), mass, v0.phi());

PWGLF/TableProducer/Strangeness/cascqaanalysis.cxx

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ struct cascqaanalysis {
4848
// Event selection criteria
4949
Configurable<float> cutzvertex{"cutzvertex", 20.0f, "Accepted z-vertex range (cm)"};
5050
Configurable<bool> sel8{"sel8", 1, "Apply sel8 event selection"};
51-
Configurable<bool> isTimeFrameBorderCut{"isTimeFrameBorderCut", 1, "Apply timeframe border cut"};
52-
Configurable<bool> isITSROFrameBorderCut{"isITSROFrameBorderCut", 1, "Apply ITS frame border cut"};
5351
Configurable<bool> isVertexITSTPCCut{"isVertexITSTPCCut", 1, "Select collisions with at least one ITS-TPC track"};
5452
Configurable<bool> isNoSameBunchPileupCut{"isNoSameBunchPileupCut", 1, "Same found-by-T0 bunch crossing rejection"};
5553
Configurable<bool> isGoodZvtxFT0vsPVCut{"isGoodZvtxFT0vsPVCut", 1, "z of PV by tracks and z of PV from FT0 A-C time difference cut"};
@@ -113,9 +111,9 @@ struct cascqaanalysis {
113111

114112
TString hCandidateCounterLabels[5] = {"All candidates", "v0data exists", "passed topo cuts", "has associated MC particle", "associated with Xi(Omega)"};
115113
TString hNEventsMCLabels[6] = {"All", "z vrtx", "INEL", "INEL>0", "INEL>1", "Associated with rec. collision"};
116-
TString hNEventsLabels[11] = {"All", "sel8", "TimeFrame cut", "ITS ROF cut", "kIsVertexITSTPC", "kNoSameBunchPileup", "kIsGoodZvtxFT0vsPV", "z vrtx", "INEL", "INEL>0", "INEL>1"};
114+
TString hNEventsLabels[9] = {"All", "sel8", "kIsVertexITSTPC", "kNoSameBunchPileup", "kIsGoodZvtxFT0vsPV", "z vrtx", "INEL", "INEL>0", "INEL>1"};
117115

118-
registry.add("hNEvents", "hNEvents", {HistType::kTH1F, {{11, 0.f, 11.f}}});
116+
registry.add("hNEvents", "hNEvents", {HistType::kTH1F, {{9, 0.f, 9.f}}});
119117
for (Int_t n = 1; n <= registry.get<TH1>(HIST("hNEvents"))->GetNbinsX(); n++) {
120118
registry.get<TH1>(HIST("hNEvents"))->GetXaxis()->SetBinLabel(n, hNEventsLabels[n - 1]);
121119
}
@@ -242,14 +240,14 @@ struct cascqaanalysis {
242240
{
243241
// 0 - INEL, 1 - INEL > 0, 2 - INEL>1
244242
int evFlag = 0;
245-
registry.fill(HIST("hNEvents"), 8.5); // INEL
243+
registry.fill(HIST("hNEvents"), 6.5); // INEL
246244
if (collision.multNTracksPVeta1() > 0) {
247245
evFlag += 1;
248-
registry.fill(HIST("hNEvents"), 9.5); // INEL>0
246+
registry.fill(HIST("hNEvents"), 7.5); // INEL>0
249247
}
250248
if (collision.multNTracksPVeta1() > 1) {
251249
evFlag += 1;
252-
registry.fill(HIST("hNEvents"), 10.5); // INEL>1
250+
registry.fill(HIST("hNEvents"), 8.5); // INEL>1
253251
}
254252
return evFlag;
255253
}
@@ -268,50 +266,34 @@ struct cascqaanalysis {
268266
registry.fill(HIST("hNEvents"), 1.5);
269267
}
270268

271-
// kNoTimeFrameBorder selection
272-
if (isTimeFrameBorderCut && !collision.selection_bit(aod::evsel::kNoTimeFrameBorder)) {
273-
return false;
274-
}
275-
if (isFillEventSelectionQA) {
276-
registry.fill(HIST("hNEvents"), 2.5);
277-
}
278-
279-
// kNoITSROFrameBorder selection
280-
if (isITSROFrameBorderCut && !collision.selection_bit(aod::evsel::kNoITSROFrameBorder)) {
281-
return false;
282-
}
283-
if (isFillEventSelectionQA) {
284-
registry.fill(HIST("hNEvents"), 3.5);
285-
}
286-
287269
// kIsVertexITSTPC selection
288270
if (isVertexITSTPCCut && !collision.selection_bit(aod::evsel::kIsVertexITSTPC)) {
289271
return false;
290272
}
291273
if (isFillEventSelectionQA) {
292-
registry.fill(HIST("hNEvents"), 4.5);
274+
registry.fill(HIST("hNEvents"), 2.5);
293275
}
294276
// kNoSameBunchPileup selection
295277
if (isNoSameBunchPileupCut && !collision.selection_bit(aod::evsel::kNoSameBunchPileup)) {
296278
return false;
297279
}
298280
if (isFillEventSelectionQA) {
299-
registry.fill(HIST("hNEvents"), 5.5);
281+
registry.fill(HIST("hNEvents"), 3.5);
300282
}
301283
// kIsGoodZvtxFT0vsPV selection
302284
if (isGoodZvtxFT0vsPVCut && !collision.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV)) {
303285
return false;
304286
}
305287
if (isFillEventSelectionQA) {
306-
registry.fill(HIST("hNEvents"), 6.5);
288+
registry.fill(HIST("hNEvents"), 4.5);
307289
}
308290

309291
// Z vertex selection
310292
if (TMath::Abs(collision.posZ()) > cutzvertex) {
311293
return false;
312294
}
313295
if (isFillEventSelectionQA) {
314-
registry.fill(HIST("hNEvents"), 7.5);
296+
registry.fill(HIST("hNEvents"), 5.5);
315297
registry.fill(HIST("hZCollision"), collision.posZ());
316298
}
317299

0 commit comments

Comments
 (0)