You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1472e6a
Browse filesBrowse the repository at this point in the historyBrowse files
MatchCosmics: selection of cosmics in collision data, named presets
In collision data nearly all seeds are collision tracks and TPC-only legs had their z ignored, so any two tracks back-to-back in
the transverse plane were paired (PbPb: minutes per TF, tens of thousands of fake pairs). New settings, all off by default and
switched on together by the preset physics-v1 (o2-cosmics-match-workflow --cosmics-preset physics-v1; --configKeyValues can still
override single keys, unknown names are fatal):
- Seed cuts: minSeedNClTPC, minSeedDCAxy and minSeedDCAxyNSigma reject short TPC fragments and seeds passing the beam line
(cosmics through the beam line are indistinguishable from collision tracks anyway).
- z test of TPC-only legs (constrainTPCOnlyZ): a one-side TPC-only track has z relative to its time0, z(t) = z + side*vD*(t-time0);
a CE-crossing or non-TPC-only track has an absolute z. The legs are compared at a common time (same side, or one leg with known
time); for legs on opposite sides z continuity fixes the common time, which must lie in both time brackets. That time, with its
error sigma_z / (2 vD) (~0.3 mus), is used for the refit and as the time of the cosmic (before: the centre of the bracket overlap,
tens of mus, which put the legs at the wrong z: cosmics run 562658 A x C chi2Match median 3.5e4 -> 43). For all other pairs the
time error of the cosmic stays the half-width of the bracket overlap.
- Same-half veto (vetoSameHalf): pairs whose two legs lie on the same side of the closest approach in the transverse plane (two
pieces of one leg) are rejected; skipped when a leg's reference point is within 20 cm of the closest approach.
- maxChi2Match: cut on the chi2 of the refitted top/bottom legs.
- minPtOppositeSides: for TPC-only legs on opposite sides z continuity defines the time, so z does not reject random pairs (94 % of
the PbPb candidates). Both legs (in checkPair, before the winner selection) and the refitted cosmic need pT above it (scaled with
the field).
Unconditionally, the seeds and the refit use the muon mass (and charge 1) for the material corrections instead of the TPC track's
PID from dE/dx (a leg tagged as kaon or proton got that mass): cosmic MC 6987 -> 7003 correct pairs (0 wrong), cosmics run 562658
357 -> 358; the refitted q/pt changes by +-0.4 % (MC) and +-1 % (562658) (q16-q84, pT < 20 GeV).
physics-v1: pT > 1 GeV, |DCA_xy| > 3 cm and > 10 sigma, >= 30 TPC clusters; systematic errors for the leg comparison y 0.5 cm,
snp 0.02, q/pt 0.05 (true pairs had pulls 2-4x too wide) with crude chi2 < 50; open per-parameter windows except tgl (3 sigma);
chi2Match < 1000; z test and same-half veto on; minPtOppositeSides 2 GeV.
Validation, TPC-only legs: cosmic MC with PbPb-like distortions 7003 of 8638 cosmics correct (81.1 %, 0 wrong pairs); cosmics run
562658 358 cosmics; PbPb 2025 LHC25an 567939 (19 kHz) 0.37 cosmics per TF (3.90 without the pT cut), 568041 reconstructed from
CTF 0.30 per TF (3203 in 10546 TFs; the PbPb numbers before the muon mass, which leaves 4 PbPb TFs unchanged).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
using InfoAccessor = o2d::AbstractRefAccessor<int, GTrackID::NSources>; // there is no unique <Info> structure, so the default return type is dummy (int)
@@ -78,6 +81,8 @@ class MatchCosmics
78
81
int id1 = MinusOne; ///< id of 2nd parnter
79
82
float chi2 = -1.f; ///< matching chi2
80
83
int next = MinusOne; ///< index of eventual next record
84
+
float tCommon = 0.f; ///< common time [mus] fixed by z continuity of TPC-only legs on opposite TPC sides
85
+
float tCommonErr = -1.f; ///< its 1 sigma error [mus]; < 0: not fixed, the refit uses the centre of the time-bracket overlap and the cosmic's time error is the overlap's half-width
81
86
};
82
87
83
88
structTrackSeed : publico2::track::TrackParCov {
@@ -86,6 +91,9 @@ class MatchCosmics
86
91
int matchID = MinusOne; ///< entry (none if MinusOne) of its match in the vector of matches
87
92
short vtIDMin = -1; ///< id of the 1st compatible vertex
88
93
short vtIDMax = -1; ///< id of the last compatible vertex
94
+
float tRef = 0.f; ///< time [mus] the z of the parameters refers to (TPC-only: the TrackTPC time0; others: bracket centre)
95
+
int8_t tpcSide = 0; ///< TPC-only seed with clusters on one side: +1 A, -1 C (z = z(t) - side*vD*(t-tRef)); 0: z absolute
96
+
std::array<float, 3> xyzRef{}; ///< global position of the reference point before the propagation to the DCA (same-half veto)
float maxChi2Match = -1.f; // reject cosmics whose top/bottom refitted legs disagree by more than this chi2 (< 0: no cut)
34
+
float minPtOppositeSides = 0.f; // TPC-only legs on opposite TPC sides: reject cosmics with the pT of either leg or of the refitted cosmic below this (scaled with field; 0: no cut)
32
35
float timeToleranceMUS = 0.f;
33
36
float maxStep = 10.f;
34
37
float maxSnp = 0.99f;
35
38
float minSeedPt = 0.10f; // use only tracks above this pT (scaled with field)
39
+
int minSeedNClTPC = 0; // use only TPC-only seeds with at least this number of clusters (0: no cut)
40
+
float minSeedDCAxy = 0.f; // use only tracks with |DCA_xy| to the beam line >= this [cm] (0: no cut; rejects collision tracks in physics data)
41
+
float minSeedDCAxyNSigma = 0.f; // use only tracks with |DCA_xy| >= this * sigma(DCA_xy) (0: no cut; poorly measured collision tracks)
42
+
bool constrainTPCOnlyZ = false; // TPC-only legs: test z at a common time (same side, or a leg with known time), else require the time implied by z continuity in both brackets
43
+
bool vetoSameHalf = false; // reject pairs whose two legs lie on the same side of the closest approach (two pieces of one leg)
36
44
float nSigmaTError = 4.f; // number of sigmas on track time error for matching (except for TPC which provides an interval)
37
45
float tpcExtraZError2 = 1.f; // extra error^2 on the TPC-only track Z coordinate
38
46
float fiducialRIP = 1.0f; // consider track having |Y@x=0|< this as passing DCA cut (if requested)
@@ -44,6 +52,12 @@ struct MatchCosmicsParams : public o2::conf::ConfigurableParamHelper<MatchCosmic
44
52
O2ParamDef(MatchCosmicsParams, "cosmicsMatch");
45
53
};
46
54
55
+
/// key=value string (configKeyValues syntax) of a named set of MatchCosmicsParams settings; the cosmics-match workflow applies it before
56
+
/// --configKeyValues, so single keys can still be overridden. Unknown names are fatal.
57
+
/// "physics-v1": cosmics in collision data (seed cuts against collision tracks, realistic systematic errors for the pair chi2, tgl window,
58
+
/// pT cut on pairs of TPC-only legs on opposite TPC sides)
// RSTODO this is simplification: one should constraint the TPC-only track Z by the time of other candidate (at least their difference of both tracks are TPC only).
466
-
// If the shift is large, eventually the tracks need to be refitted.
467
-
if (!ignoreZ) { // cut on Z makes no sense for TPC only tracks
515
+
if (ignoreZ && mMatchParams->constrainTPCOnlyZ) {
516
+
// a TPC-only track with clusters on one side has z relative to its time0: z(t) = z + side * vD * (t - tRef); a CE-crossing or
517
+
// non-TPC-only track has an absolute z (side 0). Bring both legs to a common time where possible and test z; for legs on opposite
518
+
// sides, z continuity fixes the common time, which must lie in both time brackets.
0 commit comments