Skip to content

Commit 751707b

Browse files
Solved errors and warnings
1 parent 57dda23 commit 751707b

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

‎PWGLF/TableProducer/Strangeness/doubleOmegaTreeCreator.cxx‎

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ struct doubleOmegaTreeCreator {
865865
void mix(CollisionCandidates const& reference, CollisionCandidates const& omegaSource,
866866
CollisionCandidates const& lambdaSource, CollisionCandidates const& kaonSource, MixingType mixingType)
867867
{
868-
if (!(mixingOpts.mixingTypes & (1 << (mixingType - 1)))) {
868+
if ((mixingOpts.mixingTypes & (1 << (mixingType - 1))) == 0) {
869869
return;
870870
}
871871
helper.combine(reference, omegaSource, lambdaSource, kaonSource, [&](DoubleOmegaCandidate const& cand, auto const&...) {
@@ -1304,7 +1304,13 @@ struct doubleOmegaTreeCreator {
13041304
MixingSeed makeSeed(int64_t collisionId, CollisionCandidates const& candidates, BuiltOmegaCandidate const& omega,
13051305
BuiltLambdaCandidate const& lambda, BuiltKaonCandidate const& kaon) const
13061306
{
1307-
return {uniqueIndex(collisionId), candidates.primaryVertex, candidates.runNumber, candidates.bz, omega, lambda, kaon};
1307+
return MixingSeed{.collisionId = uniqueIndex(collisionId),
1308+
.primaryVertex = candidates.primaryVertex,
1309+
.runNumber = candidates.runNumber,
1310+
.bz = candidates.bz,
1311+
.omega = omega,
1312+
.lambda = lambda,
1313+
.kaon = kaon};
13081314
}
13091315

13101316
// Mixed candidates whose reference seed was recorded with a field different from the current one:
@@ -1345,7 +1351,7 @@ struct doubleOmegaTreeCreator {
13451351
void mixSeedDaughters(MixingSeed const& reference, BuiltOmegaCandidate const& omega, BuiltLambdaCandidate const& lambda,
13461352
BuiltKaonCandidate const& kaon, MixingType mixingType, std::set<MixedCombination>& written)
13471353
{
1348-
if (!(mixingOpts.mixingTypes & (1 << (mixingType - 1)))) {
1354+
if ((mixingOpts.mixingTypes & (1 << (mixingType - 1))) == 0) {
13491355
return;
13501356
}
13511357
const MixedCombination combination{omega.posTrackId, omega.negTrackId, omega.bachelorId, lambda.posTrackId, lambda.negTrackId, kaon.trackId};
@@ -1422,7 +1428,7 @@ struct doubleOmegaTreeCreator {
14221428
partners.push_back(&*partner);
14231429
mixSeedPair(seed, *partner, written);
14241430
}
1425-
if (!(mixingOpts.mixingTypes & (1 << (kMixedAll - 1)))) {
1431+
if ((mixingOpts.mixingTypes & (1 << (kMixedAll - 1))) == 0) {
14261432
return;
14271433
}
14281434
for (std::size_t j = 0; j < partners.size(); ++j) {
@@ -1465,9 +1471,9 @@ struct doubleOmegaTreeCreator {
14651471
buildDeferredMixes();
14661472
initCCDBForDerived(candidates.runNumber, candidates.bz);
14671473
}
1468-
for (auto& [key, seed] : newSeeds) {
1474+
for (const auto& [key, seed] : newSeeds) {
14691475
auto& pool = mSeedPool[key];
1470-
pool.push_back(std::move(seed));
1476+
pool.push_back(seed);
14711477
++mPoolSeeds;
14721478
if (pool.size() > poolDepth) {
14731479
pool.pop_front();
@@ -1661,7 +1667,7 @@ struct doubleOmegaTreeCreator {
16611667
addPairJobs(jobs, collision0.globalIndex(), collision1.globalIndex(), relation);
16621668
}
16631669

1664-
if (mixingOpts.mixingTypes & (1 << (kMixedAll - 1))) {
1670+
if (mixingOpts.mixingTypes & (1 << (kMixedAll - 1)) != 0) {
16651671
for (const auto& [collision0, collision1, collision2] : selfTripleCombinations(binning, mixingOpts.nMixingCollisions, -1, collisions)) {
16661672
histos.fill(HIST("Mixing/hMixedCollisions"), 2);
16671673
const auto [minPVz, maxPVz] = std::minmax({collision0.posZ(), collision1.posZ(), collision2.posZ()});

0 commit comments

Comments
 (0)