Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MegaLinter] Apply linters automatic fixes to #4282 #2

Closed
wants to merge 3 commits into from
Closed
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
32 changes: 31 additions & 1 deletion DPG/Tasks/AOTTrack/PID/qaPIDTPC.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ struct tpcPidQa {
static constexpr std::string_view hnsigma_pt[Np] = {"nsigma/pt/El", "nsigma/pt/Mu", "nsigma/pt/Pi",
"nsigma/pt/Ka", "nsigma/pt/Pr", "nsigma/pt/De",
"nsigma/pt/Tr", "nsigma/pt/He", "nsigma/pt/Al"};
static constexpr std::string_view hnsigma_eta[Np] = {"nsigma/eta/El", "nsigma/eta/Mu", "nsigma/eta/Pi",
"nsigma/eta/Ka", "nsigma/eta/Pr", "nsigma/eta/De",
"nsigma/eta/Tr", "nsigma/eta/He", "nsigma/eta/Al"};

// With TOF
static constexpr std::string_view hexpected_wTOF[Np] = {"wTOF/expected/El", "wTOF/expected/Mu", "wTOF/expected/Pi",
Expand All @@ -76,14 +79,17 @@ struct tpcPidQa {
static constexpr std::string_view hsignal_wTOF[Np] = {"wTOF/signal/El", "wTOF/signal/Mu", "wTOF/signal/Pi",
"wTOF/signal/Ka", "wTOF/signal/Pr", "wTOF/signal/De",
"wTOF/signal/Tr", "wTOF/signal/He", "wTOF/signal/Al"};
static constexpr std::string_view hnsigma_eta_wTOF[Np] = {"wTOF/nsigma/eta/El", "wTOF/nsigma/eta/Mu", "wTOF/nsigma/eta/Pi",
"wTOF/nsigma/eta/Ka", "wTOF/nsigma/eta/Pr", "wTOF/nsigma/eta/De",
"wTOF/nsigma/eta/Tr", "wTOF/nsigma/eta/He", "wTOF/nsigma/eta/Al"};

HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject};

Configurable<int> logAxis{"logAxis", 1, "Flag to use a log momentum axis"};
Configurable<int> nBinsP{"nBinsP", 3000, "Number of bins for the momentum"};
Configurable<float> minP{"minP", 0.01, "Minimum momentum in range"};
Configurable<float> maxP{"maxP", 20, "Maximum momentum in range"};
ConfigurableAxis etaBins{"etaBins", {100, -1.f, 1.f}, "Binning in eta"};
ConfigurableAxis etaBins{"etaBins", {50, -1.f, 1.f}, "Binning in eta"};
ConfigurableAxis phiBins{"phiBins", {100, 0, TMath::TwoPi()}, "Binning in eta"};
ConfigurableAxis trackLengthBins{"trackLengthBins", {100, 0, 1000.f}, "Binning in track length plot"};
ConfigurableAxis deltaBins{"deltaBins", {200, -1000.f, 1000.f}, "Binning in Delta (dEdx - expected dEdx)"};
Expand All @@ -96,6 +102,8 @@ struct tpcPidQa {
Configurable<bool> splitSignalPerCharge{"splitSignalPerCharge", true, "Split the signal per charge (reduces memory footprint if off)"};
Configurable<bool> enableDeDxPlot{"enableDeDxPlot", true, "Enables the dEdx plot (reduces memory footprint if off)"};
Configurable<int16_t> minTPCNcls{"minTPCNcls", 0, "Minimum number or TPC Clusters for tracks"};
ConfigurableAxis tpcNclsBins{"tpcNclsBins", {16, 0, 160}, "Bining in number of cluster in TPC"};
Configurable<bool> flagFourDemensionQA{"flagFourDemensionQA", false, "Flag to check the four dimension QA"};

template <o2::track::PID::ID id>
void initPerParticle(const AxisSpec& pAxis,
Expand Down Expand Up @@ -175,6 +183,14 @@ struct tpcPidQa {
const AxisSpec expSigmaAxis{expSigmaBins, Form("Exp_{#sigma}^{TPC}(%s)", pT[id])};
histos.add(hexpsigma[id].data(), "", kTH2F, {pAxis, expSigmaAxis});

const AxisSpec etaAxis{etaBins, "#it{#eta}"};
const AxisSpec tpcnclsAxis{tpcNclsBins, "TPC #cls"};

HistogramConfigSpec defaultParticleHists{HistType::kTHnSparseF, {pAxis, etaAxis, nSigmaAxis, tpcnclsAxis}};
if (flagFourDemensionQA) {
histos.add(hnsigma_eta[id].data(), axisTitle, defaultParticleHists);
}

if (!enableTOFHistos) { // Returning if the plots with TOF are not requested
return;
}
Expand All @@ -185,6 +201,12 @@ struct tpcPidQa {
histos.add(hdelta_pt_neg_wTOF[id].data(), "With TOF Negative", kTH2F, {ptAxis, deltaAxis});
histos.add(hexpsigma_wTOF[id].data(), "With TOF", kTH2F, {pAxis, expSigmaAxis});
histos.add(hnsigma_wTOF[id].data(), Form("With TOF %s", axisTitle), kTH2F, {pAxis, nSigmaAxis});

HistogramConfigSpec defaultParticleHists_wTOF{HistType::kTHnSparseF, {pAxis, etaAxis, nSigmaAxis, tpcnclsAxis}};
if (flagFourDemensionQA) {
histos.add(hnsigma_eta_wTOF[id].data(), Form("With TOF %s", axisTitle), defaultParticleHists_wTOF);
}

if (splitSignalPerCharge) {
histos.add(hnsigma_pt_wTOF[id].data(), Form("With TOF %s", axisTitle), kTH3F, {ptAxis, nSigmaAxis, chargeAxis});
histos.add(hsignal_wTOF[id].data(), "With TOF", kTH3F, {pAxis, dedxAxis, chargeAxis});
Expand Down Expand Up @@ -386,6 +408,11 @@ struct tpcPidQa {
// Fill histograms
histos.fill(HIST(hexpected[id]), t.tpcInnerParam(), t.tpcSignal() - diff);
histos.fill(HIST(hdelta[id]), t.tpcInnerParam(), diff);

if (flagFourDemensionQA) {
histos.fill(HIST(hnsigma_eta[id]), t.p(), t.eta(), nsigma, t.tpcNClsFindable());
}

if (splitSignalPerCharge) {
histos.fill(HIST(hdelta_pt[id]), t.pt(), diff, t.sign());
} else {
Expand All @@ -404,6 +431,9 @@ struct tpcPidQa {
const auto& nsigmatof = o2::aod::pidutils::tofNSigma<id>(t);
if (std::abs(nsigmatof) < 3.f) {
histos.fill(HIST(hnsigma_wTOF[id]), t.p(), nsigma);
if (flagFourDemensionQA) {
histos.fill(HIST(hnsigma_eta_wTOF[id]), t.p(), t.eta(), nsigma, t.tpcNClsFindable());
}
if (splitSignalPerCharge) {
histos.fill(HIST(hnsigma_pt_wTOF[id]), t.pt(), nsigma, t.sign());
histos.fill(HIST(hsignal_wTOF[id]), t.tpcInnerParam(), t.tpcSignal(), t.sign());
Expand Down
Loading