Skip to content
Closed
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Common/DataModel/FT0Corrected.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ DECLARE_SOA_DYNAMIC_COLUMN(T0ACorrectedValid, t0ACorrectedValid, //! Was T0ACorr
[](float t0) -> bool { return t0 < 1e9; });
DECLARE_SOA_DYNAMIC_COLUMN(T0CCorrectedValid, t0CCorrectedValid, //! Was T0CCorrected computable?
[](float t0) -> bool { return t0 < 1e9; });
DECLARE_SOA_DYNAMIC_COLUMN(T0resolution, t0resolution, //! Was T0CCorrected computable?
DECLARE_SOA_DYNAMIC_COLUMN(T0resolution, t0resolution, //! (T0ACorrected - T0CCorrected) / 2. FT0 time resoluition = std. dev. of this quantity's distribution. On event level, handle negative values as needed.
[](float t0A, float t0C) -> float { return 0.5f * (t0A - t0C); });
DECLARE_SOA_DYNAMIC_COLUMN(T0ACValid, t0ACValid, //! Was T0AC computable?
[](float t0a, float t0c) -> bool { return (t0a < 1e9) && (t0c < 1e9); });
Expand Down
13 changes: 13 additions & 0 deletions Common/Tasks/ft0Qa.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in Common/Tasks/ft0Qa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Provide mandatory file documentation.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand All @@ -8,7 +8,7 @@
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

Check failure on line 11 in Common/Tasks/ft0Qa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \author is missing, incorrect or misplaced.

Check failure on line 11 in Common/Tasks/ft0Qa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \brief is missing, incorrect or misplaced.

Check failure on line 11 in Common/Tasks/ft0Qa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.
#include <bitset>
#include "Common/DataModel/EventSelection.h"
#include "Common/DataModel/FT0Corrected.h"
Expand All @@ -26,7 +26,7 @@
using BCsWithRun3Matchings = soa::Join<aod::BCs, aod::BcSels, aod::Timestamps,
aod::Run3MatchedToBCSparse>;

struct ft0QaTask {

Check failure on line 29 in Common/Tasks/ft0Qa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/struct]

Use UpperCamelCase for names of structs.

// Configurable<bool> isMC{"isMC", 0, "0 - data, 1 - MC"};
Configurable<int> selection{"selection", 0, "trigger: 0 - no sel, 8 - sel8"};
Expand Down Expand Up @@ -78,6 +78,10 @@
histos.add("hT0AC", "T0AC;T0AC time (ns);counts", kTH1F, {axisTime});
histos.add("hT0res", "FT0 resolution", kTH1F, {axisColTimeRes});
histos.add("hColTime", "", kTH1F, {axisTime});
histos.add("hT0res_nContrib", "FT0 resolution vs. Ncontributors", kTH2F,
{axisColTimeRes, axisNcontrib});
histos.add("hT0res_MultT0AC", "FT0 resolution vs. T0AC multiplicity", kTH2F,
{axisColTimeRes, axisMultT0AC});

// FT0 vertex
histos.add("hT0vertex", "FT0 vertex;FT0 vertex (cm);counts", kTH1F,
Expand All @@ -103,6 +107,11 @@
histos.add("hPV_nContrib",
"PV vs. Ncontributers;primary vertex (cm);(# contrubutors)",
kTH2F, {axisVertex, axisNcontrib});
histos.add("hT0vertexDiff_vs_nContrib", "FT0V - PV vs. Ncontributors;FT0 vertex - PV (cm);# contrubutors",
kTH2F, {axisVertex, axisNcontrib});
histos.add("hT0vertexDiff_vs_MultT0AC",
"FT0V - PV vs. T0AC multiplicity;FT0 vertex - PV (cm);T0AC multiplicity (# ADC channels)",
kTH2F, {axisVertex, axisMultT0AC});

// FT0 amplitude and multiplicity
histos.add("hAmpT0A", "amplitude T0A;#ADC channels;counts", kTH1F,
Expand Down Expand Up @@ -235,7 +244,7 @@
aod::FT0s const&, aod::FV0As const&)
{

if (selection == 8 && !collision.sel8()) {

Check failure on line 247 in Common/Tasks/ft0Qa.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;
}

Expand Down Expand Up @@ -363,9 +372,13 @@
histos.fill(HIST("hVertex_T0_PV"), ft0.posZ(), collision.posZ());
histos.fill(HIST("hPV"), collision.posZ());
histos.fill(HIST("hT0res"), collision.t0resolution());
histos.fill(HIST("hT0res_nContrib"), collision.t0resolution(), nContrib);
histos.fill(HIST("hT0res_MultT0AC"), collision.t0resolution(), multFT0M);
histos.fill(HIST("hT0vertexDiff"), ft0.posZ() - collision.posZ());
histos.fill(HIST("hT0vertexDiff_vs_nContrib"), ft0.posZ() - collision.posZ(), nContrib);
histos.fill(HIST("hT0vertexDiff_vs_MultT0AC"), ft0.posZ() - collision.posZ(), multFT0M);

if (nContrib > 20) {

Check failure on line 381 in Common/Tasks/ft0Qa.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.fill(HIST("hVertex_T0_PV_nC20"), ft0.posZ(), collision.posZ());
histos.fill(HIST("hT0vertexDiff_nC20"),
Expand Down Expand Up @@ -433,11 +446,11 @@
cent = triggers[o2::ft0::Triggers::bitCen];
semicent = triggers[o2::ft0::Triggers::bitSCen];

for (auto amplitude : ft0.amplitudeA()) {

Check failure on line 449 in Common/Tasks/ft0Qa.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.
multFT0A += amplitude;
histos.fill(HIST("hBcAmpT0A"), amplitude);
}
for (auto amplitude : ft0.amplitudeC()) {

Check failure on line 453 in Common/Tasks/ft0Qa.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.
multFT0C += amplitude;
histos.fill(HIST("hBcAmpT0C"), amplitude);
}
Expand Down Expand Up @@ -516,5 +529,5 @@

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{adaptAnalysisTask<ft0QaTask>(cfgc, TaskName{"ft0-qa"})};

Check failure on line 532 in Common/Tasks/ft0Qa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-task]

Specified task name ft0-qa produces device name ft0-qa which does not match the device name ft0-qa-task from the struct name ft0QaTask. (Matching struct name Ft0Qa)
}
Loading