Skip to content

Tf3 dev - #7

Closed
maciacco wants to merge 378 commits into
Marcellocosti:devfrom
maciacco:tf3_dev
Closed

maciacco wants to merge 378 commits into
Marcellocosti:devfrom
maciacco:tf3_dev

Conversation

@maciacco

Copy link
Copy Markdown

No description provided.

aalkin and others added 30 commits July 23, 2026 10:12
…low (AliceO2Group#15618)

* TPC TimeSeries: propagate min-momentum, min-cluster, max-tgl to workflow

Add configurable environment variables for o2-tpc-time-series-workflow:
  TPCTIMESERIES_MIN_MOMENTUM (default: 0.2)
  TPCTIMESERIES_MIN_CLUSTER  (default: 80)
  TPCTIMESERIES_MAX_TGL      (default: 1.4)

Defaults match TPCTimeSeriesSpec.cxx hardcoded values.
Previously these cuts were not configurable from the workflow script.

* TPC TimeSeries: propagate track selection and multiplicity cuts to workflow

Add configurable environment variables for o2-tpc-time-series-workflow:
  TPCTIMESERIES_MIN_MOMENTUM (default: 0.2)
  TPCTIMESERIES_MIN_CLUSTER  (default: 80)
  TPCTIMESERIES_MAX_TGL      (default: 1.4)
  TPCTIMESERIES_MULT_MAX     (default: 50000)

Defaults match TPCTimeSeriesSpec.cxx hardcoded values.
Previously these cuts were not configurable from the workflow script.

---------

Co-authored-by: miranov25 <marian.ivanov@cern.cg>
…segmentation (AliceO2Group#15639)

* approach TF3 ASIC size by using 8-chip modules + update chip segmentation parameters

* fix parameter + update number of sensors in macro
The field normally should not be deleted since this would invalidate the field
pointers cached elsewhere (e.g. by the double version of the Propagator if it was
requested). Instead, the existing field should be scaled by the newly provided
current values.
The exception is the marginal case when the scaling is not possible, e.g. when
switching from 5kGauss map to 2kGauss (which should be avoided for other reasons).
In this case the field will be recreated and the warning will be printed about
possible invalidation of cached pointers.
…p#15644)

staticMapCreatorCPM.C creates the correction map from the unbinned
residuals via the crossing point method

SmoothingExtrapolate.C Performs gaussian smoothing and extrapolation to
small unmeasured radii

voxResQA.C Makes default QA plots

TPCFastTransformInitCPM.C converts the correction maps to the final
splines
Introduces multi-threaded creation of the material budget lookup table, reducing it
from hours to minutes. Creating the LUT walks every cell of every layer through TGeo
and the cells are independent, so they are spread over TBB tasks with one
TGeoNavigator per thread. The innermost 20 layers at 60 trials/cell drop from 28 min
to 72 s on 28 cores.

Effective only with ROOT >= v6-36-10-alice3, which removes a per-query thread-id
lookup and the false sharing between per-thread scratch buffers of TGeo shapes. On
older ROOT the parallel path is correct, just slower -- it saturates near 12x.

All layers map onto a single flat cell index so the load stays balanced despite very
different cell counts per layer; a binary search maps a flat index back to
(layer, iz, iphi). The worker navigators are given back at the end.

meanMaterialBudget() takes an optional navigator: a caller passing its own runs
lock-free, a caller passing none shares gGeoManager's and still takes the mutex.
Deciding from the argument keeps it local, so process-global state cannot break it.

Thread count comes from the new populateFromTGeo() argument, falling back to
NTHREADS_MATBUD; the default is the previous serial path. Results are independent of
the thread count -- compareMatBudLUT.C checks a parallel LUT against a serial one cell
by cell, and they match exactly over all 129523 cells.

Supervised-by: Sandro Wenzel <sandro.wenzel@cern.ch>
* [ALICE3] Merge forward disks (FT3) into TRK module

* [ALICE3] Add digitization for forward disks

* Please consider the following formatting changes

* Fixup whitespace

* Fix indentation in CMakeLists.txt

* Add curly braces for single-line if statements.

---------

Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
Co-authored-by: Nicolò Jacazio <njacazio@users.noreply.github.com>
…ams (AliceO2Group#15623)

* Set digitizer parameters as configurables

* remove hard-coded digitizer parameters

* use new names from dpldigitizerparames

* set digitizer parameters in the dplconfigurable

* remove unused parameter

* use dplparameter to convert energy to electrons

* remove getters/setters

* remove call to unused setter

* call digitizer param instance each time it is needed (possibly to be cleaned up in future)

* revert charge threshold default
* Method to extract ConfigurableParam as JSON string and update from such string

* Add all barrel tracking configurables to AOD metadata

Add all barrel tracking configurables to AOD metadata:
write them as ConfigParam_<device>_<configname>.json
files from every device (1st lane only in pipelined)
Also, send them as META/<PROCNAME>/0 sporadic DPL output
only once for the direct collection by the metadata writer
(when it will be supported by the DPL).

* Option to create configParams metadata from json dumps

With the option `--collect-config-files` provided, the AODProducer will collect the json dumps of ConfigParams
made by the upstream processes and will add them as `<configName> : <configParam json>` TObjString pairs
in the AOD metadata.
Once the DPL supports collecting META/<PROCNAME>/0 sporadic inputs, the metadata will be created directly
from these inputs, so this option will not be needed for the data processing.
But in the case of MC, collecting json files via this option is the only way to add configs to the AOD metadata
(as it is done in the sim_challenge.sh).
AliceO2Group#15656)

For detectors up to Focal inclusively only 1^15 chips per detector can be referred by this method
(for the backward compatibility with existing geometry files).
The mu(bc) lookup in CollisionContextTool uses its own CCDBManagerInstance,
which -- unlike BasicCCDBManager -- never picks up the time-machine constraint
from ALICEO2_CCDB_CONDITION_NOT_AFTER. FT0/Calib/EventsPerBc was therefore
resolved against the present even when a time machine was requested, quietly
switching the sampler and changing the collision context at an unchanged seed.
Bunch filling and mean vertex, which go through BasicCCDBManager, were pinned
correctly.

Now carry the constraint over explicitly. See O2-7093.
…AliceO2Group#15659)

The input cluster sources will be deduced from the track source.
The InputHelper will be invoked if --disable-root-inputs option is absent.
Possibility to prepend the workflow with the rate/maxTF limiter in standalone mode
(i.e. w/o --disable-root-inputs). E.g

GLOSET="--shm-segment-size 10000000000  --timeframes-rate-limit 2 --timeframes-rate-limit-ipcid 1234 --hbfutils-config o2_tfidinfo.root,upstream"
o2-reader-driver-workflow --max-tf ${MAXTF:--1}  $GLOSET | \
o2-tpc-time-series-workflow $GLOSET --enable-unbinned-root-output   -b --run
sawenzel and others added 29 commits September 17, 2026 10:52
This fixes zero track weights for the box-gun generator presets in o2-sim.

- FairBoxGenerator adds tracks without a weight, so FairRoot's default of 0 was used.
- Geant4 scoring multiplies by the track weight, so all scores were zero.
- The box-gun presets and toftest now use o2::eventgen::BoxGenerator, which gives weight 1.
- BoxGenerator now looks up the mass for each call; the static cache gave every generator the mass of the first one used.
- The kinematics distributions are unchanged; for a fixed seed the particle list is shifted by one particle.
- BoxGunParam.debug no longer has an effect.
…eO2Group#15802)

* TPC: place shared constants in the Metal constant address space

MSL requires namespace-scope constexpr to live in the constant address space.
Generic pointers do not help here: constant is explicitly not among the
address spaces MSL 4.1 makes generic, so the annotation is required whatever
the language version. Guarded on __METAL__, so no other build changes.

* Please consider the following formatting changes

---------

Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
* Harden bulk TTree reads against corrupted baskets

* fmt::format for exception
* Improve digit efficiency in stepping

* Switch on stepping

* Implement Mario and Giorgio comments

* Please consider the following formatting changes

---------

Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
This replaces the phi division of the space-frame mother BBMO by 18 explicit
placements of the sector volume BBCE, so that the sector contents survive the
conversion to Geant4.

- Geant4 divides a polyhedra in phi by its number of sides and ignores the
  requested width and offset, and its cell frame sits at the start of a sector
  where TGeo's sits at the centre.
- Both conversion routes, ROOT's GDML writer and VGM, are affected, so the 18
  FTOS service boxes placed in BBCE were absent from the Geant4 geometry.
- The TGeo geometry is unchanged: same node count, same BBCE shape and content,
  same global placements, no new overlaps.
- With this, the ray-by-ray mass thickness of the two Geant4 geometries agrees
  with TGeo to 9e-8 relative, against 5e-5 before.

https://its.cern.ch/jira/browse/O2-7153
Metal has no launch bounds, so the thread and warp count helpers pass the
value through rather than deriving it from a kernel attribute.
Metal also lacks variadic arguments for C functions, so
one need to implement that using templates.
…eO2Group#15788)

- Remove TMath calls with std function calls
- Fix wrong comments for `thetaToEta` and `etaToTheta` in the .cxx
- `buildCluster` uses the local index of cells in eta and phi for calcualting M02, M20 and dispersion. The member `mSharedCluster` would need to be set to true, to apply a correction for the local index when switching from one SM to antoher for cluster spanning two SM. This commit fixes this issue by setting `mSharedCluster` in `buildCluster`.
- Add `mCellGeomBuffer` as new member which stores the geometry information of all cells of the current cluster. This way this information is only obtained ONCE instead of THREE times.
- Removed unused unary operator& which can be dangerous.
Adds sLibMETAL and the DeviceType::METAL dispatch, plus the METAL_ENABLED
cmakedefine. The loader is constructed unconditionally, as the others are,
and only resolves its symbols when that device type is actually requested --
so this builds and links without the backend present.
This fixes unbounded 1 MeV neutron-equivalent weights outside the RD50 tables.

- GetWeight evaluated the spline beyond the last table point, giving a pion weight of 541 at 10 GeV and 5e11 at 1 TeV.
- The energy is now clamped to the table range, so weights beyond it use the value at the table edge.
- Graphs read from CSV are sorted, since the clamp takes the range from the first and last point.
- An empty graph returns 0, as before.
This makes Geant4 command-line scoring usable with o2-sim running several workers.

- Each worker writes its scoring meshes to <mesh>.worker<pid>.txt before finishing the Geant4 run.
- The master worker shuts down before waiting for its forked workers, so its dump is not lost to the kill timer.
- o2-sim waits for all workers to exit and sums the worker files into <mesh>.txt.
- The merge fails if the number of dumps differs from the number of workers.
- The tool o2-sim-merge-g4scoring does the same merge for a given directory.
- The total column merges exactly; entries and total^2 count Geant4 events, which o2-sim splits into chunks per worker.
This extends the 1 MeV neutron equivalent fluence weighting to all hadrons and to e±, in line with FLUKA's SI1MEVNE.

- Mesons use the pion weights and (anti)baryons other than the neutron use the proton weights.
- e± use electron weights when the weight file provides pdg 11.
- Near the beam pipe, kaons alone add 15% to the n_eq fluence.
The sole need for the wrapper was to properly handle warnings
and complain on missing options. Since long rootcling is now gracefully
handling both, so we remove the wrapper.
…ss space (AliceO2Group#15818)

MSL requires every variable at program scope to name an address space and
diagnoses it at the declaration, so these headers broke any device translation
unit that included them. GPUglobalconstexpr() expands to constexpr everywhere
except Metal, where it adds `constant`.

Attempt to make Apple avoid the need for the extra specifier reported as Apple Feedback `FB24852288`.
@maciacco maciacco closed this Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.