Skip to content

Commit faf8b2a

Browse files
Merge branch 'AliceO2Group:master' into master
2 parents 8c1915a + 5bc86da commit faf8b2a

147 files changed

Lines changed: 10127 additions & 3914 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.

ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ struct OnTheFlyTracker {
8181
Produces<aod::UpgradeCascades> upgradeCascades;
8282

8383
// optionally produced, empty (to be tuned later)
84-
Produces<aod::StoredTracksExtra> tracksExtra; // base table, extend later
84+
Produces<aod::StoredTracksExtra_001> tracksExtra; // base table, extend later
8585
Produces<aod::TrackSelection> trackSelection;
8686
Produces<aod::TrackSelectionExtension> trackSelectionExtension;
8787

ALICE3/TableProducer/alice3-multicharm.cxx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -499,15 +499,14 @@ struct alice3multicharm {
499499
continue; // do not take if radius too small, likely a primary combination
500500

501501
o2::dataformats::DCA dcaInfo;
502-
float xicdcaXY = 1e+10, xicdcaZ = 1e+10;
502+
float xicdcaXY = 1e+10;
503503
o2::track::TrackParCov xicTrackCopy(xicTrack); // paranoia
504504

505505
o2::vertexing::PVertex primaryVertex;
506506
primaryVertex.setXYZ(collision.posX(), collision.posY(), collision.posZ());
507507

508508
if (xicTrackCopy.propagateToDCA(primaryVertex, magneticField, &dcaInfo)) {
509509
xicdcaXY = dcaInfo.getY();
510-
xicdcaZ = dcaInfo.getZ();
511510
}
512511

513512
histos.fill(HIST("hMassXiC"), thisXiCcandidate.mass);
@@ -543,10 +542,9 @@ struct alice3multicharm {
543542

544543
o2::track::TrackParCov xiccTrack(thisXiCCcandidate.xyz, momentumCC, thisXiCCcandidate.parentTrackCovMatrix, +2);
545544

546-
float xiccdcaXY = 1e+10, xiccdcaZ = 1e+10;
545+
float xiccdcaXY = 1e+10;
547546
if (xiccTrack.propagateToDCA(primaryVertex, magneticField, &dcaInfo)) {
548547
xiccdcaXY = dcaInfo.getY();
549-
xiccdcaZ = dcaInfo.getZ();
550548
}
551549

552550
// produce multi-charm table for posterior analysis

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
/PWGMM/UE @alibuild @aalkin @aortizve
5656

5757
/PWGUD @alibuild @pbuehler @abylinkin @rolavick
58-
/PWGJE @alibuild @lhavener @maoyx @nzardosh @ddobrigk @mfasDa
58+
/PWGJE @alibuild @lhavener @maoyx @nzardosh @fjonasALICE @mfasDa @mhemmer-cern
5959
/Tools/PIDML @alibuild @saganatt
6060
/Tools/ML @alibuild @fcatalan92 @fmazzasc
6161
/Tutorials/PWGCF @alibuild @jgrosseo @saganatt @victor-gonzalez @zchochul

Common/Core/RecoDecay.h

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@
2020
#include <algorithm> // std::find
2121
#include <array> // std::array
2222
#include <cmath> // std::abs, std::sqrt
23+
#include <cstdio>
2324
#include <utility> // std::move
2425
#include <vector> // std::vector
2526

2627
#include "TMCProcess.h" // for VMC Particle Production Process
28+
#include "TPDGCode.h" // for PDG codes
2729
#include "CommonConstants/MathConstants.h"
2830

2931
/// Base class for calculating properties of reconstructed decays
@@ -663,26 +665,33 @@ struct RecoDecay {
663665
/// Checks whether the reconstructed decay candidate is the expected decay.
664666
/// \param checkProcess switch to accept only decay daughters by checking the production process of MC particles
665667
/// \param acceptIncompleteReco switch to accept candidates with only part of the daughters reconstructed
668+
/// \tparam acceptTrackDecay switch to accept candidates with daughter tracks of pions and kaons which decayed
666669
/// \param particlesMC table with MC particles
667670
/// \param arrDaughters array of candidate daughters
668671
/// \param PDGMother expected mother PDG code
669672
/// \param arrPDGDaughters array of expected daughter PDG codes
670673
/// \param acceptAntiParticles switch to accept the antiparticle version of the expected decay
671674
/// \param sign antiparticle indicator of the found mother w.r.t. PDGMother; 1 if particle, -1 if antiparticle, 0 if mother not found
672675
/// \param depthMax maximum decay tree level to check; Daughters up to this level will be considered. If -1, all levels are considered.
676+
/// \param nPiToMu number of pion prongs decayed to a muon
677+
/// \param nKaToPi number of kaon prongs decayed to a pion
673678
/// \return index of the mother particle if the mother and daughters are correct, -1 otherwise
674-
template <bool acceptFlavourOscillation = false, bool checkProcess = false, bool acceptIncompleteReco = false, std::size_t N, typename T, typename U>
679+
template <bool acceptFlavourOscillation = false, bool checkProcess = false, bool acceptIncompleteReco = false, bool acceptTrackDecay = false, std::size_t N, typename T, typename U>
675680
static int getMatchedMCRec(const T& particlesMC,
676681
const std::array<U, N>& arrDaughters,
677682
int PDGMother,
678683
std::array<int, N> arrPDGDaughters,
679684
bool acceptAntiParticles = false,
680685
int8_t* sign = nullptr,
681-
int depthMax = 1)
686+
int depthMax = 1,
687+
int8_t* nPiToMu = nullptr,
688+
int8_t* nKaToPi = nullptr)
682689
{
683690
// Printf("MC Rec: Expected mother PDG: %d", PDGMother);
684691
int8_t coefFlavourOscillation = 1; // 1 if no B0(s) flavour oscillation occured, -1 else
685692
int8_t sgn = 0; // 1 if the expected mother is particle, -1 if antiparticle (w.r.t. PDGMother)
693+
int8_t nPiToMuLocal = 0; // number of pion prongs decayed to a muon
694+
int8_t nKaToPiLocal = 0; // number of kaon prongs decayed to a pion
686695
int indexMother = -1; // index of the mother particle
687696
std::vector<int> arrAllDaughtersIndex; // vector of indices of all daughters of the mother of the first provided daughter
688697
std::array<int, N> arrDaughtersIndex; // array of indices of provided daughters
@@ -708,6 +717,21 @@ struct RecoDecay {
708717
return -1;
709718
}
710719
auto particleI = arrDaughters[iProng].mcParticle(); // ith daughter particle
720+
if constexpr (acceptTrackDecay) {
721+
// Replace the MC particle associated with the prong by its mother for π → μ and K → π.
722+
auto motherI = particleI.template mothers_first_as<T>();
723+
auto pdgI = std::abs(particleI.pdgCode());
724+
auto pdgMotherI = std::abs(motherI.pdgCode());
725+
if (pdgI == kMuonMinus && pdgMotherI == kPiPlus) {
726+
// π → μ
727+
nPiToMuLocal++;
728+
particleI = motherI;
729+
} else if (pdgI == kPiPlus && pdgMotherI == kKPlus) {
730+
// K → π
731+
nKaToPiLocal++;
732+
particleI = motherI;
733+
}
734+
}
711735
arrDaughtersIndex[iProng] = particleI.globalIndex();
712736
// Get the list of daughter indices from the mother of the first prong.
713737
if (iProng == 0) {
@@ -780,6 +804,14 @@ struct RecoDecay {
780804
if (sign) {
781805
*sign = sgn;
782806
}
807+
if constexpr (acceptTrackDecay) {
808+
if (nPiToMu) {
809+
*nPiToMu = nPiToMuLocal;
810+
}
811+
if (nKaToPi) {
812+
*nKaToPi = nKaToPiLocal;
813+
}
814+
}
783815
return indexMother;
784816
}
785817

Common/Core/TPCVDriftManager.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ class TPCVDriftManager
116116
if (dDriftErr < 0.f || dDrift > 250.f) { // we cannot move a track outside the drift volume
117117
if (mOutside < mWarningLimit) {
118118
LOGP(warn, "Skipping correction outside of tpc volume with dDrift={} +- {}", dDrift, dDriftErr);
119-
const auto& trackBC = trackExtra.template collision_as<Collisions>().template foundBC_as<BCs>().globalBC();
120-
const auto& colBC = col.template foundBC_as<BCs>().globalBC();
119+
const auto trackBC = trackExtra.template collision_as<Collisions>().template foundBC_as<BCs>().globalBC();
120+
const auto colBC = col.template foundBC_as<BCs>().globalBC();
121121
int diffBC = colBC - trackBC;
122122
LOGP(info, "ct={}; ctr={}; tTB={}; t0={}; dTime={}; dDrift={}; tgl={}: colBC={} trackBC={} diffBC={}", col.collisionTime(), col.collisionTimeRes(), tTB, trackExtra.trackTime(), dTime, dDrift, track.getTgl(), colBC, trackBC, diffBC);
123123
if (mOutside == mWarningLimit - 1) {

Common/DataModel/TrackSelectionTables.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ struct TrackSelectionFlags {
6060
static constexpr flagtype kGlobalTrackWoTPCCluster = kQualityTracksWoTPCCluster | kPrimaryTracks | kInAcceptanceTracks;
6161
static constexpr flagtype kGlobalTrackWoPtEta = kQualityTracks | kPrimaryTracks;
6262
static constexpr flagtype kGlobalTrackWoDCA = kQualityTracks | kInAcceptanceTracks;
63+
static constexpr flagtype kGlobalTrackWoDCAxy = kQualityTracks | kInAcceptanceTracks | kDCAz;
6364
static constexpr flagtype kGlobalTrackWoDCATPCCluster = kQualityTracksWoTPCCluster | kInAcceptanceTracks;
6465

6566
/// @brief Function to check flag content

Common/TableProducer/Converters/bcFlagsCreator.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ struct bcFlagsCreator {
2222

2323
void process(aod::BCs const& bcTable)
2424
{
25-
for (auto& _ : bcTable) {
25+
for (int64_t i = 0; i < bcTable.size(); ++i) {
2626
bcFlags(0);
2727
}
2828
}

Common/TableProducer/mcCollsExtra.cxx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212
// Quick and dirty task to correlate MC <-> data
1313
//
1414

15-
#include <cmath>
1615
#include <array>
16+
#include <cmath>
1717
#include <cstdlib>
18+
#include <vector>
1819

1920
#include "Math/Vector4D.h"
2021
#include <TFile.h>
@@ -135,8 +136,8 @@ struct mcCollisionExtra {
135136
auto iter = std::find(sortedIndices.begin(), sortedIndices.end(), mcCollision.index());
136137
if (iter != sortedIndices.end()) {
137138
auto index = std::distance(iter, sortedIndices.begin());
138-
for (size_t iMcColl = index + 1; iMcColl < index + 17; iMcColl++) {
139-
if (iMcColl >= sortedIndices.size())
139+
for (auto iMcColl = index + 1; iMcColl < index + 17; iMcColl++) {
140+
if (iMcColl >= std::ssize(sortedIndices))
140141
continue;
141142
if (mcCollisionHasPoI[sortedIndices[iMcColl]])
142143
bitset(forwardHistory, iMcColl - index - 1);

Common/Tools/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
add_subdirectory(Multiplicity)
1313
add_subdirectory(PID)
1414

15-
o2physics_add_executable(aod-data-model-graph
16-
SOURCES aodDataModelGraph.cxx
17-
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore)
15+
#o2physics_add_executable(aod-data-model-graph
16+
# SOURCES aodDataModelGraph.cxx
17+
# PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore)
1818

1919
o2physics_add_library(trackSelectionRequest
2020
SOURCES trackSelectionRequest.cxx

0 commit comments

Comments
 (0)