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
28 changes: 16 additions & 12 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 @@ -999,20 +999,24 @@
for (const auto& track : tracks) {
auto mapAmbTrIdsIt = mapAmbTrIds.find(track.globalIndex());
int ambTrId = mapAmbTrIdsIt == mapAmbTrIds.end() ? -1 : mapAmbTrIdsIt->second;

// special check to avoid crashes (in particular, on some MC Pb-Pb datasets)
// (related to shifts in ambiguous tracks association to bc slices (off by 1) - see https://mattermost.web.cern.ch/alice/pl/g9yaaf3tn3g4pgn7c1yex9copy
if (ambTrId >= 0 && (ambTracks.iteratorAt(ambTrId).bcIds()[0] >= bcs.size()))
continue;

int indexBc = ambTrId < 0 ? track.collision_as<ColEvSels>().bc_as<BCsRun3>().globalIndex() : ambTracks.iteratorAt(ambTrId).bc_as<BCsRun3>().begin().globalIndex();
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);
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 1017 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 @@ -1166,7 +1170,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 1173 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 @@ -1174,7 +1178,7 @@
nTPConlyNoITS++;
}

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

Check failure on line 1181 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 @@ -1194,7 +1198,7 @@
if (track.hasTPC()) {
nContributorsAfterEtaTPCLooseCuts++;

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

Check failure on line 1201 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 @@ -1206,7 +1210,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 1213 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 @@ -1230,7 +1234,7 @@

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

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

Check failure on line 1237 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