Skip to content

Commit 778a227

Browse files
Merge branch 'AliceO2Group:master' into master
2 parents 7ddb95e + 6ce17cb commit 778a227

56 files changed

Lines changed: 6439 additions & 6038 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.claude/commands/migrate-ccdb.md‎

Lines changed: 59 additions & 44 deletions
Large diffs are not rendered by default.

‎CODEOWNERS‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
/PWGCF/DataModel @alibuild @jgrosseo @jaelpark @victor-gonzalez @dsarkaralice @lauraser
3737
/PWGCF/TableProducer @alibuild @jgrosseo @jaelpark @victor-gonzalez @dsarkaralice @lauraser
3838
/PWGCF/Tasks @alibuild @jgrosseo @jaelpark @victor-gonzalez @dsarkaralice @lauraser
39-
/PWGCF/EbyEFluctuations @alibuild @SwatiSaha-1997 @isputows @victor-gonzalez @dsarkaralice @lauraser
39+
/PWGCF/EbyEFluctuations @alibuild @SwatiSaha-1997 @isputows @victor-gonzalez @dsarkaralice @lauraser @fsii
4040
/PWGCF/Femto @alibuild @lauraser @ariedel-cern @dimihayl @victor-gonzalez @dsarkaralice @wrzesaCERN
4141
/PWGCF/FemtoDream @alibuild @lauraser @ariedel-cern @dimihayl @victor-gonzalez @dsarkaralice @wrzesaCERN
4242
/PWGCF/Femto3D @alibuild @glromane @sofiatomassini @lauraser @dimihayl @victor-gonzalez @dsarkaralice @wrzesaCERN

‎DPG/Tasks/AOTEvent/eventSelectionQa.cxx‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,8 +1009,12 @@ struct EventSelectionQaTask {
10091009

10101010
// special check to avoid crashes (in particular, on some MC Pb-Pb datasets)
10111011
// (related to shifts in ambiguous tracks association to bc slices (off by 1) - see https://mattermost.web.cern.ch/alice/pl/g9yaaf3tn3g4pgn7c1yex9copy
1012-
if (ambTrId >= 0 && (ambTracks.iteratorAt(ambTrId).bcIds()[0] >= bcs.size()))
1013-
continue;
1012+
// an empty slice (-1, -1) passes the upper check, so test it as well
1013+
if (ambTrId >= 0) {
1014+
const auto& ambTrack = ambTracks.iteratorAt(ambTrId);
1015+
if (!ambTrack.has_bc() || ambTrack.bcIds()[0] >= bcs.size() || ambTrack.bcIds()[1] >= bcs.size())
1016+
continue;
1017+
}
10141018

10151019
int indexBc = ambTrId < 0 ? track.collision_as<ColEvSels>().bc_as<BCsRun3>().globalIndex() : ambTracks.iteratorAt(ambTrId).bc_as<BCsRun3>().begin().globalIndex();
10161020
auto bc = bcs.iteratorAt(indexBc);

‎PWGCF/EbyEFluctuations/Tasks/partNumFluc.cxx‎

Lines changed: 577 additions & 528 deletions
Large diffs are not rendered by default.

‎PWGCF/Femto/Core/cascadeBuilder.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ class CascadeBuilder
669669
}
670670

671671
template <typename T1, typename T2, typename T3, typename T4>
672-
void fillCascade(T1& collisionBuilder, T2& cascadeProducts, T3 const& cascade, T4 const& col, int bachelorIndex, int posDaughterIndex, int negDaughterIndex)
672+
void fillCascade(T1& collisionBuilder, T2& cascadeProducts, T3 const& cascade, T4 const& col, int64_t bachelorIndex, int64_t posDaughterIndex, int64_t negDaughterIndex)
673673
{
674674
float strangeTofBachelor = 0.f;
675675
float strangeTofPosDau = 0.f;

‎PWGCF/Femto/Core/cascadeHistManager.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ class CascadeHistManager
475475
this->fillAnalysis(cascadeCandidate);
476476
}
477477
if constexpr (modes::isFlagSet(mode, modes::Mode::kQa)) {
478-
this->fillQa(cascadeCandidate, bachelor, negDaughter, posDaughter);
478+
this->fillQa(cascadeCandidate, bachelor, posDaughter, negDaughter);
479479
}
480480
if constexpr (modes::isFlagSet(mode, modes::Mode::kMc)) {
481481
this->template fillMc<mode>(cascadeCandidate, col, mcParticles, mcMothers, mcPartonicMothers);

‎PWGCF/Femto/Core/collisionBuilder.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,9 @@ class CollisionBuilder
669669
template <modes::System system, typename T1, typename T2, typename T3, typename T4, typename T5>
670670
void initCollision(T1 const& bc, T2 const& col, T3 const& tracks, T4& ccdb, T5& histRegistry)
671671
{
672+
if (!mFillAnyTable) {
673+
return; // selection object was never configured (no collision table requested), applying selections would use an unset registry
674+
}
672675
if (mRunNumber != bc.runNumber()) {
673676
mRunNumber = bc.runNumber();
674677
if (mMagFieldForced == 0) {

‎PWGCF/Femto/Core/mcBuilder.h‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -149,18 +149,18 @@ class McBuilder
149149
mProduceMcParticles = utils::enableTable("FMcParticles_001", table.produceMcParticles.value, initContext);
150150
mProduceMcMothers = utils::enableTable("FMcMothers_001", table.produceMcMothers.value, initContext);
151151
mProduceMcPartonicMothers = utils::enableTable("FMcPartMoths_001", table.produceMcPartonicMothers.value, initContext);
152-
mProduceMcMotherLabels = utils::enableTable("FMcMotherLabels", table.producedMcMotherLabels.value, initContext);
153-
154-
mProduceCollisionLabels = utils::enableTable("FColLabels", table.producedCollisionLabels.value, initContext);
155-
mProduceTrackLabels = utils::enableTable("FTrackLabels", table.producedTrackLabels.value, initContext);
156-
mProduceLambdaLabels = utils::enableTable("FLambdaLabels", table.producedLambdaLabels.value, initContext);
157-
mProduceK0shortLabels = utils::enableTable("FK0shortLabels", table.producedK0shortLabels.value, initContext);
158-
mProduceD0Labels = utils::enableTable("FD0Labels", table.producedD0Labels.value, initContext);
159-
mProduceLcLabels = utils::enableTable("FLcLabels", table.producedLcLabels.value, initContext);
160-
mProduceSigmaLabels = utils::enableTable("FSigmaLabels", table.producedSigmaLabels.value, initContext);
161-
mProduceSigmaPlusLabels = utils::enableTable("FSigmaPlusLabels", table.producedSigmaPlusLabels.value, initContext);
162-
mProduceXiLabels = utils::enableTable("FXiLabels", table.producedXiLabels.value, initContext);
163-
mProduceOmegaLabels = utils::enableTable("FOmegaLabels", table.producedOmegaLabels.value, initContext);
152+
mProduceMcMotherLabels = utils::enableTable("FMcMotherLabels_001", table.producedMcMotherLabels.value, initContext);
153+
154+
mProduceCollisionLabels = utils::enableTable("FColLabels_001", table.producedCollisionLabels.value, initContext);
155+
mProduceTrackLabels = utils::enableTable("FTrackLabels_001", table.producedTrackLabels.value, initContext);
156+
mProduceLambdaLabels = utils::enableTable("FLambdaLabels_001", table.producedLambdaLabels.value, initContext);
157+
mProduceK0shortLabels = utils::enableTable("FK0shortLabels_001", table.producedK0shortLabels.value, initContext);
158+
mProduceD0Labels = utils::enableTable("FD0Labels_001", table.producedD0Labels.value, initContext);
159+
mProduceLcLabels = utils::enableTable("FLcLabels_001", table.producedLcLabels.value, initContext);
160+
mProduceSigmaLabels = utils::enableTable("FSigmaLabels_001", table.producedSigmaLabels.value, initContext);
161+
mProduceSigmaPlusLabels = utils::enableTable("FSigmaPlusLabels_001", table.producedSigmaPlusLabels.value, initContext);
162+
mProduceXiLabels = utils::enableTable("FXiLabels_001", table.producedXiLabels.value, initContext);
163+
mProduceOmegaLabels = utils::enableTable("FOmegaLabels_001", table.producedOmegaLabels.value, initContext);
164164

165165
if (mProduceMcCollisions || mProduceCollisionLabels ||
166166
mProduceMcParticles || mProduceMcMotherLabels ||

‎PWGCF/Femto/Core/pairBuilder.h‎

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -398,14 +398,6 @@ class PairV0V0Builder
398398
<< "). Overriding sameSpecies to false.";
399399
mSameSpecies = false;
400400
}
401-
} else {
402-
// same v0 species: both values are legitimate (e.g. lambda-lambda vs lambda-antilambda),
403-
// but running as different species only makes sense if the two selections are disjoint
404-
if (!mSameSpecies && confV0Selection1.sign.value == confV0Selection2.sign.value) {
405-
LOG(warn) << "sameSpecies=false for identical v0 species with identical sign ("
406-
<< confV0Selection1.sign.value << "). If both selections match the same "
407-
<< "candidates, this produces self-pairs and double counting.";
408-
}
409401
}
410402

411403
mColHistManager.template init<modeSe>(registry, colHistSpec, confCollisionBinning);
@@ -1910,17 +1902,17 @@ class PairTrackCascadeBuilder
19101902
}
19111903

19121904
template <modes::Mode mode, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
1913-
void processMixedEvent(T1 const& cols, T2& trackTable, T3& trackPartition, T4& v0Partition, T5& cache, T6& binsVtxMult, T7& binsVtxCent, T8& binsVtxMultCent)
1905+
void processMixedEvent(T1 const& cols, T2& trackTable, T3& trackPartition, T4& cascadePartition, T5& cache, T6& binsVtxMult, T7& binsVtxCent, T8& binsVtxMultCent)
19141906
{
19151907
switch (mMixingPolicy) {
19161908
case static_cast<int>(pairhistmanager::kVtxMult):
1917-
pairprocesshelpers::processMixedEvent<mode>(cols, trackPartition, v0Partition, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe);
1909+
pairprocesshelpers::processMixedEvent<mode>(cols, trackPartition, cascadePartition, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe);
19181910
break;
19191911
case static_cast<int>(pairhistmanager::kVtxCent):
1920-
pairprocesshelpers::processMixedEvent<mode>(cols, trackPartition, v0Partition, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe);
1912+
pairprocesshelpers::processMixedEvent<mode>(cols, trackPartition, cascadePartition, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe);
19211913
break;
19221914
case static_cast<int>(pairhistmanager::kVtxMultCent):
1923-
pairprocesshelpers::processMixedEvent<mode>(cols, trackPartition, v0Partition, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe);
1915+
pairprocesshelpers::processMixedEvent<mode>(cols, trackPartition, cascadePartition, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe);
19241916
break;
19251917
default:
19261918
LOG(fatal) << "Invalid binning policiy specifed. Breaking...";
@@ -2067,7 +2059,7 @@ class PairMcParticleMcParticleBuilder
20672059
bool processSameEvent(T1 const& col, T2 const& mcParticles, T3 const& mcMothers, T4 const& mcPartonicMothers, T5& partition1, T6& partition2, T7& cache)
20682060
{
20692061
if (mSameSpecies) {
2070-
auto mcParticleSlice = partition1->sliceByCached(o2::aod::femtomcparticle::fMcColId, col.globalIndex(), cache);
2062+
auto mcParticleSlice = partition1->sliceByCachedUnsorted(o2::aod::femtomcparticle::fMcColId, col.globalIndex(), cache);
20712063

20722064
if (mcParticleSlice.size() < nLimitPartitionIdenticalParticles) {
20732065
return false;
@@ -2080,8 +2072,8 @@ class PairMcParticleMcParticleBuilder
20802072
return pairprocesshelpers::processSameEvent<mode>(mcParticleSlice, mcParticles, mcMothers, mcPartonicMothers, col, mMcParticleHistManager1, mPairHistManagerSe, mMcParticleCleaner1, mCprSe, mPcSe, pairOrder);
20812073
}
20822074

2083-
auto mcParticleSlice1 = partition1->sliceByCached(o2::aod::femtomcparticle::fMcColId, col.globalIndex(), cache);
2084-
auto mcParticleSlice2 = partition2->sliceByCached(o2::aod::femtomcparticle::fMcColId, col.globalIndex(), cache);
2075+
auto mcParticleSlice1 = partition1->sliceByCachedUnsorted(o2::aod::femtomcparticle::fMcColId, col.globalIndex(), cache);
2076+
auto mcParticleSlice2 = partition2->sliceByCachedUnsorted(o2::aod::femtomcparticle::fMcColId, col.globalIndex(), cache);
20852077
if (mcParticleSlice1.size() < nLimitPartitionParticles || mcParticleSlice2.size() < nLimitPartitionParticles) {
20862078
return false;
20872079
}

‎PWGCF/Femto/Core/pairProcessHelpers.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ void processMixedEvent(T1 const& Collisions,
667667
int windowSizeRaw = 0;
668668
int windowSizeEffective = 0;
669669

670-
std::optional<decltype(Partition1->sliceByCached(o2::aod::femtomcparticle::fMcColId, 0, cache))> sliceParticle1;
670+
std::optional<decltype(Partition1->sliceByCachedUnsorted(o2::aod::femtomcparticle::fMcColId, 0, cache))> sliceParticle1;
671671

672672
for (auto const& [collision1, collision2] : o2::soa::selfCombinations(policy, depth, -1, Collisions, Collisions)) {
673673

@@ -678,12 +678,12 @@ void processMixedEvent(T1 const& Collisions,
678678
windowSizeRaw = 0;
679679
windowSizeEffective = 0;
680680
lastCollisionIndex = collision1.globalIndex();
681-
sliceParticle1.emplace(Partition1->sliceByCached(o2::aod::femtomcparticle::fMcColId, collision1.globalIndex(), cache));
681+
sliceParticle1.emplace(Partition1->sliceByCachedUnsorted(o2::aod::femtomcparticle::fMcColId, collision1.globalIndex(), cache));
682682
}
683683

684684
++windowSizeRaw;
685685

686-
auto sliceParticle2 = Partition2->sliceByCached(o2::aod::femtomcparticle::fMcColId, collision2.globalIndex(), cache);
686+
auto sliceParticle2 = Partition2->sliceByCachedUnsorted(o2::aod::femtomcparticle::fMcColId, collision2.globalIndex(), cache);
687687

688688
PairHistManager.resetTrackedParticlesPerEvent();
689689

0 commit comments

Comments
 (0)