StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
HitT.h
1 #ifndef __HIT__
2 #define __HIT__
3 //#define __USE_GLOBAL__
4 #include <string.h>
5 #include "TObject.h"
6 class StHit;
7 class HitT : public TObject {
8  private:
9  Char_t start;
10  Int_t Id;
11  Int_t sector, barrel, layer, ladder, wafer, hybrid, rdo; // SSD: barrel = layer = hybrid = 0
12  Double32_t xG, yG, zG; // hit Global from StEvent
13  Double32_t xGC, yGC, zGC; // hit Global from local
14  Double32_t xL, yL, zL; // hit in Ladder CS
15  Double32_t u, v, w; // hit in Local (Wafer) xL == u_m, yL == v_m
16  Double32_t tuP, tvP; // tangs
17  Double32_t uP, vP; // prediction in Wafer CS
18  Double32_t pT, pMom; // track
19  Double32_t xPG, yPG, zPG; // Prediction in Global CS
20  Double32_t cxPG, cyPG, czPG; // Predicted direction cos in Global
21  Double32_t wGu, wGv, wGw; // Global direction for detector plane
22  Double32_t xPL, yPL, zPL; // Ladder
23 #ifdef __USE_GLOBAL__
24  Double32_t uPGl, vPGl; // prediction in Wafer CS
25  Double32_t tuPGl, tvPGl; // tangs
26  Double32_t xPGlG, yPGlG, zPGlG; // Prediction in Global CS
27  Double32_t cxPGlG, cyPGlG, czPGlG; // Predicted direction cos in Global
28  Double32_t xPGlL, yPGlL, zPGlL; // Ladder
29 #endif
30  // Double32_t cxPL, cyPL, czPL; // Ladder
31 #if 0
32  Bool_t fValidDerivatives;
33  Double32_t duPdxV,duPdyV,duPdzV,duPddip,duPdphi,duPdRho; // derivatives uP wrt xV,yV,zV,1/pT,dip,phi
34  Double32_t dvPdxV,dvPdyV,dvPdzV,dvPddip,dvPdphi,dvPdRho; // derivatives vP wrt xV,yV,zV,1/pT,dip,phi
35 #endif
36  Double32_t uM, vM;
37  Double32_t anode, timeb;
38  Int_t NoHitPerTrack;
39  Double32_t uD, vD;
40  Double32_t uHat;
41  Double32_t vHat;
42  Int_t NofHits; // total no. of hits per wafer
43  Int_t NofFHits;// total no. of fitted hits per wafer
44  Int_t isFitted;
45  Int_t isTrack;
46  Int_t isUsedInFit;
47  UInt_t hitFlag;
48  Char_t end;
49  public:
50  HitT(Int_t B = 0, Int_t L = 0, Int_t l = 0, Int_t W = 0, Int_t H = 0,
51  Double32_t X = 0, Double32_t Y = 0, Double32_t Z = 0,
52  Double32_t XL = 0, Double32_t YL = 0, Double32_t ZL = 0) {
53  memset(&start, 0, &end - &start);
54  SetId(B,L,l,W,H); Set(X,Y,Z,XL,YL,ZL);
55  }
56 
57  virtual ~HitT() {}
58  void Set(Double32_t X, Double32_t Y, Double32_t Z,
59  Double32_t XL = 0, Double32_t YL = 0, Double32_t ZL = 0) {
60  xG = X; yG = Y; zG = Z;
61  uM = XL; vM = YL; w = ZL;
62  }
63  void SetHitFlag(const UInt_t flag) {hitFlag = flag;}
64  void SetL(Double32_t X, Double32_t Y, Double32_t Z) {xL = X; yL = Y; zL = Z;}
65  void SetGC(Double32_t X, Double32_t Y, Double32_t Z) {xGC = X; yGC = Y; zGC = Z;}
66  void SetLM(Double32_t X, Double32_t Z) {u = X; v = Z;}
67  void SetAnode(Double32_t p=0) {anode=p;}
68  void SetTimeB(Double32_t p=0) {timeb=p;}
69  void SetId(Int_t B = 0, Int_t L = 0, Int_t l = 0, Int_t W = 0, Int_t H = 0);
70 #if 0
71  void SetId(StHit *HitT);
72 #endif
73  void Set(Double32_t *xyzG, Double32_t *xyzL) {Set(xyzG[0],xyzG[1],xyzG[2],xyzL[0],xyzL[1],xyzL[2]);}
74  void SetpT(Double32_t p) {pT = p;}
75  void SetMom(Double32_t p) {pMom = p;}
76  void SetUVPred(Double32_t u, Double32_t v) {uP = u; vP = v;}
77  void SettUVPred(Double32_t tu, Double32_t tv) {tuP = tu; tvP = tv;}
78  void SetWG(Double32_t wu, Double32_t wv, Double32_t ww) { wGu = wu; wGv = wv; wGw = ww;}
79  // void SetWL(Double32_t wx, Double32_t wy, Double32_t wz) { wLx = wx; wLy = wy; wLz = wz;}
80 #if 0
81  void SetValidDerivatives(Bool_t p=kTRUE) {fValidDerivatives = p;}
82  void SetDerivatives(Double32_t *der) {Double32_t *d = &duPdxV; for (Int_t i = 0; i < 12; i++) d[i] = der[i];}
83 #endif
84  void SetXyzG(const Double_t *x) {Double32_t *xyzPG = &xPG; for (Int_t i = 0; i < 3; i++) xyzPG[i] = x[i];}
85  void SetDirG(const Double_t *x) {Double32_t *dirPG = &cxPG;for (Int_t i = 0; i < 3; i++) dirPG[i] = x[i];}
86  void SetXyzL(const Double_t *x) {Double32_t *xyzPL = &xPL; for (Int_t i = 0; i < 3; i++) xyzPL[i] = x[i];}
87  void SetRDO(Int_t r) {rdo = r;}
88  void SetuvD(Double_t u, Double_t v) {uD = u; vD = v;};
89 #ifdef __USE_GLOBAL__
90  void SetUVPredGl(Double32_t u, Double32_t v) {uPGl = u; vPGl = v;}
91  void SettUVPredGl(Double32_t tu, Double32_t tv) {tuPGl = tu; tvPGl = tv;}
92  void SetXyzGl(const Double_t *x) {Double32_t *xyzPG = &xPGlG; for (Int_t i = 0; i < 3; i++) xyzPG[i] = x[i];}
93  void SetDirGl(const Double_t *x) {Double32_t *dirPG = &cxPGlG;for (Int_t i = 0; i < 3; i++) dirPG[i] = x[i];}
94  void SetXyzGlL(const Double_t *x) {Double32_t *xyzPL = &xPGlL; for (Int_t i = 0; i < 3; i++) xyzPL[i] = x[i];}
95 #endif
96  void SetHitPerTrack(Int_t k) {NoHitPerTrack = k;}
97  void SetuHat(Double_t u) {uHat = u;}
98  void SetvHat(Double_t v) {vHat = v;}
99  void SetNofHits(Int_t n) {NofHits = n;}
100  void SetNofFHits(Int_t n) {NofFHits = n;}
101  void SetisFitted(Int_t k=1) {isFitted = k;}
102  void SetisTrack(Int_t k=1) {isTrack = k;}
103  void SetUsedInFit(Int_t k=0) {isUsedInFit = k;}
104  UInt_t GetHitFlag() const {return hitFlag;}
105  Double32_t GetU() const {return u;}
106  Double32_t GetV() const {return v;}
107  Double32_t GetuD() const {return uD;}
108  Double32_t GetvD() const {return vD;}
109  Double32_t *GetXyzP() {return &xPG;}
110  Double32_t *GetXyzL() {return &xPL;}
111  Double32_t *GetXyzW() {return &xPL;}
112  Double32_t GetPredtU() const {return tuP;}
113  Double32_t GetPredtV() const {return tvP;}
114  Double32_t GetPredU() const {return uP;}
115  Double32_t GetPredV() const {return vP;}
116 #ifdef __USE_GLOBAL__
117 
118  Double32_t *GetXyzPGl() {return &xPGlG;}
119  Double32_t *GetXyzLGl() {return &xPGlL;}
120  Double32_t *GetXyzWGl() {return &xPGlL;}
121  Double32_t GetPredGltU() const {return tuPGl;}
122  Double32_t GetPredGltV() const {return tvPGl;}
123  Double32_t GetPredGlU() const {return uPGl;}
124  Double32_t GetPredGlV() const {return vPGl;}
125 #endif
126  Int_t Barrel() const {return barrel;}
127  Int_t Layer() const {return layer;}
128  Int_t Ladder() const {return ladder;}
129  Int_t Wafer() const {return wafer;}
130  Int_t GetId() const {return Id;}
131 #if 0
132  const Double32_t *GetDerivatives() const {return &duPdxV;}
133  Bool_t ValidDerivatives() const {return fValidDerivatives;}
134 #endif
135  virtual void Print(Option_t *opt="") const;
136  ClassDef(HitT,1)
137 };
138 #endif
Definition: StHit.h:125
Definition: HitT.h:7