CbmRoot
Loading...
Searching...
No Matches
CbmHelix.h
Go to the documentation of this file.
1/* Copyright (C) 2023-2023 Warsaw University of Technology, Warsaw
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Daniel Wielanek [committer] */
4#ifndef CBMHELIX_H_
5#define CBMHELIX_H_
6
7#include "CbmGlobalTrack.h"
8#include "CbmStsTrack.h"
9#include "FairField.h"
10
11#include <TObject.h>
12
13#include <iostream>
18namespace Hal
19{
20 class MagField;
21}
22class CbmHelix : public TObject {
23 protected:
24 Double_t fT[6], fTb[15];
25 Double_t Qp() const { return fT[4]; };
26 void SetQp(Double_t qp) { fT[4] = qp; }
27 Double_t X() const { return fT[0]; }
28 Double_t Y() const { return fT[1]; }
29 Double_t Z() const { return fT[5]; }
30 Double_t Tx() const { return fT[2]; }
31 Double_t Ty() const { return fT[3]; }
32 static Hal::MagField* fgField;
33 Int_t indexS(Int_t i, Int_t j) { return (j <= i) ? i * (i + 1) / 2 + j : j * (j + 1) / 2 + i; }
34 void ExtrapolateLine(Double_t z_out);
35 Int_t ExtrapolateALight(Double_t z_out);
36 Int_t Propagate(Double_t Z);
37 void SetParameters(const FairTrackParam* param);
38
39 public:
40 CbmHelix();
41 static void SetField(Hal::MagField* field) { fgField = field; };
42 CbmHelix(const CbmHelix& other);
43 CbmHelix& operator=(const CbmHelix& other);
44 void Build(const FairTrackParam* params) { SetParameters(params); }
45 void Build(const CbmGlobalTrack* tr);
46 void Build(const CbmStsTrack* tr, Bool_t first);
47 void Build(const TVector3& pos, const TVector3& mom, Double_t charge);
48 void PrintInfo() const
49 {
50 std::cout << Form("T={%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f}", fT[0], fT[1], fT[2], fT[3], fT[4], fT[5])
51 << std::endl;
52 std::cout << Form("Tb={%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f}", fTb[0], fTb[1], fTb[2], fTb[3], fTb[4], fTb[5])
53 << std::endl;
54 }
55 Double_t* GetTrack() { return fT; }
56 TVector3 Eval(Double_t z);
57 TVector3 Eval(Double_t z, TVector3& mom);
58 virtual ~CbmHelix();
59 ClassDef(CbmHelix, 1)
60};
61
62#endif /* NICA_CBM_HELPERS_CBMHELIX_H_ */
Data class for STS tracks.
bool first
void SetParameters(const FairTrackParam *param)
Definition CbmHelix.cxx:48
void PrintInfo() const
Definition CbmHelix.h:48
Int_t Propagate(Double_t Z)
Definition CbmHelix.cxx:89
void Build(const FairTrackParam *params)
Definition CbmHelix.h:44
void SetQp(Double_t qp)
Definition CbmHelix.h:26
Double_t fTb[15]
Definition CbmHelix.h:24
Double_t fT[6]
Definition CbmHelix.h:24
Double_t Qp() const
Definition CbmHelix.h:25
Double_t * GetTrack()
Definition CbmHelix.h:55
Int_t ExtrapolateALight(Double_t z_out)
Definition CbmHelix.cxx:128
static Hal::MagField * fgField
Definition CbmHelix.h:32
Double_t Y() const
Definition CbmHelix.h:28
Double_t Tx() const
Definition CbmHelix.h:30
Double_t Z() const
Definition CbmHelix.h:29
Int_t indexS(Int_t i, Int_t j)
Definition CbmHelix.h:33
Double_t X() const
Definition CbmHelix.h:27
TVector3 Eval(Double_t z)
Definition CbmHelix.cxx:31
Double_t Ty() const
Definition CbmHelix.h:31
CbmHelix & operator=(const CbmHelix &other)
Definition CbmHelix.cxx:79
static void SetField(Hal::MagField *field)
Definition CbmHelix.h:41
virtual ~CbmHelix()
Definition CbmHelix.cxx:69
void ExtrapolateLine(Double_t z_out)
Definition CbmHelix.cxx:119