CbmRoot
Loading...
Searching...
No Matches
CbmRich.h
Go to the documentation of this file.
1/* Copyright (C) 2004-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Volker Friese, Semen Lebedev, Claudia Hoehne [committer] */
4
14#ifndef CBM_RICH
15#define CBM_RICH
16
17#include <FairDetector.h>
18
19#include <Rtypes.h>
20#include <TClonesArray.h>
21#include <TString.h>
22#include <TVector3.h>
23
24#include <map>
25
26class CbmRichPoint;
27class FairVolume;
28class TGeoMatrix;
29class TGeoNode;
30class TGeoMedium;
31
40class CbmRich : public FairDetector {
41public:
45 CbmRich();
46
58 CbmRich(const char* name, Bool_t active, Double_t px = 0., Double_t py = 0.,
59 Double_t pz = 258.75, // Z coordinate for v16a = 270, for v17a = 258.75, for v18a = 0
60 Double_t rx = 0., Double_t ry = 0., Double_t rz = 0.);
61
65 virtual ~CbmRich();
66
70 virtual void Initialize();
71
78 virtual Bool_t ProcessHits(FairVolume* vol = nullptr);
79
84 virtual void EndOfEvent();
85
89 virtual void Register();
90
94 virtual TClonesArray* GetCollection(Int_t iColl) const;
95
99 virtual void Print(Option_t*) const;
100
104 virtual void Reset();
105
112 virtual void CopyClones(TClonesArray* cl1, TClonesArray* cl2, Int_t offset);
113
118 virtual void ConstructGeometry();
119
124 void ConstructGdmlGeometry(TGeoMatrix* geoMatrix);
125
130 void ExpandNodeForGdml(TGeoNode* node);
131
135 void ConstructOpGeometry();
136
141
150 virtual Bool_t CheckIfSensitive(std::string name);
151 virtual Bool_t IsSensitive(const std::string& name);
152
157
158private:
160
161 // Set to true if you want to register photons onto the sensitive gas plane,
162 // if false then only charged particles are registered
164
165 TClonesArray* fRichPoints; // MC points onto the photodetector plane
166 TClonesArray* fRichRefPlanePoints; // Points on the reference plane
167 TClonesArray* fRichMirrorPoints; // Mirror points
168
169 // GDML geometry
170 static std::map<TString, TGeoMedium*> fFixedMedia; // List of media "repaired" after importing GMDL
171 TGeoRotation* fRotation; // Rotation matrix of the RICH detector
172 TGeoCombiTrans* fPositionRotation; // Full combined matrix for position and rotation of the RICH detector
173
177 CbmRichPoint* AddHit(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length,
178 Double_t eLoss);
179
183 CbmRichPoint* AddRefPlaneHit(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length,
184 Double_t eLoss);
185
189 CbmRichPoint* AddMirrorHit(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length,
190 Double_t eLoss);
191
196
201
202 ClassDef(CbmRich, 2)
203};
204
205#endif
Defines the active detector RICH. Constructs the geometry and creates MCPoints.
Definition CbmRich.h:40
Int_t fPosIndex
Definition CbmRich.h:159
virtual Bool_t IsSensitive(const std::string &name)
Definition CbmRich.cxx:86
void ConstructGdmlGeometry(TGeoMatrix *geoMatrix)
Construct geometry from GDML file.
Definition CbmRich.cxx:349
virtual Bool_t ProcessHits(FairVolume *vol=nullptr)
Defines the action to be taken when a step is inside the active volume. Creates CbmRichPoints for MAP...
Definition CbmRich.cxx:99
void SetRichGlassPropertiesForGeant4()
Set Cherenkov propeties for RICH mirror.
Definition CbmRich.cxx:299
virtual void ConstructGeometry()
Construct geometry. Currently ROOT and ASCII formats are supported. The concrete method for geometry ...
Definition CbmRich.cxx:275
void ConstructOpGeometry()
Put some optical properties.
Definition CbmRich.cxx:269
Bool_t fRegisterPhotonsOnSensitivePlane
Definition CbmRich.h:163
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Copies the hit collection with a given track index offset.
Definition CbmRich.cxx:253
TClonesArray * fRichMirrorPoints
Definition CbmRich.h:167
virtual ~CbmRich()
Destructor.
Definition CbmRich.cxx:63
CbmRichPoint * AddHit(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Double_t eLoss)
Adds a RichPoint to the TClonesArray.
Definition CbmRich.cxx:506
void ExpandNodeForGdml(TGeoNode *node)
Assign materials by taking description from medoa.geo and not from GDML for a certain node.
Definition CbmRich.cxx:393
TGeoCombiTrans * fPositionRotation
Definition CbmRich.h:172
TGeoRotation * fRotation
Definition CbmRich.h:171
virtual void EndOfEvent()
If verbosity level is set, print hit collection at the end of the event and resets it afterwards.
Definition CbmRich.cxx:214
CbmRich()
Default constructor.
Definition CbmRich.cxx:36
TClonesArray * fRichPoints
Definition CbmRich.h:165
TClonesArray * fRichRefPlanePoints
Definition CbmRich.h:166
virtual void Reset()
Clears the hit collection.
Definition CbmRich.cxx:245
CbmRich(const CbmRich &)
Copy constructor.
CbmRichPoint * AddRefPlaneHit(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Double_t eLoss)
Adds a RichRefPlanePoint to the TClonesArray.
Definition CbmRich.cxx:514
virtual void Print(Option_t *) const
Screen output of hit collection.
Definition CbmRich.cxx:235
static std::map< TString, TGeoMedium * > fFixedMedia
Definition CbmRich.h:170
virtual void Register()
Registers the hit collection in the ROOT manager.
Definition CbmRich.cxx:220
virtual void Initialize()
Initialize detector. Stores volume IDs for RICH detector and mirror.
Definition CbmRich.cxx:80
virtual TClonesArray * GetCollection(Int_t iColl) const
Return hit collection.
Definition CbmRich.cxx:227
virtual Bool_t CheckIfSensitive(std::string name)
Check whether a volume is sensitive. The decision is based on the volume name. Only used in case of R...
Definition CbmRich.cxx:96
CbmRichPoint * AddMirrorHit(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Double_t eLoss)
Adds a RichMirrorPoint to the TClonesArray.
Definition CbmRich.cxx:522
void SetRegisterPhotonsOnSensitivePlane(Bool_t b)
set fRegisterPhotonsOnSensitivePlane parameter
Definition CbmRich.h:156
CbmRich & operator=(const CbmRich &)
Assignment operator.