Skip to content
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
18 changes: 9 additions & 9 deletions Tutorials/PWGUD/timeScan.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

/// \file timeScan.cxx
/// \brief Example task to scan data vs time TF-by-TF in single AO2D.root
/// Run as: o2-analysis-ud-time-structure --aod-file AO2D.root
/// Run as: o2-analysis-ud-time-structure --aod-file AO2D.root
/// Filling 1D histos (fill1D=1) might require large shm size: --shm-segment-size 14000000000
/// \author Evgeny Kryshen

Expand All @@ -34,8 +34,8 @@
#include <TH2.h>
#include <TString.h>

#include <cstdint>
#include <bitset>
#include <cstdint>
#include <map>
#include <memory>
#include <numeric>
Expand Down Expand Up @@ -132,7 +132,7 @@ struct TimeScan {
LOGP(debug, "Fill maps of 1D histograms for new TF");
const AxisSpec axisBCinTF{nBCsPerTF, 0., static_cast<double>(nBCsPerTF), "BC in TF"};
mapHistoCollidingBCs[tfID] = histosCollidingBCs.add<TH1>(Form("%d/hCollidingBCs", tfID), "Colliding BCs", HistType::kTH1D, {axisBCinTF});
if (fill1D>0) {
if (fill1D > 0) {
mapHistoBCs[tfID] = histosBCs.add<TH1>(Form("%d/hBCs", tfID), "Non-empty BCs", HistType::kTH1D, {axisBCinTF});
mapHistoCols[tfID] = histosCols.add<TH1>(Form("%d/hCols", tfID), "Number of contributors", HistType::kTH1D, {axisBCinTF});
mapHistoFT0A[tfID] = histosFT0A.add<TH1>(Form("%d/hFT0A", tfID), "FT0A amplitude", HistType::kTH1D, {axisBCinTF});
Expand Down Expand Up @@ -161,7 +161,7 @@ struct TimeScan {
const int32_t bcInTF = (globalBC - bcSOR) % nBCsPerTF;
LOGP(debug, "globalBC={} tfID={} bcInTF={}", globalBC, tfID, bcInTF);
histos.get<TH2>(HIST("hBCs"))->Fill(Form("%d", tfID), bcInTF, 1.);
if (fill1D>0) {
if (fill1D > 0) {
mapHistoBCs[tfID]->Fill(bcInTF);
}
}
Expand All @@ -175,7 +175,7 @@ struct TimeScan {
LOGP(debug, "globalBC={} nContributors={}", globalBC, nContributors);
histos.get<TH2>(HIST("hCols"))->Fill(Form("%d", tfID), bcInTF, nContributors);
histos.get<TH1>(HIST("hNumContrib"))->Fill(nContributors);
if (fill1D>0) {
if (fill1D > 0) {
mapHistoCols[tfID]->Fill(bcInTF, nContributors);
}
}
Expand All @@ -192,7 +192,7 @@ struct TimeScan {
histos.get<TH2>(HIST("hFT0C"))->Fill(Form("%d", tfID), bcInTF, sumAmpFT0C);
histos.get<TH1>(HIST("hSumAmpFT0A"))->Fill(sumAmpFT0A);
histos.get<TH1>(HIST("hSumAmpFT0C"))->Fill(sumAmpFT0C);
if (fill1D>0) {
if (fill1D > 0) {
mapHistoFT0A[tfID]->Fill(bcInTF, sumAmpFT0A);
mapHistoFT0C[tfID]->Fill(bcInTF, sumAmpFT0C);
}
Expand All @@ -207,7 +207,7 @@ struct TimeScan {
LOGP(debug, "globalBC={} sumAmpFV0A={}", globalBC, sumAmpFV0A);
histos.get<TH2>(HIST("hFV0A"))->Fill(Form("%d", tfID), bcInTF, sumAmpFV0A);
histos.get<TH1>(HIST("hSumAmpFV0A"))->Fill(sumAmpFV0A);
if (fill1D>0) {
if (fill1D > 0) {
mapHistoFV0A[tfID]->Fill(bcInTF, sumAmpFV0A);
}
}
Expand All @@ -224,7 +224,7 @@ struct TimeScan {
histos.get<TH2>(HIST("hFDDC"))->Fill(Form("%d", tfID), bcInTF, sumAmpFDDC);
histos.get<TH1>(HIST("hSumAmpFDDA"))->Fill(sumAmpFDDA);
histos.get<TH1>(HIST("hSumAmpFDDC"))->Fill(sumAmpFDDC);
if (fill1D>0) {
if (fill1D > 0) {
mapHistoFDDA[tfID]->Fill(bcInTF, sumAmpFDDA);
mapHistoFDDC[tfID]->Fill(bcInTF, sumAmpFDDC);
}
Expand All @@ -242,7 +242,7 @@ struct TimeScan {
histos.get<TH2>(HIST("hZNC"))->Fill(Form("%d", tfID), bcInTF, sumAmpZNC);
histos.get<TH1>(HIST("hSumAmpZNA"))->Fill(sumAmpZNA);
histos.get<TH1>(HIST("hSumAmpZNC"))->Fill(sumAmpZNC);
if (fill1D>0) {
if (fill1D > 0) {
mapHistoZNA[tfID]->Fill(bcInTF, sumAmpZNA);
mapHistoZNC[tfID]->Fill(bcInTF, sumAmpZNC);
}
Expand Down
Loading