Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2026-08-31 08:21:26

0001 // Tell emacs that this is a C++ source
0002 // -*- C++ -*-.
0003 #ifndef TPCTRACKRECO_TPCTRACKKALMANFITTER_H
0004 #define TPCTRACKRECO_TPCTRACKKALMANFITTER_H
0005 
0006 #include "TpcTrackFit.h"
0007 
0008 #include <array>
0009 #include <utility>
0010 #include <vector>
0011 
0012 class TpcTrackKalmanFitter
0013 {
0014  public:
0015   enum StateIndex
0016   {
0017     X = 0,
0018     Y = 1,
0019     Z = 2,
0020     Phi = 3,
0021     QOverPt = 4,
0022     TanLambda = 5,
0023     StateDim = 6
0024   };
0025 
0026   static bool fit(const std::vector<TpcTrackPoint> &points,
0027                   int charge,
0028                   const TpcKalmanConfig &config,
0029                   TpcKalmanResult &result,
0030                   double mass_gev = 0.13957039);
0031 
0032   static TpcTrackVec3 state_position(const std::array<double, StateDim> &state);
0033   static TpcTrackVec3 state_momentum(const std::array<double, StateDim> &state);
0034   static TpcTrackVec3 state_tangent(const std::array<double, StateDim> &state);
0035   static std::array<double, StateDim> propagation_state(const TpcKalmanResult &fit,
0036                                                         const TpcTrackVec3 &reference_vertex);
0037   static std::array<double, StateDim> propagate_state(const std::array<double, StateDim> &state,
0038                                                       double ds_cm,
0039                                                       const TpcKalmanConfig &config,
0040                                                       double mass_gev = 0.13957039);
0041   static std::pair<double, double> dca_to_vertex(const TpcKalmanResult &fit,
0042                                                  const TpcTrackVec3 &vertex,
0043                                                  const TpcKalmanConfig *config = nullptr);
0044 };
0045 
0046 #endif