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
8 changes: 4 additions & 4 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 @@ -86,8 +86,8 @@
Configurable<bool> doEvtMixing{"doEvtMixing", false, "Mixed-event background"};
Configurable<int> nMix{"nMix", 5, "Number of mixed events"};
Configurable<int> deltaCollision{"deltaCollision", 25, "Min |Δ globalIndex| for mixing"};
Configurable<float> KStarMaxOPAngle{"KStarMaxOPAngle", 7.f, "Max opening angle (rad)"};

Check failure on line 89 in PWGLF/Tasks/Resonances/k892hadronphotonBkg.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
Configurable<float> KStarMaxRap{"KStarMaxRap", 0.5f, "Max |y(K*)|"};

Check failure on line 90 in PWGLF/Tasks/Resonances/k892hadronphotonBkg.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
Configurable<int> nBkgRot{"nBkgRot", 3, "Rotations per pair (rotational bkg)"};
Configurable<int> rotationalCut{"rotationalCut", 10, "theta band: [pi - pi/cut, pi + pi/cut]"};
} kstarBkgConfig;
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,14 +534,14 @@
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);

float kPt = kshort.pt();
float kEta = kshort.eta();
float kPhi = kshort.phi();

for (int pIdx : photonIndices) {

Check failure on line 544 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 @@ -635,7 +635,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 638 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 @@ -647,15 +647,15 @@

if (std::abs(static_cast<int64_t>(coll1.globalIndex()) - static_cast<int64_t>(coll2.globalIndex())) < kstarBkgConfig.deltaCollision)
continue;
xww
auto const& photons1 = photonPool[coll1.globalIndex()];
xww auto const& photons1 = photonPool[coll1.globalIndex()];
auto const& kshorts1 = kshortPool[coll1.globalIndex()];
auto const& photons2 = photonPool[coll2.globalIndex()];
auto const& kshorts2 = kshortPool[coll2.globalIndex()];

// K0s(coll1) × γ(coll2)
if (!kshorts1.empty() && !photons2.empty()) {xw
for (int kIdx : kshorts1) {
if (!kshorts1.empty() && !photons2.empty()) {
xw for (int kIdx : kshorts1)
{
auto kshort = fullV0s.rawIteratorAt(kIdx);
float kP = std::hypot(kshort.px(), kshort.py(), kshort.pz());
ROOT::Math::PxPyPzEVector FourMomKShort(
Expand All @@ -664,7 +664,7 @@
o2::constants::physics::MassK0Short *
o2::constants::physics::MassK0Short));

for (int pIdx : photons2) {

Check failure on line 667 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 @@ -702,13 +702,13 @@

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

Check failure on line 705 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 711 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