Skip to content

Commit c88de93

Browse files
authored
more QA checks
1 parent 11595a3 commit c88de93

File tree

1 file changed

+50
-16
lines changed

1 file changed

+50
-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<int> 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

0 commit comments

Comments
 (0)