CbmRoot
Loading...
Searching...
No Matches
CbmLitRK4TrackExtrapolator.h
Go to the documentation of this file.
1/* Copyright (C) 2007-2019 GSI/JINR-LIT, Darmstadt/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Andrey Lebedev [committer] */
4
16#ifndef CBMLITRK4TRACKEXTRAPOLATOR_H_
17#define CBMLITRK4TRACKEXTRAPOLATOR_H_
18
21
22#include <memory>
23#include <vector>
24
25class CbmLitField;
26
28 public:
29 /* Constructor with field
30 *@param field Magnetic field.
31 */
32 CbmLitRK4TrackExtrapolator(std::shared_ptr<CbmLitField> field);
33 //CbmLitField* field);
34
35 /* Destructor */
37
38 /* Inherited from CbmLitTrackExtrapolation */
39 virtual LitStatus Extrapolate(const CbmLitTrackParam* parIn, CbmLitTrackParam* parOut, litfloat zOut,
40 std::vector<litfloat>* F);
41
42 /* Inherited from CbmLitTrackExtrapolation */
43 virtual LitStatus 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, litfloat zIn, std::vector<litfloat>& xOut, litfloat zOut,
55 std::vector<litfloat>& derivs) const;
56
57 /* TODO: add comment */
58 litfloat CalcOut(litfloat in, const litfloat k[4]) const;
59
60 /* Transport the covariance matrix, using formula cOut = F*cIn*Ft.
61 * @param cIn Input covariance matrix.
62 * @param F Input transport matrix.
63 * @param cOut Output covariance matrix.
64 */
65 void TransportC(const std::vector<litfloat>& cIn, const std::vector<litfloat>& F, std::vector<litfloat>& cOut) const;
66
67 private:
68 std::shared_ptr<CbmLitField> fField;
69 //CbmLitField* fField; // magnetic field
70};
71
72#endif //CBMLITRK4TRACKEXTRAPOLATOR_H_
LitStatus
Definition CbmLitEnums.h:29
double litfloat
Definition CbmLitFloat.h:19
Interface for track extrapolation algorithm.
Data class for track parameters.
Interface for accessing the magnetic field.
Definition CbmLitField.h:25
std::shared_ptr< CbmLitField > fField
virtual LitStatus Extrapolate(const CbmLitTrackParam *parIn, CbmLitTrackParam *parOut, litfloat zOut, std::vector< litfloat > *F)
Track parameters extrapolation with calculation of transport matrix.
void RK4Order(const std::vector< litfloat > &xIn, litfloat zIn, std::vector< litfloat > &xOut, litfloat zOut, std::vector< litfloat > &derivs) const
CbmLitRK4TrackExtrapolator(std::shared_ptr< CbmLitField > field)
litfloat CalcOut(litfloat in, const litfloat k[4]) const
void TransportC(const std::vector< litfloat > &cIn, const std::vector< litfloat > &F, std::vector< litfloat > &cOut) const
Interface for track extrapolation algorithm.
Data class for track parameters.