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
29 changes: 18 additions & 11 deletions PWGLF/Tasks/GlobalEventProperties/ucc-zdc-analysis.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 warning on line 1 in PWGLF/Tasks/GlobalEventProperties/ucc-zdc-analysis.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 @@ -11,7 +11,7 @@
///
/// \brief This task is an empty skeleton that fills a simple eta histogram.
/// it is meant to be a blank page for further developments.
/// \author everyone

Check warning on line 14 in PWGLF/Tasks/GlobalEventProperties/ucc-zdc-analysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.

#include "Common/CCDB/EventSelectionParams.h"
#include "Common/CCDB/TriggerAliases.h"
Expand Down Expand Up @@ -39,8 +39,8 @@
struct UCCZDC {
// Configurable number of bins
Configurable<int> nBinsAmp{"nBinsAmp", 1025, "nbinsAmp"};
Configurable<float> MaxZN{"MaxZN", 4099.5, "Max ZN signal"};

Check warning on line 42 in PWGLF/Tasks/GlobalEventProperties/ucc-zdc-analysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
Configurable<float> MaxZP{"MaxZP", 3099.5, "Max ZP signal"};

Check warning on line 43 in PWGLF/Tasks/GlobalEventProperties/ucc-zdc-analysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
Configurable<float> MaxZEM{"MaxZEM", 3099.5, "Max ZEM signal"};
Configurable<int> nBinsTDC{"nBinsTDC", 480, "nbinsTDC"};

Expand All @@ -51,9 +51,12 @@

// Histogram registry: an object to hold your histograms
HistogramRegistry histos{
"histos", {}, OutputObjHandlingPolicy::AnalysisObject};
"histos",
{},
OutputObjHandlingPolicy::AnalysisObject};

void init(InitContext const&) {
void init(InitContext const&)
{
// define axes you want to use
const AxisSpec axisEvent{3, 0., +3.0, ""};
const AxisSpec axisEta{30, -1.5, +1.5, "#eta"};
Expand Down Expand Up @@ -131,10 +134,11 @@
}

void processZdcCollAss(
ColEvSels const& cols, BCsRun3 const& /*bcs*/, aod::Zdcs const& /*zdcs*/,
aod::FV0As const& /*fv0as*/, aod::FT0s const& /*ft0s*/,
soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA> const& tracks) {
ColEvSels const& cols, BCsRun3 const& /*bcs*/, aod::Zdcs const& /*zdcs*/,
aod::FV0As const& /*fv0as*/, aod::FT0s const& /*ft0s*/,
soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA> const& tracks)
{
for (auto& collision : cols) {

Check warning on line 141 in PWGLF/Tasks/GlobalEventProperties/ucc-zdc-analysis.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.
histos.fill(HIST("hEventCounter"), 0.5);
if (!collision.sel8()) {
return;
Expand Down Expand Up @@ -164,10 +168,10 @@
float multV0A{0.};

if (foundBC.has_ft0()) {
for (auto amplitude : foundBC.ft0().amplitudeA()) {

Check warning on line 171 in PWGLF/Tasks/GlobalEventProperties/ucc-zdc-analysis.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.
multT0A += amplitude;
}
for (auto amplitude : foundBC.ft0().amplitudeC()) {

Check warning on line 174 in PWGLF/Tasks/GlobalEventProperties/ucc-zdc-analysis.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.
multT0C += amplitude;
}
} else {
Expand All @@ -175,7 +179,7 @@
}

if (foundBC.has_fv0a()) {
for (auto amplitude : foundBC.fv0a().amplitude()) {

Check warning on line 182 in PWGLF/Tasks/GlobalEventProperties/ucc-zdc-analysis.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.
multV0A += amplitude;
}
} else {
Expand Down Expand Up @@ -205,14 +209,16 @@
histos.get<TH2>(HIST("debunch"))->Fill(tZNA - tZNC, tZNA + tZNC);

histos.get<TH2>(HIST("ZNvsFV0Acorrel"))
->Fill(multV0A / 100., aZNA + aZNC);
->Fill(multV0A / 100., aZNA + aZNC);
histos.get<TH2>(HIST("ZNvsFT0correl"))
->Fill((multT0A + multT0C) / 100., aZNC + aZNA);
} // foundBC.has_zdc()
->Fill((multT0A + multT0C) / 100., aZNC + aZNA);
} // foundBC.has_zdc()

for (auto& track : tracks) {

Check warning on line 217 in PWGLF/Tasks/GlobalEventProperties/ucc-zdc-analysis.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 (track.tpcNClsCrossedRows() < 70) continue;
if (fabs(track.dcaXY()) > 0.2) continue;
if (track.tpcNClsCrossedRows() < 70)
continue;
if (fabs(track.dcaXY()) > 0.2)

Check warning on line 220 in PWGLF/Tasks/GlobalEventProperties/ucc-zdc-analysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
continue;

histos.fill(HIST("etaHistogram"), track.eta());
}
Expand Down Expand Up @@ -281,6 +287,7 @@
// "Processing ZDC vs. mult. w. collision association", true);
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) {
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{adaptAnalysisTask<UCCZDC>(cfgc)};
}
Loading