StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
HitT.h
1 #ifndef __HIT__
2 #define __HIT__
3 
4 //#define __USE_GLOBAL__
5 
6 // ROOT headers
7 #include "TObject.h"
8 
9 // C/C++ headers
10 #include <string>
11 
12 // Forward declarations
13 class StHit;
14 
15 //________________
16 class HitT : public TObject {
17  private:
18  Char_t start;
19  Int_t Id;
20  Int_t sector, barrel, layer, ladder, wafer, hybrid, rdo; // SSD: barrel = layer = hybrid = 0
21  Double32_t xG, yG, zG; // hit Global from StEvent
22  Double32_t xGC, yGC, zGC; // hit Global from local
23  Double32_t xL, yL, zL; // hit in Ladder CS
24  Double32_t u, v, w; // hit in Local (Wafer) xL == u_m, yL == v_m
25  Double32_t tuP, tvP; // tangs
26  Double32_t uP, vP; // prediction in Wafer CS
27  Double32_t pT, pMom; // track
28  Double32_t xPG, yPG, zPG; // Prediction in Global CS
29  Double32_t cxPG, cyPG, czPG; // Predicted direction cos in Global
30  Double32_t wGu, wGv, wGw; // Global direction for detector plane
31  Double32_t xPL, yPL, zPL; // Ladder
32  Bool_t isPrimary; // If primary track
33  Bool_t isCrossingMembrain; //If track crosses membrain
34 #ifdef __USE_GLOBAL__
35  Double32_t uPGl, vPGl; // prediction in Wafer CS
36  Double32_t tuPGl, tvPGl; // tangs
37  Double32_t xPGlG, yPGlG, zPGlG; // Prediction in Global CS
38  Double32_t cxPGlG, cyPGlG, czPGlG; // Predicted direction cos in Global
39  Double32_t xPGlL, yPGlL, zPGlL; // Ladder
40 #endif
41  // Double32_t cxPL, cyPL, czPL; // Ladder
42 
43  Double32_t uM, vM;
44  Double32_t anode, timeb;
45  Int_t NoHitPerTrack;
46  Double32_t uD, vD; // positions of hits from detector
47  Double32_t duD, dvD; // errors in positions
48  Double32_t suD, svD; // sigma
49  Double32_t dsuD, dsvD; // errors in sigma
50  Double32_t uAdcD, vAdcD; // Adc
51  Double32_t duAdcD, dvAdcD; // errors in adc
52  Double32_t uHat;
53  Double32_t vHat;
54  Int_t NofHits; // total no. of hits per wafer
55  Int_t NofFHits;// total no. of fitted hits per wafer
56  Int_t isFitted;
57  Int_t isTrack;
58  Int_t isUsedInFit;
59  UInt_t hitFlag;
60  Double32_t sLength;
61  Double32_t sLengthR;
62  Double32_t dR;
63  Char_t end;
64  public:
65  HitT(Int_t B = 0, Int_t L = 0, Int_t l = 0, Int_t W = 0, Int_t H = 0,
66  Double32_t X = 0, Double32_t Y = 0, Double32_t Z = 0,
67  Double32_t XL = 0, Double32_t YL = 0, Double32_t ZL = 0) {
68  memset(&start, 0, &end - &start);
69  SetId(B,L,l,W,H); Set(X,Y,Z,XL,YL,ZL);
70  }
71 
72  virtual ~HitT() {}
73  void Set(Double32_t X, Double32_t Y, Double32_t Z,
74  Double32_t XL = 0, Double32_t YL = 0, Double32_t ZL = 0) {
75  xG = X; yG = Y; zG = Z;
76  uM = XL; vM = YL; w = ZL;
77  }
78  void SetHitLength(Double_t sh) {sLength = sh;}
79  void SetHitLengthR(Double_t sh) {sLengthR = sh;}
80  void SetHitdR(Double_t sh) {dR = sh;}
81  void SetHitFlag(const UInt_t flag) {hitFlag = flag;}
82  void SetL(Double32_t X, Double32_t Y, Double32_t Z) {xL = X; yL = Y; zL = Z;}
83  void SetGC(Double32_t X, Double32_t Y, Double32_t Z) {xGC = X; yGC = Y; zGC = Z;}
84  void SetLM(Double32_t X, Double32_t Z) {u = X; v = Z;}
85  void SetAnode(Double32_t p=0) {anode=p;}
86  void SetTimeB(Double32_t p=0) {timeb=p;}
87  void SetId(Int_t B = 0, Int_t L = 0, Int_t l = 0, Int_t W = 0, Int_t H = 0);
88 
89  void Set(Double32_t *xyzG, Double32_t *xyzL) {Set(xyzG[0],xyzG[1],xyzG[2],xyzL[0],xyzL[1],xyzL[2]);}
90  void SetpT(Double32_t p) {pT = p;}
91  void SetMom(Double32_t p) {pMom = p;}
92  void SetUVPred(Double32_t u, Double32_t v) {uP = u; vP = v;}
93  void SettUVPred(Double32_t tu, Double32_t tv) {tuP = tu; tvP = tv;}
94  void SetWG(Double32_t wu, Double32_t wv, Double32_t ww) { wGu = wu; wGv = wv; wGw = ww;}
95  // void SetWL(Double32_t wx, Double32_t wy, Double32_t wz) { wLx = wx; wLy = wy; wLz = wz;}
96 
97  void SetXyzG(const Double_t *x) {Double32_t *xyzPG = &xPG; for (Int_t i = 0; i < 3; i++) xyzPG[i] = x[i];}
98  void SetDirG(const Double_t *x) {Double32_t *dirPG = &cxPG;for (Int_t i = 0; i < 3; i++) dirPG[i] = x[i];}
99  void SetXyzL(const Double_t *x) {Double32_t *xyzPL = &xPL; for (Int_t i = 0; i < 3; i++) xyzPL[i] = x[i];}
100  void SetRDO(Int_t r) {rdo = r;}
101  void SetuvD(Double32_t u, Double32_t v) {uD = u; vD = v;}
102  void SetuvDError(Double32_t du, Double32_t dv) {duD = du; dvD = dv;}
103  void SetSigma(Double32_t su, Double32_t sv) {suD = su; svD = sv;}
104  void SetSigmaError(Double32_t dsu, Double32_t dsv) {dsuD = dsu; dsvD = dsv;}
105  void SetAdc(Double32_t uAdc, Double32_t vAdc) {uAdcD = uAdc; vAdcD = vAdc;}
106  void SetAdcError(Double32_t duAdc, Double32_t dvAdc) {duAdcD = duAdc; dvAdcD = dvAdc;}
107 #ifdef __USE_GLOBAL__
108  void SetUVPredGl(Double32_t u, Double32_t v) {uPGl = u; vPGl = v;}
109  void SettUVPredGl(Double32_t tu, Double32_t tv) {tuPGl = tu; tvPGl = tv;}
110  void SetXyzGl(const Double_t *x) {Double32_t *xyzPG = &xPGlG; for (Int_t i = 0; i < 3; i++) xyzPG[i] = x[i];}
111  void SetDirGl(const Double_t *x) {Double32_t *dirPG = &cxPGlG;for (Int_t i = 0; i < 3; i++) dirPG[i] = x[i];}
112  void SetXyzGlL(const Double_t *x) {Double32_t *xyzPL = &xPGlL; for (Int_t i = 0; i < 3; i++) xyzPL[i] = x[i];}
113 #endif
114  void SetHitPerTrack(Int_t k) {NoHitPerTrack = k;}
115  void SetuHat(Double_t u) {uHat = u;}
116  void SetvHat(Double_t v) {vHat = v;}
117  void SetNofHits(Int_t n) {NofHits = n;}
118  void SetNofFHits(Int_t n) {NofFHits = n;}
119  void SetisFitted(Int_t k=1) {isFitted = k;}
120  void SetisTrack(Int_t k=1) {isTrack = k;}
121  void SetUsedInFit(Int_t k=0) {isUsedInFit = k;}
122  void SetisPrimary(Bool_t k) {isPrimary = k;}
123  void SetisCrossingMembrain(Bool_t k) {isCrossingMembrain = k;}
124  UInt_t GetHitFlag() const {return hitFlag;}
125  Double32_t GetU() const {return u;}
126  Double32_t GetV() const {return v;}
127  Double32_t GetuD() const {return uD;}
128  Double32_t GetvD() const {return vD;}
129  Double32_t *GetXyzP() {return &xPG;}
130  Double32_t *GetXyzL() {return &xPL;}
131  Double32_t *GetXyzW() {return &xPL;}
132  Double32_t GetPredtU() const {return tuP;}
133  Double32_t GetPredtV() const {return tvP;}
134  Double32_t GetPredU() const {return uP;}
135  Double32_t GetPredV() const {return vP;}
136  Bool_t GetisPrimary() const {return isPrimary;}
137  Bool_t GetisCrossingMembrain(){return isCrossingMembrain;}
138 #ifdef __USE_GLOBAL__
139 
140  Double32_t *GetXyzPGl() {return &xPGlG;}
141  Double32_t *GetXyzLGl() {return &xPGlL;}
142  Double32_t *GetXyzWGl() {return &xPGlL;}
143  Double32_t GetPredGltU() const {return tuPGl;}
144  Double32_t GetPredGltV() const {return tvPGl;}
145  Double32_t GetPredGlU() const {return uPGl;}
146  Double32_t GetPredGlV() const {return vPGl;}
147 #endif
148  Int_t Barrel() const {return barrel;}
149  Int_t Layer() const {return layer;}
150  Int_t Ladder() const {return ladder;}
151  Int_t Wafer() const {return wafer;}
152  Int_t GetId() const {return Id;}
153 
154  virtual void Print(Option_t *opt="") const;
155  ClassDef(HitT,1)
156 };
157 #endif
Definition: StHit.h:125
Definition: HitT.h:16