Skip to content

Commit 656d6c9

Browse files
committed
Add plain QA mode for cross-checks
1 parent ccf360e commit 656d6c9

File tree

1 file changed

+91
-3
lines changed

1 file changed

+91
-3
lines changed

PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx

Lines changed: 91 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ struct derivedlambdakzeroanalysis {
9494
// PID (TPC)
9595
Configurable<float> TpcPidNsigmaCut{"TpcPidNsigmaCut", 5, "TpcPidNsigmaCut"};
9696

97-
Configurable<bool> doQA{"doQA", true, "do topological variable QA histograms"};
97+
Configurable<bool> doCompleteQA{"doCompleteQA", false, "do topological variable QA histograms"};
98+
Configurable<bool> doPlainQA{"doPlainQA", true, "do simple 1D QA of candidates"};
9899
Configurable<float> qaMinPt{"qaMinPt", 0.0f, "minimum pT for QA plots"};
99100
Configurable<float> qaMaxPt{"qaMaxPt", 0.0f, "maximum pT for QA plots"};
100101
Configurable<bool> qaCentrality{"qaCentrality", false, "qa centrality flag: check base raw values"};
@@ -124,6 +125,10 @@ struct derivedlambdakzeroanalysis {
124125
ConfigurableAxis axisAPAlpha{"axisAPAlpha", {220, -1.1f, 1.1f}, "V0 AP alpha"};
125126
ConfigurableAxis axisAPQt{"axisAPQt", {220, 0.0f, 0.5f}, "V0 AP alpha"};
126127

128+
// Track quality axes
129+
ConfigurableAxis axisTPCrows{"axisTPCrows", {160, 0.0f, 160.0f}, "N TPC rows"};
130+
ConfigurableAxis axisITSclus{"axisITSclus", {7, 0.0f, 7.0f}, "N ITS Clusters"};
131+
127132
enum species { spK0Short = 0,
128133
spLambda,
129134
spAntiLambda };
@@ -240,7 +245,7 @@ struct derivedlambdakzeroanalysis {
240245
histos.add("hMassK0Short", "hMassK0Short", kTH1F, {axisK0Mass});
241246

242247
// QA histograms if requested
243-
if (doQA) {
248+
if (doCompleteQA) {
244249
// initialize for K0short...
245250
if (analyseK0Short) {
246251
histos.add("K0Short/h4dPosDCAToPV", "h4dPosDCAToPV", kTHnF, {axisCentrality, axisPtCoarse, axisK0Mass, axisDCAtoPV});
@@ -264,9 +269,50 @@ struct derivedlambdakzeroanalysis {
264269
histos.add("AntiLambda/h4dV0Radius", "h4dV0Radius", kTHnF, {axisCentrality, axisPtCoarse, axisLambdaMass, axisV0Radius});
265270
}
266271

272+
if (doPlainQA) {
273+
if (analyseK0Short) {
274+
histos.add("K0Short/hPosDCAToPV", "hPosDCAToPV", kTH1F, {axisDCAtoPV});
275+
histos.add("K0Short/hNegDCAToPV", "hNegDCAToPV", kTH1F, {axisDCAtoPV});
276+
histos.add("K0Short/hDCADaughters", "hDCADaughters", kTH1F, {axisDCAdau});
277+
histos.add("K0Short/hPointingAngle", "hPointingAngle", kTH1F, {axisPointingAngle});
278+
histos.add("K0Short/hV0Radius", "hV0Radius", kTH1F, {axisV0Radius});
279+
histos.add("K0Short/h2dPositiveITSvsTPCpts", "h2dPositiveITSvsTPCpts", kTH2F, {axisTPCrows, axisITSclus});
280+
histos.add("K0Short/h2dNegativeITSvsTPCpts", "h2dNegativeITSvsTPCpts", kTH2F, {axisTPCrows, axisITSclus});
281+
}
282+
if (analyseLambda) {
283+
histos.add("Lambda/hPosDCAToPV", "hPosDCAToPV", kTH1F, {axisDCAtoPV});
284+
histos.add("Lambda/hNegDCAToPV", "hNegDCAToPV", kTH1F, {axisDCAtoPV});
285+
histos.add("Lambda/hDCADaughters", "hDCADaughters", kTH1F, {axisDCAdau});
286+
histos.add("Lambda/hPointingAngle", "hPointingAngle", kTH1F, {axisPointingAngle});
287+
histos.add("Lambda/hV0Radius", "hV0Radius", kTH1F, {axisV0Radius});
288+
histos.add("Lambda/h2dPositiveITSvsTPCpts", "h2dPositiveITSvsTPCpts", kTH2F, {axisTPCrows, axisITSclus});
289+
histos.add("Lambda/h2dNegativeITSvsTPCpts", "h2dNegativeITSvsTPCpts", kTH2F, {axisTPCrows, axisITSclus});
290+
}
291+
if (analyseAntiLambda) {
292+
histos.add("AntiLambda/hPosDCAToPV", "hPosDCAToPV", kTH1F, {axisDCAtoPV});
293+
histos.add("AntiLambda/hNegDCAToPV", "hNegDCAToPV", kTH1F, {axisDCAtoPV});
294+
histos.add("AntiLambda/hDCADaughters", "hDCADaughters", kTH1F, {axisDCAdau});
295+
histos.add("AntiLambda/hPointingAngle", "hPointingAngle", kTH1F, {axisPointingAngle});
296+
histos.add("AntiLambda/hV0Radius", "hV0Radius", kTH1F, {axisV0Radius});
297+
histos.add("AntiLambda/h2dPositiveITSvsTPCpts", "h2dPositiveITSvsTPCpts", kTH2F, {axisTPCrows, axisITSclus});
298+
histos.add("AntiLambda/h2dNegativeITSvsTPCpts", "h2dNegativeITSvsTPCpts", kTH2F, {axisTPCrows, axisITSclus});
299+
}
300+
}
301+
267302
// Check if doing the right thing in AP space please
268303
histos.add("GeneralQA/h2dArmenterosAll", "h2dArmenterosAll", kTH2F, {axisAPAlpha, axisAPQt});
269304
histos.add("GeneralQA/h2dArmenterosSelected", "h2dArmenterosSelected", kTH2F, {axisAPAlpha, axisAPQt});
305+
306+
// base QA for all candidates
307+
if (doPlainQA) {
308+
histos.add("hPosDCAToPV", "hPosDCAToPV", kTH1F, {axisDCAtoPV});
309+
histos.add("hNegDCAToPV", "hNegDCAToPV", kTH1F, {axisDCAtoPV});
310+
histos.add("hDCADaughters", "hDCADaughters", kTH1F, {axisDCAdau});
311+
histos.add("hPointingAngle", "hPointingAngle", kTH1F, {axisPointingAngle});
312+
histos.add("hV0Radius", "hV0Radius", kTH1F, {axisV0Radius});
313+
histos.add("h2dPositiveITSvsTPCpts", "h2dPositiveITSvsTPCpts", kTH2F, {axisTPCrows, axisITSclus});
314+
histos.add("h2dNegativeITSvsTPCpts", "h2dNegativeITSvsTPCpts", kTH2F, {axisTPCrows, axisITSclus});
315+
}
270316
}
271317
}
272318

@@ -381,23 +427,65 @@ struct derivedlambdakzeroanalysis {
381427
void analyseCandidate(TV0 v0, float centrality, uint32_t selMap)
382428
// precalculate this information so that a check is one mask operation, not many
383429
{
430+
auto posTrackExtra = v0.template posTrackExtra_as<dauTracks>();
431+
auto negTrackExtra = v0.template negTrackExtra_as<dauTracks>();
432+
433+
// __________________________________________
434+
// fill with no selection if plain QA requested
435+
if (doPlainQA) {
436+
histos.fill(HIST("hPosDCAToPV"), v0.dcapostopv());
437+
histos.fill(HIST("hNegDCAToPV"), v0.dcanegtopv());
438+
histos.fill(HIST("hDCADaughters"), v0.dcaV0daughters());
439+
histos.fill(HIST("hPointingAngle"), TMath::ACos(v0.v0cosPA()));
440+
histos.fill(HIST("hV0Radius"), v0.v0radius());
441+
histos.fill(HIST("h2dPositiveITSvsTPCpts"), posTrackExtra.tpcCrossedRows(), posTrackExtra.itsNCls());
442+
histos.fill(HIST("h2dNegativeITSvsTPCpts"), negTrackExtra.tpcCrossedRows(), negTrackExtra.itsNCls());
443+
}
444+
384445
// __________________________________________
385446
// main analysis
386447
if (verifyMask(selMap, maskSelectionK0Short) && analyseK0Short) {
387448
histos.fill(HIST("GeneralQA/h2dArmenterosSelected"), v0.alpha(), v0.qtarm()); // cross-check
388449
histos.fill(HIST("h3dMassK0Short"), centrality, v0.pt(), v0.mK0Short());
389450
histos.fill(HIST("hMassK0Short"), v0.mK0Short());
451+
if (doPlainQA) {
452+
histos.fill(HIST("K0Short/hPosDCAToPV"), v0.dcapostopv());
453+
histos.fill(HIST("K0Short/hNegDCAToPV"), v0.dcanegtopv());
454+
histos.fill(HIST("K0Short/hDCADaughters"), v0.dcaV0daughters());
455+
histos.fill(HIST("K0Short/hPointingAngle"), TMath::ACos(v0.v0cosPA()));
456+
histos.fill(HIST("K0Short/hV0Radius"), v0.v0radius());
457+
histos.fill(HIST("K0Short/h2dPositiveITSvsTPCpts"), posTrackExtra.tpcCrossedRows(), posTrackExtra.itsNCls());
458+
histos.fill(HIST("K0Short/h2dNegativeITSvsTPCpts"), negTrackExtra.tpcCrossedRows(), negTrackExtra.itsNCls());
459+
}
390460
}
391461
if (verifyMask(selMap, maskSelectionLambda) && analyseLambda) {
392462
histos.fill(HIST("h3dMassLambda"), centrality, v0.pt(), v0.mLambda());
463+
if (doPlainQA) {
464+
histos.fill(HIST("Lambda/hPosDCAToPV"), v0.dcapostopv());
465+
histos.fill(HIST("Lambda/hNegDCAToPV"), v0.dcanegtopv());
466+
histos.fill(HIST("Lambda/hDCADaughters"), v0.dcaV0daughters());
467+
histos.fill(HIST("Lambda/hPointingAngle"), TMath::ACos(v0.v0cosPA()));
468+
histos.fill(HIST("Lambda/hV0Radius"), v0.v0radius());
469+
histos.fill(HIST("Lambda/h2dPositiveITSvsTPCpts"), posTrackExtra.tpcCrossedRows(), posTrackExtra.itsNCls());
470+
histos.fill(HIST("Lambda/h2dNegativeITSvsTPCpts"), negTrackExtra.tpcCrossedRows(), negTrackExtra.itsNCls());
471+
}
393472
}
394473
if (verifyMask(selMap, maskSelectionAntiLambda) && analyseAntiLambda) {
395474
histos.fill(HIST("h3dMassAntiLambda"), centrality, v0.pt(), v0.mAntiLambda());
475+
if (doPlainQA) {
476+
histos.fill(HIST("AntiLambda/hPosDCAToPV"), v0.dcapostopv());
477+
histos.fill(HIST("AntiLambda/hNegDCAToPV"), v0.dcanegtopv());
478+
histos.fill(HIST("AntiLambda/hDCADaughters"), v0.dcaV0daughters());
479+
histos.fill(HIST("AntiLambda/hPointingAngle"), TMath::ACos(v0.v0cosPA()));
480+
histos.fill(HIST("AntiLambda/hV0Radius"), v0.v0radius());
481+
histos.fill(HIST("AntiLambda/h2dPositiveITSvsTPCpts"), posTrackExtra.tpcCrossedRows(), posTrackExtra.itsNCls());
482+
histos.fill(HIST("AntiLambda/h2dNegativeITSvsTPCpts"), negTrackExtra.tpcCrossedRows(), negTrackExtra.itsNCls());
483+
}
396484
}
397485

398486
// __________________________________________
399487
// do systematics / qa plots
400-
if (doQA) {
488+
if (doCompleteQA) {
401489
if (analyseK0Short) {
402490
if (verifyMask(selMap, maskTopoNoV0Radius | maskK0ShortSpecific))
403491
histos.fill(HIST("K0Short/h4dV0Radius"), centrality, v0.pt(), v0.mK0Short(), v0.v0radius());

0 commit comments

Comments
 (0)