Skip to content
Merged
Changes from all 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
27 changes: 22 additions & 5 deletions DPG/Tasks/AOTEvent/eventSelectionQa.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -346,12 +346,15 @@
histos.add("occupancyQA/hOccupancyByFT0CvsByTracks", "", kTH2D, {{150, 0, 15000}, {150, 0, 150000}});

// 3D histograms: nGlobalTracks with cls567 as y-axis, V0A as x-axis:
const AxisSpec axisNtracks{160, -0.5, 4000 - 0.5, "n tracks"};
const AxisSpec axisNtracksGlobal{120, -0.5, 3000 - 0.5, "n tracks"};
const AxisSpec axisNtracksPV{160, -0.5, 4000 - 0.5, "n ITS PV tracks"};
const AxisSpec axisNtracksPVTPC{120, -0.5, 3000 - 0.5, "n ITS-TPC PV tracks"};
const AxisSpec axisNtracksTPConly{120, -0.5, 6000 - 0.5, "n TPC-only tracks"};
const AxisSpec axisMultV0AForOccup{20, 0., static_cast<float>(200000), "mult V0A"};
const AxisSpec axisOccupancyTracks{150, 0., 15000, "occupancy (n ITS tracks weighted)"};
histos.add("occupancyQA/hNumTracksPV_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisNtracks, axisOccupancyTracks});
histos.add("occupancyQA/hNumTracksPVTPC_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisNtracksGlobal, axisOccupancyTracks});
histos.add("occupancyQA/hNumTracksPV_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisNtracksPV, axisOccupancyTracks});
histos.add("occupancyQA/hNumTracksPVTPC_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisNtracksPVTPC, axisOccupancyTracks});
histos.add("occupancyQA/hNumTracksTPConly_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisNtracksTPConly, axisOccupancyTracks});
histos.add("occupancyQA/hNumTracksTPConlyNoITS_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisNtracksTPConly, axisOccupancyTracks});

histos.add("occupancyQA/hITSTracks_ev1_vs_ev2_2coll_in_ROF", ";nITStracks event #1;nITStracks event #2", kTH2D, {{200, 0., 6000}, {200, 0., 6000}});
histos.add("occupancyQA/hITSTracks_ev1_vs_ev2_2coll_in_ROF_UPC", ";nITStracks event #1;nITStracks event #2", kTH2D, {{41, -0.5, 40.5}, {41, -0.5, 40.5}});
Expand Down Expand Up @@ -381,7 +384,7 @@
for (int i = 0; i < kNsel; i++) {
histos.get<TH1>(HIST("hSelMask"))->SetBinContent(i + 1, applySelection[i]);
}
isINT1period = run <= 136377 || (run >= 144871 && run <= 159582);

Check failure on line 387 in DPG/Tasks/AOTEvent/eventSelectionQa.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.
}

// bc-based event selection qa
Expand Down Expand Up @@ -579,7 +582,7 @@
lastRun = run;
int64_t tsSOR = 0; // dummy start-of-run timestamp for unanchored MC
int64_t tsEOR = 1; // dummy end-of-run timestamp for unanchored MC
if (run >= 500000) {

Check failure on line 585 in DPG/Tasks/AOTEvent/eventSelectionQa.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(), run);
// first bc of the first orbit
bcSOR = runInfo.orbitSOR * nBCsPerOrbit;
Expand Down Expand Up @@ -945,7 +948,7 @@
for (const auto& bc : bcs) {
int64_t globalBC = bc.globalBC();
// skip non-colliding bcs for data and anchored runs
if (run >= 500000 && bcPatternB[globalBC % nBCsPerOrbit] == 0) {

Check failure on line 951 in DPG/Tasks/AOTEvent/eventSelectionQa.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;
}
if (bc.selection_bit(kIsBBT0A) || bc.selection_bit(kIsBBT0C)) {
Expand All @@ -969,7 +972,7 @@
if (track.hasTOF() || track.hasTRD() || !track.hasITS() || !track.hasTPC() || track.pt() < 1)
continue;
histos.fill(HIST("hTrackBcDiffVsEtaAll"), track.eta(), bcDiff);
if (track.eta() < -0.2 || track.eta() > 0.2)

Check failure on line 975 in DPG/Tasks/AOTEvent/eventSelectionQa.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;
histos.fill(HIST("hSecondsTVXvsBcDifAll"), bc.timestamp() / 1000., bcDiff);
}
Expand Down Expand Up @@ -1108,20 +1111,32 @@
// count tracks of different types
auto tracksGrouped = tracks.sliceBy(perCollision, colIndex);
int nPV = 0;
int nTPConly = 0;
// int nTPConlyWithDeDxCut = 0;
int nTPConlyNoITS = 0;
int nContributorsAfterEtaTPCCuts = 0;
bool isTVX = col.selection_bit(kIsTriggerTVX);
for (const auto& track : tracksGrouped) {
int trackBcDiff = bcDiff + track.trackTime() / o2::constants::lhc::LHCBunchSpacingNS;

if (track.hasTPC() && std::fabs(track.eta()) < 0.8 && track.pt() > 0.2 && track.tpcNClsFound() > 50 && track.tpcNClsCrossedRows() > 50 && track.tpcChi2NCl() < 4) {

Check failure on line 1122 in DPG/Tasks/AOTEvent/eventSelectionQa.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.
nTPConly++;
// if (track.tpcSignal() > 20)
// nTPConlyWithDeDxCut++;
if (!track.hasITS())
nTPConlyNoITS++;
}

if (!track.isPVContributor())
continue;

if (track.itsNCls() >= 5)

Check failure on line 1133 in DPG/Tasks/AOTEvent/eventSelectionQa.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.
vTracksITS567perColl[colIndex]++;

// high-quality contributors for ROF border QA and occupancy study
if (isTVX && std::fabs(track.eta()) < 0.8 && track.pt() > 0.2 && track.itsNCls() >= 5) {
if (std::fabs(track.eta()) < 0.8 && track.pt() > 0.2 && track.itsNCls() >= 5) {

Check failure on line 1137 in DPG/Tasks/AOTEvent/eventSelectionQa.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.
nPV++;
if (track.tpcNClsFound() > 70 && track.tpcNClsCrossedRows() > 80 && track.itsChi2NCl() < 36 && track.tpcChi2NCl() < 4) {

Check failure on line 1139 in DPG/Tasks/AOTEvent/eventSelectionQa.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.
nContributorsAfterEtaTPCCuts++;
// ROF border QA
histos.fill(HIST("ITSROFborderQA/hFoundBC_kTVX_nITSlayers_for_ITSTPCtracks"), localBC, track.itsNCls());
Expand All @@ -1138,14 +1153,14 @@
if (track.hasTOF() || track.hasTRD() || !track.hasITS() || !track.hasTPC() || track.pt() < 1)
continue;
histos.fill(HIST("hTrackBcDiffVsEta"), track.eta(), trackBcDiff);
if (track.eta() < -0.2 || track.eta() > 0.2)

Check failure on line 1156 in DPG/Tasks/AOTEvent/eventSelectionQa.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;
histos.fill(HIST("hSecondsTVXvsBcDif"), bc.timestamp() / 1000., trackBcDiff);
} // end of track loop

histos.fill(HIST("hNcontribAfterCutsVsBcInTF"), bcInTF, nContributorsAfterEtaTPCCuts);

if (!isLowFlux && col.sel8() && fabs(col.posZ()) < 10) {

Check failure on line 1163 in DPG/Tasks/AOTEvent/eventSelectionQa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
int occupancyByTracks = col.trackOccupancyInTimeRange();
histos.fill(HIST("occupancyQA/hOccupancyByTracks"), occupancyByTracks);
float occupancyByFT0C = col.ft0cOccupancyInTimeRange();
Expand All @@ -1154,6 +1169,8 @@
histos.fill(HIST("occupancyQA/hOccupancyByFT0CvsByTracks"), occupancyByTracks, occupancyByFT0C);
histos.fill(HIST("occupancyQA/hNumTracksPV_vs_V0A_vs_occupancy"), multV0A, nPV, occupancyByTracks);
histos.fill(HIST("occupancyQA/hNumTracksPVTPC_vs_V0A_vs_occupancy"), multV0A, nContributorsAfterEtaTPCCuts, occupancyByTracks);
histos.fill(HIST("occupancyQA/hNumTracksTPConly_vs_V0A_vs_occupancy"), multV0A, nTPConly, occupancyByTracks);
histos.fill(HIST("occupancyQA/hNumTracksTPConlyNoITS_vs_V0A_vs_occupancy"), multV0A, nTPConlyNoITS, occupancyByTracks);

// dE/dx QA for a narrow pT bin
for (const auto& track : tracksGrouped) {
Expand Down
Loading