"MarlinReco"  1.16.0
tktebank.h
1 // A header file which defines the basics of a tpc
2 
3 #ifndef Tk_Te_Bank_h
4 #define Tk_Te_Bank_h 1
5 
6 #include<vector>
7 #include <cfortran.h>
8 
9 
10 
11 
13 {
14 
15  public:
16  Tk_Te_Bank() ;
17  ~Tk_Te_Bank() ;
18  void clear();
19  void add_te(int,int,int,int,int,int,int,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float) ;
20 
21  void remove_te(int) ;
22 
23  // int tkmktecpp(int,int,int,int,int,int,int,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float) ;
24 
25  int tkmktecpp(int,int,int,int,int,int,int,float,float,float,float,float,float,float,float,float,float *) ;
26 
27  void setSubdetector_ID(int subid, int te){te_bank[te].subdetector_ID = subid ; } ;
28  void setSubmodule(int submod, int te){te_bank[te].submodule = submod ; } ;
29  void setUnused(int unused, int te){te_bank[te].unused = unused ; } ;
30  void setMeasurement_code(int MesrCode, int te){te_bank[te].measurement_code = MesrCode ; } ;
31  void setPointer_to_end_of_TE(int PnteTE, int te){te_bank[te].pointer_to_end_of_TE = PnteTE ; } ;
32  void setCharge(int Charge, int te){te_bank[te].charge = Charge ; } ;
33  void setNdf(int ndf, int te){te_bank[te].ndf = ndf ; } ;
34  void setChi2(float chi2, int te){te_bank[te].chi2 = chi2 ; } ;
35  void setLength(float L, int te){te_bank[te].length = L ; } ;
36  void setCoord1_of_ref_point(float cord1, int te){te_bank[te].coord1_of_ref_point = cord1 ; } ;
37  void setCoord2_of_ref_point(float cord2, int te){te_bank[te].coord2_of_ref_point = cord2 ; } ;
38  void setCoord3_of_ref_point(float cord3, int te){te_bank[te].coord3_of_ref_point = cord3 ; } ;
39  void setTheta(float theta, int te){te_bank[te].theta = theta ; } ;
40  void setPhi(float phi, int te){te_bank[te].phi = phi ; } ;
41  void setInvp(float invp, int te){te_bank[te].invp = invp ; } ;
42  void setDe_dx(float dedx, int te){te_bank[te].de_dx = dedx ; } ;
43  void setCovmatrix1(float cov1, int te){te_bank[te].covmatrix1 = cov1 ; };
44  void setCovmatrix2(float cov2, int te){te_bank[te].covmatrix2 = cov2 ; } ;
45  void setCovmatrix3(float cov3, int te){te_bank[te].covmatrix3 = cov3 ; } ;
46  void setCovmatrix4(float cov4, int te){te_bank[te].covmatrix4 = cov4 ; } ;
47  void setCovmatrix5(float cov5, int te){te_bank[te].covmatrix5 = cov5 ; } ;
48  void setCovmatrix6(float cov6, int te){te_bank[te].covmatrix6 = cov6 ; } ;
49  void setCovmatrix7(float cov7, int te){te_bank[te].covmatrix7 = cov7 ; } ;
50  void setCovmatrix8(float cov8, int te){te_bank[te].covmatrix8 = cov8 ; } ;
51  void setCovmatrix9(float cov9, int te){te_bank[te].covmatrix9 = cov9 ; } ;
52  void setCovmatrix10(float cov10, int te){te_bank[te].covmatrix10 = cov10 ; } ;
53  void setCovmatrix11(float cov11, int te){te_bank[te].covmatrix11 = cov11 ; } ;
54  void setCovmatrix12(float cov12, int te){te_bank[te].covmatrix12 = cov12 ; } ;
55  void setCovmatrix13(float cov13, int te){te_bank[te].covmatrix13 = cov13 ; } ;
56  void setCovmatrix14(float cov14, int te){te_bank[te].covmatrix14 = cov14 ; } ;
57  void setCovmatrix15(float cov15, int te){te_bank[te].covmatrix15 = cov15 ; } ;
58 
59  void setPosOfFirstHitInHitList(int itedat1, int te){ itedat_bank[te].posOfFirstHitInHitList = itedat1 ; } ;
60  void setNumOfHits(int itedat2, int te){ itedat_bank[te].numOfHits = itedat2 ; } ;
61  void setPointrToFirstExclusion(int itedat3, int te){ itedat_bank[te].pointrToFirstExclusion = itedat3 ; } ;
62  void setNumOfExclusions(int itedat4, int te){ itedat_bank[te].numOfExclusions = itedat4 ; } ;
63  void setTrackNo(int itedat5, int te){ itedat_bank[te].trackNo = itedat5 ; } ;
64 
65  void addHit(int hit, int te){te_bank[te].hitlist.push_back(hit) ; } ;
66 
67  int size(){return te_bank.size() ; } ;
68 
69  int getSubdetector_ID(int te){return te_bank[te].subdetector_ID ; } ;
70  int getSubmodule(int te){return te_bank[te].submodule ; } ;
71  int getUnused(int te){return te_bank[te].unused ; } ;
72  int getMeasurement_code(int te){return te_bank[te].measurement_code ; } ;
73  int getPointer_to_end_of_TE(int te){return te_bank[te].pointer_to_end_of_TE ; } ;
74  int getCharge(int te){return te_bank[te].charge ; } ;
75  int getNdf(int te){return te_bank[te].ndf ; } ;
76  float getChi2(int te){return te_bank[te].chi2 ; } ;
77  float getLength(int te){return te_bank[te].length ; } ;
78  float getCoord1_of_ref_point(int te){return te_bank[te].coord1_of_ref_point ; } ;
79  float getCoord2_of_ref_point(int te){return te_bank[te].coord2_of_ref_point ; } ;
80  float getCoord3_of_ref_point(int te){return te_bank[te].coord3_of_ref_point ; } ;
81  float getTheta(int te){return te_bank[te].theta ; } ;
82  float getPhi(int te){return te_bank[te].phi ; } ;
83  float getInvp(int te){return te_bank[te].invp ; } ;
84  float getDe_dx(int te){return te_bank[te].de_dx ; } ;
85  float getCovmatrix1(int te){return te_bank[te].covmatrix1 ; } ;
86  float getCovmatrix2(int te){return te_bank[te].covmatrix2 ; } ;
87  float getCovmatrix3(int te){return te_bank[te].covmatrix3 ; } ;
88  float getCovmatrix4(int te){return te_bank[te].covmatrix4 ; } ;
89  float getCovmatrix5(int te){return te_bank[te].covmatrix5 ; } ;
90  float getCovmatrix6(int te){return te_bank[te].covmatrix6 ; } ;
91  float getCovmatrix7(int te){return te_bank[te].covmatrix7 ; } ;
92  float getCovmatrix8(int te){return te_bank[te].covmatrix8 ; } ;
93  float getCovmatrix9(int te){return te_bank[te].covmatrix9 ; } ;
94  float getCovmatrix10(int te){return te_bank[te].covmatrix10 ; } ;
95  float getCovmatrix11(int te){return te_bank[te].covmatrix11 ; } ;
96  float getCovmatrix12(int te){return te_bank[te].covmatrix12 ; } ;
97  float getCovmatrix13(int te){return te_bank[te].covmatrix13 ; } ;
98  float getCovmatrix14(int te){return te_bank[te].covmatrix14 ; } ;
99  float getCovmatrix15(int te){return te_bank[te].covmatrix15 ; } ;
100 
101  int getPosOfFirstHitInHitList( int te ){ return itedat_bank[te].posOfFirstHitInHitList ; } ;
102  int getNumOfHits( int te ){ return itedat_bank[te].numOfHits ; } ;
103  int getPointrToFirstExclusion( int te ){ return itedat_bank[te].pointrToFirstExclusion ; } ;
104  int getNumOfExclusions( int te ){ return itedat_bank[te].numOfExclusions ; } ;
105  int gettrackNo( int te ){ return itedat_bank[te].trackNo ; } ;
106 
107  const std::vector<int> * getHitlist(int te){return &te_bank[te].hitlist ; } ;
108 
109  private:
110 
111 struct tk_te
112 {
113  int subdetector_ID ;
114  int submodule ;
115  int unused ;
116  int measurement_code ;
117  int pointer_to_end_of_TE ;
118  int charge ;
119  int ndf ;
120  float chi2 ;
121  float length ;
122  float coord1_of_ref_point ;
123  float coord2_of_ref_point ;
124  float coord3_of_ref_point ;
125  float theta ;
126  float phi ;
127  float invp ;
128  float de_dx ;
129  float covmatrix1 ;
130  float covmatrix2 ;
131  float covmatrix3 ;
132  float covmatrix4 ;
133  float covmatrix5 ;
134  float covmatrix6 ;
135  float covmatrix7 ;
136  float covmatrix8 ;
137  float covmatrix9 ;
138  float covmatrix10 ;
139  float covmatrix11 ;
140  float covmatrix12 ;
141  float covmatrix13 ;
142  float covmatrix14 ;
143  float covmatrix15 ;
144 
145  std::vector <int> hitlist ;
146 
147 } ;
148 
149  std::vector <tk_te> te_bank ;
150 
151  // documentation of the ITEDAT from BRAHMS
152 /* * --- additional information. first index: */
153 /* * 1 (integer) position of first associated hit in hit list (see below) */
154 /* * 2 (integer) number of hits */
155 /* * 3 (integer) pointer to first exclusion (0 if none) in exclusion list */
156 /* * 4 (integer) number of exclusions */
157 /* * 5 (integer) track no. (positive if 95% of the hits belong to */
158 /* * same track, negative if 75%, zero below.) */
159 //* remark: the exclusion list is shared with the hit bank (see there).
160 
161 struct tk_itedat
162 {
163  int posOfFirstHitInHitList ;
164  int numOfHits ;
165  int pointrToFirstExclusion ;
166  int numOfExclusions ;
167  int trackNo ;
168 } ;
169 
170  std::vector <tk_itedat> itedat_bank ;
171 
172 } ;
173 
174 // Global pointer to the Tk_Te_Bank structure which is defined in tktebank.cc
175 extern Tk_Te_Bank * TkTeBank ;
176 
177 
178 #endif
Definition: tktebank.h:12