Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@
histos.add("track_distr_nITStrThisEv_above_2000/hEta_highOccupInDistantFuture", ";#eta;n tracks", kTH1D, {axisEta});
histos.add("track_distr_nITStrThisEv_above_2000/hEta_highOccupInNeighbourEvents", ";#eta;n tracks", kTH1D, {axisEta});

const int nPhiBins = 800;
const int nPhiBins = 810; // 18*45
AxisSpec axisPhi{nPhiBins, 0, TMath::TwoPi(), "#varphi"}; // o2-linter: disable=external-pi (temporary fix)
histos.add("track_distr_nITStrThisEv_10_200/hPhi_lowOccupInTPC", ";#varphi;n tracks", kTH1D, {axisPhi});
histos.add("track_distr_nITStrThisEv_10_200/hPhi_highOccupInRecentPast", ";#varphi;n tracks", kTH1D, {axisPhi});
Expand Down Expand Up @@ -290,7 +290,8 @@
histos.add("track_distr_nITStrThisEv_above_2000/hPt_highOccupInNeighbourEvents", ";p_{T};n tracks", kTH1D, {axisLogPt});

// July 2025: to compare data and MC (pt, eta, phi)
AxisSpec axisOccupForKine{{0, 500, 1000, 2000, 4000, 6000, 20000}, "weighted occupancy"};
// AxisSpec axisOccupForKine{{0, 500, 1000, 2000, 4000, 6000, 20000}, "weighted occupancy"};
AxisSpec axisOccupForKine{{0, 500, 1000, 2000, 4000, 6000, 8000, 10000, 20000}, "weighted occupancy"};
AxisSpec axisPtForKine{{0.2, 0.6, 1.0, 2.0, 10}, "centrality percentile"};
histos.add("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hPt_pos", ";p_{T};weighted occupancy", kTH2D, {axisLogPt, axisOccupForKine});
histos.add("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/hPt_neg", ";p_{T};weighted occupancy", kTH2D, {axisLogPt, axisOccupForKine});
Expand Down Expand Up @@ -514,7 +515,7 @@
if (runNumber != lastRunNumber) {
lastRunNumber = runNumber; // do it only once

if (runNumber >= 500000) {

Check failure on line 518 in DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
auto runInfo = o2::parameters::AggregatedRunInfo::buildAggregatedRunInfo(o2::ccdb::BasicCCDBManager::instance(), runNumber);
// first bc of the first orbit
bcSOR = runInfo.orbitSOR * o2::constants::lhc::LHCMaxBunches;
Expand Down Expand Up @@ -565,7 +566,7 @@
if (!track.isPVContributor()) {
continue;
}
if (track.itsNCls() < 5)

Check failure on line 569 in DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
continue;
nITS567cls++;
nITSTPCtracks += track.hasITS() && track.hasTPC();
Expand Down Expand Up @@ -616,7 +617,7 @@
vIsFullInfoForOccupancy[colIndex] = ((bcInTF - 300) * bcNS > timeWinOccupancyCalcNS) && ((nBCsPerTF - 4000 - bcInTF) * bcNS > timeWinOccupancyCalcNS) ? true : false;

// cut on the max bc in the time frame
vIsMarkedCollForAnalysis[colIndex] = nMaxBcInTFforAnalysis == -1 ? 1 : (bcInTF >= 300 && bcInTF < nMaxBcInTFforAnalysis);

Check failure on line 620 in DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
LOGP(debug, "### check bcInTF cut: colIndex={} bcInTF={} vIsFullInfoForOccupancy={}", colIndex, bcInTF, static_cast<int>(vIsFullInfoForOccupancy[colIndex]));
}

Expand Down Expand Up @@ -650,7 +651,7 @@

float dt = (thisBC - foundGlobalBC) * bcNS; // ns

if (confFlagWhichTimeRange == 2 && dt < 0)

Check failure on line 654 in DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
break;

// check if we are within the chosen time range
Expand Down Expand Up @@ -758,7 +759,7 @@
nITSTPCtracksInTimeWindowSel += vTracksITSTPCperColl[thisColIndex];

mUniqueBC[thisGlobBC] = thisColIndex;
if (vTracksITSTPCperColl[thisColIndex] >= 2)

Check failure on line 762 in DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
nCollInTimeWindowSelITSTPC++;

if (vIsVertexTOFmatched[thisColIndex])
Expand Down Expand Up @@ -801,7 +802,7 @@
histos.fill(HIST("hNumITSTPC_vs_ITS567tracksThisCol_vs_ITS567tracksInTimeWindow_BEFORE_sel"), vTracksITS567perCollPtEtaCuts[colIndex], vTracksITSTPCperCollPtEtaCuts[colIndex], nITS567tracksInTimeWindow - vTracksITS567perColl[colIndex]);
histos.fill(HIST("hNumITSTPC_vs_ITS567tracksThisCol_vs_FT0CamplInTimeWindow_BEFORE_sel"), vTracksITS567perCollPtEtaCuts[colIndex], vTracksITSTPCperCollPtEtaCuts[colIndex], multFT0CInTimeWindow - multFT0CmainCollision);

if (sel && std::fabs(col.posZ()) < 10) {

Check failure on line 805 in DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
histos.fill(HIST("hNumITS567tracksInTimeWindowSel"), nITS567tracksInTimeWindowSel);
histos.fill(HIST("hNumITSTPCtracksInTimeWindowSel"), nITSTPCtracksInTimeWindowSel);

Expand Down Expand Up @@ -849,7 +850,7 @@
float integralNeighbourEvents = histos.get<TH1>(HIST("thisEventITStracksInTimeBins"))->Integral(binMin, binMax);

// recent past
if (integralFullDeltaTime < 200) // ~empty detector

Check failure on line 853 in DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
vFlagsForEtaQAvsOccupancyInDeltaTimeWins[colIndex] = 1;
// recent past
if (integralPast > /*3000*/ 2500 && (integralFullDeltaTime - integralPast) < 180) // low occupancy outside the dt region of interest
Expand Down Expand Up @@ -885,7 +886,7 @@
if (confFlagUseNoHighMultCollInPrevRof && !col.selection_bit(kNoHighMultCollInPrevRof))
flagFillOccupVsDt = false;

if (sel && std::fabs(col.posZ()) < 10 && flagFillOccupVsDt) {

Check failure on line 889 in DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
histos.fill(HIST("occupancyInTimeBins"), dt, vTracksITS567perCollPtEtaCuts[colIndex], confFlagUseGlobalTracks ? vTracksGlobalPerCollPtEtaCuts[colIndex] : vTracksITSTPCperCollPtEtaCuts[colIndex], nITStrInTimeBin);
if (confFlagManyHeavyHistos)
histos.fill(HIST("occupancyInTimeBins_occupByFT0"), dt, vTracksITS567perCollPtEtaCuts[colIndex], confFlagUseGlobalTracks ? vTracksGlobalPerCollPtEtaCuts[colIndex] : vTracksITSTPCperCollPtEtaCuts[colIndex], nFT0CInTimeBin);
Expand Down Expand Up @@ -914,7 +915,7 @@
histos.fill(HIST("histOccupInTimeBinsQA"), dt, counterQAtimeOccupHistos + 1, nITStrInTimeBin);

// QA for high occup in time bins
if (vFlagsForEtaQAvsOccupancyInDeltaTimeWins[colIndex] == 2)

Check failure on line 918 in DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
histos.fill(HIST("qaForHighOccupITStracksInTimeBinPast"), dt, nITStrInTimeBin);
if (vFlagsForEtaQAvsOccupancyInDeltaTimeWins[colIndex] == 3)
histos.fill(HIST("qaForHighOccupITStracksInTimeBinFuture1"), dt, nITStrInTimeBin);
Expand Down Expand Up @@ -1224,7 +1225,7 @@
float eta = track.eta();
float phi = track.phi();

if (occupancy >= 0 && fabs(eta) < 0.8 && pt > 0.15) {

Check failure on line 1228 in DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
// if (confFlagManyHeavyHistos) {
// histos.fill(HIST("ptGlobal_vs_centr_vs_occup"), nPV, occupancy, pt);
// histos.fill(HIST("ptPV_vs_centr_vs_occup"), nPV, occupancy, pt);
Expand Down
Loading