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
19 changes: 17 additions & 2 deletions DPG/Tasks/AOTTrack/PID/TOF/qaPIDTOFDynamic.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,30 @@
///

#include "Common/DataModel/EventSelection.h"
#include "Common/DataModel/FT0Corrected.h"
#include "Common/DataModel/PIDResponseTOF.h"
#include "Common/DataModel/TrackSelectionTables.h"
#include "Common/TableProducer/PID/pidTOFBase.h"

#include <CCDB/BasicCCDBManager.h>
#include <Framework/ASoA.h>
#include <Framework/AnalysisDataModel.h>
#include <Framework/AnalysisHelpers.h>
#include <Framework/AnalysisTask.h>
#include <Framework/Configurable.h>
#include <Framework/Expressions.h>
#include <Framework/HistogramRegistry.h>
#include <Framework/HistogramSpec.h>
#include <Framework/InitContext.h>
#include <Framework/OutputObjHeader.h>
#include <Framework/StaticFor.h>
#include <Framework/runDataProcessing.h>
#include <PID/PIDTOFParamService.h>
#include <ReconstructionDataFormats/PID.h>

#include <TH1.h>
#include <TMath.h>
#include <TString.h>

#include <string_view>

using namespace o2;
using namespace o2::framework;
Expand Down Expand Up @@ -246,7 +261,7 @@
histos.add(hdelta_evtime_tof[id].data(), axisTitle, kTH2F, {pAxis, deltaAxis});
histos.add(hdelta_evtime_ft0[id].data(), axisTitle, kTH2F, {pAxis, deltaAxis});
histos.add(hdelta_evtime_tofft0[id].data(), axisTitle, kTH2F, {pAxis, deltaAxis});
} else if (enableVsMomentumHistograms == 2) {

Check failure on line 264 in DPG/Tasks/AOTTrack/PID/TOF/qaPIDTOFDynamic.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.add(hdelta_evtime_fill[id].data(), axisTitle, kTH3F, {pAxis, etaAxis, deltaAxis});
histos.add(hdelta_evtime_tof[id].data(), axisTitle, kTH3F, {pAxis, etaAxis, deltaAxis});
histos.add(hdelta_evtime_ft0[id].data(), axisTitle, kTH3F, {pAxis, etaAxis, deltaAxis});
Expand Down Expand Up @@ -308,7 +323,7 @@
histos.add("event/pvcontributors", "", kTH1D, {contributorsAxis});
histos.add("event/vertexz", "", kTH1D, {vtxZAxis});
h = histos.add<TH1>("event/particlehypo", "", kTH1D, {{10, 0, 10, "PID in tracking"}});
for (int i = 0; i < 9; i++) {

Check failure on line 326 in DPG/Tasks/AOTTrack/PID/TOF/qaPIDTOFDynamic.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.
h->GetXaxis()->SetBinLabel(i + 1, PID::getName(i));
}

Expand Down Expand Up @@ -370,7 +385,7 @@
if (!collision.sel7()) {
return false;
}
} else if (applyEvSel == 2) {

Check failure on line 388 in DPG/Tasks/AOTTrack/PID/TOF/qaPIDTOFDynamic.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 (!collision.sel8()) {
return false;
}
Expand All @@ -386,7 +401,7 @@
int evtimeflag = 0;

if constexpr (fillHistograms) {
for (auto t : tracks) {

Check failure on line 404 in DPG/Tasks/AOTTrack/PID/TOF/qaPIDTOFDynamic.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (!t.hasTOF()) { // Skipping tracks without TOF
continue;
}
Expand All @@ -406,7 +421,7 @@
}
}
}
if (std::abs(collision.posZ()) > 10.f) {

Check failure on line 424 in DPG/Tasks/AOTTrack/PID/TOF/qaPIDTOFDynamic.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.
return false;
}
// Count the number of contributors
Expand Down Expand Up @@ -520,11 +535,11 @@

Filter eventFilter = (applyEvSel.node() == 0) ||
((applyEvSel.node() == 1) && (o2::aod::evsel::sel7 == true)) ||
((applyEvSel.node() == 2) && (o2::aod::evsel::sel8 == true));

Check failure on line 538 in DPG/Tasks/AOTTrack/PID/TOF/qaPIDTOFDynamic.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.
Filter trackFilter = (trackSelection.node() == 0) ||
((trackSelection.node() == 1) && requireGlobalTrackInFilter()) ||
((trackSelection.node() == 2) && requireGlobalTrackWoPtEtaInFilter()) ||

Check failure on line 541 in DPG/Tasks/AOTTrack/PID/TOF/qaPIDTOFDynamic.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.
((trackSelection.node() == 3) && requireGlobalTrackWoDCAInFilter()) ||

Check failure on line 542 in DPG/Tasks/AOTTrack/PID/TOF/qaPIDTOFDynamic.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.
((trackSelection.node() == 4) && requireQualityTracksInFilter()) ||
((trackSelection.node() == 5) && requireInAcceptanceTracksInFilter());
using CollisionCandidate = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels>>::iterator;
Expand All @@ -539,7 +554,7 @@
tofResponse->processSetup(collision.bc_as<o2::aod::BCsWithTimestamps>());

isEventSelected<true>(collision, tracks);
for (auto t : tracks) {

Check failure on line 557 in DPG/Tasks/AOTTrack/PID/TOF/qaPIDTOFDynamic.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
isTrackSelected<true>(collision, t);
}
}
Expand All @@ -553,7 +568,7 @@
return;
}

for (auto t : tracks) {

Check failure on line 571 in DPG/Tasks/AOTTrack/PID/TOF/qaPIDTOFDynamic.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (!isTrackSelected<false>(collision, t)) {
continue;
}
Expand Down
Loading