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
8 changes: 4 additions & 4 deletions PWGCF/FemtoDream/Tasks/femtoDreamPairTaskV0V0.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2025 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGCF/FemtoDream/Tasks/femtoDreamPairTaskV0V0.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-process]

Use constant references for table subscriptions in process functions.
// 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 @@ -276,7 +276,7 @@
template <bool isMC, typename PartitionType, typename PartType, typename Collision>
void doSameEvent(PartitionType SliceV01, PartitionType SliceV02, PartType parts, Collision col)
{
for (auto& v0 : SliceV01) {

Check failure on line 279 in PWGCF/FemtoDream/Tasks/femtoDreamPairTaskV0V0.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.
const auto& posChild = parts.iteratorAt(v0.index() - 2);
const auto& negChild = parts.iteratorAt(v0.index() - 1);
if (((posChild.cut() & V01.ChildPos_CutBit) == V01.ChildPos_CutBit) &&
Expand All @@ -292,7 +292,7 @@
/// Now build the combinations
float rand = 0.;
if (Option.SameSpecies.value) {
for (auto& [p1, p2] : combinations(CombinationsStrictlyUpperIndexPolicy(SliceV01, SliceV02))) {

Check failure on line 295 in PWGCF/FemtoDream/Tasks/femtoDreamPairTaskV0V0.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.
const auto& posChild_1 = parts.iteratorAt(p1.index() - 2);
const auto& negChild_1 = parts.iteratorAt(p1.index() - 1);
const auto& posChild_2 = parts.iteratorAt(p2.index() - 2);
Expand Down Expand Up @@ -321,7 +321,7 @@
if (Option.RandomizePair.value) {
rand = random->Rndm();
}
if (rand <= 0.5) {

Check failure on line 324 in PWGCF/FemtoDream/Tasks/femtoDreamPairTaskV0V0.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.
sameEventCont.setPair<isMC>(p1, p2, col.multNtr(), col.multV0M(), Option.Use4D, Option.ExtendedPlots, Option.SmearingByOrigin);
} else {
sameEventCont.setPair<isMC>(p2, p1, col.multNtr(), col.multV0M(), Option.Use4D, Option.ExtendedPlots, Option.SmearingByOrigin);
Expand All @@ -329,7 +329,7 @@
}
}
} else {
for (auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(SliceV01, SliceV02))) {

Check failure on line 332 in PWGCF/FemtoDream/Tasks/femtoDreamPairTaskV0V0.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 (Option.CPROn.value) {
if (pairCloseRejectionSE.isClosePair(p1, p2, parts, col.magField())) {
continue;
Expand All @@ -349,7 +349,7 @@
/// process function for to call doSameEvent with Data
/// \param col subscribe to the collision table (Data)
/// \param parts subscribe to the femtoDreamParticleTable
void processSameEvent(FilteredCollision& col, o2::aod::FDParticles& parts)

Check failure on line 352 in PWGCF/FemtoDream/Tasks/femtoDreamPairTaskV0V0.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-process]

Argument o2::aod::FDParticles& parts is not const&.

Check failure on line 352 in PWGCF/FemtoDream/Tasks/femtoDreamPairTaskV0V0.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-process]

Argument FilteredCollision& col is not const&.
{
fillCollision<false>(col);
auto SliceV01 = PartitionV01->sliceByCached(aod::femtodreamparticle::fdCollisionId, col.globalIndex(), cache);
Expand All @@ -370,11 +370,11 @@
if (SliceV01.size() == 0 || SliceV02.size() == 0) {
continue;
}
for (auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(SliceV01, SliceV02))) {

Check failure on line 373 in PWGCF/FemtoDream/Tasks/femtoDreamPairTaskV0V0.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.
const auto& posChild_1 = parts.iteratorAt(p1.index() - 2);
const auto& negChild_1 = parts.iteratorAt(p1.index() - 1);
const auto& posChild_2 = parts.iteratorAt(p2.index() - 2);
const auto& negChild_2 = parts.iteratorAt(p2.index() - 1);
const auto& posChild_1 = parts.iteratorAt(p1.globalIndex() - 2);
const auto& negChild_1 = parts.iteratorAt(p1.globalIndex() - 1);
const auto& posChild_2 = parts.iteratorAt(p2.globalIndex() - 2);
const auto& negChild_2 = parts.iteratorAt(p2.globalIndex() - 1);
if (((posChild_1.cut() & V01.ChildPos_CutBit) == V01.ChildPos_CutBit) &&
((posChild_1.pidcut() & V01.ChildPos_TPCBit) == V01.ChildPos_TPCBit) &&
((negChild_1.cut() & V01.ChildNeg_CutBit) == V01.ChildNeg_CutBit) &&
Expand All @@ -398,7 +398,7 @@
/// process function for to call doMixedEvent with Data
/// @param cols subscribe to the collisions table (Data)
/// @param parts subscribe to the femtoDreamParticleTable
void processMixedEvent(FilteredCollisions& cols, o2::aod::FDParticles& parts)

Check failure on line 401 in PWGCF/FemtoDream/Tasks/femtoDreamPairTaskV0V0.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-process]

Argument o2::aod::FDParticles& parts is not const&.

Check failure on line 401 in PWGCF/FemtoDream/Tasks/femtoDreamPairTaskV0V0.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-process]

Argument FilteredCollisions& cols is not const&.
{
switch (Mixing.Policy.value) {
case femtodreamcollision::kMult:
Expand Down
Loading