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
22 changes: 12 additions & 10 deletions DPG/Tasks/AOTEvent/eventSelectionQa.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,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 420 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 @@ -615,7 +615,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 618 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 @@ -755,7 +755,7 @@

double minSec = floor(tsSOR / 1000.);
double maxSec = ceil(tsEOR / 1000.);
const AxisSpec axisSeconds{maxSec - minSec < 1000 ? static_cast<int>(maxSec - minSec) : 1000, minSec, maxSec, "seconds"};

Check failure on line 758 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.
const AxisSpec axisBcDif{600, -300., 300., "bc difference"};
histos.add("hSecondsTVXvsBcDif", "", kTH2F, {axisSeconds, axisBcDif});
histos.add("hSecondsTVXvsBcDifAll", "", kTH2F, {axisSeconds, axisBcDif});
Expand Down Expand Up @@ -984,7 +984,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 987 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 @@ -1000,17 +1000,19 @@
auto mapAmbTrIdsIt = mapAmbTrIds.find(track.globalIndex());
int ambTrId = mapAmbTrIdsIt == mapAmbTrIds.end() ? -1 : mapAmbTrIdsIt->second;
int indexBc = ambTrId < 0 ? track.collision_as<ColEvSels>().bc_as<BCsRun3>().globalIndex() : ambTracks.iteratorAt(ambTrId).bc_as<BCsRun3>().begin().globalIndex();
auto bc = bcs.iteratorAt(indexBc);
int64_t globalBC = bc.globalBC() + floor(track.trackTime() / o2::constants::lhc::LHCBunchSpacingNS);
if (ambTrId < 0) { // temprorary limitation, to avoid crashes, in particular, on MC Pb-Pb datasets
auto bc = bcs.iteratorAt(indexBc);
int64_t globalBC = bc.globalBC() + floor(track.trackTime() / o2::constants::lhc::LHCBunchSpacingNS);

int32_t indexClosestTVX = findClosest(globalBC, mapGlobalBcWithTVX);
int bcDiff = static_cast<int>(globalBC - vGlobalBCs[indexClosestTVX]);
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)
continue;
histos.fill(HIST("hSecondsTVXvsBcDifAll"), bc.timestamp() / 1000., bcDiff);
int32_t indexClosestTVX = findClosest(globalBC, mapGlobalBcWithTVX);
int bcDiff = static_cast<int>(globalBC - vGlobalBCs[indexClosestTVX]);
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 1012 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);
}
}

// collision-based event selection qa
Expand Down Expand Up @@ -1164,7 +1166,7 @@
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 1169 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++;
Expand All @@ -1172,7 +1174,7 @@
nTPConlyNoITS++;
}

if (std::fabs(track.eta()) < 0.8 && track.pt() > 0.2) {

Check failure on line 1177 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.
if (track.hasITS()) {
nTracksITS++;
if (track.hasTPC())
Expand All @@ -1192,7 +1194,7 @@
if (track.hasTPC()) {
nContributorsAfterEtaTPCLooseCuts++;

if (!isLowFlux && col.sel8() && col.selection_bit(kNoSameBunchPileup) && fabs(col.posZ()) < 10 && occupancyByTracks >= 0) {

Check failure on line 1197 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.
histos.fill(HIST("occupancyQA/tpcNClsFound_vs_V0A_vs_occupancy"), multV0A, track.tpcNClsFound(), occupancyByTracks);
histos.fill(HIST("occupancyQA/tpcNClsFindable_vs_V0A_vs_occupancy"), multV0A, track.tpcNClsFindable(), occupancyByTracks);
histos.fill(HIST("occupancyQA/tpcNClsShared_vs_V0A_vs_occupancy"), multV0A, track.tpcNClsShared(), occupancyByTracks);
Expand All @@ -1204,7 +1206,7 @@
histos.fill(HIST("occupancyQA/tpcNCrossedRows_vs_V0A_vs_occupancy"), multV0A, track.tpcNClsFindable() - tpcNClsFindableMinusCrossedRowsCorrected, occupancyByTracks);
}
} // end of hasTPC
if (col.sel8() && fabs(col.posZ()) < 10 && track.tpcNClsFound() > 50 && track.tpcNClsCrossedRows() > 80 && track.itsChi2NCl() < 36 && track.tpcChi2NCl() < 4) {

Check failure on line 1209 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.
nContributorsAfterEtaTPCCuts++;
// ROF border QA
histos.fill(HIST("ITSROFborderQA/hFoundBC_kTVX_nITSlayers_for_ITSTPCtracks"), localBC, track.itsNCls());
Expand All @@ -1228,7 +1230,7 @@

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

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

Check failure on line 1233 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.
histos.fill(HIST("occupancyQA/hOccupancyByTracks"), occupancyByTracks);
histos.fill(HIST("occupancyQA/hOccupancyByFT0C"), occupancyByFT0C);
if (occupancyByTracks >= 0) {
Expand Down
Loading