CbmRoot
CbmRich.h
Go to the documentation of this file.
1 
10 #ifndef CBM_RICH
11 #define CBM_RICH
12 
13 
14 #include "FairDetector.h"
15 
16 #include "Rtypes.h"
17 #include "TGeoMatrix.h"
18 #include "TString.h"
19 #include "TVector3.h"
20 #include <TClonesArray.h> // for ROOTCLING
21 #include <map>
22 
23 class CbmRichRefPlanePoint;
24 class CbmRichPoint;
25 class CbmRichMirrorPoint;
26 class FairVolume;
27 class TGeoMatrix;
28 class TGeoNode;
29 class TGeoMedium;
38 class CbmRich : public FairDetector {
39 
40 public:
44  CbmRich();
45 
57  CbmRich(
58  const char* name,
59  Bool_t active,
60  Double_t px = 0.,
61  Double_t py = 0.,
62  Double_t pz =
63  258.75, // Z coordinate for v16a = 270, for v17a = 258.75, for v18a = 0
64  Double_t rx = 0.,
65  Double_t ry = 0.,
66  Double_t rz = 0.);
67 
68 
72  virtual ~CbmRich();
73 
74 
78  virtual void Initialize();
79 
80 
87  virtual Bool_t ProcessHits(FairVolume* vol = 0);
88 
93  virtual void EndOfEvent();
94 
95 
99  virtual void Register();
100 
101 
105  virtual TClonesArray* GetCollection(Int_t iColl) const;
106 
107 
111  virtual void Print(Option_t*) const;
112 
113 
117  virtual void Reset();
118 
119 
126  virtual void CopyClones(TClonesArray* cl1, TClonesArray* cl2, Int_t offset);
127 
128 
133  virtual void ConstructGeometry();
134 
135 
140  void ConstructGdmlGeometry(TGeoMatrix* geoMatrix);
141 
146  void ExpandNodeForGdml(TGeoNode* node);
147 
148 
152  void ConstructOpGeometry();
153 
158 
159 
167  virtual Bool_t CheckIfSensitive(std::string name);
168 
169  /*
170  * \brief set fRegisterPhotonsOnSensitivePlane parameter
171  */
174  }
175 
176 private:
177  Int_t fPosIndex;
178  // set to true if you want to register photons onto the sensitive gas plane,
179  // if false then only charged particles are registered
181 
182  TClonesArray* fRichPoints; // MC points onto the photodetector plane
183  TClonesArray* fRichRefPlanePoints; // points on the reference plane
184  TClonesArray* fRichMirrorPoints; // mirror points
185 
186 
187  // GDML geometry
188  static std::map<TString, TGeoMedium*>
189  fFixedMedia; // List of media "repaired" after importing GMDL
190  TGeoRotation* fRotation; // Rotation matrix of the RICH detector
191  TGeoCombiTrans*
192  fPositionRotation; // Full combined matrix for position and rotation of the RICH detector
193 
197  CbmRichPoint* AddHit(Int_t trackID,
198  Int_t detID,
199  TVector3 pos,
200  TVector3 mom,
201  Double_t time,
202  Double_t length,
203  Double_t eLoss);
204 
208  CbmRichPoint* AddRefPlaneHit(Int_t trackID,
209  Int_t detID,
210  TVector3 pos,
211  TVector3 mom,
212  Double_t time,
213  Double_t length,
214  Double_t eLoss);
215 
219  CbmRichPoint* AddMirrorHit(Int_t trackID,
220  Int_t detID,
221  TVector3 pos,
222  TVector3 mom,
223  Double_t time,
224  Double_t length,
225  Double_t eLoss);
226 
230  CbmRich(const CbmRich&);
231 
236 
237  ClassDef(CbmRich, 2)
238 };
239 
240 #endif
CbmRich::Initialize
virtual void Initialize()
Initialize detector. Stores volume IDs for RICH detector and mirror.
Definition: CbmRich.cxx:91
CbmRich::GetCollection
virtual TClonesArray * GetCollection(Int_t iColl) const
Return hit collection.
Definition: CbmRich.cxx:244
CbmRich::ProcessHits
virtual Bool_t ProcessHits(FairVolume *vol=0)
Defines the action to be taken when a step is inside the active volume. Creates CbmRichPoints and Cbm...
Definition: CbmRich.cxx:104
CbmRich::fRotation
TGeoRotation * fRotation
Definition: CbmRich.h:190
CbmRich::fRichRefPlanePoints
TClonesArray * fRichRefPlanePoints
Definition: CbmRich.h:183
CbmRich
Defines the active detector RICH. Constructs the geometry and creates MCPoints.
Definition: CbmRich.h:38
CbmRich::fRichPoints
TClonesArray * fRichPoints
Definition: CbmRich.h:182
CbmRich::CopyClones
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Copies the hit collection with a given track index offset.
Definition: CbmRich.cxx:267
CbmRich::AddRefPlaneHit
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:556
CbmRich::AddHit
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:543
CbmRich::Reset
virtual void Reset()
Clears the hit collection.
Definition: CbmRich.cxx:260
CbmRich::fFixedMedia
static std::map< TString, TGeoMedium * > fFixedMedia
Definition: CbmRich.h:189
CbmRich::ExpandNodeForGdml
void ExpandNodeForGdml(TGeoNode *node)
Assign materials by taking description from medoa.geo and not from GDML for a certain node.
Definition: CbmRich.cxx:417
CbmRich::CheckIfSensitive
virtual Bool_t CheckIfSensitive(std::string name)
Definition: CbmRich.cxx:93
CbmRich::fRichMirrorPoints
TClonesArray * fRichMirrorPoints
Definition: CbmRich.h:184
CbmRich::Print
virtual void Print(Option_t *) const
Screen output of hit collection.
Definition: CbmRich.cxx:251
CbmRich::EndOfEvent
virtual void EndOfEvent()
If verbosity level is set, print hit collection at the end of the event and resets it afterwards.
Definition: CbmRich.cxx:230
CbmRich::SetRichGlassPropertiesForGeant4
void SetRichGlassPropertiesForGeant4()
Set Cherenkov propeties for RICH mirror.
Definition: CbmRich.cxx:310
CbmRich::SetRegisterPhotonsOnSensitivePlane
void SetRegisterPhotonsOnSensitivePlane(Bool_t b)
Definition: CbmRich.h:172
CbmRich::CbmRich
CbmRich(const CbmRich &)
Copy constructor.
CbmRich::operator=
CbmRich & operator=(const CbmRich &)
Assignment operator.
CbmRich::fRegisterPhotonsOnSensitivePlane
Bool_t fRegisterPhotonsOnSensitivePlane
Definition: CbmRich.h:180
CbmRich::ConstructGdmlGeometry
void ConstructGdmlGeometry(TGeoMatrix *geoMatrix)
Construct geometry from GDML file.
Definition: CbmRich.cxx:372
CbmRich::ConstructGeometry
virtual void ConstructGeometry()
Construct geometry. Currently ROOT and ASCII formats are supported. The concrete method for geometry ...
Definition: CbmRich.cxx:287
pos
TVector3 pos
Definition: CbmMvdSensorDigiToHitTask.cxx:60
CbmRich::fPositionRotation
TGeoCombiTrans * fPositionRotation
Definition: CbmRich.h:192
CbmRich::fPosIndex
Int_t fPosIndex
Definition: CbmRich.h:177
CbmRich::~CbmRich
virtual ~CbmRich()
Destructor.
Definition: CbmRich.cxx:75
CbmRich::Register
virtual void Register()
Registers the hit collection in the ROOT manager.
Definition: CbmRich.cxx:235
CbmRich::CbmRich
CbmRich()
Default constructor.
Definition: CbmRich.cxx:44
CbmRichPoint
Definition: CbmRichPoint.h:24
CbmRich::AddMirrorHit
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:569
CbmRich::ConstructOpGeometry
void ConstructOpGeometry()
Put some optical properties.
Definition: CbmRich.cxx:282