CbmRoot
CbmGlobalTrackingTof.h
Go to the documentation of this file.
1 /*
2  * To change this license header, choose License Headers in Project Properties.
3  * To change this template file, choose Tools | Templates
4  * and open the template in the editor.
5  */
6 
7 /*
8  * File: CbmGlobalTrackingTof.h
9  * Author: tablyaz
10  *
11  * Created on January 31, 2017, 5:51 PM
12  */
13 
14 #ifndef CBMGLOBALTRACKINGTOF_H
15 #define CBMGLOBALTRACKINGTOF_H
16 
17 #include "CbmGlobalTrackingDefs.h"
18 #include "FairTrackParam.h"
19 #include "TClonesArray.h"
20 #include <list>
21 #include <map>
22 #include <set>
23 
24 #define CBM_GLOBALTB_TOF_3D
25 
26 #ifdef CBM_GLOBALTB_TOF_3D
27 //#define CBM_GLOBALTB_TOF_3D_CUBOIDS
28 #endif //CBM_GLOBALTB_TOF_3D
29 
30 #ifdef CBM_GLOBALTB_TOF_3D
31 #ifdef CBM_GLOBALTB_TOF_3D_CUBOIDS
32 struct Cuboid;
33 #endif //CBM_GLOBALTB_TOF_3D_CUBOIDS
34 struct ZBin;
35 #endif //CBM_GLOBALTB_TOF_3D
36 
38 public:
39  struct Rect {
44  };
45 
47 
51 
53  bool Read();
54 
55  void SetPdg(Int_t v) { fPDG = v; }
56 
57  void SetChi2Cut(Double_t v) { fChi2Cut = v; }
58 
59  int GetXInd(scaltype x) const {
60  int ind = (x - fMinX) / fXBinSize;
61 
62  if (ind < 0)
63  ind = 0;
64  else if (ind >= fNofXBins)
65  ind = fNofXBins - 1;
66 
67  return ind;
68  }
69 
70  int GetYInd(scaltype y) const {
71  int ind = (y - fMinY) / fYBinSize;
72 
73  if (ind < 0)
74  ind = 0;
75  else if (ind >= fNofYBins)
76  ind = fNofYBins - 1;
77 
78  return ind;
79  }
80 
81  int GetZInd(scaltype z) const {
82  int ind = (z - fMinZ) / fZBinSize;
83 
84  if (ind < 0)
85  ind = 0;
86  else if (ind >= fNofZBins)
87  ind = fNofZBins - 1;
88 
89  return ind;
90  }
91 
92  int GetTInd(timetype t) const {
93  int ind = (t - fStartTime) / fTBinSize;
94 
95  if (ind < 0)
96  ind = 0;
97  else if (ind >= fNofTBins)
98  ind = fNofTBins - 1;
99 
100  return ind;
101  }
102 
103  void SetNofTBins(int v) { fNofTBins = v; }
104 
106 
108 
109  void SetTofHits(TClonesArray* v) { fTofHits = v; }
110 
111  void Clear();
112  void Prepare(timetype startTime);
113  void Find(FairTrackParam& trackParams,
114  timetype trackTime,
115  timetype errT,
116  Int_t& tofHitInd,
117  Double_t& length);
118 
119 private:
121  Int_t fPDG;
122  Double_t fChi2Cut;
123 #ifdef CBM_GLOBALTB_TOF_3D_CUBOIDS
124  std::list<Cuboid*> fCuboids;
125 #endif //CBM_GLOBALTB_TOF_3D_CUBOIDS
143  TClonesArray* fTofHits;
144 };
145 
146 #endif /* CBMGLOBALTRACKINGTOF_H */
CbmGlobalTrackingTofGeometry::fC
scaltype fC
Definition: CbmGlobalTrackingTof.h:120
CbmGlobalTrackingTofGeometry::GetZInd
int GetZInd(scaltype z) const
Definition: CbmGlobalTrackingTof.h:81
CbmGlobalTrackingTofGeometry::Rect::minY
scaltype minY
Definition: CbmGlobalTrackingTof.h:42
CbmGlobalTrackingTofGeometry::fMaxY
scaltype fMaxY
Definition: CbmGlobalTrackingTof.h:136
CbmGlobalTrackingTofGeometry::fNofTBins
int fNofTBins
Definition: CbmGlobalTrackingTof.h:126
scaltype
#define scaltype
Definition: CbmGlobalTrackingDefs.h:17
CbmGlobalTrackingTofGeometry::fEndTime
timetype fEndTime
Definition: CbmGlobalTrackingTof.h:142
CbmGlobalTrackingTofGeometry::fMinX
scaltype fMinX
Definition: CbmGlobalTrackingTof.h:132
CbmGlobalTrackingTofGeometry::CbmGlobalTrackingTofGeometry
CbmGlobalTrackingTofGeometry()
Definition: CbmGlobalTrackingTof.cxx:557
CbmGlobalTrackingTofGeometry::Rect
Definition: CbmGlobalTrackingTof.h:39
CbmGlobalTrackingTofGeometry::fZBinSize
scaltype fZBinSize
Definition: CbmGlobalTrackingTof.h:140
CbmGlobalTrackingTofGeometry::~CbmGlobalTrackingTofGeometry
~CbmGlobalTrackingTofGeometry()
Definition: CbmGlobalTrackingTof.cxx:587
CbmGlobalTrackingTofGeometry::GetYInd
int GetYInd(scaltype y) const
Definition: CbmGlobalTrackingTof.h:70
CbmGlobalTrackingTofGeometry::fMinZ
scaltype fMinZ
Definition: CbmGlobalTrackingTof.h:138
CbmGlobalTrackingTofGeometry::SetStartTime
void SetStartTime(timetype v)
Definition: CbmGlobalTrackingTof.h:107
CbmGlobalTrackingTofGeometry
Definition: CbmGlobalTrackingTof.h:37
CbmGlobalTrackingTofGeometry::fMinY
scaltype fMinY
Definition: CbmGlobalTrackingTof.h:135
CbmGlobalTrackingTofGeometry::Rect::minX
scaltype minX
Definition: CbmGlobalTrackingTof.h:40
CbmGlobalTrackingDefs.h
CbmGlobalTrackingTofGeometry::SetNofTBins
void SetNofTBins(int v)
Definition: CbmGlobalTrackingTof.h:103
CbmGlobalTrackingTofGeometry::GetTInd
int GetTInd(timetype t) const
Definition: CbmGlobalTrackingTof.h:92
CbmGlobalTrackingTofGeometry::fPDG
Int_t fPDG
Definition: CbmGlobalTrackingTof.h:121
CbmGlobalTrackingTofGeometry::fTofHits
TClonesArray * fTofHits
Definition: CbmGlobalTrackingTof.h:143
CbmGlobalTrackingTofGeometry::fNofZBins
int fNofZBins
Definition: CbmGlobalTrackingTof.h:129
CbmGlobalTrackingTofGeometry::fMaxX
scaltype fMaxX
Definition: CbmGlobalTrackingTof.h:133
CbmGlobalTrackingTofGeometry::fMaxZ
scaltype fMaxZ
Definition: CbmGlobalTrackingTof.h:139
CbmGlobalTrackingTofGeometry::Read
bool Read()
Definition: CbmGlobalTrackingTof.cxx:607
CbmGlobalTrackingTofGeometry::SetChi2Cut
void SetChi2Cut(Double_t v)
Definition: CbmGlobalTrackingTof.h:57
CbmGlobalTrackingTofGeometry::fChi2Cut
Double_t fChi2Cut
Definition: CbmGlobalTrackingTof.h:122
CbmGlobalTrackingTofGeometry::SetTBinSize
void SetTBinSize(scaltype v)
Definition: CbmGlobalTrackingTof.h:105
CbmGlobalTrackingTofGeometry::Find
void Find(FairTrackParam &trackParams, timetype trackTime, timetype errT, Int_t &tofHitInd, Double_t &length)
Definition: CbmGlobalTrackingTof.cxx:860
CbmGlobalTrackingTofGeometry::fXBinSize
scaltype fXBinSize
Definition: CbmGlobalTrackingTof.h:134
CbmGlobalTrackingTofGeometry::operator=
CbmGlobalTrackingTofGeometry & operator=(const CbmGlobalTrackingTofGeometry &)=delete
v
__m128 v
Definition: L1/vectors/P4_F32vec4.h:1
timetype
#define timetype
Definition: CbmGlobalTrackingDefs.h:18
CbmGlobalTrackingTofGeometry::SetTofHits
void SetTofHits(TClonesArray *v)
Definition: CbmGlobalTrackingTof.h:109
x
Double_t x
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmGlobalTrackingTofGeometry::fTBinSize
scaltype fTBinSize
Definition: CbmGlobalTrackingTof.h:131
CbmGlobalTrackingTofGeometry::fStartTime
timetype fStartTime
Definition: CbmGlobalTrackingTof.h:141
y
Double_t y
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmGlobalTrackingTofGeometry::Prepare
void Prepare(timetype startTime)
Definition: CbmGlobalTrackingTof.cxx:794
CbmGlobalTrackingTofGeometry::Rect::maxX
scaltype maxX
Definition: CbmGlobalTrackingTof.h:41
CbmGlobalTrackingTofGeometry::CbmGlobalTrackingTofGeometry
CbmGlobalTrackingTofGeometry(const CbmGlobalTrackingTofGeometry &)=delete
CbmGlobalTrackingTofGeometry::fNofXBins
int fNofXBins
Definition: CbmGlobalTrackingTof.h:127
CbmGlobalTrackingTofGeometry::fNofYBins
int fNofYBins
Definition: CbmGlobalTrackingTof.h:128
CbmGlobalTrackingTofGeometry::fZBins
ZBin * fZBins
Definition: CbmGlobalTrackingTof.h:130
CbmGlobalTrackingTofGeometry::GetXInd
int GetXInd(scaltype x) const
Definition: CbmGlobalTrackingTof.h:59
CbmGlobalTrackingTofGeometry::fYBinSize
scaltype fYBinSize
Definition: CbmGlobalTrackingTof.h:137
CbmGlobalTrackingTofGeometry::SetPdg
void SetPdg(Int_t v)
Definition: CbmGlobalTrackingTof.h:55
ZBin
Definition: CbmGlobalTrackingTof.cxx:539
CbmGlobalTrackingTofGeometry::Rect::maxY
scaltype maxY
Definition: CbmGlobalTrackingTof.h:43
CbmGlobalTrackingTofGeometry::Clear
void Clear()
Definition: CbmGlobalTrackingTof.cxx:785