Skip to content

Commit 0aae535

Browse files
authored
Merge branch 'AliceO2Group:master' into master
2 parents b8ab1e4 + d26ca49 commit 0aae535

File tree

531 files changed

+26240
-12411
lines changed

Some content is hidden

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

531 files changed

+26240
-12411
lines changed

.github/workflows/o2-linter.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Find issues in O2 code
33
name: O2 linter
44

5-
#"on": [pull_request_target, push]
5+
"on": [pull_request_target, push]
66
permissions: {}
77
env:
88
BRANCH_MAIN: master
@@ -20,12 +20,12 @@ jobs:
2020
steps:
2121
- name: Set branches
2222
run: |
23-
if [[ "${{ github.event_name }}" == "push" ]]; then
23+
if [[ "${{ github.event_name }}" == "push" || "${{ github.event_name }}" == "pull_request" ]]; then
2424
branch_head="${{ github.ref }}"
25-
branch_base="${{ env.BRANCH_MAIN }}"
25+
branch_base="origin/${{ env.BRANCH_MAIN }}"
2626
else
2727
branch_head="refs/pull/${{ github.event.pull_request.number }}/merge"
28-
branch_base="${{ github.event.pull_request.base.ref }}"
28+
branch_base="origin/${{ github.event.pull_request.base.ref }}"
2929
fi
3030
echo BRANCH_HEAD="$branch_head" >> "$GITHUB_ENV"
3131
echo BRANCH_BASE="$branch_base" >> "$GITHUB_ENV"
@@ -37,9 +37,10 @@ jobs:
3737
- name: Run tests
3838
id: linter
3939
run: |
40+
git log -n 1 --pretty='format:%ci %h %s %d%n'
4041
# Diff against the common ancestor of the source (head) branch and the target (base) branch.
4142
echo "Diffing ${{ env.BRANCH_HEAD }} against ${{ env.BRANCH_BASE }}."
42-
readarray -t files < <(git diff --diff-filter d --name-only origin/${{ env.BRANCH_BASE }}...)
43+
readarray -t files < <(git diff --diff-filter d --name-only ${{ env.BRANCH_BASE }}...)
4344
if [ ${#files[@]} -eq 0 ]; then
4445
echo "::notice::No files to lint."
4546
echo "linter_ran=0" >> "$GITHUB_OUTPUT"

ALICE3/DataModel/OTFMCParticle.h

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,22 @@ DECLARE_SOA_COLUMN(Y, y, float);
3434
DECLARE_SOA_COLUMN(IsAlive, isAlive, bool);
3535
DECLARE_SOA_COLUMN(IsPrimary, isPrimary, bool);
3636

37+
DECLARE_SOA_SELF_INDEX_COLUMN_FULL(Mother0, mother0, int, "McPartsWithDau_Mother0"); //! Track index of the first mother
38+
DECLARE_SOA_SELF_INDEX_COLUMN_FULL(Mother1, mother1, int, "McPartsWithDau_Mother1"); //! Track index of the last mother
39+
DECLARE_SOA_SELF_INDEX_COLUMN_FULL(Daughter0, daughter0, int, "McPartsWithDau_Daughter0"); //! Track index of the first daugther
40+
DECLARE_SOA_SELF_INDEX_COLUMN_FULL(Daughter1, daughter1, int, "McPartsWithDau_Daughter1"); //! Track index of the last daugther
41+
DECLARE_SOA_SELF_ARRAY_INDEX_COLUMN(Mothers, mothers); //! Mother tracks (possible empty) array. Iterate over mcParticle.mothers_as<aod::McParticles>())
42+
DECLARE_SOA_SELF_SLICE_INDEX_COLUMN(Daughters, daughters); //! Daughter tracks (possibly empty) slice. Check for non-zero with mcParticle.has_daughters(). Iterate over mcParticle.daughters_as<aod::McParticles>())
3743
} // namespace otfmcparticle
3844

39-
DECLARE_SOA_TABLE_FULL(McPartsWithDau, "McPartsWithDau", "AOD", "MCPARTSWITHDAU",
45+
DECLARE_SOA_TABLE_FULL(McPartWithDaus, "McPartWithDaus", "AOD", "MCPARTSWITHDAU",
4046
o2::soa::Index<>,
4147
mcparticle::McCollisionId,
4248
mcparticle::PdgCode,
4349
mcparticle::StatusCode,
4450
mcparticle::Flags,
45-
mcparticle::MothersIds,
46-
mcparticle::DaughtersIdSlice,
51+
otfmcparticle::MothersIds,
52+
otfmcparticle::DaughtersIdSlice,
4753
mcparticle::Weight,
4854
mcparticle::Px,
4955
mcparticle::Py,
@@ -68,7 +74,18 @@ DECLARE_SOA_TABLE_FULL(McPartsWithDau, "McPartsWithDau", "AOD", "MCPARTSWITHDAU"
6874
mcparticle::GetProcess<mcparticle::Flags, mcparticle::StatusCode>,
6975
mcparticle::IsPhysicalPrimary<mcparticle::Flags>);
7076

71-
using McPartWithDau = McPartsWithDau::iterator;
77+
using McPartWithDau = McPartWithDaus::iterator;
78+
79+
namespace otfmctracklable
80+
{
81+
DECLARE_SOA_INDEX_COLUMN(McPartWithDau, mcPartWithDau); //! MC particle
82+
DECLARE_SOA_COLUMN(McMask, mcMask, uint16_t); //! Bit mask to indicate detector mismatches (bit ON means mismatch). Bit 0-6: mismatch at ITS layer. Bit 12: ITSAB tracklet mismatch. Bit 13: ITS-TPC mismatch. Bit 14: isNoise == True (global track), Bit 15: isFake == True (global track)
83+
} // namespace otfmctracklable
84+
85+
DECLARE_SOA_TABLE(McTrackWithDauLabels, "AOD", "MCTRACKWithDAULABEL", //! Table joined to the track table containing the MC index
86+
otfmctracklable::McPartWithDauId, otfmctracklable::McMask);
87+
88+
using McTrackWithDauLabel = McTrackWithDauLabels::iterator;
7289

7390
} // namespace o2::aod
7491

ALICE3/Macros/drawFastTracker.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ void drawFastTracker(float magneticField = 5.f, // in units of kGauss
7575
fastTracker.AddLayer("B11", 100., 250, x0OB, xrhoOB, resRPhiOB, resZOB, eff, 1);
7676
} else {
7777
std::vector<float> pixelRes{0.025, 0.025, 0.01, 0.01};
78-
fastTracker.AddSiliconALICE3v4(pixelRes);
78+
// fastTracker.AddSiliconALICE3v4(pixelRes); // FIXME
7979
}
8080

8181
fastTracker.Print();

ALICE3/Macros/testFastTracker.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void testFastTracker(std::string geometryFile = "a3geo.ini")
2727
// auto& ccdb = o2::ccdb::BasicCCDBManager::instance();
2828
// ccdb.setURL("http://alice-ccdb.cern.ch");
2929
o2::fastsim::FastTracker fastTracker;
30-
fastTracker.AddGenericDetector(geometryFile);
30+
// fastTracker.AddGenericDetector(geometryFile); // FIXME
3131
// fastTracker.AddGenericDetector(geometryFile, &ccdb);
3232
fastTracker.Print();
3333
}

ALICE3/TableProducer/OTF/onTheFlyDecayer.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ static const std::vector<int> pdgCodes{kK0Short,
7272
kOmegaPlusBar};
7373

7474
struct OnTheFlyDecayer {
75-
Produces<aod::McPartsWithDau> tableMcParticlesWithDau;
75+
Produces<aod::McPartWithDaus> tableMcParticlesWithDau;
7676

7777
o2::upgrade::Decayer decayer;
7878
Service<o2::framework::O2DatabasePDG> pdgDB;

ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ struct OnTheFlyTracker {
124124
Produces<aod::StoredTracksCov> tableStoredTracksCov;
125125
Produces<aod::TracksCovExtension> tableTracksCovExtension;
126126
Produces<aod::McTrackLabels> tableMcTrackLabels;
127+
Produces<aod::McTrackWithDauLabels> tableMcTrackWithDauLabels;
127128
Produces<aod::TracksDCA> tableTracksDCA;
128129
Produces<aod::TracksDCACov> tableTracksDCACov;
129130
Produces<aod::CollisionsAlice3> tableCollisionsAlice3;
@@ -1871,7 +1872,7 @@ struct OnTheFlyTracker {
18711872
}
18721873
}
18731874

1874-
void processConfigurationDev(aod::McCollision const& mcCollision, aod::McPartsWithDau const& mcParticles, const int icfg)
1875+
void processConfigurationDev(aod::McCollision const& mcCollision, aod::McPartWithDaus const& mcParticles, const int icfg)
18751876
{
18761877
// const int lastTrackIndex = tableStoredTracksCov.lastIndex() + 1; // bookkeep the last added track
18771878
const std::string histPath = "Configuration_" + std::to_string(icfg) + "/";
@@ -2065,7 +2066,7 @@ struct OnTheFlyTracker {
20652066
trackParCov.getSigmaSnpZ(), trackParCov.getSigmaSnp2(), trackParCov.getSigmaTglY(), trackParCov.getSigmaTglZ(), trackParCov.getSigmaTglSnp(),
20662067
trackParCov.getSigmaTgl2(), trackParCov.getSigma1PtY(), trackParCov.getSigma1PtZ(), trackParCov.getSigma1PtSnp(), trackParCov.getSigma1PtTgl(),
20672068
trackParCov.getSigma1Pt2());
2068-
tableMcTrackLabels(trackParCov.mcLabel, 0);
2069+
tableMcTrackWithDauLabels(trackParCov.mcLabel, 0);
20692070
tableTracksExtraA3(trackParCov.nSiliconHits, trackParCov.nTPCHits);
20702071

20712072
// populate extra tables if required to do so
@@ -2111,7 +2112,7 @@ struct OnTheFlyTracker {
21112112
trackParCov.getSigmaSnpZ(), trackParCov.getSigmaSnp2(), trackParCov.getSigmaTglY(), trackParCov.getSigmaTglZ(), trackParCov.getSigmaTglSnp(),
21122113
trackParCov.getSigmaTgl2(), trackParCov.getSigma1PtY(), trackParCov.getSigma1PtZ(), trackParCov.getSigma1PtSnp(), trackParCov.getSigma1PtTgl(),
21132114
trackParCov.getSigma1Pt2());
2114-
tableMcTrackLabels(trackParCov.mcLabel, 0);
2115+
tableMcTrackWithDauLabels(trackParCov.mcLabel, 0);
21152116
tableTracksExtraA3(trackParCov.nSiliconHits, trackParCov.nTPCHits);
21162117

21172118
// populate extra tables if required to do so
@@ -2129,7 +2130,7 @@ struct OnTheFlyTracker {
21292130
}
21302131
}
21312132

2132-
void processDecayer(aod::McCollision const& mcCollision, aod::McPartsWithDau const& mcParticles)
2133+
void processDecayer(aod::McCollision const& mcCollision, aod::McPartWithDaus const& mcParticles)
21332134
{
21342135
for (size_t icfg = 0; icfg < mSmearer.size(); ++icfg) {
21352136
processConfigurationDev(mcCollision, mcParticles, static_cast<int>(icfg));

ALICE3/TableProducer/alice3-decayfinder.cxx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ using std::array;
6666
// #define bitcheck(var, nbit) ((var) & (static_cast<uint32_t>(1) << (nbit)))
6767

6868
// For MC association in pre-selection
69-
using Alice3TracksWPid = soa::Join<aod::Tracks, aod::TracksCov, aod::Alice3DecayMaps, aod::McTrackLabels, aod::TracksDCA, aod::UpgradeTrkPids, aod::UpgradeTofs, aod::UpgradeRichs>;
69+
using Alice3TracksWPid = soa::Join<aod::Tracks, aod::TracksCov, aod::Alice3DecayMaps, aod::McTrackLabels, aod::TracksDCA, aod::UpgradeTofs, aod::UpgradeRichs>;
70+
using Alice3TracksWTrkPid = soa::Join<Alice3TracksWPid, aod::UpgradeTrkPids>;
7071

7172
struct alice3decayFinder {
7273
SliceCache cache;
@@ -185,18 +186,17 @@ struct alice3decayFinder {
185186
((aod::a3DecayMap::decayMap & trackSelectionKaMinusFromD) == trackSelectionKaMinusFromD) && aod::track::signed1Pt < 0.0f && nabs(aod::track::dcaXY) > kaFromD_dcaXYconstant + kaFromD_dcaXYpTdep* nabs(aod::track::signed1Pt);
186187

187188
// partitions for Lc baryons
188-
Partition<Alice3TracksWPid> tracksPiPlusFromLc =
189+
Partition<Alice3TracksWTrkPid> tracksPiPlusFromLc =
189190
((aod::a3DecayMap::decayMap & trackSelectionPiPlusFromLc) == trackSelectionPiPlusFromLc) && aod::track::signed1Pt > 0.0f && nabs(aod::track::dcaXY) > piFromLc_dcaXYconstant + piFromLc_dcaXYpTdep* nabs(aod::track::signed1Pt);
190-
Partition<Alice3TracksWPid> tracksKaPlusFromLc =
191+
Partition<Alice3TracksWTrkPid> tracksKaPlusFromLc =
191192
((aod::a3DecayMap::decayMap & trackSelectionKaPlusFromLc) == trackSelectionKaPlusFromLc) && aod::track::signed1Pt > 0.0f && nabs(aod::track::dcaXY) > kaFromLc_dcaXYconstant + kaFromLc_dcaXYpTdep* nabs(aod::track::signed1Pt);
192-
Partition<Alice3TracksWPid> tracksPrPlusFromLc =
193+
Partition<Alice3TracksWTrkPid> tracksPrPlusFromLc =
193194
((aod::a3DecayMap::decayMap & trackSelectionPrPlusFromLc) == trackSelectionPrPlusFromLc) && aod::track::signed1Pt > 0.0f && nabs(aod::track::dcaXY) > prFromLc_dcaXYconstant + prFromLc_dcaXYpTdep* nabs(aod::track::signed1Pt);
194-
// partitions for Lc baryons
195-
Partition<Alice3TracksWPid> tracksPiMinusFromLc =
195+
Partition<Alice3TracksWTrkPid> tracksPiMinusFromLc =
196196
((aod::a3DecayMap::decayMap & trackSelectionPiMinusFromLc) == trackSelectionPiMinusFromLc) && aod::track::signed1Pt < 0.0f && nabs(aod::track::dcaXY) > piFromLc_dcaXYconstant + piFromLc_dcaXYpTdep* nabs(aod::track::signed1Pt);
197-
Partition<Alice3TracksWPid> tracksKaMinusFromLc =
197+
Partition<Alice3TracksWTrkPid> tracksKaMinusFromLc =
198198
((aod::a3DecayMap::decayMap & trackSelectionKaMinusFromLc) == trackSelectionKaMinusFromLc) && aod::track::signed1Pt < 0.0f && nabs(aod::track::dcaXY) > kaFromLc_dcaXYconstant + kaFromLc_dcaXYpTdep* nabs(aod::track::signed1Pt);
199-
Partition<Alice3TracksWPid> tracksPrMinusFromLc =
199+
Partition<Alice3TracksWTrkPid> tracksPrMinusFromLc =
200200
((aod::a3DecayMap::decayMap & trackSelectionPrMinusFromLc) == trackSelectionPrMinusFromLc) && aod::track::signed1Pt < 0.0f && nabs(aod::track::dcaXY) > prFromLc_dcaXYconstant + prFromLc_dcaXYpTdep* nabs(aod::track::signed1Pt);
201201

202202
// Helper struct to pass candidate information
@@ -1068,7 +1068,7 @@ struct alice3decayFinder {
10681068

10691069
void processFindLc(aod::Collision const& collision,
10701070
aod::McParticles const& mcParticles,
1071-
Alice3TracksWPid const& tracks)
1071+
Alice3TracksWTrkPid const& tracks)
10721072
{
10731073
LOG(debug) << "Processing Lc candidates for collision " << collision.globalIndex() << " with " << tracks.size() << " tracks";
10741074
for (auto const& track : tracks) {

0 commit comments

Comments
 (0)