CbmRoot
CbmHelix.h
Go to the documentation of this file.
1 /*
2  * CbmHelix.h
3  *
4  * Created on: 27 sie 2019
5  * Author: Daniel Wielanek
6  * E-mail: daniel.wielanek@gmail.com
7  * Warsaw University of Technology, Faculty of Physics
8  * version of CbmKFTrack without any additional dependencies
9  */
10 #ifndef CBMHELIX_H_
11 #define CBMHELIX_H_
12 
13 #include "CbmGlobalTrack.h"
14 #include "CbmStsTrack.h"
15 #include "FairField.h"
16 #include <TObject.h>
17 #include <iostream>
21 #define SKIP_LOSSES
22 
23 class CbmHelix : public TObject {
24 protected:
25  Double_t fT[6], fC[15];
26  Double_t Qp() const { return fT[4]; };
27  void SetQp(Double_t qp) { fT[4] = qp; }
28  Double_t X() const { return fT[0]; }
29  Double_t Y() const { return fT[1]; }
30  Double_t Z() const { return fT[5]; }
31  Double_t Tx() const { return fT[2]; }
32  Double_t Ty() const { return fT[3]; }
33  static FairField* fgField;
34  Int_t indexS(Int_t i, Int_t j) {
35  return (j <= i) ? i * (i + 1) / 2 + j : j * (j + 1) / 2 + i;
36  }
37  void multQtSQ(const Int_t N, Double_t Q[]);
38  void ExtrapolateLine(Double_t z_out);
39  Int_t ExtrapolateRK4(Double_t z_out);
40  Int_t ExtrapolateALight(Double_t z_out);
41  Int_t Propagate(Double_t Z);
42  void SetParameters(const FairTrackParam* param);
43 
44 public:
45  CbmHelix();
46  static void SetField(FairField* field) { fgField = field; };
47  CbmHelix(const CbmHelix& other);
48  CbmHelix& operator=(const CbmHelix& other);
49  void Build(const FairTrackParam* params) { SetParameters(params); }
50  void Build(const CbmGlobalTrack* tr);
51  void Build(const CbmStsTrack* tr, Bool_t first);
52  void PrintInfo() const {
53  std::cout << Form("T={%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f}",
54  fT[0],
55  fT[1],
56  fT[2],
57  fT[3],
58  fT[4],
59  fT[5])
60  << std::endl;
61  }
62  Double_t* GetTrack() { return fT; }
63  Double_t* GetCovMatrix() { return fC; }
64  TVector3 Eval(Double_t z);
65  TVector3 Eval(Double_t z, TVector3& mom);
66  virtual ~CbmHelix();
67  ClassDef(CbmHelix, 1)
68 };
69 
70 #endif /* NICA_CBM_HELPERS_CBMHELIX_H_ */
CbmHelix::Y
Double_t Y() const
Definition: CbmHelix.h:29
CbmHelix::Ty
Double_t Ty() const
Definition: CbmHelix.h:32
CbmHelix::GetTrack
Double_t * GetTrack()
Definition: CbmHelix.h:62
CbmHelix::Tx
Double_t Tx() const
Definition: CbmHelix.h:31
CbmHelix::PrintInfo
void PrintInfo() const
Definition: CbmHelix.h:52
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
CbmHelix::CbmHelix
CbmHelix()
Definition: CbmHelix.cxx:14
CbmGlobalTrack.h
CbmHelix::Build
void Build(const FairTrackParam *params)
Definition: CbmHelix.h:49
CbmHelix::multQtSQ
void multQtSQ(const Int_t N, Double_t Q[])
Definition: CbmHelix.cxx:610
CbmHelix::Propagate
Int_t Propagate(Double_t Z)
Definition: CbmHelix.cxx:76
CbmHelix::fgField
static FairField * fgField
Definition: CbmHelix.h:33
CbmStsTrack.h
Data class for STS tracks.
CbmHelix::Z
Double_t Z() const
Definition: CbmHelix.h:30
CbmHelix::SetField
static void SetField(FairField *field)
Definition: CbmHelix.h:46
CbmHelix::fC
Double_t fC[15]
Definition: CbmHelix.h:25
CbmHelix::indexS
Int_t indexS(Int_t i, Int_t j)
Definition: CbmHelix.h:34
CbmHelix::ExtrapolateALight
Int_t ExtrapolateALight(Double_t z_out)
Definition: CbmHelix.cxx:362
CbmHelix::Eval
TVector3 Eval(Double_t z)
Definition: CbmHelix.cxx:29
CbmHelix::Qp
Double_t Qp() const
Definition: CbmHelix.h:26
CbmHelix::fT
Double_t fT[6]
Definition: CbmHelix.h:25
first
bool first
Definition: LKFMinuit.cxx:143
CbmHelix::ExtrapolateLine
void ExtrapolateLine(Double_t z_out)
Definition: CbmHelix.cxx:118
CbmHelix
Definition: CbmHelix.h:23
CbmHelix::operator=
CbmHelix & operator=(const CbmHelix &other)
Definition: CbmHelix.cxx:67
CbmGlobalTrack
Definition: CbmGlobalTrack.h:26
CbmHelix::SetParameters
void SetParameters(const FairTrackParam *param)
Definition: CbmHelix.cxx:44
CbmHelix::SetQp
void SetQp(Double_t qp)
Definition: CbmHelix.h:27
CbmHelix::X
Double_t X() const
Definition: CbmHelix.h:28
CbmStsTrack
Definition: CbmStsTrack.h:37
CbmHelix::GetCovMatrix
Double_t * GetCovMatrix()
Definition: CbmHelix.h:63
CbmHelix::ExtrapolateRK4
Int_t ExtrapolateRK4(Double_t z_out)
Definition: CbmHelix.cxx:142
CbmHelix::~CbmHelix
virtual ~CbmHelix()
Definition: CbmHelix.cxx:56