BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
Event/DstEvent/DstEvent-00-02-51/DstEvent/DstExtTrack.h
Go to the documentation of this file.
1//
2//File: DstExtTrack.h
3//Author: L.L.Wang
4
5#ifndef DSTEXTTRACK_H
6#define DSTEXTTRACK_H
7
8#include <vector>
9
10#include "GaudiKernel/ContainedObject.h"
11#include "GaudiKernel/ObjectVector.h"
12#include "EventModel/EventModel.h"
13
14#include "CLHEP/Matrix/Vector.h"
15#include "CLHEP/Matrix/SymMatrix.h"
16#include "CLHEP/Vector/ThreeVector.h"
17//#include "ExtEvent/ExtMucHit.h"
18
19using namespace std;
20using namespace EventModel;
21
22using CLHEP::Hep3Vector;
23using CLHEP::HepSymMatrix;
24extern const CLID& CLID_DstExtTrack;
25
26class DstExtTrack : virtual public ContainedObject
27{
28 public:
29 const CLID& clID() const
30 {
31 return DstExtTrack::classID();
32 }
33
34 static const CLID& classID()
35 {
36 return CLID_DstExtTrack;
37 }
38
41
42 const int GetTrackId() const {return m_trackId ;}
43 const int trackId() const {return m_trackId ;}
44
45 //Get track extrapolation data @ Tof layer1.
46 //const Hep3Vector GetTof1Position() const;
47 //const Hep3Vector GetTof1Momentum() const;
48 //const string GetTof1VolumeName() const;
49 //const int GetTof1VolumeNumber() const;
50 //const double GetTof1() const;
51 //const double GetTof1Path() const;
52 //const double GetTof1PosSigmaAlongZ() const;
53 //const double GetTof1PosSigmaAlongT() const;
54 //const double GetTof1PosSigmaAlongX() const;
55 //const double GetTof1PosSigmaAlongY() const;
56 //const HepSymMatrix GetTof1ErrorMatrix() const;
57
58 const Hep3Vector tof1Position() const {return myTof1Position[myParticleType];};
59 const Hep3Vector tof1Position(int parID) const {return myTof1Position[parID];};
60 const Hep3Vector tof1Momentum() const {return myTof1Momentum[myParticleType];};
61 const Hep3Vector tof1Momentum(int parID) const {return myTof1Momentum[parID];};
62 const string tof1VolumeName() const {return myTof1VolumeName[myParticleType];};
63 const string tof1VolumeName(int parID) const {return myTof1VolumeName[parID];};
64 const int tof1VolumeNumber() const {return myTof1VolumeNumber[myParticleType];};
65 const int tof1VolumeNumber(int parID) const {return myTof1VolumeNumber[parID];};
66 const double tof1() const {return myTof1[myParticleType];};
67 const double tof1(int parID) const {return myTof1[parID];};
68 const double tof1Path() const {return myTof1Path[myParticleType];};
69 const double tof1Path(int parID) const {return myTof1Path[parID];};
70 const double tof1PosSigmaAlongZ() const {return myTof1PosSigmaAlongZ[myParticleType];};
71 const double tof1PosSigmaAlongZ(int parID) const {return myTof1PosSigmaAlongZ[parID];};
72 const double tof1PosSigmaAlongT() const {return myTof1PosSigmaAlongT[myParticleType];};
73 const double tof1PosSigmaAlongT(int parID) const {return myTof1PosSigmaAlongT[parID];};
74 const double tof1PosSigmaAlongX() const {return myTof1PosSigmaAlongX[myParticleType];};
75 const double tof1PosSigmaAlongX(int parID) const {return myTof1PosSigmaAlongX[parID];};
76 const double tof1PosSigmaAlongY() const {return myTof1PosSigmaAlongY[myParticleType];};
77 const double tof1PosSigmaAlongY(int parID) const {return myTof1PosSigmaAlongY[parID];};
78 const HepSymMatrix tof1ErrorMatrix() const {return myTof1ErrorMatrix[myParticleType];};
79 const HepSymMatrix tof1ErrorMatrix(int parID) const {return myTof1ErrorMatrix[parID];};
80
81 //Get track extrapolation data @ Tof layer2.
82 //const Hep3Vector GetTof2Position() const;
83 //const Hep3Vector GetTof2Momentum() const;
84 //const string GetTof2VolumeName() const;
85 //const int GetTof2VolumeNumber() const;
86 //const double GetTof2() const;
87 //const double GetTof2Path() const;
88 //const double GetTof2PosSigmaAlongZ() const;
89 //const double GetTof2PosSigmaAlongT() const;
90 //const double GetTof2PosSigmaAlongX() const;
91 //const double GetTof2PosSigmaAlongY() const;
92 //const HepSymMatrix GetTof2ErrorMatrix() const;
93
94 const Hep3Vector tof2Position() const {return myTof2Position[myParticleType];};
95 const Hep3Vector tof2Position(int parID) const {return myTof2Position[parID];};
96 const Hep3Vector tof2Momentum() const {return myTof2Momentum[myParticleType];};
97 const Hep3Vector tof2Momentum(int parID) const {return myTof2Momentum[parID];};
98 const string tof2VolumeName() const {return myTof2VolumeName[myParticleType];};
99 const string tof2VolumeName(int parID) const {return myTof2VolumeName[parID];};
100 const int tof2VolumeNumber() const {return myTof2VolumeNumber[myParticleType];};
101 const int tof2VolumeNumber(int parID) const {return myTof2VolumeNumber[parID];};
102 const double tof2() const {return myTof2[myParticleType];};
103 const double tof2(int parID) const {return myTof2[parID];};
104 const double tof2Path() const {return myTof2Path[myParticleType];};
105 const double tof2Path(int parID) const {return myTof2Path[parID];};
106 const double tof2PosSigmaAlongZ() const {return myTof2PosSigmaAlongZ[myParticleType];};
107 const double tof2PosSigmaAlongZ(int parID) const {return myTof2PosSigmaAlongZ[parID];};
108 const double tof2PosSigmaAlongT() const {return myTof2PosSigmaAlongT[myParticleType];};
109 const double tof2PosSigmaAlongT(int parID) const {return myTof2PosSigmaAlongT[parID];};
110 const double tof2PosSigmaAlongX() const {return myTof2PosSigmaAlongX[myParticleType];};
111 const double tof2PosSigmaAlongX(int parID) const {return myTof2PosSigmaAlongX[parID];};
112 const double tof2PosSigmaAlongY() const {return myTof2PosSigmaAlongY[myParticleType];};
113 const double tof2PosSigmaAlongY(int parID) const {return myTof2PosSigmaAlongY[parID];};
114 const HepSymMatrix tof2ErrorMatrix() const {return myTof2ErrorMatrix[myParticleType];};
115 const HepSymMatrix tof2ErrorMatrix(int parID) const {return myTof2ErrorMatrix[parID];};
116
117 //Get track extrapolation data @ EMC.
118 //const Hep3Vector GetEmcPosition() const;
119 //const Hep3Vector GetEmcMomentum() const;
120 //const string GetEmcVolumeName() const;
121 //const int GetEmcVolumeNumber() const;
122 //const double GetEmcPosSigmaAlongTheta() const;
123 //const double GetEmcPosSigmaAlongPhi() const;
124 //const HepSymMatrix GetEmcErrorMatrix() const;
125
126 const Hep3Vector emcPosition() const {return myEmcPosition[myParticleType];};
127 const Hep3Vector emcPosition(int parID) const {return myEmcPosition[parID];};
128 const Hep3Vector emcMomentum() const {return myEmcMomentum[myParticleType];};
129 const Hep3Vector emcMomentum(int parID) const {return myEmcMomentum[parID];};
130 const string emcVolumeName() const {return myEmcVolumeName[myParticleType];};
131 const string emcVolumeName(int parID) const {return myEmcVolumeName[parID];};
132 const int emcVolumeNumber() const {return myEmcVolumeNumber[myParticleType];};
133 const int emcVolumeNumber(int parID) const {return myEmcVolumeNumber[parID];};
134 const double emcPosSigmaAlongTheta() const {return myEmcPosSigmaAlongTheta[myParticleType];};
135 const double emcPosSigmaAlongTheta(int parID) const {return myEmcPosSigmaAlongTheta[parID];};
136 const double emcPosSigmaAlongPhi() const {return myEmcPosSigmaAlongPhi[myParticleType];};
137 const double emcPosSigmaAlongPhi(int parID) const {return myEmcPosSigmaAlongPhi[parID];};
138 const HepSymMatrix emcErrorMatrix() const {return myEmcErrorMatrix[myParticleType];};
139 const HepSymMatrix emcErrorMatrix(int parID) const {return myEmcErrorMatrix[parID];};
140 const double emcPath() const {return myEmcPath[myParticleType];};
141 const double emcPath(int parID) const {return myEmcPath[parID];};
142
143 //Get track extrapolation data @ MUC.
144 //const Hep3Vector GetMucPosition() const;
145 //const Hep3Vector GetMucMomentum() const;
146 //const string GetMucVolumeName() const;
147 //const int GetMucVolumeNumber() const;
148 //const double GetMucPosSigmaAlongZ() const;
149 //const double GetMucPosSigmaAlongT() const;
150 //const double GetMucPosSigmaAlongX() const;
151 //const double GetMucPosSigmaAlongY() const;
152 //const HepSymMatrix GetMucErrorMatrix() const;
153
154 const Hep3Vector mucPosition() const {return myMucPosition[myParticleType];};
155 const Hep3Vector mucPosition(int parID) const {return myMucPosition[parID];};
156 const Hep3Vector mucMomentum() const {return myMucMomentum[myParticleType];};
157 const Hep3Vector mucMomentum(int parID) const {return myMucMomentum[parID];};
158 const string mucVolumeName() const {return myMucVolumeName[myParticleType];};
159 const string mucVolumeName(int parID) const {return myMucVolumeName[parID];};
160 const int mucVolumeNumber() const {return myMucVolumeNumber[myParticleType];};
161 const int mucVolumeNumber(int parID) const {return myMucVolumeNumber[parID];};
162 const double mucPosSigmaAlongZ() const { return myMucPosSigmaAlongZ[myParticleType];};
163 const double mucPosSigmaAlongZ(int parID) const {return myMucPosSigmaAlongZ[parID];};
164 const double mucPosSigmaAlongT() const {return myMucPosSigmaAlongT[myParticleType];};
165 const double mucPosSigmaAlongT(int parID) const {return myMucPosSigmaAlongT[parID];};
166 const double mucPosSigmaAlongX() const {return myMucPosSigmaAlongX[myParticleType];};
167 const double mucPosSigmaAlongX(int parID) const {return myMucPosSigmaAlongX[parID];};
168 const double mucPosSigmaAlongY() const {return myMucPosSigmaAlongY[myParticleType];};
169 const double mucPosSigmaAlongY(int parID) const {return myMucPosSigmaAlongY[parID];};
170 const HepSymMatrix mucErrorMatrix() const {return myMucErrorMatrix[myParticleType];};
171 const HepSymMatrix mucErrorMatrix(int parID) const {return myMucErrorMatrix[parID];};
172
173 //**** added by LI Chunhua
174 const double MucKalchi2() const { return myMucKalchi2[1];};
175 const double MucKalchi2(int parID) const { return myMucKalchi2[1];}
176 const int MucKaldof() const { return myMucKaldof[1];};
177 const int MucKaldof(int parID) const { return myMucKaldof[1];};
178 const double MucKaldepth() const { return myMucKaldepth[1];};
179 const double MucKaldepth(int parID) const { return myMucKaldepth[1];};
180 const int MucKalbrLastLayer() const { return myMucKalbrLastLayer[1];};
181 const int MucKalbrLastLayer(int parID) const { return myMucKalbrLastLayer[1];};
182 const int MucKalecLastLayer() const { return myMucKalecLastLayer[1];};
183 const int MucKalecLastLayer(int parID) const { return myMucKalecLastLayer[1];};
184 const int MucKalnumHits() const { return myMucKalnumHits[1];};
185 const int MucKalnumHits(int parID) const { return myMucKalnumHits[1];};
186 //***********************************************************
187
188 //Get ExtMucHitCol
189 //const ExtMucHitVec GetExtMucHitVec() const {return myExtMucHitVec;};
190 //const ExtMucHitVec extMucHitVec() const {return myExtMucHitVec;};
191
192 // set functions
193 void SetTrackId(int trackId){m_trackId = trackId;}
194 void SetParType(int aParType=2)
195 {
196 if(aParType>=0&&aParType<=4) myParticleType=aParType;
197 else {
198 cout<<"DstExtTrack::warning: Invalid particle number: "<<aParType<<endl;
200 }
201 }
202
203 void SetTof1Data(Hep3Vector aPosition,Hep3Vector aMomentum,string aVolumeName,
204 int aVolumeNumber,double aTof,double aPath,HepSymMatrix aErrorMatrix,
205 double aZSigma=0.,double aTSigma=0.,double aXSigma=0.,double aYSigma=0.);
206
207 void SetTof2Data(Hep3Vector aPosition,Hep3Vector aMomentum,string aVolumeName,
208 int aVolumeNumber,double aTof,double aPath,HepSymMatrix aErrorMatrix,
209 double aZSigma=0.,double aTSigma=0.,double aXSigma=0.,double aYSigma=0.);
210
211 void SetEmcData(Hep3Vector aPosition,Hep3Vector aMomentum,string aVolumeName,
212 int aVolumeNumber,double aThetaSigma,double aPhiSigma,HepSymMatrix aErrorMatrix);
213
214 void SetEmcPath(double path) {myEmcPath[myParticleType] = path;};
215
216 void SetMucData(Hep3Vector aPosition,Hep3Vector aMomentum,string aVolumeName,
217 int aVolumeNumber,HepSymMatrix aErrorMatrix,double aZSigma=0.,
218 double aTSigma=0.,double aXSigma=0.,double aYSigma=0.);
219
220 //**** added by LI Chunhua
221 void SetMucKalData(double chi2,int dof, double depth, int brLastLay, int ecLastLay, int nhits);
222
223
224 //void AddExtMucHit(ExtMucHit aExtMucHit) {myExtMucHitVec.push_back(aExtMucHit);}
225
226 protected:
227 int myParticleType;// default particle type
228
229
230 private:
231 int m_trackId; // Track ID wensp Add 2005-10-19
232 //Tof TrkExt data.
233 //
234 //Tof layer1:
235 vector<Hep3Vector> myTof1Position;//Position when the particle enters the TOF layer1.
236 vector<Hep3Vector> myTof1Momentum;//Momentum when the particle enters the TOF layer1.
237 vector<string> myTof1VolumeName;//Scintillator volume name
238 int myTof1VolumeNumber[5];//Scintillator volume number
239 double myTof1[5];//Time of flight
240 double myTof1Path[5];//Path of flight
241 double myTof1PosSigmaAlongZ[5];//Sigma Z
242 double myTof1PosSigmaAlongT[5];//Sigma along Z x R
243 double myTof1PosSigmaAlongX[5];//Sigma X
244 double myTof1PosSigmaAlongY[5];//Sigma Y
245 vector<HepSymMatrix> myTof1ErrorMatrix;//Error matrix 6x6 (x,p)
246
247 //Tof layer2:
248 vector<Hep3Vector> myTof2Position;//Position when the particle enters the TOF layer2.
249 vector<Hep3Vector> myTof2Momentum;//Momentum when the particle enters the TOF layer2.
250 vector<string> myTof2VolumeName;//Scintillator volume name
251 int myTof2VolumeNumber[5];//Scintillator volume number
252 double myTof2[5];//Time of flight
253 double myTof2Path[5];//Path of flight
254 double myTof2PosSigmaAlongZ[5];//Sigma Z
255 double myTof2PosSigmaAlongT[5];//Sigma along Z x R
256 double myTof2PosSigmaAlongX[5];//Sigma X
257 double myTof2PosSigmaAlongY[5];//Sigma Y
258 vector<HepSymMatrix> myTof2ErrorMatrix;//Error matrix 6x6 (x,p)
259
260 //Emc TrkExt data
261 vector<Hep3Vector> myEmcPosition;
262 vector<Hep3Vector> myEmcMomentum;
263 vector<string> myEmcVolumeName;
264 int myEmcVolumeNumber[5];
265 double myEmcPosSigmaAlongTheta[5];
266 double myEmcPosSigmaAlongPhi[5];
267 vector<HepSymMatrix> myEmcErrorMatrix;
268 double myEmcPath[5];
269
270 //Muc TrkExt data
271 vector<Hep3Vector> myMucPosition;
272 vector<Hep3Vector> myMucMomentum;
273 vector<string> myMucVolumeName;
274 int myMucVolumeNumber[5];
275 double myMucPosSigmaAlongZ[5];
276 double myMucPosSigmaAlongT[5];
277 double myMucPosSigmaAlongX[5];
278 double myMucPosSigmaAlongY[5];
279 vector<HepSymMatrix> myMucErrorMatrix;
280
281 //**** added by LI Chunhua
282 double myMucKalchi2[5];
283 int myMucKaldof[5];
284 double myMucKaldepth[5];
285 int myMucKalbrLastLayer[5];
286 int myMucKalecLastLayer[5];
287 int myMucKalnumHits[5];
288 //**********************
289
290
291 //MUC Hits collection
292 //ExtMucHitVec myExtMucHitVec;
293};
294
295typedef ObjectVector<DstExtTrack> DstExtTrackCol;
296
297#endif
298
const CLID & CLID_DstExtTrack
Definition: EventModel.cxx:270
ObjectVector< DstExtTrack > DstExtTrackCol
const CLID & CLID_DstExtTrack
Definition: EventModel.cxx:270
const HepSymMatrix mucErrorMatrix(int parID) const
void SetTof1Data(Hep3Vector aPosition, Hep3Vector aMomentum, string aVolumeName, int aVolumeNumber, double aTof, double aPath, HepSymMatrix aErrorMatrix, double aZSigma=0., double aTSigma=0., double aXSigma=0., double aYSigma=0.)
const Hep3Vector tof1Position(int parID) const
const Hep3Vector tof1Momentum(int parID) const
void SetEmcData(Hep3Vector aPosition, Hep3Vector aMomentum, string aVolumeName, int aVolumeNumber, double aThetaSigma, double aPhiSigma, HepSymMatrix aErrorMatrix)
const double tof1PosSigmaAlongX(int parID) const
const Hep3Vector tof2Position(int parID) const
const double tof2PosSigmaAlongY(int parID) const
const Hep3Vector mucMomentum(int parID) const
const Hep3Vector mucPosition(int parID) const
const Hep3Vector tof2Momentum(int parID) const
const double tof2PosSigmaAlongX(int parID) const
const Hep3Vector emcMomentum(int parID) const
const double tof1PosSigmaAlongT(int parID) const
const double emcPosSigmaAlongTheta(int parID) const
const double tof1PosSigmaAlongZ(int parID) const
void SetTof2Data(Hep3Vector aPosition, Hep3Vector aMomentum, string aVolumeName, int aVolumeNumber, double aTof, double aPath, HepSymMatrix aErrorMatrix, double aZSigma=0., double aTSigma=0., double aXSigma=0., double aYSigma=0.)
const double tof2PosSigmaAlongT(int parID) const
const double tof2PosSigmaAlongZ(int parID) const
const double tof1PosSigmaAlongY(int parID) const
const HepSymMatrix tof1ErrorMatrix(int parID) const
const double emcPosSigmaAlongPhi(int parID) const
void SetMucData(Hep3Vector aPosition, Hep3Vector aMomentum, string aVolumeName, int aVolumeNumber, HepSymMatrix aErrorMatrix, double aZSigma=0., double aTSigma=0., double aXSigma=0., double aYSigma=0.)
const HepSymMatrix tof2ErrorMatrix(int parID) const
const HepSymMatrix emcErrorMatrix(int parID) const
void SetMucKalData(double chi2, int dof, double depth, int brLastLay, int ecLastLay, int nhits)
const Hep3Vector emcPosition(int parID) const
int nhits