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
6 changes: 2 additions & 4 deletions PWGUD/Tasks/upcEventITSROFcounter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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 warning on line 11 in PWGUD/Tasks/upcEventITSROFcounter.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.

Check warning on line 11 in PWGUD/Tasks/upcEventITSROFcounter.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \brief is missing, incorrect or misplaced.
#include "Framework/runDataProcessing.h"
#include "Framework/AnalysisTask.h"
#include "Framework/AnalysisDataModel.h"
Expand Down Expand Up @@ -56,8 +56,8 @@
histos.add("Events/hCountCollisionsInROFborderMatching", ";;Number of collision (-)", HistType::kTH1D, {{11, -0.5, 10.5}});
histos.add("Events/hCountUPCcollisionsInROFborderMatching", ";;Number of UPC (mult < 17) collision (-)", HistType::kTH1D, {{11, -0.5, 10.5}});

histos.add("Events/hPVcontribsVsCollisionsPerITSROFstd", "Collisions reconstructed with standard mode;Number of vertex contributors (-); Number of collisions in one ITSROF (-)", HistType::kTH2D, {{101, -0.5, 100.5},{11, -0.5, 10.5}});
histos.add("Events/hPVcontribsVsCollisionsPerITSROFupc", "Collisions reconstructed with upc mode;Number of vertex contributors (-); Number of collisions in one ITSROF (-)", HistType::kTH2D, {{101, -0.5, 100.5},{11, -0.5, 10.5}});
histos.add("Events/hPVcontribsVsCollisionsPerITSROFstd", "Collisions reconstructed with standard mode;Number of vertex contributors (-); Number of collisions in one ITSROF (-)", HistType::kTH2D, {{101, -0.5, 100.5}, {11, -0.5, 10.5}});
histos.add("Events/hPVcontribsVsCollisionsPerITSROFupc", "Collisions reconstructed with upc mode;Number of vertex contributors (-); Number of collisions in one ITSROF (-)", HistType::kTH2D, {{101, -0.5, 100.5}, {11, -0.5, 10.5}});

histos.add("Runs/hStdModeCollDG", ";Run number;Number of events (-)", HistType::kTH1D, {axisRunNumbers});
histos.add("Runs/hUpcModeCollDG", ";Run number;Number of events (-)", HistType::kTH1D, {axisRunNumbers});
Expand All @@ -84,7 +84,7 @@
int64_t ts = bcs.iteratorAt(0).timestamp();
auto alppar = ccdb->getForTimeStamp<o2::itsmft::DPLAlpideParam<0>>("ITS/Config/AlpideParam", ts);

for (auto bc : bcs) {

Check warning on line 87 in PWGUD/Tasks/upcEventITSROFcounter.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.
uint64_t globalBC = bc.globalBC();
uint64_t globalIndex = bc.globalIndex();
if (isFirst) {
Expand All @@ -104,7 +104,7 @@
previousBCinITSROF = bcInITSROF;
previousBCglobalIndex = globalIndex;
// next is based on exact matching of bc and collision
for (auto& collision : collisions) {

Check warning on line 107 in PWGUD/Tasks/upcEventITSROFcounter.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 (collision.has_foundBC()) {
if (collision.foundBCId() == bc.globalIndex()) {
nAllColls++;
Expand All @@ -125,10 +125,10 @@
int arrUPCcolls[1000] = {0};

// next is based on matching of collision bc within ITSROF range in bcs
for (auto& itsrofBorder : vecITSROFborders) {

Check warning on line 128 in PWGUD/Tasks/upcEventITSROFcounter.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.
int nAllCollsInROF = 0;
int nUpcCollsInROF = 0;
for (auto& collision : collisions) {

Check warning on line 131 in PWGUD/Tasks/upcEventITSROFcounter.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 ((itsrofBorder.first < collision.bcId()) && (collision.bcId() < itsrofBorder.second)) {
nAllCollsInROF++;
if (collision.numContrib() < nTracksForUPCevent + 1) {
Expand All @@ -147,10 +147,10 @@

// TEST vertex contributors per reconstruction flag (std vs upc)
// matching of collision bc within ITSROF range in bcs
for (auto& itsrofBorder : vecITSROFborders) {

Check warning on line 150 in PWGUD/Tasks/upcEventITSROFcounter.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.
std::vector<int> vecNumContribsStd;
std::vector<int> vecNumContribsUpc;
for (auto& collision : collisions) {

Check warning on line 153 in PWGUD/Tasks/upcEventITSROFcounter.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 ((itsrofBorder.first < collision.bcId()) && (collision.bcId() < itsrofBorder.second)) {
if (collision.flags() & dataformats::Vertex<o2::dataformats::TimeStamp<int>>::Flags::UPCMode) {
vecNumContribsUpc.push_back(collision.numContrib());
Expand All @@ -160,16 +160,14 @@
}
} // end loop over collisions

for (auto& numContribs : vecNumContribsStd) {

Check warning on line 163 in PWGUD/Tasks/upcEventITSROFcounter.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.get<TH2>(HIST("Events/hPVcontribsVsCollisionsPerITSROFstd"))->Fill(numContribs, vecNumContribsStd.size());
}
for (auto& numContribs : vecNumContribsUpc) {

Check warning on line 166 in PWGUD/Tasks/upcEventITSROFcounter.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.get<TH2>(HIST("Events/hPVcontribsVsCollisionsPerITSROFupc"))->Fill(numContribs, vecNumContribsUpc.size());
}

} // end loop over ITSROFs


}

void processCounterPerRun(FullSGUDCollision const& coll)
Expand Down
Loading