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
4 changes: 2 additions & 2 deletions PWGLF/Tasks/Resonances/k892hadronphotonBkg.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 PWGLF/Tasks/Resonances/k892hadronphotonBkg.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -36,24 +36,24 @@
#include <Framework/AnalysisDataModel.h>
#include <Framework/AnalysisHelpers.h>
#include <Framework/AnalysisTask.h>
#include <Framework/BinningPolicy.h>
#include <Framework/Configurable.h>
#include <Framework/HistogramRegistry.h>
#include <Framework/HistogramSpec.h>
#include <Framework/InitContext.h>
#include <Framework/OutputObjHeader.h>
#include <Framework/runDataProcessing.h>
#include "Framework/BinningPolicy.h"

#include <Math/Vector4D.h>
#include <TH1.h>
#include <TRandom3.h>

#include <array>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <string>
#include <vector>
#include <cstddef>

using namespace o2;
using namespace o2::framework;
Expand Down Expand Up @@ -334,7 +334,7 @@
}
if (fillHists)
histos.fill(HIST("hEventSelection"), 16 /* INEL > 0 */);
if (eventSelections.requireINEL1 && collision.multNTracksPVeta1() < 2) {

Check failure on line 337 in PWGLF/Tasks/Resonances/k892hadronphotonBkg.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 false;
}
if (fillHists)
Expand Down Expand Up @@ -534,10 +534,10 @@
return;

const float centrality = doPPAnalysis ? coll.centFT0M() : coll.centFT0C();
for (int kIdx : kshortIndices) {

Check failure on line 537 in PWGLF/Tasks/Resonances/k892hadronphotonBkg.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.
auto kshort = fullV0s.rawIteratorAt(kIdx);

for (int pIdx : photonIndices) {

Check failure on line 540 in PWGLF/Tasks/Resonances/k892hadronphotonBkg.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.
auto photon = fullV0s.rawIteratorAt(pIdx);

// photon as a massless 4-vector
Expand Down Expand Up @@ -631,7 +631,7 @@
// the framework applies JSON overrides), silently ignoring user configuration.
BkgBinningType bkgColBinning{{axisVertexMixBkg, axisCentralityMixBkg}, true};

for (auto& [coll1, coll2] : selfCombinations(bkgColBinning, kstarBkgConfig.nMix, -1,

Check failure on line 634 in PWGLF/Tasks/Resonances/k892hadronphotonBkg.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.
collisions, collisions)) {
if (coll1.globalIndex() == coll2.globalIndex())
continue;
Expand All @@ -651,7 +651,7 @@

// K0s(coll1) × γ(coll2)
if (!kshorts1.empty() && !photons2.empty()) {
for (int kIdx : kshorts1) {

Check failure on line 654 in PWGLF/Tasks/Resonances/k892hadronphotonBkg.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.
auto kshort = fullV0s.rawIteratorAt(kIdx);
float kP = std::hypot(kshort.px(), kshort.py(), kshort.pz());
ROOT::Math::PxPyPzEVector fourMomKShort(
Expand All @@ -660,7 +660,7 @@
o2::constants::physics::MassK0Short *
o2::constants::physics::MassK0Short));

for (int pIdx : photons2) {

Check failure on line 663 in PWGLF/Tasks/Resonances/k892hadronphotonBkg.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.
auto photon = fullV0s.rawIteratorAt(pIdx);
float pP = std::hypot(photon.px(), photon.py(), photon.pz());
ROOT::Math::PxPyPzEVector fourMomPhoton(
Expand Down Expand Up @@ -698,13 +698,13 @@

// γ(coll1) × K0s(coll2)
if (!photons1.empty() && !kshorts2.empty()) {
for (int pIdx : photons1) {

Check failure on line 701 in PWGLF/Tasks/Resonances/k892hadronphotonBkg.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.
auto photon = fullV0s.rawIteratorAt(pIdx);
float pP = std::hypot(photon.px(), photon.py(), photon.pz());
ROOT::Math::PxPyPzEVector fourMomPhoton(
photon.px(), photon.py(), photon.pz(), pP);

for (int kIdx : kshorts2) {

Check failure on line 707 in PWGLF/Tasks/Resonances/k892hadronphotonBkg.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.
auto kshort = fullV0s.rawIteratorAt(kIdx);
float kP = std::hypot(kshort.px(), kshort.py(), kshort.pz());
ROOT::Math::PxPyPzEVector fourMomKShort(
Expand Down
Loading