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