78 template<
typename DataT,
class Settings = FilterSettings<>>
116 if constexpr (Settings::kDoFitTime) {
224 std::array<DataT, 5>& Jy)
const;
231 const std::array<DataT, 5>& Jy);
238 const std::array<DataT, 5>& jR);
242 const std::array<DataT, 5>& jR);
272 static DataT
ApproximateBetheBloch(DataT bg2, DataT kp0, DataT kp1, DataT kp2, DataT kp3, DataT kp4);
296 void GuessTrack(
const DataT& trackZ,
const DataT hitX[],
const DataT hitY[],
const DataT hitZ[],
const DataT hitT[],
321 template<
typename DataT,
class Settings>
324 return fTr.ToString(i);
328 template<
typename DataT,
class Settings>
331 fTr.SetOneEntry(i0, T1.
fTr, i1);
335 template<
typename DataT,
class Settings>
338 DataT dz = (z_out -
fTr.GetZ());
339 return std::pair(
fTr.GetX() +
fTr.GetTx() * dz,
fTr.C00() + dz * (2 *
fTr.C20() + dz *
fTr.C22()));
342 template<
typename DataT,
class Settings>
345 DataT dz = (z_out -
fTr.GetZ());
346 return std::pair(
fTr.GetY() +
fTr.GetTy() * dz,
fTr.C11() + dz * (DataT(2.) *
fTr.C31() + dz *
fTr.C33()));
349 template<
typename DataT,
class Settings>
352 DataT dz = (z_out -
fTr.GetZ());
353 return fTr.C10() + dz * (
fTr.C21() +
fTr.C30() + dz *
fTr.C32());
357 template<
typename DataT,
class Settings>
368 DataT zLastLoop = z - step;
378 template<
typename DataT,
class Settings>
381 if constexpr (!Settings::kDoFitTime) {
382 for (
int j = 0; j < 5; j++) {
383 fTr.C(5, j) = DataT(0.);
385 for (
int j = 0; j < 6; j++) {
386 fTr.C(6, j) = DataT(0.);
Magnetic flux density interpolation along the track vs. z-coordinate (header)
Definition of the KfMeasurementXy class.
Implementation selection for the SIMD utilities (VS or pseudo)
Magnetic field region, corresponding to a hit triplet.
Magnetic field manager class.
The class describes a time measurement.
The class describes a 1D - measurement U in XY coordinate system.
The class describes a 2D - measurement (x, y) in XY coordinate system.
static constexpr int kNactiveParams
void FilterTime(DataT t, DataT dt2, const DataTmask &m)
filter the track with the time measurement
void SetMaxExtrapolationStep(double step)
set max extrapolation step [cm]
DataT ExtrapolateLineDxy(DataT z_out) const
DataT GetParticleMass() const
get the particle mass
void SetTrack(DataT z, const LinearizationFull< DataT > &lin)
void EnergyLossCorrection(DataT radThick, FitDirection direction)
void ExtrapolateNoField(DataT z)
extrapolate the track to the given Z assuming no magnetic field
void FilterTime(kf::MeasurementTime< DataT > mt)
filter the track with the time measurement
void SetMask(const DataTmask &m)
void FilterExtrapolatedXY(const kf::MeasurementXy< DataT > &m, const std::array< DataT, 5 > &Jx, const std::array< DataT, 5 > &Jy)
void SetLinearization(const Linearization_t &lin)
kf::TrackParam< DataT > fTr
track parameters
kf::utils::masktype< DataT > DataTmask
void SetOneEntry(const int i0, const TrackKalmanFilter &T1, const int i1)
Linearization_t fLinearisation
linearization parameters
void Filter1d(const kf::MeasurementU< DataT > &m)
filter the track with the 1d measurement
void FilterExtrapolatedY(const kf::MeasurementXy< DataT > &m, const std::array< DataT, 5 > &Jy)
void Extrapolate(DataT z, const kf::FieldRegion< DataT > &F)
static DataT ApproximateBetheBloch(DataT bg2)
Approximate mean energy loss with Bethe-Bloch formula.
DataT fMass
particle mass (muon mass by default)
void MultipleScattering(DataT radThick)
apply multiple scattering correction to the track
DataT GetMaxExtrapolationStep() const
get the particle mass
kf::utils::scaltype< DataT > DataTscal
std::string ToString(int i=-1)
void MultipleScattering(DataT radThick, DataT tx0, DataT ty0, DataT qp0)
apply multiple scattering correction to the track with the given Qp0
void SetParticleMass(DataT mass)
set particle mass for the fit
TrackKalmanFilter(const kf::TrackParam< T > &t)
kf::TrackParam< DataT > & Tr()
typename Settings::template LinearizationT< DataT > Linearization_t
void FilterExtrapolatedYChi2(const kf::MeasurementXy< DataT > &mL, const std::array< DataT, 5 > &jL, const kf::MeasurementXy< DataT > &mM, DataT msM, const kf::MeasurementXy< DataT > &mR, const std::array< DataT, 5 > &jR)
static std::tuple< DataT, DataT > GetChi2XChi2U(kf::MeasurementXy< DataT > m, DataT x, DataT y, DataT C00, DataT C10, DataT C11)
git two chi^2 components of the track fit to measurement
DataT GetParticleMass2() const
get the particle mass squared
Linearization_t & Linearization()
void GuessTrack(const DataT &trackZ, const DataT hitX[], const DataT hitY[], const DataT hitZ[], const DataT hitT[], const DataT By[], const DataTmask hitW[], const DataTmask hitWtime[], int NHits)
fast guess of track parameterts based on its hits
void FilterXY(const kf::MeasurementXy< DataT > &m, bool skipUnmeasuredCoordinates=false)
filter the track with the XY measurement
TrackKalmanFilter()=default
void SetTrack(const kf::TrackParam< T > &t)
void ExtrapolateInOneStep(DataT z, const kf::FieldRegion< DataT > &Field)
void MultipleScatteringInThickMaterial(DataT radThick, DataT thickness, bool fDownstream)
apply multiple scattering correction in thick material to the track
std::pair< DataT, DataT > ExtrapolateLineXdX2(DataT z_out) const
void MeasureVelocityWithQp()
measure the track velocity with the track Qp and the mass
std::pair< DataT, DataT > ExtrapolateLineYdY2(DataT z_out) const
DataT fMaxExtrapolationStep
max extrapolation step [cm]
void FilterVi(DataT vi)
filter the inverse speed
DataTmask fMask
mask of active elements in simd vectors
void ExtrapolateLineInField(DataT z_out, const kf::FieldRegion< DataT > &F)
extrapolate the track to the given Z using linearization at the straight line
void GetMeasurementModelAtZline(DataT zm, const kf::FieldRegion< DataT > &Field, std::array< DataT, 5 > &Jx, std::array< DataT, 5 > &Jy) const
extrapolate track as a line, return the extrapolated X, Y and the Jacobians
TrackKalmanFilter(const kf::TrackParam< DataT > &t)
void CleanNonActiveCovariances()
TrackParam classes of different types.
static void CopyEntries(TdataA &a, int ia, const TdataB &b, int ib)
typename std::conditional< std::is_same< T, fvec >::value, fmask, bool >::type masktype
typename std::conditional< std::is_same< T, fvec >::value, fscal, T >::type scaltype
fvec iif(const fmask &m, const fvec &t, const fvec &f)
FitDirection operator!(FitDirection d)
@ Y
Fit the time component.
static constexpr bool kDoFitTime
LinearizationT_< T > LinearizationT
LinearizationFull()=default
T y
y coordinate at the linearization point
T ty
ty = py/pz at the linearization point
T x
x coordinate at the linearization point
T qp
qp = q/pz at the linearization point
T vi
inverse speed at the linearization point
LinearizationFull(const TrackParam< T > p)
T time
time at the linearization point
T tx
tx = px/pz at the linearization point
LinearizationQp()=default
T qp
qp = q/pz at the linearization point
LinearizationQp(const TrackParam< T > p)