CbmRoot
CbmLitRK4TrackExtrapolator.h
Go to the documentation of this file.
1 
12 #ifndef CBMLITRK4TRACKEXTRAPOLATOR_H_
13 #define CBMLITRK4TRACKEXTRAPOLATOR_H_
14 
16 
17 #include "data/CbmLitTrackParam.h"
18 
19 #include <memory>
20 #include <vector>
21 
22 class CbmLitField;
23 
25 public:
26  /* Constructor with field
27  *@param field Magnetic field.
28  */
29  CbmLitRK4TrackExtrapolator(std::shared_ptr<CbmLitField> field);
30  //CbmLitField* field);
31 
32  /* Destructor */
34 
35  /* Inherited from CbmLitTrackExtrapolation */
36  virtual LitStatus Extrapolate(const CbmLitTrackParam* parIn,
37  CbmLitTrackParam* parOut,
38  litfloat zOut,
39  std::vector<litfloat>* F);
40 
41  /* Inherited from CbmLitTrackExtrapolation */
42  virtual LitStatus
43  Extrapolate(CbmLitTrackParam* par, litfloat zOut, std::vector<litfloat>* F);
44 
45 protected:
46  /* Calculates output track parameters and derivatives with the 4th order Runge-Kutta method.
47  * @param xIn Input track parameters vector (x, y, tx, ty, q/p).
48  * @param zIn Input Z position [cm].
49  * @param xOut Output track parameters vector (x, y, tx, ty, q/p)
50  * @param zOut Input Z position to extrapolate to [cm].
51  * @param derivs Vector with integrated derivatives.
52  */
53 
54  void RK4Order(const std::vector<litfloat>& xIn,
55  litfloat zIn,
56  std::vector<litfloat>& xOut,
57  litfloat zOut,
58  std::vector<litfloat>& derivs) const;
59 
60  /* TODO: add comment */
61  litfloat CalcOut(litfloat in, const litfloat k[4]) const;
62 
63  /* Transport the covariance matrix, using formula cOut = F*cIn*Ft.
64  * @param cIn Input covariance matrix.
65  * @param F Input transport matrix.
66  * @param cOut Output covariance matrix.
67  */
68  void TransportC(const std::vector<litfloat>& cIn,
69  const std::vector<litfloat>& F,
70  std::vector<litfloat>& cOut) const;
71 
72 private:
73  std::shared_ptr<CbmLitField> fField;
74  //CbmLitField* fField; // magnetic field
75 };
76 
77 #endif //CBMLITRK4TRACKEXTRAPOLATOR_H_
CbmLitTrackParam.h
Data class for track parameters.
litfloat
double litfloat
Definition: CbmLitFloat.h:15
CbmLitTrackParam
Data class for track parameters.
Definition: CbmLitTrackParam.h:29
CbmLitField
Interface for accessing the magnetic field.
Definition: CbmLitField.h:20
CbmLitRK4TrackExtrapolator::fField
std::shared_ptr< CbmLitField > fField
Definition: CbmLitRK4TrackExtrapolator.h:73
CbmLitTrackExtrapolator.h
Interface for track extrapolation algorithm.
CbmLitRK4TrackExtrapolator::~CbmLitRK4TrackExtrapolator
virtual ~CbmLitRK4TrackExtrapolator()
Definition: CbmLitRK4TrackExtrapolator.cxx:17
CbmLitRK4TrackExtrapolator::TransportC
void TransportC(const std::vector< litfloat > &cIn, const std::vector< litfloat > &F, std::vector< litfloat > &cOut) const
Definition: CbmLitRK4TrackExtrapolator.cxx:262
CbmLitTrackExtrapolator
Interface for track extrapolation algorithm.
Definition: CbmLitTrackExtrapolator.h:27
CbmLitRK4TrackExtrapolator
Definition: CbmLitRK4TrackExtrapolator.h:24
CbmLitRK4TrackExtrapolator::CbmLitRK4TrackExtrapolator
CbmLitRK4TrackExtrapolator(std::shared_ptr< CbmLitField > field)
Definition: CbmLitRK4TrackExtrapolator.cxx:13
CbmLitRK4TrackExtrapolator::CalcOut
litfloat CalcOut(litfloat in, const litfloat k[4]) const
Definition: CbmLitRK4TrackExtrapolator.cxx:235
LitStatus
LitStatus
Definition: CbmLitEnums.h:23
CbmLitRK4TrackExtrapolator::RK4Order
void RK4Order(const std::vector< litfloat > &xIn, litfloat zIn, std::vector< litfloat > &xOut, litfloat zOut, std::vector< litfloat > &derivs) const
Definition: CbmLitRK4TrackExtrapolator.cxx:51
CbmLitRK4TrackExtrapolator::Extrapolate
virtual LitStatus Extrapolate(const CbmLitTrackParam *parIn, CbmLitTrackParam *parOut, litfloat zOut, std::vector< litfloat > *F)
Track parameters extrapolation with calculation of transport matrix.
Definition: CbmLitRK4TrackExtrapolator.cxx:19