delphi-edm4hep
DELPHI SDST/FDST -> EDM4hep converter
Loading...
Searching...
No Matches
PerigeeMatch.h
Go to the documentation of this file.
1
// PerigeeMatch.h
2
//
3
// Identity-binding between sDST and fDST tracks via PA.TRAC perigee
4
// geometry. Used by the pass-2 binary.
5
//
6
// Why perigee-geometric matching: paIdx and vecp_i are PSCEVT-rebuilt
7
// per DST level and NOT invariant across sDST/fDST for the same
8
// physical track. The PA.TRAC perigee parameters (d0, z0, theta, phi,
9
// 1/R) are stored identically on both DST levels for the same physical
10
// track — float-precision identity, modulo any postDST re-fit. This is
11
// the only reliable identity key.
12
//
13
// The cost formula and tolerance are kept compatible with the legacy
14
// SDST converter's fdst-sidecar matcher, which has been validated to
15
// ~97% match rate on the qq sample.
16
17
#pragma once
18
19
#include <edm4hep/TrackCollection.h>
20
21
namespace
delphi_edm4hep::perigee_match
{
22
23
// Given the sDST Track collection (helix basis, mm) and one fDST
24
// candidate track's perigee parameters (also helix basis, mm),
25
// find the best-matching sDST Track index within tolerance.
26
// Returns -1 if no match.
27
//
28
// The cost is computed in DELPHI cm-units internally so the
29
// `tolerance_cm2` default matches the legacy converter's threshold
30
// exactly. Cost formula:
31
// cost = (dd0[cm])² + (dz0[cm])² + (1000·d_invR[1/cm])²
32
// tolerance: 1e-4 cm² (~ 100 μm radial match)
33
//
34
// Charge gate: implicit via the sign of omega (= sign of q·B·sin(θ)·invP;
35
// the B-field is uniform per event so sign(omega) == sign(q)).
36
int
findMatch
(
37
const
edm4hep::TrackCollection& sdst_tracks,
38
double
fdst_D0_mm,
39
double
fdst_Z0_mm,
40
double
fdst_omega_per_mm,
41
int
fdst_charge_signed,
42
double
tolerance_cm2 = 1.0e-4);
43
44
}
// namespace delphi_edm4hep::perigee_match
delphi_edm4hep::perigee_match
Definition
PerigeeMatch.h:21
delphi_edm4hep::perigee_match::findMatch
int findMatch(const edm4hep::TrackCollection &sdst_tracks, double fdst_D0_mm, double fdst_Z0_mm, double fdst_omega_per_mm, int fdst_charge_signed, double tolerance_cm2=1.0e-4)
Definition
PerigeeMatch.cpp:38
delphi_edm4hep
include
delphi_edm4hep
PerigeeMatch.h
Generated by
1.15.0