00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef RECMDCKALTRACK_H
00011 #define RECMDCKALTRACK_H
00012 #include "GaudiKernel/ContainedObject.h"
00013 #include "GaudiKernel/SmartRef.h"
00014 #include "GaudiKernel/SmartRefVector.h"
00015 #include "GaudiKernel/ObjectVector.h"
00016 #include "EventModel/EventModel.h"
00017 #include "DstEvent/DstMdcKalTrack.h"
00018 #include "CLHEP/Matrix/Vector.h"
00019 #include "CLHEP/Matrix/SymMatrix.h"
00020 #include "CLHEP/Vector/ThreeVector.h"
00021 #include "CLHEP/Geometry/Point3D.h"
00022 #include "RecMdcKalHelixSeg.h"
00023
00024
00025 extern const CLID& CLID_RecMdcKalTrack;
00026
00027 typedef SmartRefVector<RecMdcKalHelixSeg> HelixSegRefVec;
00028
00029
00030 class RecMdcKalTrack : public DstMdcKalTrack {
00031
00032 public:
00033 virtual const CLID& clID() const {
00034 return RecMdcKalTrack::classID();
00035 }
00036
00037 static const CLID& classID() {
00038 return CLID_RecMdcKalTrack;
00039 }
00040
00041 RecMdcKalTrack();
00042 RecMdcKalTrack(const RecMdcKalTrack& track);
00043 RecMdcKalTrack(const DstMdcKalTrack& track);
00044 RecMdcKalTrack& operator=(const RecMdcKalTrack&);
00045 RecMdcKalTrack& operator=(const DstMdcKalTrack&);
00046 ~RecMdcKalTrack();
00047
00048
00049 HelixSegRefVec getVecHelixSegs(int pid=-1) const;
00050
00051 int getTrackId( void ) const { return m_trackId; }
00052 double getMass( int pid ) const { return m_mass[pid]; }
00053 double getLength( int pid ) const { return m_length[pid]; }
00054 double getTof( int pid ) const { return m_tof[pid]; }
00055 int getNhits( int pid ) const { return m_nhits[pid]; }
00056 int getStat( int i, int pid ) const { return m_stat[i][pid]; }
00057 int getNster(const int i, const int pid) const { return m_nster[i][pid]; }
00058 int getFirstLayer(const int i, const int pid) const { return m_firstLayer[i][pid]; }
00059 int getLastLayer(const int i, const int pid) const { return m_lastLayer[i][pid]; }
00060 double getChisq( int i, int pid ) const { return m_chisq[i][pid]; }
00061 int getNdf( int i, int pid ) const { return m_ndf[i][pid]; }
00062 double getPathl( int i ) const { return m_pathl[i]; }
00063 double getPathSM( int pid) const { return m_pathSM[pid]; }
00064
00065
00066 const HepVector& getZHelix() const { return m_zhelixs[2]; }
00067 const HepSymMatrix& getZError() const { return m_zerrors[2]; }
00068 const HepVector& getFHelix() const { return m_fhelixs[2]; }
00069 const HepSymMatrix& getFError() const { return m_ferrors[2]; }
00070 const HepVector& getLHelix() const { return m_lhelixs[2]; }
00071 const HepSymMatrix& getLError() const { return m_lerrors[2]; }
00072 const double getTHelix(const int i) const { return m_thelix[i]; }
00073 const double getTError(const int i) const { return m_terror[i]; }
00074 const HepVector getTHelix() const { return m_ta; }
00075 const HepSymMatrix getTError() const { return m_tEa; }
00076
00077 HepVector& getZHelixE() { return m_zhelixs[0]; }
00078 HepSymMatrix& getZErrorE() { return m_zerrors[0]; }
00079 HepVector& getFHelixE() { return m_fhelixs[0]; }
00080 HepSymMatrix& getFErrorE() { return m_ferrors[0]; }
00081 HepVector& getLHelixE() { return m_lhelixs[0]; }
00082 HepSymMatrix& getLErrorE() { return m_lerrors[0]; }
00083
00084 HepVector& getZHelixMu() { return m_zhelixs[1]; }
00085 HepSymMatrix& getZErrorMu() { return m_zerrors[1]; }
00086 HepVector& getFHelixMu() { return m_fhelixs[1]; }
00087 HepSymMatrix& getFErrorMu() { return m_ferrors[1]; }
00088 HepVector& getLHelixMu() { return m_lhelixs[1]; }
00089 HepSymMatrix& getLErrorMu() { return m_lerrors[1]; }
00090
00091 HepVector& getZHelixK() { return m_zhelixs[3]; }
00092 HepSymMatrix& getZErrorK() { return m_zerrors[3]; }
00093 HepVector& getFHelixK() { return m_fhelixs[3]; }
00094 HepSymMatrix& getFErrorK() { return m_ferrors[3]; }
00095 HepVector& getLHelixK() { return m_lhelixs[3]; }
00096 HepSymMatrix& getLErrorK() { return m_lerrors[3]; }
00097
00098 HepVector& getZHelixP() { return m_zhelixs[4]; }
00099 HepSymMatrix& getZErrorP() { return m_zerrors[4]; }
00100 HepVector& getFHelixP() { return m_fhelixs[4]; }
00101 HepSymMatrix& getFErrorP() { return m_ferrors[4]; }
00102 HepVector& getLHelixP() { return m_lhelixs[4]; }
00103 HepSymMatrix& getLErrorP() { return m_lerrors[4]; }
00104
00105 const HepPoint3D getPocaE() const { return m_pocas[0]; }
00106 const HepPoint3D getPocaMu() const { return m_pocas[1]; }
00107 const HepPoint3D getPoca() const { return m_pocas[2]; }
00108 const HepPoint3D getPocaK() const { return m_pocas[3]; }
00109 const HepPoint3D getPocaP() const { return m_pocas[4]; }
00110
00111 const HepPoint3D& getLPointE() const { return m_lpoints[0]; }
00112 const HepPoint3D& getLPointMu() const { return m_lpoints[1]; }
00113 const HepPoint3D& getLPoint() const { return m_lpoints[2]; }
00114 const HepPoint3D& getLPointK() const { return m_lpoints[3]; }
00115 const HepPoint3D& getLPointP() const { return m_lpoints[4]; }
00116
00117 const HepPoint3D& getLPivotE() const { return m_lpivots[0]; }
00118 const HepPoint3D& getLPivotMu() const { return m_lpivots[1]; }
00119 const HepPoint3D& getLPivot() const { return m_lpivots[2]; }
00120 const HepPoint3D& getLPivotK() const { return m_lpivots[3]; }
00121 const HepPoint3D& getLPivotP() const { return m_lpivots[4]; }
00122
00123
00124
00125 const HepVector& getLHelix(const int pid) const { return m_lhelixs[pid];}
00126 const HepSymMatrix& getLError(const int pid) const { return m_lerrors[pid];}
00127
00128
00129 const HepPoint3D& getPoca(const int pid) const { return m_pocas[pid];}
00130 const HepPoint3D& getLPoint(const int pid) const { return m_lpoints[pid];}
00131 const double getFiTerm(const int pid) const { return m_fiTerm[pid]; }
00132 const HepPoint3D& getLPivot(const int pid) const { return m_lpivots[pid];}
00133
00134
00135 const double getZDr(void) const { return m_zhelixs[2][0]; }
00136 const double getZFi0(void) const { return m_zhelixs[2][1]; }
00137 const double getZCpa(void) const { return m_zhelixs[2][2]; }
00138 const double getZDz(void) const { return m_zhelixs[2][3]; }
00139 const double getZTanl(void) const { return m_zhelixs[2][4]; }
00140
00141 const double getLDr(void) const { return m_lhelixs[2][0]; }
00142 const double getLFi0(void) const { return m_lhelixs[2][1]; }
00143 const double getLCpa(void) const { return m_lhelixs[2][2]; }
00144 const double getLDz(void) const { return m_lhelixs[2][3]; }
00145 const double getLTanl(void) const { return m_lhelixs[2][4]; }
00146
00147 const double getFDr(void) const { return m_fhelixs[2][0]; }
00148 const double getFFi0(void) const { return m_fhelixs[2][1]; }
00149 const double getFCpa(void) const { return m_fhelixs[2][2]; }
00150 const double getFDz(void) const { return m_fhelixs[2][3]; }
00151 const double getFTanl(void) const { return m_fhelixs[2][4]; }
00152
00153
00154
00155 void setVecHelixSegs(const HelixSegRefVec& vechelixsegs, int pid=-1);
00156
00157
00158
00159 void setMass(double mass, int pid) { m_mass[pid] = mass; }
00160 void setLength(double length, int pid) { m_length[pid] = length; }
00161 void setTof(double tof, int pid) { m_tof[pid] = tof; }
00162 void setNhits(int nhits, int pid) { m_nhits[pid] = nhits; }
00163
00164
00165
00166
00167
00168
00169 void setPathl(double pathl, int i) { m_pathl[i] = pathl; }
00170 void setPathSM(double length, int pid) { m_pathSM[pid] = length; }
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221 void setLHelix(const HepVector& helix, const int pid) {
00222 m_lhelixs[pid] = helix;
00223 }
00224 void setLError(const HepSymMatrix& error, const int pid) {
00225 m_lerrors[pid] = error;
00226 }
00227 void setLHelix(double* helix, const int pid) {
00228 for(int i=0; i<5; i++) {
00229 m_lhelixs[pid][i] = helix[i];
00230 }
00231 }
00232 void setLError(double* error, const int pid) {
00233 int k=0;
00234 HepSymMatrix mat(5);
00235 for(int i=0; i<5 ; i++) {
00236 for(int j=0; j<=i; j++,k++) {
00237 mat[i][j] = error[k];
00238 mat[j][i] = error[k];
00239 }
00240 }
00241 m_lerrors[pid] = mat;
00242 }
00243
00244 void setTHelix(const HepVector& helix) {
00245 for(int i=0; i<5; i++){
00246 m_thelix[i] = helix[i];
00247 }
00248 m_ta = helix;
00249 }
00250 void setTError(const HepSymMatrix& error) {
00251 int k=0;
00252 for(int i=0; i<5; i++){
00253 for(int j=i; j<5; j++){
00254 m_terror[k] = error[i][j];
00255 k++;
00256 }
00257 }
00258 m_tEa = error;
00259 }
00260 void setTHelix(double helix[5]) {
00261 HepVector atemp(5);
00262 for(int i=0; i<5; i++) {
00263 m_thelix[i] = helix[i];
00264 atemp[i] = helix[i];
00265 }
00266 m_ta = atemp;
00267 }
00268 void setTError(double error[15] ) {
00269 int k=0;
00270 HepSymMatrix mat(5);
00271 for(int i=0; i<5 ; i++) {
00272 for(int j=0; j<=i; j++,k++) {
00273 mat[i][j] = error[k];
00274 mat[j][i] = mat[i][j];
00275 }
00276 }
00277 m_tEa = mat;
00278
00279 for(int i=0; i<15 ; i++) {
00280 m_terror[i] = error[i];
00281 }
00282 }
00283
00284 void setLPoint(const HepPoint3D& point, const int pid) {
00285 m_lpoints[pid] = point;
00286 }
00287
00288
00289 void setFiTerm(double fi, const int pid){
00290 m_fiTerm[pid] = fi;
00291 }
00292
00293
00294 void setLPivot(const HepPoint3D& pivot, const int pid) {
00295 m_lpivots[pid] = pivot;
00296 }
00297
00298
00299
00300
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310 private:
00311 HelixSegRefVec m_vechelixsegs[5];
00312 int pidSeg;
00313
00314 double m_mass[5];
00315
00316 double m_length[5];
00317 double m_tof[5];
00318 int m_nhits[5];
00319
00320
00321
00322
00323
00324
00325
00326 double m_pathl[43];
00327 double m_pathSM[5];
00328 double m_fiTerm[5];
00329
00330
00331
00332
00333
00334 std::vector<HepPoint3D> m_lpivots;
00335 std::vector<HepPoint3D> m_lpoints;
00336
00337
00338
00339 std::vector<HepVector> m_lhelixs;
00340 std::vector<HepSymMatrix> m_lerrors;
00341 double m_thelix[5];
00342 double m_terror[15];
00343 HepVector m_ta;
00344 HepSymMatrix m_tEa;
00345
00346 };
00347
00348 typedef ObjectVector<RecMdcKalTrack> RecMdcKalTrackCol;
00349
00350 #endif
00351