EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CbmRichRing.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CbmRichRing.h
1 /* class: CbmRichRing
2 * Created 05/07/04
3 * author A. Soloviev<solovjev@cv.jinr.ru>
4 *
5 * Rings in Rich Photodetector
6 **/
7 
8 #ifndef CBM_RICH_RING_H
9 #define CBM_RICH_RING_H
10 
11 //#include "CbmRichRingLight.h"
12 
13 #include "TObject.h"
14 
15 #include <vector>
16 
17 class CbmRichRing : public TObject {
18 
19 public:
20 
22  CbmRichRing();
23 
29  CbmRichRing ( Float_t x, Float_t y, Float_t r );
30 
32  virtual ~CbmRichRing();
33 
35  void AddHit(UShort_t pHit) {fHitCollection.push_back(pHit);}
39  Bool_t RemoveHit(UShort_t hitId);
41  Int_t GetNofHits() const { return fHitCollection.size(); }
43  UShort_t GetHit(Int_t i) const {return fHitCollection[i];}
45  void Print();
46 
47 
49  void SetAPar(Double_t a) {fAPar = a;}
50  void SetBPar(Double_t b) {fBPar = b;}
51  void SetCPar(Double_t c) {fCPar = c;}
52  void SetDPar(Double_t d) {fDPar = d;}
53  void SetEPar(Double_t e) {fEPar = e;}
54  void SetFPar(Double_t f) {fFPar = f;}
55 
56  void SetCenterX(Float_t x) {fCenterX = x;}
57  void SetCenterY(Float_t y) {fCenterY = y;}
58  void SetRadius(Float_t r) {fRadius = r;}
59  void SetAaxis(Double_t a) {fAaxis = a;}
60  void SetBaxis(Double_t b) {fBaxis = b;}
61  void SetAaxisCor(Double_t a) {fAaxisCor = a;}
62  void SetBaxisCor(Double_t b) {fBaxisCor = b;}
63  void SetXYABPhi(Double_t x, Double_t y,
64  Double_t a, Double_t b,
65  Double_t phi);
66  void SetPhi(Double_t phi) {fPhi = phi;}
67  void SetTrackID(Int_t track) {fTrackID = track;}
68  void SetDistance(Double_t d) {fDistance = d;}
69  void SetChi2(Double_t chi2) {fChi2 = chi2;}
70  void SetRecFlag (Int_t recflag) {fRecFlag = recflag;}
71  void SetAngle( Double_t angle) {fAngle = angle;}
72  void SetNofHitsOnRing(Int_t onring) {fNofHitsOnRing = onring;}
74  void SetSelectionNN (Double_t selectionNN ) {fSelectionNN = selectionNN;}
75 
77  Double_t GetAPar() const {return fAPar;}
78  Double_t GetBPar() const {return fBPar;}
79  Double_t GetCPar() const {return fCPar;}
80  Double_t GetDPar() const {return fDPar;}
81  Double_t GetEPar() const {return fEPar;}
82  Double_t GetFPar() const {return fFPar;}
83 
84  Float_t GetCenterX() const {return fCenterX;}
85  Float_t GetCenterY() const {return fCenterY;}
86  Float_t GetRadius() const {return fRadius;}
87  Double_t GetAaxis() const {return fAaxis;}
88  Double_t GetBaxis() const {return fBaxis;}
89  Double_t GetAaxisCor() const {return fAaxisCor;}
90  Double_t GetBaxisCor() const {return fBaxisCor;}
91  Double_t GetPhi() const {return fPhi;}
92  Double_t GetXF1() const;
93  Double_t GetYF1() const;
94  Double_t GetXF2() const;
95  Double_t GetYF2() const;
96 
97  Int_t GetTrackID() const {return fTrackID;}
98 
99  Double_t GetSelectionNN() const {return fSelectionNN;}
100  Double_t GetDistance() const {return fDistance;}
101  Double_t GetChi2() const {return fChi2;}
102  Double_t GetNDF() const {return GetNofHits()-5;}
103  Float_t GetRadialPosition() const;
104  Double_t GetAngle() const {return fAngle;}
105  Int_t GetNofHitsOnRing() const {return fNofHitsOnRing;}
106  Double_t GetRadialAngle() const;
107  Int_t GetRecFlag() const {return fRecFlag;}
108  //CbmRichRingLight* toLightRing();
109 private:
110 
111  std::vector<UShort_t> fHitCollection;
113 protected:
114 
115  Double_t fAPar; // Axx+Bxy+Cyy+Dx+Ey+F
116  Double_t fBPar;
117  Double_t fCPar;
118  Double_t fDPar;
119  Double_t fEPar;
120  Double_t fFPar;
121 
122  Float_t fCenterX;
123  Float_t fCenterY;
124  Float_t fRadius;
125 
126  Double_t fAaxis; // major axis of ellipse
127  Double_t fBaxis; // minor axes of the ellipse
128  Double_t fAaxisCor; // major axis of ellipse after correction
129  Double_t fBaxisCor; // minor axes of the ellipse after correction
130 
131  Double_t fPhi; // rotation angle
132 
133  Int_t fTrackID; // ID of the matched track, set after track matching
134 
135  Double_t fDistance; // Distance to track matched to this ring
136  Double_t fChi2;
137  Double_t fAngle;
139 
140  Double_t fSelectionNN; // value for selection high quality rings
141 
142  Int_t fRecFlag;
143 
144 ClassDef(CbmRichRing,2)
145 };
146 
147 #endif // CBM_RICH_RING_H