Estimated reading time: 6 minutes

Tracking Package based on LCIO and GEAR, primarily aimed at providing track fitting in Marlin

Developed by S. Aplin, F. Gaede DESY, 2011

This is a weakness in CEPC Tracking.

Code reading:

===== MarlinKalTestTrack ============================================

addHit(hit), 在track里面加入hit,需要是有序的,因为要处理能损的方向 addHit(hit)


| v01-11 | ———

     - Improved readability of the MarlinTrkUtils functions
     - Added LCTPC-specific modifications:
       - geometry building is now based on the detector name from GEAR
       - Magnetic field may be zero -> avoid the value of infinity for kappa
       - Interaction Point (IP) meas. layer may not exist for LCTPC
       - Do not throw exception if the layer is not found, return "no_intersection" code
         instead. This avoids the problem if some of the state is not or cannot be available,
         e.g. the IP and CaloFace states are not (yet?) defined for the LCTPC geometry

| v01-10-01 | ————

     - Added some more diagnostics, no change to algorithms.

| v01-10 | ———

 - General 
   - Made Debug output more consistent

 - MarlinKalTestTrack
   - Changed smooth() to do _kaltrack->SmoothAll(), previously _hitIndexAtPositiveNDF + 1 
   - Corrected orientation regarding transporting inwards or outwards in propagate.
       - Fixed problem where initial covariance term kappa,tanL wrongly set as  kappa,z0.
         Minimal impact excepted. (Tino Calancha) 
   - Ensure that hits which are rejected for reasons other that Chi2 cut are added to the 
     list of outliers. 

| v01-09 | ———

  - General 
    - Made Debug output more consistent
- IMarlinTrack
    - Moved constant definitions of return codes outside of the header file. 
    - Added additional error return, for the case where no site are filtered when calling fit.

  - MarlinKalTestTrack
    - Prefer translation over rotation of the trackstate early in the fit, when using simple helix initialisation.

  - MarlinTrkUtils
    - Use EVENT::TrackState in place of IMPL::TrackStateImpl where appropriate. 
    - The TrackState for the initialisation can be at any reference point.

| v01-08 | ——–

Improvements in Diagnostics. - MarlinKalTestTrack
    - Print trkhit id in add hit

  - TrkAnalysisTree
    - Initialise the index values with -1
    - Added run and event number, added reciprocal weights for relations, corrected array sizes in places.

| v01-07 | ——–

- IMarlinTrack
    - Added two new methods to IMarlinTrack interface:  int getNDF( int& ndf ) and int getTrackerHitAtPositiveNDF( EVENT::TrackerHit*& trkhit ).                                   
  - MarlinKalTestTrack
    - smooth() no longer smooths back to 4th hit, but goes back the the hit at which the fit was constrained, meaning that it can adapt to 1D hits properly.
    - Fixed the issue where the upper part of the triangular symmetric cov matrix was not copied into the square TMatrixD cov(5,5).                                  
- HelixFit
    - Correct pass by reference in argument list

  - MarlinTrkUtils
    - placed definition of finaliseLCIOTrack in header making it publicly available. 
    - Corrected track state at first and last hit.
    - finaliseLCIOTrack now has the option to take the state at the last hit and calo face as input, 
      for the case where these have been calculated separately, e.g. in an in-out out-in strategy.
        - Due to occasional problems in the covariance matrix when smoothing back to sites added before the fit was fully constrained, 
      the last hit and the calo face use the smoothed values from the site at which the fit was fully constrained. 
          The fit is propagated to the point of closest approach to the last hit, and to the calo face.                	    
- Improved Diagnostics.

| v01-06 | ——– - Added convenient utility methods for fitting and producing LCIO tracks. - Added SET. - Moved initial pivot from the origin to the point where the initial helix crossed the layer containing the first hit to be filtered. - Replaced NULL C macro with 0 for pointers value. - Corrected phi range for moveRefPoint in HelixTrack. - Corrected the direction of the helix fit in HelixTrack - Added diagnostic functionality. This needs to be enabled via the #define statement MARLINTRK_DIAGNOSTICS_ON in MarlinTrkDiagnostics.h. The recording of diagnostics is controlled via DiagnosticsController, with recording off by default. To enable recording use getDiagnositicsPointer on the IMarlinTrkSystem and cast to DiagnosticsController, then call init(std::string root_file_name, std::string root_tree_name, bool recording_on) with recording_on set to true.

| v01-05 | ——–

   - MarlinKalTestTrack:
     - Protect against initializing before any hits have been added.
     - Allow starting from strip hit in debug mode.

   - HelixTrack:
     - Take account of direction of helix for fit.

   - LCIOTrackPropagators:
     - Corrected phi range for propagation.

| v01-04 | ——–

   - Changed fit  method to optionally respect a maxDeltaChi2 in IMarlinTrack interface:
  	      fit( double maxChi2Increment=DBL_MAX ) ;
  	   - Added new constructor to HelixTrack that generates helix from three point.
   - Corrected sign of d0 when initialising from an LCIO track state in MarlinKalTestTrack.
   - Fill GEAR MeasurementSurfaceStore using ILDMeasurementSurfaceStoreFiller from KalDet.
   - Cleaned up depedencies

| v01-03 | ——–

- Added cylindrical SIT for LOI data.
   - improve use of MarlinTrk namespace.
   - Fixed use of covariance matrix in initialise. 
   - Changed getSiteFromLCIOHit from taking an iterator to taking a pointer to a site. 
   - Corrected smoothed state when used.

| v01-02 | ——–

- To correctly determine the fits at the first hit and the last hit methods have be added to IMarlinTrk to
         get the list of pointers to EVENT::TrackerHit and the chi2 increment for both hits included in the fit 
         as well as those rejected as outliers. 
   - To test the chi2 increment which would result from adding a hit to the fit the method  testChi2Increment 
         has been added to IMarlinTrk. This method will not alter the fit, it simply provides a method to test 
         the inclusion of a hit. 
       - MarlinKalTestTrack has been adapted to use the pointer to LCIO TrackerHits in ILDVTrackHit.

| v01-01 | ——–

- Support for KalDet Multilayer added
   - Added calo face to support detector
   - Made use of new method in  ILDVMeasLayer "getIntersectionAndCellID"
   - Change GetMLName to GetName in line with KalTest
   - Fixed phi range of helixtrack
  	   - MarlinKalTestTrack fixed definition of phi0 in  initialise(TS& ts)
     corrected conversion from LCIO to KalTest track parameters in initialise

| v01-00 | ——–

IMarlinTrack: Interface for generic tracks in MarlinTrk. The interface should provide the functionality to perform track finding and fitting.

IMarlinTrkSystem: Base class for tracking system implementations in MarlinTrk.

MarlinKalTestTrack: Tracking System used to create a KaltTest Kalman fitter - instantiates and holds the detector geometry.

LCIOTrackPropagators: Functions to perform the geometric propagation of LCIO tracks, for closed solutions.

HelixFit: C++ rewrite of the aleph Fortran routine TFITHL, which provides a fast helix fit