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
26 changes: 23 additions & 3 deletions DPG/Tasks/AOTEvent/lightIonsEvSelQa.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,12 @@
histos.add("MCnonTVX/hMCdataVzDiff", "", kTH2F, {axisNcontrib, axisVtxZdiff});
histos.add("MCnonTVX/hMCdataBcDiffVsMult", "", kTH2F, {axisNcontrib, axisBcDiff});
histos.add("MCnonTVX/hMCdataFoundBcDiffVsMult", "", kTH2F, {axisNcontrib, axisBcDiff});

//
histos.add("MC_not_TF_ROF_borders/hNcontribColFromData", "", kTH1F, {axisNcontrib});
histos.add("MC_not_TF_ROF_borders/hNcontribAccFromData", "", kTH1F, {axisNcontrib});
histos.add("MC_not_TF_ROF_borders/hNcontribColFromData_foundBcDiff0", "", kTH1F, {axisNcontrib});
histos.add("MC_not_TF_ROF_borders/hNcontribAccFromData_foundBcDiff0", "", kTH1F, {axisNcontrib});
}

Preslice<FullTracksIU> perCollision = aod::track::collisionId;
Expand Down Expand Up @@ -688,7 +694,7 @@
int64_t tsSOR = 0; // dummy start-of-run timestamp
int64_t tsEOR = 1; // dummy end-of-run timestamp

if (runNumber >= 500000) {

Check failure on line 697 in DPG/Tasks/AOTEvent/lightIonsEvSelQa.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 @@ -785,7 +791,7 @@
pastActivityFV0 |= bcPast.has_fv0a();
// pastActivityFDD |= bcPast.has_fdd();
}
if (deltaBC < 2) {

Check failure on line 794 in DPG/Tasks/AOTEvent/lightIonsEvSelQa.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 (bcPast.has_ft0()) {
std::bitset<8> triggers = bcPast.ft0().triggerMask();
nearbyFT0activity |= (triggers[o2::ft0::RecPoints::ETriggerBits::kIsActiveSideA] || triggers[o2::ft0::RecPoints::ETriggerBits::kIsActiveSideC]);
Expand Down Expand Up @@ -814,7 +820,7 @@
futureActivityFV0 |= bcFuture.has_fv0a();
futureActivityFDD |= bcFuture.has_fdd();
}
if (deltaBC < 2) {

Check failure on line 823 in DPG/Tasks/AOTEvent/lightIonsEvSelQa.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 (bcFuture.has_ft0()) {
std::bitset<8> triggers = bcFuture.ft0().triggerMask();
nearbyFT0activity |= (triggers[o2::ft0::RecPoints::ETriggerBits::kIsActiveSideA] || triggers[o2::ft0::RecPoints::ETriggerBits::kIsActiveSideC]);
Expand Down Expand Up @@ -892,7 +898,7 @@

// ### collision loop
for (const auto& col : cols) {
if (std::abs(col.posZ()) > 10)

Check failure on line 901 in DPG/Tasks/AOTEvent/lightIonsEvSelQa.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;

const auto& foundBC = col.foundBC_as<BCsRun3>();
Expand Down Expand Up @@ -928,14 +934,14 @@
// int nTOFtracks = 0;
auto tracksGrouped = tracks.sliceBy(perCollision, col.globalIndex());
for (const auto& track : tracksGrouped) {
if (track.itsNCls() < 5)

Check failure on line 937 in DPG/Tasks/AOTEvent/lightIonsEvSelQa.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 (track.pt() < 0.2 || track.pt() > 10)

Check failure on line 939 in DPG/Tasks/AOTEvent/lightIonsEvSelQa.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 (std::abs(track.eta()) > 0.8)

Check failure on line 941 in DPG/Tasks/AOTEvent/lightIonsEvSelQa.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 (track.hasITS() && track.hasTPC() && track.tpcNClsFound() > 50 && track.tpcNClsCrossedRows() > 50 && track.tpcChi2NCl() < 4)

Check failure on line 944 in DPG/Tasks/AOTEvent/lightIonsEvSelQa.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.
nGlobalTracksAll++;

if (!track.isPVContributor()) {
Expand All @@ -946,9 +952,11 @@
nGlobalTracksPV++;
} // end of track loop

histos.fill(HIST("hNcontribColFromData"), nPVtracks);
if (col.selection_bit(kIsTriggerTVX))
histos.fill(HIST("hNcontribAccFromData"), nPVtracks);
if (col.selection_bit(kNoTimeFrameBorder) && col.selection_bit(kNoITSROFrameBorder)) {
histos.fill(HIST("hNcontribColFromData"), nPVtracks);
if (col.selection_bit(kIsTriggerTVX))
histos.fill(HIST("hNcontribAccFromData"), nPVtracks);
}

bool hasFT0 = foundBC.has_ft0();
bool hasFV0A = foundBC.has_fv0a();
Expand Down Expand Up @@ -1004,7 +1012,7 @@
if (lastRunNumber == 564468)
meanDiff = -0.60;

float stdDev = (multT0M > 10) ? 0.144723 + 13.5345 / sqrt(multT0M) : 1.5; // cm

Check failure on line 1015 in DPG/Tasks/AOTEvent/lightIonsEvSelQa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
if (multT0M > 5000)
stdDev = stdDev > 0.2 ? stdDev : 0.2; // 0.35; // cm
badVzDiff = diffVz < (meanDiff - stdDev * nSigmaForVzDiff - safetyDiffVzMargin) || diffVz > (meanDiff + stdDev * nSigmaForVzDiff + safetyDiffVzMargin);
Expand Down Expand Up @@ -1813,7 +1821,7 @@
aod::McCollisions const&)
{
for (const auto& col : collisions) {
if (fabs(col.posZ()) > 10)

Check failure on line 1824 in DPG/Tasks/AOTEvent/lightIonsEvSelQa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
continue;
bool isSel8 = col.sel8();
if (col.has_mcCollision()) {
Expand Down Expand Up @@ -1867,6 +1875,18 @@
histos.fill(HIST("MCnonTVX/hMCdataBcDiffVsMult"), col.numContrib(), bcDiff);
histos.fill(HIST("MCnonTVX/hMCdataFoundBcDiffVsMult"), col.numContrib(), foundBcDiff);
}

if (col.selection_bit(kNoTimeFrameBorder) && col.selection_bit(kNoITSROFrameBorder)) {
histos.fill(HIST("MC_not_TF_ROF_borders/hNcontribColFromData"), col.numContrib());
if (col.selection_bit(kIsTriggerTVX))
histos.fill(HIST("MC_not_TF_ROF_borders/hNcontribAccFromData"), col.numContrib());

if (foundBcDiff == 0) {
histos.fill(HIST("MC_not_TF_ROF_borders/hNcontribColFromData_foundBcDiff0"), col.numContrib());
if (col.selection_bit(kIsTriggerTVX))
histos.fill(HIST("MC_not_TF_ROF_borders/hNcontribAccFromData_foundBcDiff0"), col.numContrib());
}
}
}
}
}
Expand Down
Loading