Skip to content

Commit abf6bd3

Browse files
authored
[DPG] more QA histograms (#12553)
1 parent 1c978b9 commit abf6bd3

File tree

2 files changed

+66
-16
lines changed

2 files changed

+66
-16
lines changed

DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx

Lines changed: 50 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,31 @@
1414
///
1515
/// \author Igor Altsybeev <Igor.Altsybeev@cern.ch>
1616

17-
#include <vector>
18-
#include <map>
19-
20-
#include "Framework/runDataProcessing.h"
21-
#include "Framework/AnalysisTask.h"
22-
#include "Framework/AnalysisDataModel.h"
23-
#include "Common/DataModel/EventSelection.h"
2417
#include "Common/CCDB/EventSelectionParams.h"
25-
#include "CCDB/BasicCCDBManager.h"
26-
#include "Framework/HistogramRegistry.h"
27-
#include "CommonDataFormat/BunchFilling.h"
28-
#include "DataFormatsParameters/GRPLHCIFData.h"
29-
#include "DataFormatsParameters/GRPECSObject.h"
3018
#include "Common/Core/TrackSelection.h"
3119
#include "Common/Core/TrackSelectionDefaults.h"
32-
#include "Common/DataModel/TrackSelectionTables.h"
33-
#include "Common/DataModel/Multiplicity.h"
3420
#include "Common/DataModel/Centrality.h"
21+
#include "Common/DataModel/EventSelection.h"
22+
#include "Common/DataModel/Multiplicity.h"
23+
#include "Common/DataModel/TrackSelectionTables.h"
24+
25+
#include "CCDB/BasicCCDBManager.h"
26+
#include "CommonDataFormat/BunchFilling.h"
3527
#include "DataFormatsParameters/AggregatedRunInfo.h"
28+
#include "DataFormatsParameters/GRPECSObject.h"
29+
#include "DataFormatsParameters/GRPLHCIFData.h"
30+
#include "Framework/AnalysisDataModel.h"
31+
#include "Framework/AnalysisTask.h"
32+
#include "Framework/HistogramRegistry.h"
33+
#include "Framework/runDataProcessing.h"
3634

3735
#include "TH1F.h"
3836
#include "TH2F.h"
3937
#include "TH3.h"
4038

39+
#include <map>
40+
#include <vector>
41+
4142
using namespace o2;
4243
using namespace o2::framework;
4344
using namespace o2::aod::evsel;
@@ -90,11 +91,14 @@ struct DetectorOccupancyQaTask {
9091

9192
Configurable<int> nMaxBcInTFforAnalysis{"nMaxBcInTFforAnalysis", -1, "When to stop taking collisions in TF, if -1: take all collisions"}; // o2-linter: disable=name/configurable (temporary fix)
9293

94+
Configurable<int> confNPhiBins{"nPhiBins", 810, "N phi bits for histograms"}; // o2-linter: disable=name/configurable (temporary fix)
95+
9396
ConfigurableAxis confAxisPtBinsForPhiStudy{"PtBinsForPhiStudy", {VARIABLE_WIDTH, 0.2, 0.6, 1.0, 2.0, 10}, "pt axis"};
9497
ConfigurableAxis confAxisOccupForKine{"AxisOccupForKine", {VARIABLE_WIDTH, 0, 500, 1000, 2000, 4000, 6000, 8000, 10000, 20000}, "weighted occupancy"};
9598

9699
Configurable<bool> confUsePhiAtTPCinnerR{"UsePhiAtTPCinnerR", false, "0 - not use, 1 - use"}; // o2-linter: disable=name/configurable (temporary fix)
97100
Configurable<int> confUseAorCsideForPhiStudy{"UseAorCsideForPhiStudy", -1, "-1 - use full eta range, 0 - A, 1 - C sides"}; // o2-linter: disable=name/configurable (temporary fix)
101+
Configurable<float> confRadiusForPhiCorrection{"RadiusForPhiCorrection", 0.8, "default: inner TPC radius, cm"}; // o2-linter: disable=name/configurable (temporary fix)
98102

99103
uint64_t minGlobalBC = 0;
100104
Service<o2::ccdb::BasicCCDBManager> ccdb;
@@ -263,7 +267,7 @@ struct DetectorOccupancyQaTask {
263267
histos.add("track_distr_nITStrThisEv_above_2000/hEta_highOccupInDistantFuture", ";#eta;n tracks", kTH1D, {axisEta});
264268
histos.add("track_distr_nITStrThisEv_above_2000/hEta_highOccupInNeighbourEvents", ";#eta;n tracks", kTH1D, {axisEta});
265269

266-
const int nPhiBins = 810; // 18*45
270+
const int nPhiBins = confNPhiBins; // 810=18*45
267271
AxisSpec axisPhi{nPhiBins, 0, TMath::TwoPi(), "#varphi"}; // o2-linter: disable=external-pi (temporary fix)
268272
histos.add("track_distr_nITStrThisEv_10_200/hPhi_lowOccupInTPC", ";#varphi;n tracks", kTH1D, {axisPhi});
269273
histos.add("track_distr_nITStrThisEv_10_200/hPhi_highOccupInRecentPast", ";#varphi;n tracks", kTH1D, {axisPhi});
@@ -303,6 +307,13 @@ struct DetectorOccupancyQaTask {
303307
histos.add("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hPhi_pos", ";#varphi;n tracks", kTH3D, {axisPhi, confAxisOccupForKine, confAxisPtBinsForPhiStudy});
304308
histos.add("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hPhi_neg", ";#varphi;n tracks", kTH3D, {axisPhi, confAxisOccupForKine, confAxisPtBinsForPhiStudy});
305309

310+
histos.add("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hPhi_tpcNClsFindable_pos", ";#varphi;n tracks", kTH3D, {axisPhi, confAxisOccupForKine, confAxisPtBinsForPhiStudy});
311+
histos.add("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hPhi_tpcNClsFound_pos", ";#varphi;n tracks", kTH3D, {axisPhi, confAxisOccupForKine, confAxisPtBinsForPhiStudy});
312+
histos.add("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hPhi_tpcNClsCrossedRows_pos", ";#varphi;n tracks", kTH3D, {axisPhi, confAxisOccupForKine, confAxisPtBinsForPhiStudy});
313+
histos.add("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hPhi_tpcNClsFindable_neg", ";#varphi;n tracks", kTH3D, {axisPhi, confAxisOccupForKine, confAxisPtBinsForPhiStudy});
314+
histos.add("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hPhi_tpcNClsFound_neg", ";#varphi;n tracks", kTH3D, {axisPhi, confAxisOccupForKine, confAxisPtBinsForPhiStudy});
315+
histos.add("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hPhi_tpcNClsCrossedRows_neg", ";#varphi;n tracks", kTH3D, {axisPhi, confAxisOccupForKine, confAxisPtBinsForPhiStudy});
316+
306317
histos.add("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/PV_hPt_pos", ";p_{T};weighted occupancy", kTH2D, {axisLogPt, confAxisOccupForKine});
307318
histos.add("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/PV_hPt_neg", ";p_{T};weighted occupancy", kTH2D, {axisLogPt, confAxisOccupForKine});
308319
histos.add("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/PV_hEta_pos", ";#eta;weighted occupancy", kTH2D, {axisEta, confAxisOccupForKine});
@@ -328,6 +339,12 @@ struct DetectorOccupancyQaTask {
328339
histos.add("track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/PV_hPhi_pos", ";#varphi;n tracks", kTH3D, {axisPhi, confAxisOccupForKine, confAxisPtBinsForPhiStudy});
329340
histos.add("track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/PV_hPhi_neg", ";#varphi;n tracks", kTH3D, {axisPhi, confAxisOccupForKine, confAxisPtBinsForPhiStudy});
330341

342+
// QA nTPCcls
343+
AxisSpec axisNTPCclsPlusMinusQA{521, -260, 260, "n TPC clusters"};
344+
histos.add("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/QA_tpcNClsFindable_pos", "", kTH1D, {axisNTPCclsPlusMinusQA});
345+
histos.add("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/QA_tpcNClsFound_pos", "", kTH1D, {axisNTPCclsPlusMinusQA});
346+
histos.add("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/QA_tpcNClsCrossedRows_pos", "", kTH1D, {axisNTPCclsPlusMinusQA});
347+
331348
AxisSpec axisLogPtFor2D{50, 0.05, 10, "p_{T}"};
332349
AxisSpec axisLogPtTpcFor2D{50, 0.05, 10, "p_{T} TPC inner"};
333350
histos.add("track_distr_nITStrThisEv_10_200/hPt_vs_tpcInnerPt_vs_occup", ";p_{T};p_{T} TPC inner;weighted occupancy", kTH3D, {axisLogPtFor2D, axisLogPtTpcFor2D, confAxisOccupForKine});
@@ -1235,7 +1252,7 @@ struct DetectorOccupancyQaTask {
12351252
float phiInitial = phi;
12361253

12371254
if (confUsePhiAtTPCinnerR) {
1238-
phi -= asin(0.8 /*inner TPC radius*/ / 2 * 0.3 * sign * 0.5 / pt);
1255+
phi -= asin(confRadiusForPhiCorrection /*inner TPC radius*/ / 2 * 0.3 * sign * 0.5 / pt);
12391256
if (phi < 0)
12401257
phi += TMath::TwoPi();
12411258
else if (phi > TMath::TwoPi())
@@ -1280,6 +1297,11 @@ struct DetectorOccupancyQaTask {
12801297
} // end of TPC good global
12811298

12821299
// July 2025: for data vs MC kine distr comparison
1300+
1301+
int tpcNClsFindable = track.tpcNClsFindable();
1302+
int tpcNClsFound = track.tpcNClsFound();
1303+
int tpcNClsCrossedRows = track.tpcNClsCrossedRows();
1304+
12831305
if (sign > 0) // positive tracks
12841306
{
12851307
histos.fill(HIST("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/PV_hPt_pos"), pt, occupancy);
@@ -1289,6 +1311,14 @@ struct DetectorOccupancyQaTask {
12891311
histos.fill(HIST("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hPt_pos"), pt, occupancy);
12901312
histos.fill(HIST("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hEta_pos"), eta, occupancy);
12911313
histos.fill(HIST("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hPhi_pos"), phi, occupancy, pt);
1314+
1315+
histos.fill(HIST("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hPhi_tpcNClsFindable_pos"), phi, occupancy, pt, tpcNClsFindable);
1316+
histos.fill(HIST("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hPhi_tpcNClsFound_pos"), phi, occupancy, pt, tpcNClsFound);
1317+
histos.fill(HIST("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hPhi_tpcNClsCrossedRows_pos"), phi, occupancy, pt, tpcNClsCrossedRows);
1318+
1319+
histos.fill(HIST("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/QA_tpcNClsFindable_pos"), tpcNClsFindable);
1320+
histos.fill(HIST("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/QA_tpcNClsFound_pos"), tpcNClsFound);
1321+
histos.fill(HIST("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/QA_tpcNClsCrossedRows_pos"), tpcNClsCrossedRows);
12921322
}
12931323
} else // negative tracks
12941324
{
@@ -1299,6 +1329,10 @@ struct DetectorOccupancyQaTask {
12991329
histos.fill(HIST("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hPt_neg"), pt, occupancy);
13001330
histos.fill(HIST("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hEta_neg"), eta, occupancy);
13011331
histos.fill(HIST("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hPhi_neg"), phi, occupancy, pt);
1332+
1333+
histos.fill(HIST("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hPhi_tpcNClsFindable_neg"), phi, occupancy, pt, tpcNClsFindable);
1334+
histos.fill(HIST("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hPhi_tpcNClsFound_neg"), phi, occupancy, pt, tpcNClsFound);
1335+
histos.fill(HIST("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hPhi_tpcNClsCrossedRows_neg"), phi, occupancy, pt, tpcNClsCrossedRows);
13021336
}
13031337
}
13041338
// end of July 2025: for data vs MC kine distr comparison

DPG/Tasks/AOTEvent/lightIonsEvSelQa.cxx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,9 +641,18 @@ struct LightIonsEvSelQa {
641641
histos.add("hSecondsCollisions/noPU_good", "", kTH1F, {axisSeconds});
642642

643643
const AxisSpec axisDiffMeanVz{80, -4, 4, ""};
644+
const AxisSpec axisVzNarrow{40, -10, 10, ""};
644645
histos.add("hSecondsCollisions/noPU_meanDiffVz", "", kTH2F, {axisSeconds, axisDiffMeanVz});
645646
histos.add("hSecondsCollisions/noPU_meanDiffVz_lowMult", "", kTH2F, {axisSeconds, axisDiffMeanVz});
646647
histos.add("hSecondsCollisions/noPU_meanDiffVz_highMult", "", kTH2F, {axisSeconds, axisDiffMeanVz});
648+
histos.add("hSecondsCollisions/noPU_Vz", "", kTH2F, {axisSeconds, axisVzNarrow});
649+
histos.add("hSecondsCollisions/noPU_VzByFT0", "", kTH2F, {axisSeconds, axisVzNarrow});
650+
651+
const AxisSpec axisVz{200, -20, 20, ""};
652+
histos.add("noSpecSelections/Vz", "", kTH1F, {axisVz});
653+
histos.add("noPU/Vz", "", kTH1F, {axisVz});
654+
histos.add("noPU_badVzDiff/Vz", "", kTH1F, {axisVz});
655+
histos.add("noPU_goodVzDiff/Vz", "", kTH1F, {axisVz});
647656

648657
} // end of runNumber check
649658

@@ -958,10 +967,12 @@ struct LightIonsEvSelQa {
958967

959968
histos.fill(HIST("noSpecSelections/hBcColNoSel8"), localBC);
960969
histos.fill(HIST("noSpecSelections/hBcOrigNoSel8"), bcOriginal);
970+
histos.fill(HIST("noSpecSelections/Vz"), vZ);
961971

962972
if (noPU) {
963973
histos.fill(HIST("noPU/hBcColNoSel8"), localBC);
964974
histos.fill(HIST("noPU/hBcOrigNoSel8"), bcOriginal);
975+
histos.fill(HIST("noPU/Vz"), vZ);
965976
}
966977
if (noPU && pvTOFmatched) {
967978
histos.fill(HIST("noPU_pvTOFmatched/hBcColNoSel8"), localBC);
@@ -986,9 +997,11 @@ struct LightIonsEvSelQa {
986997
}
987998
if (noPU && badVzDiff) {
988999
histos.fill(HIST("noPU_badVzDiff/hBcColNoSel8"), localBC);
1000+
histos.fill(HIST("noPU_badVzDiff/Vz"), vZ);
9891001
}
9901002
if (noPU && !badVzDiff) {
9911003
histos.fill(HIST("noPU_goodVzDiff/hBcColNoSel8"), localBC);
1004+
histos.fill(HIST("noPU_goodVzDiff/Vz"), vZ);
9921005
}
9931006
if (noPU && !badVzDiff && narrowTimeVeto) {
9941007
histos.fill(HIST("noPU_goodVzDiff_narrowTimeVeto/hBcColNoSel8"), localBC);
@@ -1043,6 +1056,9 @@ struct LightIonsEvSelQa {
10431056
if (!underLine && !grassOnTheRight)
10441057
histos.fill(HIST("hSecondsCollisions/noPU_good"), secFromSOR);
10451058

1059+
histos.fill(HIST("hSecondsCollisions/noPU_Vz"), secFromSOR, vZ);
1060+
histos.fill(HIST("hSecondsCollisions/noPU_VzByFT0"), secFromSOR, vZft0);
1061+
10461062
if (std::abs(diffVz) < 4) {
10471063
histos.fill(HIST("hSecondsCollisions/noPU_meanDiffVz"), secFromSOR, diffVz);
10481064
if (multT0M < 1000)

0 commit comments

Comments
 (0)