@@ -42,11 +42,8 @@ using namespace o2;
4242using namespace o2 ::framework;
4343using namespace o2 ::aod::evsel;
4444
45- // using BCsRun2 = soa::Join<aod::BCs, aod::Run2BCInfos, aod::Timestamps, aod::BcSels, aod::Run2MatchedToBCSparse>;
4645using BCsRun3 = soa::Join<aod::BCs, aod::Timestamps, aod::BcSels, aod::Run3MatchedToBCSparse>;
47- // using ColEvSels = soa::Join<aod::Collisions, aod::EvSels, aod::Mults>;
4846using ColEvSels = soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0Cs>;
49- // using FullTracksIU = soa::Join<aod::TracksIU, aod::TracksExtra, aod::TrackSelection>;
5047using FullTracksIU = soa::Join<aod::TracksIU, aod::TracksExtra, aod::TrackSelection, aod::TrackSelectionExtension, aod::TracksDCA>;
5148
5249struct DetectorOccupancyQaTask {
@@ -78,7 +75,7 @@ struct DetectorOccupancyQaTask {
7875 Configurable<float > confCutPtMaxThisEvent{" PtMaxThisEvent" , 100 ., " pt cut for particles in a current event" }; // o2-linter: disable=name/configurable (temporary fix)
7976 Configurable<float > confCutEtaMinTracksThisEvent{" EtaMinTracksThisEvent" , -0.8 , " eta cut for particles in a current event" }; // o2-linter: disable=name/configurable (temporary fix)
8077 Configurable<float > confCutEtaMaxTracksThisEvent{" EtaMaxTracksThisEvent" , 0.8 , " eta cut for particles in a current event" }; // o2-linter: disable=name/configurable (temporary fix)
81- Configurable<int > confCutMinTPCcls{" MinNumTPCcls" , 70 , " min number of TPC clusters for a current event" }; // o2-linter: disable=name/configurable (temporary fix)
78+ Configurable<int > confCutMinTPCcls{" MinNumTPCcls" , 50 , " min number of TPC clusters for a current event" }; // o2-linter: disable=name/configurable (temporary fix)
8279
8380 // config for QA histograms
8481 Configurable<bool > confAddTracksVsFwdHistos{" AddTracksVsFwdHistos" , true , " 0 - add histograms, 1 - skip" }; // o2-linter: disable=name/configurable (temporary fix)
@@ -93,6 +90,12 @@ struct DetectorOccupancyQaTask {
9390
9491 Configurable<int > nMaxBcInTFforAnalysis{" nMaxBcInTFforAnalysis" , -1 , " When to stop taking collisions in TF, if -1: take all collisions" }; // o2-linter: disable=name/configurable (temporary fix)
9592
93+ ConfigurableAxis confAxisPtBinsForPhiStudy{" PtBinsForPhiStudy" , {VARIABLE_WIDTH, 0.2 , 0.6 , 1.0 , 2.0 , 10 }, " pt axis" };
94+ ConfigurableAxis confAxisOccupForKine{" AxisOccupForKine" , {VARIABLE_WIDTH, 0 , 500 , 1000 , 2000 , 4000 , 6000 , 8000 , 10000 , 20000 }, " weighted occupancy" };
95+
96+ Configurable<bool > confUsePhiAtTPCinnerR{" UsePhiAtTPCinnerR" , false , " 0 - not use, 1 - use" }; // o2-linter: disable=name/configurable (temporary fix)
97+ Configurable<int > confUseAorCsideForPhiStudy{" UseAorCsideForPhiStudy" , -1 , " -1 - use full eta range, 0 - A, 1 - C sides" }; // o2-linter: disable=name/configurable (temporary fix)
98+
9699 uint64_t minGlobalBC = 0 ;
97100 Service<o2::ccdb::BasicCCDBManager> ccdb;
98101 HistogramRegistry histos{" Histos" , {}, OutputObjHandlingPolicy::AnalysisObject};
@@ -290,46 +293,46 @@ struct DetectorOccupancyQaTask {
290293 histos.add (" track_distr_nITStrThisEv_above_2000/hPt_highOccupInNeighbourEvents" , " ;p_{T};n tracks" , kTH1D , {axisLogPt});
291294
292295 // July 2025: to compare data and MC (pt, eta, phi)
293- // AxisSpec axisOccupForKine {{0, 500, 1000, 2000, 4000, 6000, 20000}, "weighted occupancy"};
294- AxisSpec axisOccupForKine {{0 , 500 , 1000 , 2000 , 4000 , 6000 , 8000 , 10000 , 20000 }, " weighted occupancy" };
295- AxisSpec axisPtForKine {{0.2 , 0.6 , 1.0 , 2.0 , 10 }, " centrality percentile " };
296- histos.add (" track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hPt_pos" , " ;p_{T};weighted occupancy" , kTH2D , {axisLogPt, axisOccupForKine });
297- histos.add (" track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hPt_neg" , " ;p_{T};weighted occupancy" , kTH2D , {axisLogPt, axisOccupForKine });
298- histos.add (" track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hEta_pos" , " ;#eta;weighted occupancy" , kTH2D , {axisEta, axisOccupForKine });
299- histos.add (" track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hEta_neg" , " ;#eta;weighted occupancy" , kTH2D , {axisEta, axisOccupForKine });
300- histos.add (" track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hPhi_pos" , " ;#varphi;n tracks" , kTH3D , {axisPhi, axisOccupForKine, axisPtForKine });
301- histos.add (" track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hPhi_neg" , " ;#varphi;n tracks" , kTH3D , {axisPhi, axisOccupForKine, axisPtForKine });
302-
303- histos.add (" track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/PV_hPt_pos" , " ;p_{T};weighted occupancy" , kTH2D , {axisLogPt, axisOccupForKine });
304- histos.add (" track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/PV_hPt_neg" , " ;p_{T};weighted occupancy" , kTH2D , {axisLogPt, axisOccupForKine });
305- histos.add (" track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/PV_hEta_pos" , " ;#eta;weighted occupancy" , kTH2D , {axisEta, axisOccupForKine });
306- histos.add (" track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/PV_hEta_neg" , " ;#eta;weighted occupancy" , kTH2D , {axisEta, axisOccupForKine });
307- histos.add (" track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/PV_hPhi_pos" , " ;#varphi;n tracks" , kTH3D , {axisPhi, axisOccupForKine, axisPtForKine });
308- histos.add (" track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/PV_hPhi_neg" , " ;#varphi;n tracks" , kTH3D , {axisPhi, axisOccupForKine, axisPtForKine });
309-
310- histos.add (" track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/hPt_pos" , " ;p_{T};weighted occupancy" , kTH2D , {axisLogPt, axisOccupForKine });
311- histos.add (" track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/hPt_neg" , " ;p_{T};weighted occupancy" , kTH2D , {axisLogPt, axisOccupForKine });
312- histos.add (" track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/hEta_pos" , " ;#eta;weighted occupancy" , kTH2D , {axisEta, axisOccupForKine });
313- histos.add (" track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/hEta_neg" , " ;#eta;weighted occupancy" , kTH2D , {axisEta, axisOccupForKine });
314- histos.add (" track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/hPhi_pos" , " ;#varphi;n tracks" , kTH3D , {axisPhi, axisOccupForKine, axisPtForKine });
315- histos.add (" track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/hPhi_neg" , " ;#varphi;n tracks" , kTH3D , {axisPhi, axisOccupForKine, axisPtForKine });
316-
317- histos.add (" track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/PV_hPt_pos" , " ;p_{T};weighted occupancy" , kTH2D , {axisLogPt, axisOccupForKine });
318- histos.add (" track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/PV_hPt_neg" , " ;p_{T};weighted occupancy" , kTH2D , {axisLogPt, axisOccupForKine });
319- histos.add (" track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/PV_hEta_pos" , " ;#eta;weighted occupancy" , kTH2D , {axisEta, axisOccupForKine });
320- histos.add (" track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/PV_hEta_neg" , " ;#eta;weighted occupancy" , kTH2D , {axisEta, axisOccupForKine });
321- histos.add (" track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/PV_hPhi_pos" , " ;#varphi;n tracks" , kTH3D , {axisPhi, axisOccupForKine, axisPtForKine });
322- histos.add (" track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/PV_hPhi_neg" , " ;#varphi;n tracks" , kTH3D , {axisPhi, axisOccupForKine, axisPtForKine });
296+ // AxisSpec confAxisOccupForKine {{0, 500, 1000, 2000, 4000, 6000, 20000}, "weighted occupancy"};
297+ // AxisSpec confAxisOccupForKine {{0, 500, 1000, 2000, 4000, 6000, 8000, 10000, 20000}, "weighted occupancy"};
298+ // AxisSpec confAxisPtBinsForPhiStudy {{0.2, 0.6, 1.0, 2.0, 10}, "pt bins for phi study "};
299+ histos.add (" track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hPt_pos" , " ;p_{T};weighted occupancy" , kTH2D , {axisLogPt, confAxisOccupForKine });
300+ histos.add (" track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hPt_neg" , " ;p_{T};weighted occupancy" , kTH2D , {axisLogPt, confAxisOccupForKine });
301+ histos.add (" track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hEta_pos" , " ;#eta;weighted occupancy" , kTH2D , {axisEta, confAxisOccupForKine });
302+ histos.add (" track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hEta_neg" , " ;#eta;weighted occupancy" , kTH2D , {axisEta, confAxisOccupForKine });
303+ histos.add (" track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hPhi_pos" , " ;#varphi;n tracks" , kTH3D , {axisPhi, confAxisOccupForKine, confAxisPtBinsForPhiStudy });
304+ histos.add (" track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hPhi_neg" , " ;#varphi;n tracks" , kTH3D , {axisPhi, confAxisOccupForKine, confAxisPtBinsForPhiStudy });
305+
306+ histos.add (" track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/PV_hPt_pos" , " ;p_{T};weighted occupancy" , kTH2D , {axisLogPt, confAxisOccupForKine });
307+ histos.add (" track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/PV_hPt_neg" , " ;p_{T};weighted occupancy" , kTH2D , {axisLogPt, confAxisOccupForKine });
308+ histos.add (" track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/PV_hEta_pos" , " ;#eta;weighted occupancy" , kTH2D , {axisEta, confAxisOccupForKine });
309+ histos.add (" track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/PV_hEta_neg" , " ;#eta;weighted occupancy" , kTH2D , {axisEta, confAxisOccupForKine });
310+ histos.add (" track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/PV_hPhi_pos" , " ;#varphi;n tracks" , kTH3D , {axisPhi, confAxisOccupForKine, confAxisPtBinsForPhiStudy });
311+ histos.add (" track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/PV_hPhi_neg" , " ;#varphi;n tracks" , kTH3D , {axisPhi, confAxisOccupForKine, confAxisPtBinsForPhiStudy });
312+
313+ histos.add (" track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/hPt_pos" , " ;p_{T};weighted occupancy" , kTH2D , {axisLogPt, confAxisOccupForKine });
314+ histos.add (" track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/hPt_neg" , " ;p_{T};weighted occupancy" , kTH2D , {axisLogPt, confAxisOccupForKine });
315+ histos.add (" track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/hEta_pos" , " ;#eta;weighted occupancy" , kTH2D , {axisEta, confAxisOccupForKine });
316+ histos.add (" track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/hEta_neg" , " ;#eta;weighted occupancy" , kTH2D , {axisEta, confAxisOccupForKine });
317+ histos.add (" track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/hPhi_pos" , " ;#varphi;n tracks" , kTH3D , {axisPhi, confAxisOccupForKine, confAxisPtBinsForPhiStudy });
318+ histos.add (" track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/hPhi_neg" , " ;#varphi;n tracks" , kTH3D , {axisPhi, confAxisOccupForKine, confAxisPtBinsForPhiStudy });
319+
320+ histos.add (" track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/PV_hPt_pos" , " ;p_{T};weighted occupancy" , kTH2D , {axisLogPt, confAxisOccupForKine });
321+ histos.add (" track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/PV_hPt_neg" , " ;p_{T};weighted occupancy" , kTH2D , {axisLogPt, confAxisOccupForKine });
322+ histos.add (" track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/PV_hEta_pos" , " ;#eta;weighted occupancy" , kTH2D , {axisEta, confAxisOccupForKine });
323+ histos.add (" track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/PV_hEta_neg" , " ;#eta;weighted occupancy" , kTH2D , {axisEta, confAxisOccupForKine });
324+ histos.add (" track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/PV_hPhi_pos" , " ;#varphi;n tracks" , kTH3D , {axisPhi, confAxisOccupForKine, confAxisPtBinsForPhiStudy });
325+ histos.add (" track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/PV_hPhi_neg" , " ;#varphi;n tracks" , kTH3D , {axisPhi, confAxisOccupForKine, confAxisPtBinsForPhiStudy });
323326
324327 AxisSpec axisLogPtFor2D{50 , 0.05 , 10 , " p_{T}" };
325328 AxisSpec axisLogPtTpcFor2D{50 , 0.05 , 10 , " p_{T} TPC inner" };
326- histos.add (" track_distr_nITStrThisEv_10_200/hPt_vs_tpcInnerPt_vs_occup" , " ;p_{T};p_{T} TPC inner;weighted occupancy" , kTH3D , {axisLogPtFor2D, axisLogPtTpcFor2D, axisOccupForKine });
327- histos.add (" track_distr_nITStrThisEv_above_2000/hPt_vs_tpcInnerPt_vs_occup" , " ;p_{T};p_{T} TPC inner;weighted occupancy" , kTH3D , {axisLogPtFor2D, axisLogPtTpcFor2D, axisOccupForKine });
329+ histos.add (" track_distr_nITStrThisEv_10_200/hPt_vs_tpcInnerPt_vs_occup" , " ;p_{T};p_{T} TPC inner;weighted occupancy" , kTH3D , {axisLogPtFor2D, axisLogPtTpcFor2D, confAxisOccupForKine });
330+ histos.add (" track_distr_nITStrThisEv_above_2000/hPt_vs_tpcInnerPt_vs_occup" , " ;p_{T};p_{T} TPC inner;weighted occupancy" , kTH3D , {axisLogPtFor2D, axisLogPtTpcFor2D, confAxisOccupForKine });
328331
329- histos.add (" hNcolVsBcInTF/hNcolVsBcInTF_vs_occupancy" , " ;bc in TF;weighted occupancy" , kTH2F , {axisBCinTF, axisOccupForKine });
330- histos.add (" hNcolVsBcInTF/hNcolVsBcInTF_vs_occupancy_vertexTOFmatched" , " ;bc in TF;weighted occupancy" , kTH2F , {axisBCinTF, axisOccupForKine });
331- histos.add (" hNcolVsBcInTF/hNcolVsBcInTF_vs_occupancy_nPV_10_200" , " ;bc in TF;weighted occupancy" , kTH2F , {axisBCinTF, axisOccupForKine });
332- histos.add (" hNcolVsBcInTF/hNcolVsBcInTF_vs_occupancy_nPV_above2000" , " ;bc in TF;weighted occupancy" , kTH2F , {axisBCinTF, axisOccupForKine });
332+ histos.add (" hNcolVsBcInTF/hNcolVsBcInTF_vs_occupancy" , " ;bc in TF;weighted occupancy" , kTH2F , {axisBCinTF, confAxisOccupForKine });
333+ histos.add (" hNcolVsBcInTF/hNcolVsBcInTF_vs_occupancy_vertexTOFmatched" , " ;bc in TF;weighted occupancy" , kTH2F , {axisBCinTF, confAxisOccupForKine });
334+ histos.add (" hNcolVsBcInTF/hNcolVsBcInTF_vs_occupancy_nPV_10_200" , " ;bc in TF;weighted occupancy" , kTH2F , {axisBCinTF, confAxisOccupForKine });
335+ histos.add (" hNcolVsBcInTF/hNcolVsBcInTF_vs_occupancy_nPV_above2000" , " ;bc in TF;weighted occupancy" , kTH2F , {axisBCinTF, confAxisOccupForKine });
333336 // end of July 2025: to compare data and MC (pt, eta, phi)
334337
335338 // 3D: pt vs centr vs occup
@@ -1225,16 +1228,21 @@ struct DetectorOccupancyQaTask {
12251228 float eta = track.eta ();
12261229 float phi = track.phi ();
12271230
1228- if (occupancy >= 0 && fabs (eta) < 0.8 && pt > 0.15 ) {
1229- // if (confFlagManyHeavyHistos) {
1230- // histos.fill(HIST("ptGlobal_vs_centr_vs_occup"), nPV, occupancy, pt);
1231- // histos.fill(HIST("ptPV_vs_centr_vs_occup"), nPV, occupancy, pt);
1232- // if (col.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) {
1233- // histos.fill(HIST("ptGlobal_vs_centr_vs_occup_NoCollStd"), nPV, occupancy, pt);
1234- // histos.fill(HIST("ptPV_vs_centr_vs_occup_NoCollStd"), nPV, occupancy, pt);
1235- // }
1236- // }
1231+ if (confUsePhiAtTPCinnerR) {
1232+ phi += asin (0.8 /* inner TPC radius*/ / 2 * 0.3 * sign * 0.5 / pt);
1233+ if (phi < 0 )
1234+ phi += TMath::TwoPi ();
1235+ else if (phi > TMath::TwoPi ())
1236+ phi -= TMath::TwoPi ();
1237+ }
1238+
1239+ bool etaInRange = true ;
1240+ if (confUseAorCsideForPhiStudy == 0 && eta < 0.1 ) // check if we are in A side
1241+ etaInRange = false ;
1242+ if (confUseAorCsideForPhiStudy == 1 && eta > -0.1 ) // check if we are in C side
1243+ etaInRange = false ;
12371244
1245+ if (occupancy >= 0 && fabs (eta) < 0.8 && pt > 0.15 && etaInRange) {
12381246 if (nPV >= 10 && nPV < 200 ) {
12391247 if (isGoodGlobal) {
12401248 if (flagWhichDeltaTimeWin == 1 && flagNoCollNearby) {
@@ -1266,7 +1274,7 @@ struct DetectorOccupancyQaTask {
12661274 } // end of TPC good global
12671275
12681276 // July 2025: for data vs MC kine distr comparison
1269- if (sign > 0 ) // positive
1277+ if (sign > 0 ) // positive tracks
12701278 {
12711279 histos.fill (HIST (" track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/PV_hPt_pos" ), pt, occupancy);
12721280 histos.fill (HIST (" track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/PV_hEta_pos" ), eta, occupancy);
@@ -1276,7 +1284,7 @@ struct DetectorOccupancyQaTask {
12761284 histos.fill (HIST (" track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hEta_pos" ), eta, occupancy);
12771285 histos.fill (HIST (" track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hPhi_pos" ), phi, occupancy, pt);
12781286 }
1279- } else // negative
1287+ } else // negative tracks
12801288 {
12811289 histos.fill (HIST (" track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/PV_hPt_neg" ), pt, occupancy);
12821290 histos.fill (HIST (" track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/PV_hEta_neg" ), eta, occupancy);
@@ -1320,7 +1328,7 @@ struct DetectorOccupancyQaTask {
13201328 } // end of TPC good global
13211329
13221330 // July 2025: for data vs MC kine distr comparison
1323- if (sign > 0 ) // positive
1331+ if (sign > 0 ) // positive tracks
13241332 {
13251333 histos.fill (HIST (" track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/PV_hPt_pos" ), pt, occupancy);
13261334 histos.fill (HIST (" track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/PV_hEta_pos" ), eta, occupancy);
@@ -1330,7 +1338,7 @@ struct DetectorOccupancyQaTask {
13301338 histos.fill (HIST (" track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/hEta_pos" ), eta, occupancy);
13311339 histos.fill (HIST (" track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/hPhi_pos" ), phi, occupancy, pt);
13321340 }
1333- } else // negative
1341+ } else // negative tracks
13341342 {
13351343 histos.fill (HIST (" track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/PV_hPt_neg" ), pt, occupancy);
13361344 histos.fill (HIST (" track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/PV_hEta_neg" ), eta, occupancy);
@@ -1343,7 +1351,7 @@ struct DetectorOccupancyQaTask {
13431351 }
13441352 // end of July 2025: for data vs MC kine distr comparison
13451353 } // end of if (nPV >= 2000)
1346- } // end of if (occupancy >= 0)
1354+ } // end of if (occupancy >= 0) && kine cuts
13471355 } // end of spec track loop to fill track histograms
13481356 } // end of if (confAddBasicQAhistos)
13491357
0 commit comments