CbmRoot
Loading...
Searching...
No Matches
RichGeoCreator.h
Go to the documentation of this file.
1/* Copyright (C) 2022-2024 UGiessen/GSI, Giessen/Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Semen Lebedev [committer], Simon Neuhaus */
4
5/* to generate geometry version v22a use version of this file and RichGeoCreator.cxx from commit bed4c932
6 to generate geometry version v23a use version of this file and RichGeoCreator.cxx from commit c25124a0
7 to generate geometry version v24a use version of this file and RichGeoCreator.cxx from commit current version (update at some point)
8*/
9
10#ifndef RICH_GEO_CREATOR
11#define RICH_GEO_CREATOR
12
13#include "TObject.h"
14
15#include <string>
16
17#include <cmath>
18
19#include "RichGeoMaterials.h"
20
21class TGeoVolumeAssembly;
22class TGeoVolume;
23class TGeoShape;
24class TGeoMatrix;
25class TGeoCompositeShape;
26class TGeoRotation;
27
28class RichGeoCreator : public TObject {
29public:
31
32 virtual ~RichGeoCreator();
33
34 void Create();
35
36 void SetGeoName(const std::string& geoName) { fGeoName = geoName; }
37 void SetAddShieldingBox(bool addShildingBox) { fAddShieldingBox = addShildingBox; }
38 void SetVolumeColors(bool setVolumeColors) { fSetVolumeColors = setVolumeColors; }
39
40private:
42
43 std::string fGeoName = "rich_v24a";
44 bool fAddShieldingBox = true;
45 bool fSetVolumeColors = false;
46
47 // General RICH parameters
48 double fDegToRad = 1.74532925199433E-02;
49 double fRichOrigZ = 180.; //cm
50 double fAccAngle = 25.; //deg
51 double fRichLength = 220.; //cm
52 double fRichHeight = 501.7; //cm
53 double fRichWidth = 600; //cm
54 double fRichCoveringThickness = 0.5; //cm
55 double fRichAddZ = 20.; //cm
56
57 // Entrance & Exit parameters
58 double fRichEntranceWidth = 260.; //cm
59 double fRichEntranceHeight = 175.; //cm
60 double fRichEntranceThickness = 0.025; //cm
61 double fRichExitWidth = 569.; //cm
62 double fRichExitHeight = 384.; //cm
63 double fRichExitThickness = 1; //cm
64
65 // Pipe parameters
66 double fPipeOuterRadiusEntrance = 16.4; //cm
67 double fPipeThicknessEntrance = 0.3; //cm //in CAD 2mm with overlap regions with thickness 4.04mm
68 double fPipeOuterRadiusExit = 29.9; //cm
70 double fPipeCylPartLen = 10.0; //cm
71 double fPipeLength = fRichLength + 0.5; //cm
72
73 // Mirror parameters
74 double fMirrorRadius = 300.; //cm
75 double fMirrorThickness = 0.6; //cm
76 double fMirrorPos = 350.; //cm
77 double fMirrorRot = 12.; //deg
78 double fMirrorPhiSize = 8.425; //deg
79 double fMirrorPhiStep = 8.5; //deg
80 double fMirrorThetaSize = 8.088; //deg
81 double fMirrorThetaStep = 8.1625; //deg
82 double fMirrorThetaGap = 0.0745; //deg
83 double fMirrorSupportAdd = 4.5; //cm
84 double fMirrorGapY = 0.1; //cm
85
86 // PMT parameters
87 int fNofPixels = 8;
88 double fPixelSize = 0.6; //cm
89 double fPixelSizeEdge = 0.625; //cm
90 double fPixelThickness = 0.05; //cm
91 double fPmtSize = 5.2; //cm
92 double fPmtDepth = 3.871; //cm
93 double fCameraRot = 15.; //deg
94 double fCameraShiftY = 2.5; //cm
95 double fCameraShiftZ = 5.; //cm
96 double fCameraRadius = 169.7; //cm
97 double fCameraGap = 0.1; //cm
98 double fCameraTouchWidth = 15.75; //cm
99
100 // Sensitive plane parameters
101 double fSensPlaneZ = -30.; //70.; //cm
102
103 // Calculated parameters. These parameters are calculated in CalculateParams()
104 double fCameraFullRotX = 0.;
105 double fCameraOriginY = 0.;
106 double fCameraOriginZ = 0.;
107 double fMirrorOriginY = 0.;
108 double fMirrorOriginZ = 0.;
109 double fAlpha = 0.;
110 double fCameraHeight = 0.;
112 double fCameraSegmentAng = 0.;
113
114 void CalculateParams();
115
116 TGeoVolume* CreatePmt();
117 TGeoVolume* CreateCameraModule();
118 TGeoVolume* CreateCameraStrip();
119 TGeoVolumeAssembly* CreateCameraContainer();
120 TGeoVolumeAssembly* CreateMirror();
121 TGeoVolumeAssembly* CreateMainFrame();
122 TGeoVolume* CreateGas();
123 TGeoVolume* CreateRichContainer();
124 TGeoVolume* CreateSensitivePlane();
125 TGeoVolume* CreateRichEntrance();
126 TGeoVolume* CreateRichExit();
127 TGeoVolume* CreatePipe();
128 TGeoVolume* CreatePipeCyl();
129 TGeoVolumeAssembly* CreateShieldingBox();
130 TGeoVolumeAssembly* CreateBeltAssembly();
131 TGeoVolumeAssembly* CreateMirrorSupportBelts();
132 TGeoVolumeAssembly* CreateMirrorSupportPillars();
133 TGeoVolume* CreateStuds(double zpos, double lenHalf, double angle);
134 TGeoVolume* CreatePillarConnection();
135
136 void CreateRich();
137
138 double ToDeg(double rad) { return rad / fDegToRad; }
139 double ToRad(double deg) { return deg * fDegToRad; }
140
141 TGeoCompositeShape* MakeSubtraction(const std::string& name, TGeoShape* left, TGeoShape* right,
142 TGeoMatrix* lmat = nullptr, TGeoMatrix* rmat = nullptr);
143 TGeoCompositeShape* MakeUnion(const std::string& name, TGeoShape* left, TGeoShape* right, TGeoMatrix* lmat = nullptr,
144 TGeoMatrix* rmat = nullptr);
145 TGeoCompositeShape* MakeIntersection(const std::string& name, TGeoShape* left, TGeoShape* right,
146 TGeoMatrix* lmat = nullptr, TGeoMatrix* rmat = nullptr);
147
148 TGeoCombiTrans* MakeCombiTrans(double dx, double dy, double dz, double rotX, double rotY, double rotZ);
149 TGeoTranslation* MakeTrans(double dx, double dy, double dz);
150 TGeoRotation* MakeRot(double rotX, double rotY, double rotZ);
151
152 ClassDef(RichGeoCreator, 1)
153};
154
155#endif
void SetGeoName(const std::string &geoName)
double fPipeOuterRadiusEntrance
TGeoRotation * MakeRot(double rotX, double rotY, double rotZ)
TGeoVolumeAssembly * CreateMirrorSupportBelts()
TGeoTranslation * MakeTrans(double dx, double dy, double dz)
double fRichEntranceWidth
double fPipeThicknessEntrance
TGeoVolumeAssembly * CreateCameraContainer()
TGeoVolumeAssembly * CreateMainFrame()
TGeoCompositeShape * MakeIntersection(const std::string &name, TGeoShape *left, TGeoShape *right, TGeoMatrix *lmat=nullptr, TGeoMatrix *rmat=nullptr)
TGeoVolume * CreateSensitivePlane()
TGeoVolume * CreatePillarConnection()
TGeoVolume * CreateRichEntrance()
double fMirrorSupportAdd
std::string fGeoName
TGeoCompositeShape * MakeSubtraction(const std::string &name, TGeoShape *left, TGeoShape *right, TGeoMatrix *lmat=nullptr, TGeoMatrix *rmat=nullptr)
double fMirrorThetaSize
TGeoCombiTrans * MakeCombiTrans(double dx, double dy, double dz, double rotX, double rotY, double rotZ)
double fPipeOuterRadiusExit
TGeoVolumeAssembly * CreateShieldingBox()
TGeoVolume * CreatePmt()
double fCameraTouchRadius
TGeoVolume * CreateCameraModule()
double fPipeThicknessExit
TGeoVolume * CreateGas()
TGeoVolume * CreateRichExit()
void SetAddShieldingBox(bool addShildingBox)
TGeoVolumeAssembly * CreateMirrorSupportPillars()
double fMirrorThickness
TGeoVolume * CreatePipeCyl()
double ToRad(double deg)
double fRichCoveringThickness
RichGeoMaterials fMaterials
TGeoVolume * CreateStuds(double zpos, double lenHalf, double angle)
TGeoVolumeAssembly * CreateMirror()
double ToDeg(double rad)
TGeoVolume * CreatePipe()
TGeoVolume * CreateCameraStrip()
double fRichExitThickness
void SetVolumeColors(bool setVolumeColors)
double fRichEntranceHeight
virtual ~RichGeoCreator()
TGeoCompositeShape * MakeUnion(const std::string &name, TGeoShape *left, TGeoShape *right, TGeoMatrix *lmat=nullptr, TGeoMatrix *rmat=nullptr)
double fRichEntranceThickness
double fCameraTouchWidth
double fMirrorThetaStep
TGeoVolume * CreateRichContainer()
TGeoVolumeAssembly * CreateBeltAssembly()