Skip to content

[ALICE3] Added Multiplicity estimator task for ALICE3 - #17540

Open
axti98 wants to merge 4 commits into
AliceO2Group:masterfrom
axti98:Alice3MultDev
Open

[ALICE3] Added Multiplicity estimator task for ALICE3#17540
axti98 wants to merge 4 commits into
AliceO2Group:masterfrom
axti98:Alice3MultDev

Conversation

@axti98

@axti98 axti98 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Added basic multiplicity estimator task in preparation for PbPb studies and multiplicity dependent studies. Currently, two estimator types are implemented:

  • Global Tracks: Any track with certain DCA, nSiliconHits and reconstruction flag. Properties are configurable
  • PVContributors: Any track that has contributed to the fit of the primary vertex. For now, this is actually every track with isReconstructed = true, since the full track array is passed to the computeVertex function. Might be adjusted later.
  • MCTruth estimation: All charged physical primaries from the generator and in the |eta| intervals 2.5, 1.25, and 0.9

Necessary changes in the TrackingTranslator because of data model change as well as in OTF Tracker

@github-actions

Copy link
Copy Markdown

O2 linter results: ❌ 38 errors, ⚠️ 81 warnings, 🔕 0 disabled

Please consider the following formatting changes to AliceO2Group#17540
@axti98
axti98 marked this pull request as ready for review August 21, 2026 12:46
trackParCov.getSigma1Pt2());
tableMcTrackLabels(trackParCov.mcLabel, 0);
tableTracksExtraA3(trackParCov.nSiliconHits, trackParCov.nTPCHits, trackParCov.trackType);
tableTracksExtraA3(trackParCov.nSiliconHits, trackParCov.nTPCHits, trackParCov.trackType, true);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't it be only if the track is a contributor?


auto charge = 0.;
auto* p = pdg->GetParticle(mcParticle.pdgCode());
if (p != nullptr) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

multMC(numMCParticles, numMCParticlesEta25, numMCParticlesEta125, numMCParticlesEta09);
}

void processDummy(const aod::Collision&)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you need the dummy?

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 2427e80 at 2026-08-21 15:01:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'Found 55 errors and 52 warnings.'
Found 55 errors and 52 warnings.
++ [[ 55 -gt 0 ]]
++ cat /sw/BUILD/b82bcdeea63421624213d9aee1fcfc315e2ff357/O2Physics-code-check/errors.txt
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:109:9: error: function-like macro 'getHist' used; consider a 'constexpr' template function [cppcoreguidelines-macro-usage,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:110:28: error: macro argument should be enclosed in parentheses [bugprone-macro-parentheses,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:111:9: error: variadic macro 'fillHist' used; consider using a 'constexpr' variadic template function [cppcoreguidelines-macro-usage,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:116:9: error: variadic macro 'insertHist' used; consider using a 'constexpr' variadic template function [cppcoreguidelines-macro-usage,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:131:8: error: constructor does not initialize these fields: thisCascade, thisV0, pdgDB, ccdb [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:274:9: error: constructor does not initialize these fields: mcLabel, isDecayDau, isWeakDecayDau, isUsedInCascading, nSiliconHits, nTPCHits, trackType [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:408:15: error: member 'timeResolutionNs' of type 'const float' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:409:15: error: member 'nsToMus' of type 'const float' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:410:15: error: member 'timeResolutionUs' of type 'const float' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:707:26: error: do not use static_cast to downcast from a base to a derived class; use dynamic_cast instead [cppcoreguidelines-pro-type-static-cast-downcast,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:761:53: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:769:56: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:789:36: error: the parameter 'particle' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:796:11: error: variable 'sna' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:796:16: error: variable 'csa' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:840:39: error: the parameter 'particle' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:893:90: error: the const qualified parameter 'histPath' is copied for each invocation; consider making it a reference [performance-unnecessary-value-param,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:954:5: error: uninitialized record type: 'isReco' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:955:5: error: uninitialized record type: 'nHitsCascadeProngs' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:956:5: error: uninitialized record type: 'nSiliconHitsCascadeProngs' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:957:5: error: uninitialized record type: 'nTPCHitsCascadeProngs' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:1100:9: error: uninitialized record type: 'pos' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:1101:9: error: uninitialized record type: 'posCascade' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:1102:9: error: uninitialized record type: 'posP' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:1103:9: error: uninitialized record type: 'negP' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:1104:9: error: uninitialized record type: 'bachP' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:1222:15: error: uninitialized record type: 'posClusterCandidate' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:1275:9: error: uninitialized record type: 'pCasc' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:1276:9: error: uninitialized record type: 'pBach' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:1277:9: error: uninitialized record type: 'pV0' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:1333:11: error: redundant condition 'reconstructedCascade' [bugprone-redundant-branch-condition,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:1432:23: error: unused local variable 'histPath' of type 'const std::string' (aka 'const basic_string<char>') [bugprone-unused-local-non-trivial-variable,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:1590:9: error: uninitialized record type: 'pos' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:1591:9: error: uninitialized record type: 'posP' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:1592:9: error: uninitialized record type: 'negP' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:1753:32: error: slicing object from type 'TrackAlice3' to 'TrackParametrizationWithError<>' discards 40 bytes of state [cppcoreguidelines-slicing,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:2003:89: error: narrowing conversion from 'float' to 'int' [bugprone-narrowing-conversions,-warnings-as-errors]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:2012:61: error: narrowing conversion from 'float' to 'int' [bugprone-narrowing-conversions,-warnings-as-errors]
ALICE3/TableProducer/alice3Multiplicity.cxx:34:1: error: included header TH1.h is not used directly [misc-include-cleaner,-warnings-as-errors]
ALICE3/TableProducer/alice3Multiplicity.cxx:45:8: error: constructor does not initialize these fields: pdg [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
ALICE3/TableProducer/alice3TrackingTranslator.cxx:54:9: error: variable 'inputPath' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]
ALICE3/TableProducer/alice3TrackingTranslator.cxx:88:9: error: function-like macro 'SETADDRESS' used; consider a 'constexpr' template function [cppcoreguidelines-macro-usage,-warnings-as-errors]
[0 more errors; see full log]

Full log here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants