StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
TrackData.h
1 #ifndef TrackData_h
2 #define TrackData_h
3 
4 #include <TVector3.h>
5 #include <Sti/StiTrackNode.h>
6 #include "StMuDSTMaker/COMMON/StMuTrack.h"
7 
8 
9 #include <vector>
10 using namespace std; // for vector
11 
12 class VertexData ;
13 class StiKalmanTrack;
14 class StDcaGeometry;
15 
16 
18 class DcaTrack
19 {
20 public:
21 
22  TVector3 R,gP; // position (3*cm), global momentum (3*GeV/c)
23  float sigYloc, sigZ;// error of position(2*cm), local sector ref frame
24  StiNodeErrs fitErr; // covariance matrix
25  float gChi2; // global track, from Kalman
26  int nFitPoint;
27 
28  void print() {
29  printf("#track@DCA(0,0) R/cm=[%5.2f %5.2f %.1f], errYloc=%.2fcm , errZ=%.1fcm, glob P=[%6.2f %6.2f %6.1f]GeV/c, PT=%.2f\n",R.x(),R.y(),R.z(),sigYloc, sigZ,gP.x(),gP.y(),gP.z(), gP.Pt() );
30  printf(" chi2=%f, nFitP=%d, fitErr: cXX=%f cYX=%f cYY=%f cZX=%f cZY=%f cZZ=%f\n",gChi2, nFitPoint,fitErr._cXX,fitErr._cYX,fitErr._cYY,fitErr._cZX,fitErr._cZY,fitErr._cZZ);
31  }
32 
33 };
34 
35 
36 class TrackData
37 {
38 public:
39 
42  int vertexID;
43 
45  const void* mother;
46 
47  const StDcaGeometry* dca;
48 
49  short mIdTruth;
50  short mQuality;
51  int mIdParentVx;
52  DcaTrack dcaTrack; // for 3D vertex reco
53  float zDca, ezDca; // (cm) Z of track @ DCA to beam
54  float rxyDca;
55  float gPt; // (GeV) global
56  // 3-stat logic: 1=match, -1=veto, 0=dunno
57  int mBtof,mCtb,mBemc,mEemc,mTpc;
58  bool anyMatch,anyVeto;
59  float weight; // compound from all maching tests
60  int btofBin; // >=0 if track passed through BTOF cell
61  int ctbBin; // >=0 if track passed through CTB slat
62  int bemcBin; // >=0 if track passed through BTOW tower
63  int eemcBin; // >=0 if track passed through ETOW tower
64  // ........................methods
65 
66  TrackData() : TrackData(nullptr, nullptr) { }
67 
68  TrackData(const void* motherTrack, const StDcaGeometry* motherDca);
69 
70  template<class OriginalTrack_t>
71  const OriginalTrack_t* getMother() const { return static_cast<const OriginalTrack_t*>(mother); }
72 
73  void scanNodes( vector<int> & hitPatt, int jz0);
74  bool matchVertex(VertexData &V, float kSig) ;
75 
77  double calcChi2DCA(const VertexData &V) const;
78 
79  float getTpcWeight();
80  void updateAnyMatch(bool match, bool vet,int & mXXX);
81  void print(ostream& os) const;
82 };
83 
84 
85 template<class OriginalTrack_t>
86 class TrackDataT : public TrackData
87 {
88 public:
89 
90  TrackDataT(const OriginalTrack_t &motherTrack, const StDcaGeometry* trackDca=nullptr) :
91  TrackData(&motherTrack, trackDca) { }
92 
93  const OriginalTrack_t* getMother() const { return static_cast<const OriginalTrack_t*>(mother); }
94 };
95 
96 
97 template<>
98 TrackDataT<StMuTrack>::TrackDataT(const StMuTrack &motherTrack, const StDcaGeometry* trackDca);
99 
100 
101 #endif
Definition of Kalman Track.
const void * mother
Pointer to original track.
Definition: TrackData.h:45
approximtion of track as stright line @ DCA to beamLine=0,0
Definition: TrackData.h:18
int vertexID
Definition: TrackData.h:42