EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CbmRich.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CbmRich.h
1 
10 #ifndef CBM_RICH
11 #define CBM_RICH
12 
13 
14 #include "FairDetector.h"
15 
16 #include "TVector3.h"
17 
18 class TClonesArray;
19 class CbmRichRefPlanePoint;
20 class CbmRichPoint;
21 class CbmRichMirrorPoint;
22 class FairVolume;
23 class TGeoMatrix;
24 class TGeoNode;
33 class CbmRich : public FairDetector
34 {
35 
36 public:
37 
41  CbmRich();
42 
54  CbmRich(
55  const char* name,
56  Bool_t active,
57  Double_t px=0.,
58  Double_t py=0.,
59  Double_t pz=0.,
60  Double_t rx=0.,
61  Double_t ry=0.,
62  Double_t rz=0.);
63 
64 
68  virtual ~CbmRich();
69 
70 
74  virtual void Initialize();
75 
76 
83  virtual Bool_t ProcessHits(
84  FairVolume* vol = 0);
85 
86 
91  virtual void EndOfEvent();
92 
93 
97  virtual void Register();
98 
99 
103  virtual TClonesArray* GetCollection(
104  Int_t iColl) const;
105 
106 
110  virtual void Print() const;
111 
112 
116  virtual void Reset();
117 
118 
125  virtual void CopyClones(
126  TClonesArray* cl1,
127  TClonesArray* cl2,
128  Int_t offset);
129 
130 
135  virtual void ConstructGeometry();
136 
140  void ConstructAsciiGeometry();
141 
142 
147  void ConstructGdmlGeometry(TGeoMatrix* geoMatrix);
148 
153  void ExpandNodeForGdml(TGeoNode* node);
154 
155 
159  void ConstructOpGeometry();
160 
161 
169  virtual Bool_t CheckIfSensitive(std::string name);
170 
171  void SetScale(double scale) { mScale = scale; };
172 
173 private:
174  Int_t fPosIndex;
175 
176  TClonesArray* fRichPoints; // MC points onto the photodetector plane
177  TClonesArray* fRichRefPlanePoints; // points on the reference plane
178  TClonesArray* fRichMirrorPoints; // mirror points
179 
180  // GDML geometry
181  static std::map<TString, Int_t> fFixedMats; // materials for the GDML geometry
182  static Bool_t fIsFirstGDML;
183  TGeoRotation* fRotation; // Rotation matrix of the RICH detector
184  TGeoCombiTrans* fPositionRotation; // Full combined matrix for position and rotation of the RICH detector
185  Double_t mScale;
186 
187  TGeoVolume* GetGasVolume(TGeoVolume* gdmlTop);
188 
193  Int_t trackID,
194  Int_t pdg,
195  Int_t detID,
196  TVector3 pos,
197  TVector3 mom,
198  Double_t time,
199  Double_t length,
200  Double_t eLoss);
201 
206  Int_t trackID,
207  Int_t detID,
208  TVector3 pos,
209  TVector3 mom,
210  Double_t time,
211  Double_t length,
212  Double_t eLoss);
213 
218  Int_t trackID,
219  Int_t detID,
220  TVector3 pos,
221  TVector3 mom,
222  Double_t time,
223  Double_t length,
224  Double_t eLoss);
225 
229  CbmRich(const CbmRich&);
230 
234  CbmRich& operator=(const CbmRich&);
235 
236  ClassDef(CbmRich,3)
237 };
238 
239 
240 #endif