Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
216 commits
Select commit Hold shift + click to select a range
4bffbfa
Optionally select CTFs in timestamps or orbits range
shahor02 Dec 2, 2024
33b4212
ITS-GPU: Move Tracklet finder on GPU (#13737)
mconcas Dec 3, 2024
8d75c84
AOD: switch TracksQA from 000 to 001 (#13758)
f3sch Dec 4, 2024
7eaa964
DPL Analysis: Table definition rewrite (#13664)
aalkin Dec 4, 2024
5f1e50c
Fraction based randomisation for Hybrid Gen (#13745)
jackal1-66 Dec 5, 2024
808730c
New event generator/wrapper facilitating event-pools (#13766)
sawenzel Dec 5, 2024
c15014c
DPL Analysis: fix for iterator not setting the originals correctly (#…
aalkin Dec 5, 2024
a11d739
Protect vs nROFs not being multiple of 12 (#13773)
mconcas Dec 6, 2024
4bd54a7
Fix particle accumulation bug in HepMC + error handling (#13768)
pbuehler Dec 6, 2024
aa4898e
Change in case we enable the sec vtx in online (#13770)
chiarazampolli Dec 6, 2024
736eb5b
Override bad covariance instead of throwing exception
shahor02 Dec 6, 2024
ecd04ae
Set the loaded SVParams to DCAFitter of MatchITSTPCQC
shahor02 Dec 6, 2024
8157b07
AOD: Missing default init
f3sch Dec 8, 2024
f8c8cd5
Do not compile tests which need GLFW if it's not found (#13774)
ktf Dec 9, 2024
5c52a4b
Fixing the FOCAL-E pad geometry (#13764)
hahassan7 Dec 9, 2024
24e05f9
QC-1253 Mergers: Shorter latency with multiple layers (#13782)
knopers8 Dec 9, 2024
f4f8f43
Improve logging in case of OOM (#13786)
mconcas Dec 10, 2024
d06c2cf
[Run2,Converter] Add V0 on the fly table (#13765)
mhemmer-cern Dec 10, 2024
c5cbdc4
DCAFitterN: log-throttling for err.messages + user policy for bad CovMat
shahor02 Dec 10, 2024
47d098d
Get column value by column label in Framework Core ASoA (#13498)
mytkom Dec 11, 2024
1432c4b
Add additional selections on ITS tracks (#13779)
mpuccio Dec 11, 2024
3552bce
Make sure only the signposts matching the provided string are enabled…
ktf Dec 11, 2024
a21ae94
Fix inverted check in rawtf-reader max-tf-per-file check
shahor02 Dec 11, 2024
560a1e9
DPL: extra signposts for InitTask callback (#13793)
ktf Dec 11, 2024
4e92d0d
O2-4592 - adding TOF dX and dZ to the track QA table with int8 precis…
miranov25 Dec 12, 2024
deecd31
Bump trackextra table to the latest version (#13785)
maciacco Dec 12, 2024
f4d9b9c
HybridGenerator: Asyncronous + parallel event generation (#13788)
sawenzel Dec 12, 2024
07a0339
Wrap internal symbols with anonymous namespace (#13796)
mytkom Dec 12, 2024
4f42cba
Add option to drop the whole TF and continue (#13791)
mconcas Dec 12, 2024
58aec50
ITS tracking: Introduce configurable minimum pt per track length (#13…
mpuccio Dec 12, 2024
3d1e798
Optionally fill dphi-dtgl with N Sh.clusters in trackStudy
shahor02 Dec 11, 2024
142e0f5
Fix string comparison (#13798)
ktf Dec 12, 2024
97e469e
DPL Analysis: add RNTuple arrow::Dataset support (#13761)
ktf Dec 12, 2024
124b230
Pythia8: write accepted/attempted
sawenzel Dec 12, 2024
3318e86
Update AnalysisDataModel.h (#13799)
ddobrigk Dec 13, 2024
d5fa395
Add AGD DataOrigin to the list accepted by DCS file-push service
shahor02 Dec 13, 2024
a2ee722
DPL: Fix leak in TTree plugin (#13800)
ktf Dec 13, 2024
c5d40c3
Fix type for entry in MCEventHeader
sawenzel Dec 13, 2024
caa6292
DPL Analysis: copy parentFiles in AO2D -> RNTuple converter (#13805)
ktf Dec 16, 2024
8ece2ec
HybridGen/EventPool: small fixes, Add missing EventHeader propagation
sawenzel Dec 13, 2024
7e24578
fix in track propagation to TOF for MC (#13784)
noferini Dec 16, 2024
a6e67d3
ZDC - Fixes to intercalibration, waveform extraction. New workflow to…
cortesep Dec 16, 2024
a14603d
STR: Silence predicted chi2 calculation
f3sch Dec 7, 2024
ce6b536
Add Layer/Stave dump for checking clusters in IB (#13807)
mconcas Dec 16, 2024
a498560
Optionally drop huge clusters in the ALPIDE clusterer (#13808)
mconcas Dec 16, 2024
922cad6
Data model: add ITS shared clusters (#13781)
ddobrigk Dec 17, 2024
051b0b3
ORT GPU implementation (#13755)
ChSonnabend Dec 17, 2024
eae7e1d
O2-4592 - adding TOF LTIntegral to time series&skimmed data (#13809)
miranov25 Dec 17, 2024
5a7052d
ThresholdCalibratorSpec.cxx: bug fix for VRESETD scan (#13811)
iravasen Dec 18, 2024
d4f11dc
Data model: add extra information for run 2 evsel (#13810)
ddobrigk Dec 18, 2024
789968c
Fix in CTPRunScalers::getRate
shahor02 Dec 18, 2024
ecec4fc
Custom fifo names feature + jetscape usage example
jackal1-66 Nov 26, 2024
6fa29aa
Make tpc-time-series to accept track sources
shahor02 Dec 19, 2024
001ae07
Revert "fix in track propagation to TOF for MC (#13784)"
chiarazampolli Dec 19, 2024
948d271
Revert "Revert "fix in track propagation to TOF for MC (#13784)""
chiarazampolli Dec 19, 2024
9424b41
Make sure PrimaryGenerator is destructed
sawenzel Dec 19, 2024
a206db4
ITS::gpu: Update track selection logics to the state of the art (#13816)
mconcas Dec 19, 2024
4ebf849
DPL: improve handling of RNTuple (#13818)
ktf Dec 19, 2024
2a92e5e
Use O2LongInt aliased to long int instead of int64_t in persistent ob…
shahor02 Dec 13, 2024
e9e0633
Data model: bump up run 2 table versions (#13825)
ddobrigk Dec 20, 2024
07e4515
ITS::gpu: Add processNeighbours GPU kernel and handler (#13822)
mconcas Dec 20, 2024
5b004eb
ITS: Improved memory usage for vresetd scan (#13823)
iravasen Dec 20, 2024
c4c7026
o2sim: For consistency we take the eventcount from collcontext
sawenzel Dec 20, 2024
8662a04
Fix for subjob spawning with FIFOs
jackal1-66 Dec 19, 2024
384d150
Add option to rescale IT fraction for OROCs
wiechula Sep 24, 2024
ce7ac94
Common mode calculation
wiechula Sep 6, 2024
b5dd61f
Allow setting maxZ2X via config params
wiechula Nov 1, 2024
62d9460
Add functions for specific pad selections
wiechula Nov 8, 2024
f8d52a4
Add possibility to limit CM k-value in high coupling regions
wiechula Oct 16, 2024
0a49d52
Add PadFlags treatment, add protection
wiechula Dec 13, 2024
366d75e
Add possibility to store canvases in single PDF
wiechula Dec 13, 2024
89375b5
Add treatment of clustom dE/dx file and disabling dE/dx input
wiechula Dec 19, 2024
e01e682
dev: modification of getRate needed for qc
lietava Nov 24, 2024
d2dcb6b
clang
lietava Nov 24, 2024
6374d89
DPL: drop unneeded ScopedExit helper (#13831)
ktf Jan 2, 2025
f5d37d2
ITS/MFT decoder sends vector with certain errors details
shahor02 Dec 27, 2024
64dd90c
DPL: use requires rather than enable_if / static_assert
ktf Jan 3, 2025
1d6f86c
DPL: cleanup ServiceRegistry headers
ktf Jan 5, 2025
8b7ba4e
fix in TOF sim digitization (decalibration), and add MC truth for QC …
noferini Dec 30, 2024
c68ddc8
Apply encoding to boxgen particles
jackal1-66 Dec 22, 2024
9ede2d5
Fix the decay branch ratio of antihyperhelium4sigma
wang-yuanzhe Dec 20, 2024
4a1f6f8
DPL Analysis: out-of-line throws
aalkin Jan 6, 2025
ebe7724
fixup! DPL Analysis: out-of-line throws
aalkin Jan 6, 2025
fc66ba2
Please consider the following formatting changes
alibuild Jan 6, 2025
ec3e064
DPL: Simplify prune_voids_pack
ktf Dec 4, 2024
9c85fba
DPL: use constraints directly on arguments in place of requires
ktf Dec 4, 2024
ed5b093
Update Framework/Foundation/include/Framework/Endian.h
ktf Dec 12, 2024
fe94d64
Update Framework/Foundation/include/Framework/Endian.h
ktf Dec 12, 2024
964c539
Update Framework/Foundation/include/Framework/Endian.h
ktf Dec 12, 2024
f70fb9b
Ctpdev: irframes (#13835)
lietava Jan 6, 2025
b77f031
DPL: move a bunch of Variant helpers out of line
ktf Jan 7, 2025
a9ccd58
DPL: remove bloat
ktf Jan 8, 2025
3e37f60
DPL: reduce bloat in runDataProcessing.h
ktf Jan 8, 2025
a12df3e
DPL: make DeviceMetricsHelper more robust
ktf Jan 8, 2025
773a098
Common: Add flag helper class
f3sch Dec 8, 2024
11f7b5c
AOD: switch to flag class for streamer steering
f3sch Dec 9, 2024
e550484
Common: Delete enum bit operators
f3sch Dec 8, 2024
43223a4
Check presence of hit files before adding to TChain
sawenzel Jan 8, 2025
5269f06
DPL: hide more stuff from runDataProcessing.h
ktf Jan 9, 2025
8722184
GPU: Fix copying of cluster data to GPU when not all processing steps…
davidrohr Jan 9, 2025
651d9e5
DPL: improve calling of the termination hook
ktf Jan 9, 2025
501ef18
GPU: Fix sector tracking running on CPU if in GPU mode
davidrohr Jan 10, 2025
fff0296
Drop unneeded regex (#13851)
ktf Jan 10, 2025
a6d96bc
DPL: refactor ConfigParamRegistry to use C++20 (#13850)
ktf Jan 11, 2025
0c08b77
Get fmt 11.1.1 to compile (#13855)
ktf Jan 12, 2025
7f23fa1
Basic implementation of cocktail generation
jackal1-66 Dec 19, 2024
9e612a6
Update deep trigger example
sawenzel Jan 13, 2025
c834c68
Adding MFT covariances in AOD associated with global muon tracks (#13…
mcoquet642 Jan 13, 2025
92166c6
Fix mac having a different representation for unsigned long (#13858)
ktf Jan 13, 2025
25abc60
Replace is_bounded_array implementation with std:: one (#13856)
ktf Jan 14, 2025
51c1498
DPL: add explicit implementation of unsigned long (#13862)
ktf Jan 14, 2025
ee436d8
Update SCD interpolation parameters
wiechula Jan 6, 2025
75dbb6f
Protection against null CTPClass::descriptor in CTP digitizer
shahor02 Jan 14, 2025
82a019b
C++20 related fixes (#13860)
ktf Jan 14, 2025
240fad5
GPU OpenCL: Use device timers only when supported + better debug output
davidrohr Jan 11, 2025
828216a
DPL: improve HistogramRegistry.h (#13863)
ktf Jan 15, 2025
a31deb1
GPU CMake: Add check that RTC source files do not contain system headers
davidrohr Nov 26, 2024
6390170
Remove obsolete tools
davidrohr Nov 26, 2024
4a3f261
HIP RTC CMake: Fix dependency
davidrohr Jan 14, 2025
fcb75a1
DPL: add missing header on macOS (#13867)
ktf Jan 16, 2025
f83ef77
DPL Analysis: fix use-after-delete in expressions (#13869)
aalkin Jan 16, 2025
c595deb
Fix shared clusters calculation in TrackingStudy
shahor02 Jan 16, 2025
98dc521
Replaced kRainbow with kRainBow for consistency in PostTrackExtension…
Yuvrajxms09 Jan 17, 2025
90ca34c
GPU:Remove OpenCL 1.2, now that OpenCL 2 supports all its functionality
davidrohr Jan 15, 2025
b1f5bd5
GPU: Remove some template magic that was only needed for OpenCL 1.2
davidrohr Jan 15, 2025
e5c6672
Code-Checker, silence some false warnings from failures in clang-tidy
davidrohr Jan 15, 2025
843479b
GPU: Rename OpenCL2 to OpenCL, now that we have only 1 OpenCL impleme…
davidrohr Jan 15, 2025
91d6a2c
GPU: Remove obsolete tool
davidrohr Jan 15, 2025
147ed12
GPU: Merge opencl-common and opencl2 source files
davidrohr Jan 15, 2025
f9e0b93
GPU Standalone: fix makefile clean command to clean ROOT dictionaries
davidrohr Jan 15, 2025
c758e98
GPU OpenCL: Rename OPENCLCPP macros to OPENCL, since OPENCLC was removed
davidrohr Jan 15, 2025
1265804
GPU: Remove OpenCL base protections no longer needed
davidrohr Jan 15, 2025
c639af6
GPU: Remove all ROOT5 / CINT based protections
davidrohr Jan 15, 2025
c10424c
GPU: Remove all C++11 based protections
davidrohr Jan 15, 2025
518b10d
DPL: fix small leak when receiving WS messages from the driver (#13871)
ktf Jan 17, 2025
e16c810
DPL: Reduce some verbosity from FATAL to ERROR
davidrohr Jan 19, 2025
a0bd8e9
GPU: Add missing headeres and some protections
davidrohr Jan 19, 2025
41919ac
Ctpdev: 3 things (#13875)
lietava Jan 20, 2025
4d5a07f
DPL Analysis: simplify the persist method with requirements (#13881)
ktf Jan 21, 2025
9c5dea2
DPL: make `base_of_template`/`specialization_of_template` accept cr-q…
aalkin Jan 21, 2025
f96f879
DPL: only support getting a certain set of vectors
ktf Jan 21, 2025
c4f4a41
DPL: Simplify persist further
ktf Jan 21, 2025
b9b3e2e
report filenames for xrootd debug output in FileFetcher
shahor02 Dec 17, 2024
4215700
Recover adjustOverriddenEOV call from the CCDBPopulator
shahor02 Jan 21, 2025
c09848c
CPV,PHS: code reduction and fix in digitization
sawenzel Jan 22, 2025
6e582ef
DPL: drop obsolete communication method completely
ktf Jan 22, 2025
89fbec2
DPL Analysis: avoid calculating indexing columns
ktf Jan 22, 2025
47eb04f
GPU: Remove C++ <17 protections from GPU code
davidrohr Jan 19, 2025
e082562
GPU: Fix compilation without Vc.
fweig Jan 21, 2025
7b2c021
Fix GPUTPCGeometry LinearPad2Y/Y2Pad methods, define biased ones in G…
shahor02 Jan 21, 2025
b8be78a
DPL: improve getIndexFromLabel
ktf Jan 22, 2025
5efb6e2
DPL Analysis: avoid base_of_template in concepts for column type iden…
aalkin Jan 23, 2025
0f1ed00
DPL Analysis: Refactor group slicer (#13839)
aalkin Jan 23, 2025
dacf735
DPL Analysis: refactor inputsFromArgs, update concepts (#13847)
aalkin Jan 23, 2025
611600b
Trigger implementation in hybrid generator (#13873)
jackal1-66 Jan 23, 2025
912f396
added merging of TCanvas to mergers (#13876)
justonedev1 Jan 23, 2025
d9c4e19
Disable test_Generator_test_GeneratorPythia8Param (#13893)
singiamtel Jan 23, 2025
95d419d
Base: allow to create alignment for individual detectors other than ITS
f3sch Jan 23, 2025
31358c8
add TPC occupancy est. to SVStudy output
shahor02 Jan 22, 2025
dd08446
QC: add TCanvas into mergeable checks (#13897)
justonedev1 Jan 23, 2025
0d3b460
Propagate list of tables also in case of derived data (#13885)
glromane Jan 24, 2025
4208d4a
ITS3: Add metalstack to geometry
f3sch Nov 27, 2024
ebc315b
ITS3: correction to epitaxial layer
f3sch Jan 23, 2025
e6af06b
ITS3: small readme changes
f3sch Dec 18, 2024
04735fd
ITS3: Fix metal stack geo
f3sch Jan 22, 2025
dc4fd4b
ITS3: change severity to debug
f3sch Jan 22, 2025
0583f68
ITS3: modify layer geo
f3sch Jan 23, 2025
4c92a83
ITS3: make segmentation class header only
f3sch Jan 23, 2025
8596636
ITS3: move pixelarray to start at zero phi
f3sch Jan 23, 2025
ca9734e
ITS3: macro fixes
f3sch Jan 23, 2025
e67bb39
ITS: change layer name to debug severity
f3sch Jan 22, 2025
721abea
ITS: ITS3 matrix generation fix + demoting&removal of logging
f3sch Jan 23, 2025
3654964
ITS3: double precision for geometry + z-shift
f3sch Jan 24, 2025
7cc1a55
ITS3: Digitizer constness
f3sch Jan 24, 2025
00fc51c
ITS3: macro include cluster eta, row, col
f3sch Jan 24, 2025
b215ba9
ITS3: extend wrapvolZ to include outer edges
f3sch Jan 25, 2025
53e93cd
ITS3: remove unused var
f3sch Jan 27, 2025
de188ec
ITS3: cluster macro
f3sch Jan 27, 2025
4153ae8
ITS3: Add DigiParams
f3sch Feb 3, 2025
e99cb13
ITS: digiparams make print func virtual
f3sch Feb 3, 2025
c59b26d
ITS3: DigiParams amendment
f3sch Jan 31, 2025
dffc54e
ITS3: Digitizer option to pick response function
f3sch Jan 31, 2025
5e18f0d
ITS3: build APTS response function
f3sch Jan 31, 2025
b344737
ITS3: renamed SuperAlpide to Mosaix
f3sch Jan 31, 2025
b2340fc
ITS3: Propagate rename to ITS helper class
f3sch Jan 31, 2025
f84fdd1
AlpideResponse adjust for APTS
f3sch Feb 1, 2025
d19d43a
ITS3: digitizer pre-set response names
f3sch Feb 1, 2025
aa9c47d
ITS3: remove unneeded variables + make segmentation fully float
f3sch Feb 1, 2025
bf17f46
ITS3: scale pixel-resp + fix OB resp func
f3sch Feb 1, 2025
4f3713a
ITS3: make ITSRESPONSE cached var
f3sch Feb 3, 2025
39b48f1
ITS3: digitizer offset for Alpide resp.
f3sch Feb 3, 2025
be1a39f
ITS3: Segmenatation remove member prefix from vars
f3sch Feb 3, 2025
5891c13
ITS3: shift back to nominal pos + proper metal stack position
f3sch Feb 4, 2025
3381b42
ITS3: remove newline from digiparams
f3sch Feb 7, 2025
ed13ef5
ITS3: make segmentation fully constexpr
f3sch Feb 10, 2025
d11e736
ITS3: minor changes in Digitizer for float
f3sch Feb 10, 2025
98e926c
ITS3: move pixel specs down
f3sch Feb 11, 2025
694e965
ITS3: account in segmentation trans for nominal shift
f3sch Feb 11, 2025
68b8469
ITS3: Digitizer flip row for IB for APTS
f3sch Feb 11, 2025
292e001
ITS3: Add explanation to SegmentationMosaix
f3sch Feb 14, 2025
7e5ba7d
ITS3: propagating split dict to external code
f3sch Feb 26, 2025
617e4fc
ITS3: split topo dict into IB and OB
f3sch Feb 27, 2025
ecdea27
ITS3: add TopoDict print
f3sch Feb 27, 2025
25c5276
ITS3: Add fsanitizer in cmake
f3sch Mar 11, 2025
b7f0c8c
its3 digitization parameter sets
ChunzhengLab Mar 3, 2025
8c81c26
Fix on the C2F and F2C in SegmentationMosaix class
ChunzhengLab Mar 5, 2025
1002dc1
Set scale function for alpide as IB
ChunzhengLab Mar 5, 2025
7cc55c2
Fix on the init of the ITS3 chip digits container
ChunzhengLab Mar 6, 2025
292a0df
Add more info in CreateDic macro
ChunzhengLab Mar 6, 2025
9e64146
Fix reverse order of maxRows and Cols
ChunzhengLab Mar 11, 2025
3183ac7
ITS3 D2L supports floating row and column numbers
ChunzhengLab Mar 14, 2025
f6b3525
Add a macro to compare ITS3 clusters and digits on a pixel array
ChunzhengLab Mar 20, 2025
e38c5f2
Add the script to check hits and clusters on a track
ChunzhengLab Apr 1, 2025
609b9b9
Introduce ChipSimResponse with response-centre extraction logic
ChunzhengLab Apr 3, 2025
70f1d23
Add script for visualizing chip responses
ChunzhengLab Apr 4, 2025
99873a1
Please consider the following formatting changes
alibuild Apr 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
19 changes: 17 additions & 2 deletions Common/DCAFitter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
\page refDetectorsVertexing DCAFitter
/doxy -->

## DCAFitterN
# DCAFitterN

Templated class to fit the Point of Closest Approach (PCA) of secondary vertex with N prongs. Allows minimization of either absolute or weighted Distances of Closest Approach (DCA) of N tracks to their common PCA.

Expand Down Expand Up @@ -74,7 +74,22 @@ Extra method `setWeightedFinalPCA(bool)` is provided for the "mixed" mode: if `s
but the final V0 position will be calculated using weighted average. One can also recalculate the V0 position by the weighted average method by calling explicitly
`ft.recalculatePCAWithErrors(int icand=0)`, w/o prior call of `setWeightedFinalPCA(true)`: this will update the position returned by the `getPCACandidate(int cand = 0)`.

The covariance matrix of the V0 position is calculated as an inversed sum of tracks inversed covariances at respective `X_dca` points.
The covariance matrix of the V0 position is calculated as an inverted sum of tracks inversed covariances at respective `X_dca` points.

See ``O2/Common/DCAFitter/test/testDCAFitterN.cxx`` for more extended example.
Currently only 2 and 3 prongs permitted, thought this can be changed by modifying ``DCAFitterN::NMax`` constant.

## Error handling

It may happen that the track propagation to the the proximity of the PCA fails at the various stage of the fit. In this case the fit is abandoned and the failure flag is set, it can be checked using
isPropagationFailure(int cand = 0)` method.

Also, due to the linearization errors the covariance matrix of the track propagated to some point may become non-positive defined.
In this case the relevant correlation coefficient of the cov.matrix is redefined to cure the position part of the cov.matrix and further program flow depends on the user settings for `DCAFitterN::setBadCovPolicy(v)`:

`DCAFitterN::setBadCovPolicy(DCAFitterN::Discard);` : abandon fit (default)

`DCAFitterN::setBadCovPolicy(DCAFitterN::Override);` : continue fit with overridden cov.matrix

`DCAFitterN::setBadCovPolicy(DCAFitterN::OverrideAnFlag);` continue fit with overridden cov.matrix but set the propagation failure flag (can be checked using the same `isPropagationFailure(int cand = 0)` method).

132 changes: 105 additions & 27 deletions Common/DCAFitter/include/DCAFitter/DCAFitterN.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,34 +26,32 @@ namespace o2
{
namespace vertexing
{

///__________________________________________________________________________________
///< Inverse cov matrix (augmented by a dummy X error) of the point defined by the track
struct TrackCovI {
float sxx, syy, syz, szz;

GPUd() TrackCovI(const o2::track::TrackParCov& trc, float xerrFactor = 1.) { set(trc, xerrFactor); }

GPUdDefault() TrackCovI() = default;

GPUd() void set(const o2::track::TrackParCov& trc, float xerrFactor = 1)
GPUd() bool set(const o2::track::TrackParCov& trc, float xerrFactor = 1.f)
{
// we assign Y error to X for DCA calculation
// (otherwise for quazi-collinear tracks the X will not be constrained)
float cyy = trc.getSigmaY2(), czz = trc.getSigmaZ2(), cyz = trc.getSigmaZY(), cxx = cyy * xerrFactor;
float detYZ = cyy * czz - cyz * cyz;
if (detYZ > 0.) {
auto detYZI = 1. / detYZ;
sxx = 1. / cxx;
syy = czz * detYZI;
syz = -cyz * detYZI;
szz = cyy * detYZI;
} else {
#ifndef GPUCA_GPUCODE
throw std::runtime_error("invalid track covariance");
#else
printf("invalid track covariance\n");
#endif
bool res = true;
if (detYZ <= 0.) {
cyz = o2::gpu::GPUCommonMath::Sqrt(cyy * czz) * (cyz > 0 ? 0.98f : -0.98f);
detYZ = cyy * czz - cyz * cyz;
res = false;
}
auto detYZI = 1. / detYZ;
sxx = 1. / cxx;
syy = czz * detYZI;
syz = -cyz * detYZI;
szz = cyy * detYZI;
return res;
}
};

Expand All @@ -73,6 +71,27 @@ struct TrackDeriv {
}
};

///__________________________________________________________________________
///< Log log-throttling helper
struct LogLogThrottler {
size_t evCount{0};
size_t evCountPrev{0};
size_t logCount{0};

GPUdi() bool needToLog()
{
if (size_t(o2::gpu::GPUCommonMath::Log(++evCount)) + 1 > logCount) {
logCount++;
return true;
}
return false;
}

GPUdi() size_t getNMuted() const { return evCount - evCountPrev - 1; }

GPUdi() void clear() { evCount = evCountPrev = logCount = 0; }
};

template <int N, typename... Args>
class DCAFitterN
{
Expand All @@ -99,6 +118,12 @@ class DCAFitterN
using ArrTrPos = o2::gpu::gpustd::array<Vec3D, N>; // container of Track positions

public:
enum BadCovPolicy { // if encountering non-positive defined cov. matrix, the choice is:
Discard = 0, // stop evaluation
Override = 1, // override correlation coef. to have cov.matrix pos.def and continue
OverrideAndFlag = 2 // override correlation coef. to have cov.matrix pos.def, set mPropFailed flag of corresponding candidate to true and continue (up to the user to check the flag)
};

static constexpr int getNProngs() { return N; }

DCAFitterN() = default;
Expand Down Expand Up @@ -299,6 +324,9 @@ class DCAFitterN
pnt[2] = tr.getZ();
}

void setBadCovPolicy(BadCovPolicy v) { mBadCovPolicy = v; }
BadCovPolicy getBadCovPolicy() const { return mBadCovPolicy; }

private:
// vectors of 1st derivatives of track local residuals over X parameters
o2::gpu::gpustd::array<o2::gpu::gpustd::array<Vec3D, N>, N> mDResidDx;
Expand All @@ -324,11 +352,15 @@ class DCAFitterN
o2::gpu::gpustd::array<int, MAXHYP> mNIters; // number of iterations for each seed
o2::gpu::gpustd::array<bool, MAXHYP> mTrPropDone{}; // Flag that the tracks are fully propagated to PCA
o2::gpu::gpustd::array<bool, MAXHYP> mPropFailed{}; // Flag that some propagation failed for this PCA candidate
LogLogThrottler mLoggerBadCov{};
LogLogThrottler mLoggerBadInv{};
LogLogThrottler mLoggerBadProp{};
MatSym3D mWeightInv; // inverse weight of single track, [sum{M^T E M}]^-1 in EQ.T
o2::gpu::gpustd::array<int, MAXHYP> mOrder{0};
int mCurHyp = 0;
int mCrossIDCur = 0;
int mCrossIDAlt = -1;
BadCovPolicy mBadCovPolicy{BadCovPolicy::Discard}; // what to do in case of non-pos-def. cov. matrix, see BadCovPolicy enum
bool mAllowAltPreference = true; // if the fit converges to alternative PCA seed, abandon the current one
bool mUseAbsDCA = false; // use abs. distance minimization rather than chi2
bool mWeightedFinalPCA = false; // recalculate PCA as a cov-matrix weighted mean, even if absDCA method was used
Expand Down Expand Up @@ -677,7 +709,23 @@ GPUd() bool DCAFitterN<N, Args...>::recalculatePCAWithErrors(int cand)
mCurHyp = mOrder[cand];
if (mUseAbsDCA) {
for (int i = N; i--;) {
mTrcEInv[mCurHyp][i].set(mCandTr[mCurHyp][i], XerrFactor); // prepare inverse cov.matrices at starting point
if (!mTrcEInv[mCurHyp][i].set(mCandTr[mCurHyp][i], XerrFactor)) { // prepare inverse cov.matrices at starting point
if (mLoggerBadCov.needToLog()) {
#ifndef GPUCA_GPUCODE
printf("fitter %d: error (%ld muted): overrode invalid track covariance from %s\n",
mFitterID, mLoggerBadCov.getNMuted(), mCandTr[mCurHyp][i].asString().c_str());
#else
printf("fitter %d: error (%ld muted): overrode invalid track covariance cyy:%e czz:%e cyz:%e\n",
mFitterID, mLoggerBadCov.getNMuted(), mCandTr[mCurHyp][i].getSigmaY2(), mCandTr[mCurHyp][i].getSigmaZ2(), mCandTr[mCurHyp][i].getSigmaZY());
#endif
mLoggerBadCov.evCountPrev = mLoggerBadCov.evCount;
}
if (mBadCovPolicy == Discard) {
return false;
} else if (mBadCovPolicy == OverrideAndFlag) {
mPropFailed[mCurHyp] = true;
} // otherwise, just use overridden errors w/o flagging
}
}
if (!calcPCACoefs()) {
mCurHyp = saveCurHyp;
Expand Down Expand Up @@ -884,7 +932,23 @@ GPUd() bool DCAFitterN<N, Args...>::minimizeChi2()
return false;
}
setTrackPos(mTrPos[mCurHyp][i], mCandTr[mCurHyp][i]); // prepare positions
mTrcEInv[mCurHyp][i].set(mCandTr[mCurHyp][i], XerrFactor); // prepare inverse cov.matrices at starting point
if (!mTrcEInv[mCurHyp][i].set(mCandTr[mCurHyp][i], XerrFactor)) { // prepare inverse cov.matrices at starting point
if (mLoggerBadCov.needToLog()) {
#ifndef GPUCA_GPUCODE
printf("fitter %d: error (%ld muted): overrode invalid track covariance from %s\n",
mFitterID, mLoggerBadCov.getNMuted(), mCandTr[mCurHyp][i].asString().c_str());
#else
printf("fitter %d: error (%ld muted): overrode invalid track covariance cyy:%e czz:%e cyz:%e\n",
mFitterID, mLoggerBadCov.getNMuted(), mCandTr[mCurHyp][i].getSigmaY2(), mCandTr[mCurHyp][i].getSigmaZ2(), mCandTr[mCurHyp][i].getSigmaZY());
#endif
mLoggerBadCov.evCountPrev = mLoggerBadCov.evCount;
}
if (mBadCovPolicy == Discard) {
return false;
} else if (mBadCovPolicy == OverrideAndFlag) {
mPropFailed[mCurHyp] = true;
} // otherwise, just use overridden errors w/o flagging
}
}

if (mMaxDZIni > 0 && !roughDZCut()) { // apply rough cut on tracks Z difference
Expand All @@ -904,11 +968,10 @@ GPUd() bool DCAFitterN<N, Args...>::minimizeChi2()

// do Newton-Rapson iteration with corrections = - dchi2/d{x0..xN} * [ d^2chi2/d{x0..xN}^2 ]^-1
if (!mD2Chi2Dx2.Invert()) {
#ifndef GPUCA_GPUCODE_DEVICE
LOG(error) << "InversionFailed";
#else
printf("InversionFailed\n");
#endif
if (mLoggerBadInv.needToLog()) {
printf("fitter %d: error (%ld muted): Inversion failed\n", mFitterID, mLoggerBadCov.getNMuted());
mLoggerBadInv.evCountPrev = mLoggerBadInv.evCount;
}
return false;
}
VecND dx = mD2Chi2Dx2 * mDChi2Dx;
Expand Down Expand Up @@ -961,11 +1024,10 @@ GPUd() bool DCAFitterN<N, Args...>::minimizeChi2NoErr()

// do Newton-Rapson iteration with corrections = - dchi2/d{x0..xN} * [ d^2chi2/d{x0..xN}^2 ]^-1
if (!mD2Chi2Dx2.Invert()) {
#ifndef GPUCA_GPUCODE_DEVICE
LOG(error) << "InversionFailed";
#else
printf("InversionFailed\n");
#endif
if (mLoggerBadInv.needToLog()) {
printf("itter %d: error (%ld muted): Inversion failed\n", mFitterID, mLoggerBadCov.getNMuted());
mLoggerBadInv.evCountPrev = mLoggerBadInv.evCount;
}
return false;
}
VecND dx = mD2Chi2Dx2 * mDChi2Dx;
Expand Down Expand Up @@ -1108,6 +1170,14 @@ GPUdi() bool DCAFitterN<N, Args...>::propagateParamToX(o2::track::TrackPar& t, f
}
if (!res) {
mPropFailed[mCurHyp] = true;
if (mLoggerBadProp.needToLog()) {
#ifndef GPUCA_GPUCODE
printf("fitter %d: error (%ld muted): propagation failed for %s\n", mFitterID, mLoggerBadProp.getNMuted(), t.asString().c_str());
#else
printf("fitter %d: error (%ld muted): propagation failed\n", mFitterID, mLoggerBadProp.getNMuted());
#endif
mLoggerBadProp.evCountPrev = mLoggerBadProp.evCount;
}
}
return res;
}
Expand All @@ -1126,6 +1196,14 @@ GPUdi() bool DCAFitterN<N, Args...>::propagateToX(o2::track::TrackParCov& t, flo
}
if (!res) {
mPropFailed[mCurHyp] = true;
if (mLoggerBadProp.needToLog()) {
#ifndef GPUCA_GPUCODE
printf("fitter %d: error (%ld muted): propagation failed for %s\n", mFitterID, mLoggerBadProp.getNMuted(), t.asString().c_str());
#else
printf("fitter %d: error (%ld muted): propagation failed\n", mFitterID, mLoggerBadProp.getNMuted());
#endif
mLoggerBadProp.evCountPrev = mLoggerBadProp.evCount;
}
}
return res;
}
Expand Down
16 changes: 15 additions & 1 deletion Common/ML/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,21 @@
# granted to it by virtue of its status as an Intergovernmental Organization
# or submit itself to any jurisdiction.

# Pass ORT variables as a preprocessor definition
if(DEFINED ENV{ORT_ROCM_BUILD})
add_compile_definitions(ORT_ROCM_BUILD=$ENV{ORT_ROCM_BUILD})
endif()
if(DEFINED ENV{ORT_CUDA_BUILD})
add_compile_definitions(ORT_CUDA_BUILD=$ENV{ORT_CUDA_BUILD})
endif()
if(DEFINED ENV{ORT_MIGRAPHX_BUILD})
add_compile_definitions(ORT_MIGRAPHX_BUILD=$ENV{ORT_MIGRAPHX_BUILD})
endif()
if(DEFINED ENV{ORT_TENSORRT_BUILD})
add_compile_definitions(ORT_TENSORRT_BUILD=$ENV{ORT_TENSORRT_BUILD})
endif()

o2_add_library(ML
SOURCES src/ort_interface.cxx
SOURCES src/OrtInterface.cxx
TARGETVARNAME targetName
PRIVATE_LINK_LIBRARIES O2::Framework ONNXRuntime::ONNXRuntime)
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

/// \file ort_interface.h
/// \file OrtInterface.h
/// \author Christian Sonnabend <christian.sonnabend@cern.ch>
/// \brief A header library for loading ONNX models and inferencing them on CPU and GPU

#ifndef O2_ML_ONNX_INTERFACE_H
#define O2_ML_ONNX_INTERFACE_H
#ifndef O2_ML_ORTINTERFACE_H
#define O2_ML_ORTINTERFACE_H

// C++ and system includes
#include <vector>
Expand Down Expand Up @@ -89,4 +89,4 @@ class OrtModel

} // namespace o2

#endif // O2_ML_ORT_INTERFACE_H
#endif // O2_ML_ORTINTERFACE_H
Loading
Loading