/[PAMELA software]/DarthVader/TrackerLevel2/inc/TrkLevel2.h
ViewVC logotype

Contents of /DarthVader/TrackerLevel2/inc/TrkLevel2.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Wed Jun 14 10:01:44 2006 UTC (18 years, 6 months ago) by pam-fi
Branch: MAIN
CVS Tags: v0r02, v1r00
Changes since 1.2: +24 -9 lines
File MIME type: text/plain
some methods added

1 /**
2 * \file TrkLevel2.h
3 * \author Elena Vannuccini
4 */
5 #ifndef trklevel2_h
6 #define trklevel2_h
7
8 #include <TObject.h>
9 #include <TObjArray.h>
10 #include <TClonesArray.h>
11
12 #include <TrkStruct.h>
13
14 // z-coordinate of track state-vector reference-plane
15 #define ZINI 23.5
16 // upper and lower (mechanical) z-coordinate of the tracker
17 #define ZTRKUP 22.29
18 #define ZTRKDW -22.22
19
20
21 /**
22 * \brief Class to describe, by points, a particle trajectory in the apparatus.
23 *
24 * The idea is to create it by integrating the equations of motion, given the
25 * track state vector and the z coordinates where to evaluate track position.
26 */
27 // ==================================================================
28 class Trajectory : public TObject{
29 private:
30
31 public:
32
33 int npoint; ///< number of evaluated points along the trajectory
34 float* x; ///< x coordinates
35 float* y; ///< y coordinates
36 float* z; ///< z coordinates
37 float* thx; ///< x projected angle
38 float* thy; ///< y projected angle
39 float* tl; ///< track length
40
41 Trajectory();
42 Trajectory(int n);
43 Trajectory(int n, float* pz);
44 void Dump();
45
46 float GetLength(){float l=0; for(int i=0; i<npoint;i++)l=l+tl[i]; return l;};
47 float GetLength(int,int);
48
49 ClassDef(Trajectory,1);
50
51 };
52 /**
53 * \brief Class to describe fitted tracks.
54 *
55 * A track is defined by the measured coordinates associated to it, the
56 * track status vector, plus other quantities.
57 * A track may have an "image", due to the ambiguity in the y view.
58 */
59 // ==================================================================
60 class TrkTrack : public TObject {
61
62 private:
63
64 int seqno; ///<stored track sequential number
65 int image; ///<sequential number of track-image
66
67 public:
68
69
70 float al[5]; ///<TRACK STATE VECTOR
71 float coval[5][5]; ///<covariance matrix
72 int xgood[6]; ///<mask of included x planes
73 int ygood[6]; ///<mask of included y planes
74 float xm[6]; ///<measured x coordinates
75 float ym[6]; ///<measured y coordinates
76 float zm[6]; ///<measured z coordinates
77 float resx[6]; ///<spatial resolution on X view
78 float resy[6]; ///<spatial resolution on y view
79 float chi2; ///<chi2
80 float xv[6]; ///<calculated x coordinates
81 float yv[6]; ///<calculated y coordinates
82 float zv[6]; ///<calculated z coordinates
83 float axv[6]; ///<calculated angles (deg) on x view
84 float ayv[6]; ///<calculated angles (deg) on y view
85 float dedx_x[6]; ///<signal in MIP (scaled to 300 micrometer)
86 float dedx_y[6]; ///<signal in MIP (scaled to 300 micrometer)
87
88
89 TrkTrack();
90 TrkTrack(const TrkTrack&);
91
92 void Dump();
93
94 Int_t GetSeqNo(){return seqno;} ///< Returns the track sequential number
95 Int_t GetImageSeqNo(){return image;} ///< Returns the track image sequential number
96 Bool_t HasImage(){return !(image==-1);} ///< Returns true if the track has an image
97 int DoTrack(Trajectory* t); ///< Evaluates the trajectory in the apparatus.
98 int DoTrack2(Trajectory* t); ///< Evaluates the trajectory in the apparatus.
99 float BdL(){return 0;}; ///< Evaluates the integral of B*dL along the track.
100 Int_t GetNX(){Int_t n=0; for(Int_t i=0; i<6; i++)n+=xgood[i]; return n;};
101 Int_t GetNY(){Int_t n=0; for(Int_t i=0; i<6; i++)n+=ygood[i]; return n;};
102 Int_t GetNtot(){return GetNX()+GetNY();};
103 Float_t GetRigidity();
104 Float_t GetDeflection();
105 Float_t GetDEDX();
106
107 TrkTrack* GetTrkTrack(){return this;};
108
109 friend class TrkLevel2;
110
111 ClassDef(TrkTrack,1);
112
113 };
114 /**
115 * \brief Class to describe single clusters ("singlets").
116 *
117 * Single clusters are clusters not associated to any track.
118 */
119 class TrkSinglet : public TObject {
120
121 private:
122
123 public:
124
125 int plane; ///<plane
126 float coord[2]; ///<coordinate (on sensor 1 and 2)
127 float sgnl; ///<cluster signal in MIP
128
129 TrkSinglet();
130 TrkSinglet(const TrkSinglet&);
131
132 void Dump();
133
134 friend class TrkLevel2;
135
136 ClassDef(TrkSinglet,1);
137
138 };
139
140 /**
141 * \brief Class to describe tracker LEVEL2 data.
142 *
143 * A tracker events is defined by some general variables, plus the collection of all the fitted tracks and all
144 * single clusters on X and Y views.
145 * Tracks and single clusters ("singlets") are described by the classes TrkTrack and TrkSinglet respectivelly.
146 *
147 * Each track may have an "image", due to the ambiguity on the Y view, which is stored also.
148 * Thus, the number of stored tracks ( ntrk() ) differs from the number of "physical" tracks ( GetNTracks() ).
149 * Proper methods allow to sort tracks and select the physical ones ( GetTracks() ).
150 */
151 class TrkLevel2 : public TObject {
152
153 private:
154
155 public:
156
157
158
159 Int_t good2;
160 Int_t crc[12];
161
162 TClonesArray *Track; ///< fitted tracks
163 TClonesArray *SingletX; ///< x singlets
164 TClonesArray *SingletY; ///< y singlets
165
166 TrkLevel2();
167 // TrkLevel2(cTrkLevel2 *);
168
169 int ntrk() {return Track->GetEntries();} ///< number of stored track
170 int nclsx(){return SingletX->GetEntries();} ///< number of x singlets
171 int nclsy(){return SingletY->GetEntries();} ///< number of y singlets
172
173 void Dump();
174 void FillCommonVar(cTrkLevel2 *);
175 void Clear();
176 void LoadField(TString);
177
178 TrkTrack *GetStoredTrack(int i);
179 Int_t GetSeqNo(Int_t i) {return (((TrkTrack *)Track->At(i))->seqno);}; ///< Returns track sequential number
180 TClonesArray *GetTracks_Chi2Sorted();
181 TClonesArray *GetTracks_NFitSorted();
182 TClonesArray *GetTracks();
183
184 int GetNTracks(){return this->GetTracks()->GetEntries();}
185 TrkTrack* GetTrack(int i);
186 TrkTrack* GetTrackImage(int i);
187
188 TrkLevel2* GetTrkLevel2(){return this;}
189 TClonesArray* GetTrackArray(){return Track;};///< returns pointer to the track array
190
191 ClassDef(TrkLevel2,1);
192
193 };
194
195
196
197 #endif

  ViewVC Help
Powered by ViewVC 1.1.23