CbmRoot
Loading...
Searching...
No Matches
RichGeoCreator.cxx
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], Eoin Clerkin, Simon Neuhaus*/
4
5
6#include "RichGeoCreator.h"
7
8#include "Logger.h"
9#include "RichGeoMaterials.h"
10#include "TGeoArb8.h"
11#include "TGeoBBox.h"
12#include "TGeoBoolNode.h"
13#include "TGeoCompositeShape.h"
14#include "TGeoCone.h"
15#include "TGeoEltu.h"
16#include "TGeoMatrix.h"
17#include "TGeoSphere.h"
18#include "TGeoTube.h"
19#include "TGeoVolume.h"
20
21#include <TMath.h>
22
23#include <iostream>
24
25using namespace std;
26
27// using TMath::ACos;
28using TMath::ASin;
29using TMath::ATan;
30using TMath::Cos;
31using TMath::Sin;
32using TMath::Tan;
33const double pi = TMath::Pi();
34
36
38
40{
41 LOG(info) << "Create geometry: " << fGeoName;
43
45
46 // TGeoVolume* vol = CreateMirrorSupportBelts();
47 // vol->Draw("ogl");
48 // vol->Export("rich_volume.root");
49
50 CreateRich();
51}
52
54{
55 double cosMirRot = cos(ToRad(fMirrorRot));
56 double sinMirRot = sin(ToRad(fMirrorRot));
57 double mirRadCos = fMirrorRadius * cosMirRot;
58 double E = sin(ToRad(90. - fAccAngle - fMirrorRot)) / sin(ToRad(fAccAngle));
59 double A = (4. * E * E + 4. * E * sinMirRot + 1.) / (cosMirRot * cosMirRot);
60 double B = (2. * (2. * E + sinMirRot) / cosMirRot) * (1. - fMirrorPos / mirRadCos);
61 double C = fMirrorPos * (fMirrorPos - 2. * mirRadCos) / (mirRadCos * mirRadCos);
62 double t1 = (-B + sqrt(B * B - 4. * A * C)) / (2. * A);
63 fAlpha = ToDeg(asin(t1)); //rad
64 double sinAlpha = sin(ToRad(fAlpha));
65 double cosAlpha = cos(ToRad(fAlpha));
66 double psi = ToDeg(atan((fMirrorRadius * (sinAlpha * cosMirRot - sinMirRot * (1. - cosAlpha))) / fMirrorPos));
67 double mirRadHalf = fMirrorRadius / 2.;
68
70 fCameraOriginY = fMirrorPos * tan(ToRad(psi)) + mirRadHalf * sin(ToRad(psi + 2. * fMirrorRot))
73 fMirrorPos - mirRadHalf * cos(ToRad((psi + 2. * fMirrorRot))) - fCameraRadius * cos(ToRad(fCameraFullRotX));
75 fMirrorOriginZ = fMirrorPos - mirRadCos;
76
77 fCameraHeight = 7. * (2. * fPmtSize + fCameraGap) + 6. * fCameraGap;
78 double camRad1 = fCameraRadius - 1. - fPmtDepth;
79 fCameraTouchRadius = std::sqrt(camRad1 * camRad1 + fCameraTouchWidth * fCameraTouchWidth / 4.);
81}
82
84{
85 double pxSizeHalf = fPixelSize / 2.;
86 double pxThicknessHalf = fPixelThickness / 2.;
87 double pxSizeEdgeHalf = fPixelSizeEdge / 2.;
88 double pmtSizeHalf = fPmtSize / 2.;
89 double pmtDepthHalf = fPmtDepth / 2.;
90 TGeoMedium* medCsI = fMaterials.GetMedium("CsI");
91
92 TGeoBBox* pixelPB = new TGeoBBox("pmt_pixel_PB", pxSizeHalf, pxSizeHalf, pxThicknessHalf);
93 TGeoBBox* pixelCornerPB = new TGeoBBox("pmt_pixel_corner_PB", pxSizeEdgeHalf, pxSizeEdgeHalf, pxThicknessHalf);
94 TGeoBBox* pixelYPB = new TGeoBBox("pmt_pixel_y_PB", pxSizeHalf, pxSizeEdgeHalf, pxThicknessHalf);
95 TGeoBBox* pixelXPB = new TGeoBBox("pmt_pixel_x_PB", pxSizeEdgeHalf, pxSizeHalf, pxThicknessHalf);
96 TGeoBBox* pmtPB = new TGeoBBox("pmt_PB", pmtSizeHalf, pmtSizeHalf, pmtDepthHalf);
97
98 TGeoVolume* pixel = new TGeoVolume("pmt_pixel", pixelPB, medCsI);
99 //if (fSetVolumeColors) pixel->SetLineColor(kRed - 9);
100 TGeoVolume* pixelCorner = new TGeoVolume("pmt_pixel_corner", pixelCornerPB, medCsI);
101 //if (fSetVolumeColors) pixelCorner->SetLineColor(kRed);
102 TGeoVolume* pixelY = new TGeoVolume("pmt_pixel_y", pixelYPB, medCsI);
103 //if (fSetVolumeColors) pixelY->SetLineColor(kRed - 5);
104 TGeoVolume* pixelX = new TGeoVolume("pmt_pixel_x", pixelXPB, medCsI);
105 //if (fSetVolumeColors) pixelX->SetLineColor(kRed + 3);
106 TGeoVolume* pmt = new TGeoVolume("pmt", pmtPB, fMaterials.GetMedium("RICHgas_CO2_dis"));
107 //if (fSetVolumeColors) pmt->SetLineColor(kRed + 1);
108
109 double edgePxPos = 3. * fPixelSize + pxSizeEdgeHalf;
110 double zC = pmtDepthHalf - pxThicknessHalf;
111 int copyNum = 1;
112 for (int x = 0; x < fNofPixels; x++) {
113 double xC = (x - 3.5) * fPixelSize;
114 if (x == 0) xC = -edgePxPos;
115 if (x == 7) xC = edgePxPos;
116 for (int y = 0; y < fNofPixels; y++) {
117 double yC = (y - 3.5) * fPixelSize;
118 if (y == 0) yC = edgePxPos;
119 if (y == 7) yC = -edgePxPos;
120
121 bool isXEdge = (x == 0 || x == fNofPixels - 1);
122 bool isYEdge = (y == 0 || y == fNofPixels - 1);
123 TGeoVolume* curPmtPixel = pixel;
124 if (isXEdge) curPmtPixel = pixelX;
125 if (isYEdge) curPmtPixel = pixelY;
126 if (isXEdge && isYEdge) curPmtPixel = pixelCorner;
127
128 pmt->AddNode(curPmtPixel, copyNum, MakeTrans(xC, yC, zC));
129 copyNum++;
130 }
131 }
132
133 TGeoBBox* pmtContPB = new TGeoBBox("pmt_cont_PB", pmtSizeHalf, pmtSizeHalf, pmtDepthHalf);
134 TGeoVolume* pmtCont = new TGeoVolume("pmt_cont", pmtContPB, fMaterials.GetMedium("RICHgas_CO2_dis"));
135 pmtCont->AddNode(pmt, 1, MakeTrans(0., 0., 0.));
136 //if (fSetVolumeColors) pmtCont->SetLineColor(kRed - 4);
137
138 return pmtCont;
139}
140
141
143{
144 double pmtSizeGap = fPmtSize + fCameraGap;
145
146 TGeoVolume* pmt = CreatePmt();
147 TGeoBBox* camModulePB = new TGeoBBox("camera_module_PB", (3. * fPmtSize + 2. * fCameraGap) / 2.,
148 (2. * fPmtSize + fCameraGap) / 2., fPmtDepth / 2.);
149
150 TGeoVolume* camModule = new TGeoVolume("camera_module", camModulePB, fMaterials.GetMedium("RICHgas_CO2_dis"));
151 //if (fSetVolumeColors) camModule->SetLineColor(kRed - 1);
152 camModule->AddNode(pmt, 1, MakeTrans(-pmtSizeGap, pmtSizeGap / 2., 0.));
153 camModule->AddNode(pmt, 2, MakeTrans(0., pmtSizeGap / 2., 0.));
154 camModule->AddNode(pmt, 3, MakeTrans(pmtSizeGap, pmtSizeGap / 2., 0.));
155 camModule->AddNode(pmt, 4, MakeTrans(-pmtSizeGap, -pmtSizeGap / 2., 0.));
156 camModule->AddNode(pmt, 5, MakeTrans(0., -pmtSizeGap / 2., 0.));
157 camModule->AddNode(pmt, 6, MakeTrans(pmtSizeGap, -pmtSizeGap / 2., 0.));
158
159 return camModule;
160}
161
163{
164 double pmtSizeGap = fPmtSize + fCameraGap;
165 double pmtDepthHalf = fPmtDepth / 2.;
166 double aluFrameDepth = 0.5;
167
168 TGeoVolume* camModule = CreateCameraModule();
169
170 double dY = (7. * (2. * fPmtSize + fCameraGap) + 6. * fCameraGap) / 2.;
171 TGeoBBox* aluFramePB =
172 new TGeoBBox("alu_frame_PB", fCameraTouchWidth / 2., (14. * fPmtSize + 13. * fCameraGap) / 2., aluFrameDepth);
173 TGeoBBox* op0 = new TGeoBBox("camera_strip_PB_op0", (3. * fPmtSize + 2. * fCameraGap) / 2., dY, pmtDepthHalf);
174 TGeoBBox* op1 = new TGeoBBox("camera_strip_PB_op1", fCameraTouchWidth / 2., dY, aluFrameDepth);
175 TGeoTranslation* tr = MakeTrans(0., 0., -pmtDepthHalf - aluFrameDepth);
176 TGeoCompositeShape* camStripPB = MakeUnion("camera_strip_PB", op0, op1, nullptr, tr);
177
178 TGeoVolume* aluFrame = new TGeoVolume("alu_frame", aluFramePB, fMaterials.GetMedium("aluminium"));
179 //if (fSetVolumeColors) aluFrame->SetLineColor(kBlue - 4);
180 TGeoVolume* camStrip = new TGeoVolume("camera_strip", camStripPB, fMaterials.GetMedium("RICHgas_CO2_dis"));
181 //if (fSetVolumeColors) camStrip->SetLineColor(kOrange + 9);
182 int copyNum = 1;
183 for (int i = -6; i <= 6; i += 2) {
184 camStrip->AddNode(camModule, copyNum, MakeTrans(0., static_cast<double>(i) * pmtSizeGap, 0.));
185 copyNum++;
186 }
187 camStrip->AddNode(aluFrame, 1, MakeTrans(0., 0., -pmtDepthHalf - aluFrameDepth));
188
189 return camStrip;
190}
191
193{
194 TGeoVolume* camStrip = CreateCameraStrip();
195 double len = fCameraRadius - (fPmtDepth / 2.);
196
197 TGeoVolumeAssembly* camCont = new TGeoVolumeAssembly("camera_cont");
198 int copyNum = 1;
199 for (int i = -7; i <= 6; i++) {
200 double ang = (static_cast<double>(i) + 0.5) * fCameraSegmentAng;
201 TGeoMatrix* mat = MakeCombiTrans(len * sin(ToRad(ang)), 0., len * cos(ToRad(ang)), 0., ang, 0.);
202 camCont->AddNode(camStrip, copyNum, mat);
203 copyNum++;
204 }
205 return camCont;
206}
207
208TGeoVolumeAssembly* RichGeoCreator::CreateMirror()
209{
210 double mRadius = fMirrorRadius;
211 double mRadius2 = mRadius + fMirrorThickness;
212 double dTheta = fAlpha / 2. - fMirrorThetaGap * 3. / 4.;
213 double phi1 = -fMirrorPhiSize / 2.;
214 double phi2 = fMirrorPhiSize / 2.;
215 double mRot90 = 90. + fMirrorRot;
216 TGeoMedium* medGlass = fMaterials.GetMedium("RICHglass");
217
218 // Mirror tile type 0
219 double theta0 = mRot90 + fAlpha / 2. + fMirrorThetaGap * 3. / 4.;
220 TGeoSphere* op00 = new TGeoSphere("mirror_tile_type0_PB_op0", mRadius, mRadius2, theta0, theta0 + dTheta, phi1, phi2);
221 TGeoBBox* op01 = new TGeoBBox("mirror_tile_type0_PB_op1", 500., fRichWidth / 2., 10.);
222 TGeoTranslation* tr0 = MakeTrans(0., 0., -fMirrorOriginY - 10.);
223 TGeoCompositeShape* mType0 = MakeSubtraction("mirror_tile_type0_PB", op00, op01, nullptr, tr0);
224 TGeoVolume* mVolType0 = new TGeoVolume("mirror_tile_type0", mType0, medGlass);
225 //if (fSetVolumeColors) mVolType0->SetLineColor(kYellow + 1);
226
227 // Mirror tile type 1
228 double theta1 = mRot90 + fMirrorThetaGap / 2.;
229 TGeoSphere* mType1 = new TGeoSphere("mirror_tile_type1_PB", mRadius, mRadius2, theta1, theta1 + dTheta, phi1, phi2);
230 TGeoVolume* mVolType1 = new TGeoVolume("mirror_tile_type1", mType1, medGlass);
231 //if (fSetVolumeColors) mVolType1->SetLineColor(kYellow + 2);
232
233 // Mirror tile type 2
234 double theta2 = mRot90 - fAlpha / 2. + fMirrorThetaGap / 4.;
235 TGeoSphere* mType2 = new TGeoSphere("mirror_tile_type2_PB", mRadius, mRadius2, theta2, theta2 + dTheta, phi1, phi2);
236 TGeoVolume* mVolType2 = new TGeoVolume("mirror_tile_type2", mType2, medGlass);
237 //if (fSetVolumeColors) mVolType2->SetLineColor(kYellow + 3);
238
239 // Mirror tile type 3
240 double theta3 = mRot90 - fAlpha;
241 TGeoSphere* mType3 = new TGeoSphere("mirror_tile_type3_PB", mRadius, mRadius2, theta3, theta3 + dTheta, phi1, phi2);
242 TGeoVolume* mVolType3 = new TGeoVolume("mirror_tile_type3", mType3, medGlass);
243 //if (fSetVolumeColors) mVolType3->SetLineColor(kYellow - 1);
244
245 // Mirror tile type 4
246 double theta4 = mRot90 + fAlpha / 2. + fMirrorThetaGap * 3. / 4.;
247 TGeoSphere* op4_0 =
248 new TGeoSphere("mirror_tile_type4_PB_op0", mRadius, mRadius2, theta4, theta4 + dTheta, phi1, phi2);
249 TGeoBBox* op4_1 = new TGeoBBox("mirror_tile_type4_cutoff", 30, 40, 25);
250 TGeoCombiTrans* tr4_1 =
251 MakeCombiTrans(mRadius * Sin((theta4 + dTheta / 2) * pi / 180) * Cos((phi1 + phi2) / 2 * pi / 180),
252 mRadius * Sin((theta4 + dTheta / 2) * pi / 180) * Sin((phi1 + phi2) / 2 * pi / 180) + 15,
253 mRadius * Cos((theta4 + dTheta / 2) * pi / 180) - 22, 45, 0, 0);
254 TGeoCompositeShape* mType4 = MakeSubtraction("mirror_tile_type4_PB", op4_0, op4_1, nullptr, tr4_1);
255 TGeoVolume* mVolType4 = new TGeoVolume("mirror_tile_type4", mType4, medGlass);
256 //if (fSetVolumeColors) mVolType4->SetLineColor(kYellow - 2);
257
258 // Mirror tile type 5
259 double theta5 = mRot90 + fAlpha / 2. + fMirrorThetaGap * 3. / 4.;
260 TGeoSphere* op5_0 =
261 new TGeoSphere("mirror_tile_type5_PB_op0", mRadius, mRadius2, theta5, theta5 + dTheta, phi1, phi2);
262 TGeoBBox* op5_1 = new TGeoBBox("mirror_tile_type5_cutoff", 20, 30, 40);
263 TGeoCombiTrans* tr5_1 =
264 MakeCombiTrans(mRadius * Sin((theta5 + dTheta / 2) * pi / 180) * Cos((phi1 + phi2) / 2 * pi / 180),
265 mRadius * Sin((theta5 + dTheta / 2) * pi / 180) * Sin((phi1 + phi2) / 2 * pi / 180) - 20,
266 mRadius * Cos((theta5 + dTheta / 2) * pi / 180) - 22, 45, 0, 0);
267 TGeoCompositeShape* mType5 = MakeSubtraction("mirror_tile_type5_PB", op5_0, op5_1, nullptr, tr5_1);
268 TGeoVolume* mVolType5 = new TGeoVolume("mirror_tile_type5", mType5, medGlass);
269 //if (fSetVolumeColors) mVolType5->SetLineColor(kYellow - 3);
270
271 TGeoVolumeAssembly* mHalf = new TGeoVolumeAssembly("mirror_half");
272
273 for (int t = 0; t < 4; t++) {
274 TGeoVolume* mVol = nullptr;
275 if (t == 1) mVol = mVolType1;
276 if (t == 2) mVol = mVolType2;
277 if (t == 3) mVol = mVolType3;
278 for (int i = 0; i < 10; i++) {
279 double rotZ = (i - 4.5) * fMirrorPhiStep;
280 int copyNum = i + 1;
281 if (t == 0) {
282 mVol = mVolType0;
283 if (i == 4 || i == 5) { // special case for the 2 middle mirror tiles
284 mVol = (i == 4) ? mVolType5 : mVolType4;
285 copyNum = 1;
286 }
287 }
288 mHalf->AddNode(mVol, copyNum, MakeRot(0., 0., rotZ));
289 }
290 }
291
292 return mHalf;
293}
294
295TGeoVolume* RichGeoCreator::CreateStuds(double ypos, double lenHalf, double angle)
296{
297 TGeoMedium* medGas = fMaterials.GetMedium("RICHgas_CO2_dis");
298 TGeoMedium* medAl = fMaterials.GetMedium("aluminium");
299
300 double StudsSizeHalf = 5.;
301 double StudsSizeHalfGas = 4.8;
302 double lenHalf1 = lenHalf + Tan(angle * pi / 180) * StudsSizeHalf / 2;
303 double lenHalf2 = lenHalf - Tan(angle * pi / 180) * StudsSizeHalf / 2;
304 double alpha1 = angle / 2;
305
306 TGeoTrap* StudsGas = new TGeoTrap("StudsGas_Trap", StudsSizeHalfGas, 0, 0, StudsSizeHalfGas, lenHalf1, lenHalf2,
307 alpha1, StudsSizeHalfGas, lenHalf1, lenHalf2, alpha1);
308 TGeoTrap* Studs = new TGeoTrap("Studs_Trap", StudsSizeHalf, 0, 0, StudsSizeHalf, lenHalf1, lenHalf2, alpha1,
309 StudsSizeHalf, lenHalf1, lenHalf2, alpha1);
310 TGeoVolume* volStudsGas = new TGeoVolume("StudsGas", StudsGas, medGas);
311 TGeoVolume* volStuds = new TGeoVolume("Studs", Studs, medAl);
312
313 volStuds->AddNode(volStudsGas, 1);
314 TGeoVolume* returnVol = new TGeoVolumeAssembly("Stud");
315 returnVol->AddNode(volStuds, 1, MakeCombiTrans(0, ypos, lenHalf, 0, 90, 0));
316 return returnVol;
317}
318
320{
321 TGeoMedium* medGas = fMaterials.GetMedium("RICHgas_CO2_dis");
322 TGeoMedium* medAl = fMaterials.GetMedium("aluminium");
323
324 double lenHalf = 79 / 2;
325 double widthHalf = 3.0;
326 double hightHalf = 1.25;
327 double thickness = 0.2;
328 double lendiff = widthHalf * Tan(8.5 * pi / 180);
329
330 TGeoTrap* PillarConnectionGas =
331 new TGeoTrap("PillarConnectionGas_Trap", hightHalf - thickness, 0, 0, widthHalf - thickness, lenHalf + lendiff,
332 lenHalf - lendiff, 0, widthHalf - thickness, lenHalf + lendiff, lenHalf - lendiff, 0);
333 TGeoTrap* PillarConnection = new TGeoTrap("PillarConnection_Trap", hightHalf, 0, 0, widthHalf, lenHalf + lendiff,
334 lenHalf - lendiff, 0, widthHalf, lenHalf + lendiff, lenHalf - lendiff, 0);
335 TGeoVolume* volPillarConnectionGas = new TGeoVolume("PillarConnectionGas", PillarConnectionGas, medGas);
336 TGeoVolume* volPillarConnection = new TGeoVolume("PillarConnection", PillarConnection, medAl);
337 volPillarConnection->AddNode(volPillarConnectionGas, 1);
338 TGeoVolume* returnVol = new TGeoVolumeAssembly("PillarConnection");
339 returnVol->AddNode(volPillarConnection, 1, MakeCombiTrans(0, 0, 0, -90, 0, 0));
340 return returnVol;
341}
342
344{
345 TGeoMedium* medGas = fMaterials.GetMedium("RICHgas_CO2_dis");
346 TGeoMedium* medAl = fMaterials.GetMedium("aluminium");
347
348 TGeoBBox* pbGas = new TGeoBBox("mirror_support_pillar_gas_PB", 4.8, (fRichHeight / 2.) - 10.5, 4.8);
349 TGeoBBox* pb = new TGeoBBox("mirror_support_pillar_PB", 5., (fRichHeight / 2.) - 10.5, 5.);
350
351 TGeoVolume* volGas = new TGeoVolume("mirror_support_pillar_gas", pbGas, medGas);
352 TGeoVolume* vol = new TGeoVolume("mirror_support_pillar", pb, medAl);
353 //if (fSetVolumeColors) volGas->SetLineColor(kAzure + 5);
354 //if (fSetVolumeColors) vol->SetLineColor(kAzure + 5);
355 vol->AddNode(volGas, 1);
356
357 TGeoVolumeAssembly* StudsHalf = new TGeoVolumeAssembly("Studs_Half");
358 StudsHalf->AddNode(CreateStuds(16.4, 30.03 / 2., 24.2), 1);
359 StudsHalf->AddNode(CreateStuds(57.8, 14.86 / 2., 15.9), 2);
360 StudsHalf->AddNode(CreateStuds(101.05, 5.74 / 2., 7.7), 3);
361 StudsHalf->AddNode(CreateStuds(145.4, 2.9 / 2., -0.5), 4);
362
363 vol->AddNode(StudsHalf, 1, MakeCombiTrans(0, 0., -5, 0, 180, 0));
364 vol->AddNode(StudsHalf, 2, MakeCombiTrans(0, 0., -5, 0, 180, 180));
365
366 TGeoVolume* PillarConnection = CreatePillarConnection();
367
368 double dZ = 41.;
369 TGeoVolumeAssembly* pillars = new TGeoVolumeAssembly("mirror_support_pillars");
370 pillars->AddNode(vol, 1, MakeCombiTrans(210.7759 - 2.035, 0., -29.5298 + dZ - 12.4346, 0., 42., 0.));
371 pillars->AddNode(PillarConnection, 1, MakeCombiTrans(170.7323, 0., -15.9069 + dZ, 0., 33.6, 0.));
372 pillars->AddNode(vol, 2, MakeCombiTrans(134.1222 - 1.3985, 0., 21.3989 + dZ - 11.2483, 0., 25.2, 0.));
373 pillars->AddNode(PillarConnection, 2, MakeCombiTrans(89.097, 0., 23.74 + dZ, 0., 16.8, 0.));
374 pillars->AddNode(vol, 3, MakeCombiTrans(46.015 - 0.545, 0., 48. + dZ - 10.6668, 0., 8.4, 0.));
375 pillars->AddNode(PillarConnection, 3, MakeCombiTrans(0., 38.75, 37.34 + dZ, 0., 0., 0.));
376 pillars->AddNode(PillarConnection, 4, MakeCombiTrans(0., -38.75, 37.34 + dZ, 0., 0., 0.));
377 pillars->AddNode(vol, 4, MakeCombiTrans(-46.015 + 0.545, 0., 48. + dZ - 10.6668, 0., -8.4, 0.));
378 pillars->AddNode(PillarConnection, 5, MakeCombiTrans(-89.097, 0., 23.74 + dZ, 0., -16.8, 0.));
379 pillars->AddNode(vol, 5, MakeCombiTrans(-134.1222 + 1.3985, 0., 21.3989 + dZ - 11.2483, 0., -25.2, 0.));
380 pillars->AddNode(PillarConnection, 6, MakeCombiTrans(-170.7323, 0., -15.9069 + dZ, 0., -33.6, 0.));
381 pillars->AddNode(vol, 6, MakeCombiTrans(-210.7759 + 2.035, 0., -29.5298 + dZ - 12.4346, 0., -42., 0.));
382
383 return pillars;
384}
385
387{
388 TGeoMedium* medGas = fMaterials.GetMedium("RICHgas_CO2_dis");
389 TGeoMedium* medAl = fMaterials.GetMedium("aluminium");
390
391 TGeoBBox* pbGas1 = new TGeoBBox("belt1_gas_PB", 1.25, 10.367, 1.167);
392 TGeoBBox* pb1 = new TGeoBBox("belt1_PB", 1.5, 10.6, 1.4);
393 TGeoVolume* volGas1 = new TGeoVolume("belt1_gas", pbGas1, medGas);
394 TGeoVolume* vol1 = new TGeoVolume("belt1", pb1, medAl);
395 //if (fSetVolumeColors) volGas1->SetLineColor(kViolet + 8);
396 //if (fSetVolumeColors) vol1->SetLineColor(kViolet + 8);
397 vol1->AddNode(volGas1, 1, MakeTrans(0., 0., 0.233));
398
399 TGeoBBox* pbGas2 = new TGeoBBox("belt2_gas_PB", 4.7835, 1.25, 1.167);
400 TGeoBBox* pb2 = new TGeoBBox("belt2_PB", 4.9, 1.5, 1.4);
401 TGeoVolume* volGas2 = new TGeoVolume("belt2_gas", pbGas2, medGas);
402 TGeoVolume* vol2 = new TGeoVolume("belt2", pb2, medAl);
403 //if (fSetVolumeColors) volGas2->SetLineColor(kViolet + 8);
404 //if (fSetVolumeColors) vol2->SetLineColor(kViolet + 8);
405 vol2->AddNode(volGas2, 1, MakeTrans(0.1165, 0., 0.233));
406
407 TGeoBBox* pbGas3 = new TGeoBBox("belt3_gas_PB", 11.6135, 1.25, 1.167);
408 TGeoBBox* pb3 = new TGeoBBox("belt3_PB", 11.73, 1.5, 1.4);
409 TGeoVolume* volGas3 = new TGeoVolume("belt3_gas", pbGas3, medGas);
410 TGeoVolume* vol3 = new TGeoVolume("belt3", pb3, medAl);
411 //if (fSetVolumeColors) volGas3->SetLineColor(kViolet + 8);
412 //if (fSetVolumeColors) vol3->SetLineColor(kViolet + 8);
413 vol3->AddNode(volGas3, 1, MakeTrans(0.1165, 0., 0.233));
414
415 TGeoTrap* pbGas4 = new TGeoTrap("belt4_gas_PB", 0.7, 16.22, 90., 10.97, 1.3, 1.3, 0., 9.5, 1.3, 1.3, 0.);
416 TGeoTrap* pb4 = new TGeoTrap("belt4_PB", 0.9, 16.22, 90., 11.378, 1.4, 1.4, 0., 9.5, 1.4, 1.4, 0.);
417 TGeoVolume* volGas4 = new TGeoVolume("belt4_gas", pbGas4, medGas);
418 TGeoVolume* vol4 = new TGeoVolume("belt4", pb4, medAl);
419 //if (fSetVolumeColors) volGas4->SetLineColor(kViolet + 8);
420 //if (fSetVolumeColors) vol4->SetLineColor(kViolet + 8);
421 vol4->AddNode(volGas4, 1, MakeTrans(0.1, 0., 0.));
422
423 TGeoVolumeAssembly* belt = new TGeoVolumeAssembly("belt");
424 belt->AddNode(vol1, 1);
425 belt->AddNode(vol2, 1, MakeTrans(-6.4, 9.1, 0.));
426 belt->AddNode(vol3, 1, MakeTrans(-13.23, -9.1, 0.));
427 belt->AddNode(vol4, 1, MakeCombiTrans(-17.567, 0.75, 0., -127., -90., -90.));
428
429 return belt;
430}
431
433{
434 double mRadius2 = fMirrorRadius + fMirrorThickness;
435 double mRadius3 = mRadius2 + fMirrorSupportAdd;
436 double phi1 = -fMirrorPhiSize / 2.;
437 double phi2 = fMirrorPhiSize / 2.;
438 double dTheta = fMirrorThetaSize;
439 double mRot90 = 90. + fMirrorRot;
440 double richWidthHalf = fRichWidth / 2.;
441 TGeoMedium* medGas = fMaterials.GetMedium("RICHgas_CO2_dis");
442
443 TGeoVolumeAssembly* beltAssembly = CreateBeltAssembly();
444
445 // Type 0
446 double theta0 = mRot90 + fAlpha / 2. + fMirrorThetaGap * 3. / 4.;
447 TGeoSphere* sphere0 = new TGeoSphere("belt_type0_PB_op0", mRadius2, mRadius3, theta0, theta0 + dTheta, phi1, phi2);
448 TGeoBBox* box0 = new TGeoBBox("belt_type0_PB_op1", 500., richWidthHalf, 10.);
449 TGeoCompositeShape* pbType0 =
450 MakeSubtraction("belt_type0_PB", sphere0, box0, nullptr, MakeTrans(0., 0., -fMirrorOriginY - 10.));
451 TGeoVolume* volType0 = new TGeoVolume("belt_type0", pbType0, medGas);
452 volType0->AddNode(beltAssembly, 1, MakeCombiTrans(275.5, -13.23, -124.7, 65., 0., -90.));
453 //if (fSetVolumeColors) volType0->SetLineColor(kGreen);
454
455 // Type 1
456 double theta1 = mRot90 + fMirrorThetaGap / 2.;
457 TGeoSphere* pbType1 = new TGeoSphere("belt_type1_PB", mRadius2, mRadius3, theta1, theta1 + dTheta, phi1, phi2);
458 TGeoVolume* volType1 = new TGeoVolume("belt_type1", pbType1, medGas);
459 volType1->AddNode(beltAssembly, 1, MakeCombiTrans(290.4, -13.23, -84.0, 73., 0., -90.));
460 //if (fSetVolumeColors) volType1->SetLineColor(kGreen - 1);
461
462 // Type 2
463 double theta2 = mRot90 - fAlpha / 2. + fMirrorThetaGap / 4.;
464 TGeoSphere* pbType2 = new TGeoSphere("belt_type2_PB", mRadius2, mRadius3, theta2, theta2 + dTheta, phi1, phi2);
465 TGeoVolume* volType2 = new TGeoVolume("belt_type2", pbType2, medGas);
466 volType2->AddNode(beltAssembly, 1, MakeCombiTrans(299.4, -13.23, -41.5, 82., 0., -90.));
467 //if (fSetVolumeColors) volType2->SetLineColor(kGreen - 2);
468
469 // Type 3
470 double theta3 = mRot90 - fAlpha;
471 TGeoSphere* pbType3 = new TGeoSphere("belt_type3_PB", mRadius2, mRadius3, theta3, theta3 + dTheta, phi1, phi2);
472 TGeoVolume* volType3 = new TGeoVolume("belt_type3", pbType3, medGas);
473 volType3->AddNode(beltAssembly, 1, MakeCombiTrans(302.5, -13.23, 1.97, 91., 0., -90.));
474 //if (fSetVolumeColors) volType3->SetLineColor(kGreen - 3);
475
477 //double theta4 = mRot90 + fAlpha / 2. + fMirrorThetaGap * 3. / 4.;
478 //TGeoSphere* sphere4 = new TGeoSphere("belt_type4_PB_op0", mRadius2, mRadius3, theta4, theta4 + dTheta, phi1, phi2);
479 //TGeoTubeSeg* tube4 = new TGeoTubeSeg("belt_type4_PB_op1", 0., fPipeOuterRadiusExit, 400., 0., 360.);
480 //TGeoCompositeShape* sub4_1 = MakeSubtraction("belt_type4_PB_op01", sphere4, tube4, nullptr, MakeCombiTrans(0., 0., -fMirrorOriginY, 90., 0., 90. + fMirrorPhiStep * 0.5));
481 //TGeoBBox* box4 = new TGeoBBox("belt_type4_PB_op2", 500., richWidthHalf, 10.);
482 //TGeoCompositeShape* pbType4 = MakeSubtraction("belt_type4_PB", sub4_1, box4, nullptr, MakeTrans(0., 0., -fMirrorOriginY - 10.));
483 //TGeoVolume* volType4 = new TGeoVolume("belt_type4", pbType4, medGas);
484 //volType4->AddNode(beltAssembly, 1, MakeCombiTrans(281.0, 0., -113.0, 0., -66., 0.));
486 //
488 //double theta5 = mRot90 + fAlpha / 2. + fMirrorThetaGap * 3. / 4.;
489 //TGeoSphere* sphere5 = new TGeoSphere("belt_type5_PB_op0", mRadius2, mRadius3, theta5, theta5 + dTheta, phi1, phi2);
490 //TGeoTubeSeg* tube5 = new TGeoTubeSeg("belt_type5_PB_op1", 0., fPipeOuterRadiusExit, 400., 0., 360.);
491 //TGeoCompositeShape* sub5_1 = MakeSubtraction("belt_type5_PB_op01", sphere5, tube5, nullptr, MakeCombiTrans(0., 0., -fMirrorOriginY, 90., 0., 90. - fMirrorPhiStep * 0.5));
492 //TGeoBBox* box5 = new TGeoBBox("belt_type5_PB_op2", 500., richWidthHalf, 10.);
493 //TGeoCompositeShape* pbType5 = MakeSubtraction("belt_type5_PB", sub5_1, box5, nullptr, MakeTrans(0., 0., -fMirrorOriginY - 10.));
494 //TGeoVolume* volType5 = new TGeoVolume("belt_type5", pbType5, medGas);
495 //volType5->AddNode(beltAssembly, 1, MakeCombiTrans(281., 0., -113., 0., -114., 180.));
497
498 TGeoVolumeAssembly* contHalf = new TGeoVolumeAssembly("mirror_support_belts_half");
499 for (int t = 0; t < 4; t++) {
500 TGeoVolume* mVol = nullptr;
501 if (t == 1) mVol = volType1;
502 if (t == 2) mVol = volType2;
503 if (t == 3) mVol = volType3;
504 for (int i = 0; i < 10; i++) {
505 double rotZ = (i - 4.5) * fMirrorPhiStep;
506 int copyNum = i + 1;
507 if (t == 0) {
508 mVol = volType0;
509 if (i == 4 || i == 5) { // special case for the 2 middle belts
510 continue; //mVol = (i == 4) ? volType5 : volType4;
511 copyNum = 1;
512 }
513 }
514 contHalf->AddNode(mVol, copyNum, MakeRot(0., 0., rotZ));
515 }
516 }
517 return contHalf;
518}
519
521{
522 TGeoMedium* medGas = fMaterials.GetMedium("RICHgas_CO2_dis");
523 TGeoMedium* medAlum = fMaterials.GetMedium("aluminium");
524
525 double frameSizeHalf = 5.;
526 double frameSizeHalfGas = 4.3;
527 double richHeightHalf = fRichHeight / 2.;
528 double richLengthHalf = fRichLength / 2.;
529 double richWidthHalf = fRichWidth / 2.;
530 double coverThickness = fRichCoveringThickness;
531
532 //double posY = richHeightHalf - coverThickness - frameSizeHalf;
533 double rotX = 90 - fCameraFullRotX;
534 double lenHalf2 = 23.2919390;
535 double lenHalf3 = 20.;
536 double lenHalf5 = richHeightHalf - Tan(rotX * pi / 180.0) * lenHalf3 * 2.0;
537 double lenHalf6 = richLengthHalf - lenHalf2 - lenHalf3;
538 double lenHalf8 = (richWidthHalf - 229.3 / 2) / 2; // the 229.3 are the width of the shieldingbox
539
540 double posY = richHeightHalf - coverThickness - frameSizeHalf;
541 double posY2 = 90;
542 double posY3 = posY - Tan(rotX * pi / 180.0) * lenHalf3 * 2.0;
543 double posZ1 = -147.779439;
544 double posZ2 = posZ1 + lenHalf2 + 2 * lenHalf3;
545 double posZ3 = posZ1 + 2 * lenHalf2 + 2 * lenHalf3;
546 double posZ4 = posZ1 + fRichLength;
547 double posX1 = 134.6;
548 double posX2 = (posX1 + richWidthHalf) / 2;
549 double posX3 = richWidthHalf - frameSizeHalf;
550
551 TGeoBBox* crossingbox =
552 new TGeoBBox("crossing", frameSizeHalf, frameSizeHalf,
553 frameSizeHalf); // to cutoff parts of the frames where they would overlap each other
554
555 TGeoVolumeAssembly* mainFrame = new TGeoVolumeAssembly("mainframe");
556
557 // parts along x-axis
558 TGeoBBox* pbGas1 =
559 new TGeoBBox("mainframe1_gas_PB", richWidthHalf - frameSizeHalf * 2, frameSizeHalfGas, frameSizeHalfGas);
560 TGeoBBox* pb1 = new TGeoBBox("mainframe1_PB", richWidthHalf - frameSizeHalf * 2, frameSizeHalf, frameSizeHalf);
561 TGeoVolume* volGas1 = new TGeoVolume("mainframe1_gas", pbGas1, medGas);
562 TGeoVolume* vol1 = new TGeoVolume("mainframe1", pb1, medAlum);
563 //if (fSetVolumeColors) vol1->SetLineColor(kBlue);
564 //if (fSetVolumeColors) volGas1->SetLineColor(kBlue);
565 vol1->AddNode(volGas1, 1);
566 mainFrame->AddNode(vol1, 1, MakeTrans(0, posY2, posZ1));
567 mainFrame->AddNode(vol1, 2, MakeTrans(0, -posY2, posZ1));
568 mainFrame->AddNode(vol1, 3, MakeTrans(0., posY, posZ4));
569 mainFrame->AddNode(vol1, 4, MakeTrans(0., posY, posZ3));
570 mainFrame->AddNode(vol1, 5, MakeTrans(0., -posY, posZ4));
571 mainFrame->AddNode(vol1, 6, MakeTrans(0., -posY, posZ3));
572
573 // first parts along z-axis (short)
574 TGeoBBox* pbGas2 = new TGeoBBox("mainframe2_gas_PB", frameSizeHalfGas, frameSizeHalfGas, lenHalf2 - frameSizeHalf);
575 TGeoBBox* pb2 = new TGeoBBox("mainframe2_PB", frameSizeHalf, frameSizeHalf, lenHalf2 - frameSizeHalf);
576 TGeoVolume* volGas2 = new TGeoVolume("mainframe2_gas", pbGas2, medGas);
577 TGeoVolume* vol2 = new TGeoVolume("mainframe2", pb2, medAlum);
578 //if (fSetVolumeColors) vol2->SetLineColor(kBlue + 1);
579 //if (fSetVolumeColors) volGas2->SetLineColor(kBlue + 1);
580 vol2->AddNode(volGas2, 1);
581 mainFrame->AddNode(vol2, 1, MakeTrans(-posX1, posY, posZ2 - frameSizeHalf / 2));
582 mainFrame->AddNode(vol2, 2, MakeTrans(-posX1, -posY, posZ2 - frameSizeHalf / 2));
583 mainFrame->AddNode(vol2, 3, MakeTrans(posX1, posY, posZ2 - frameSizeHalf / 2));
584 mainFrame->AddNode(vol2, 4, MakeTrans(posX1, -posY, posZ2 - frameSizeHalf / 2));
585 mainFrame->AddNode(vol2, 5, MakeTrans(posX3, posY, posZ2 - frameSizeHalf / 2));
586 mainFrame->AddNode(vol2, 6, MakeTrans(posX3, -posY, posZ2 - frameSizeHalf / 2));
587 mainFrame->AddNode(vol2, 7, MakeTrans(-posX3, posY, posZ2 - frameSizeHalf / 2));
588 mainFrame->AddNode(vol2, 8, MakeTrans(-posX3, -posY, posZ2 - frameSizeHalf / 2));
589
590 // diagonal parts (y-z)
591 TGeoTrap* pbGas3 =
592 new TGeoTrap("mainframe3_gas_PB", frameSizeHalfGas, 0, 0, lenHalf3 - frameSizeHalf - coverThickness, 6.3, 9.3, rotX,
593 lenHalf3 - frameSizeHalf - coverThickness, 6.3, 9.3, rotX);
594 TGeoTrap* pb3 = new TGeoTrap("mainframe3_PB", frameSizeHalf, 0, 0, lenHalf3 - frameSizeHalf, 7, 10, rotX,
595 lenHalf3 - frameSizeHalf, 7, 10, rotX);
596 TGeoVolume* volGas3 = new TGeoVolume("mainframe3_gas", pbGas3, medGas);
597 TGeoVolume* vol3 = new TGeoVolume("mainframe3", pb3, medAlum);
598 TGeoRotation* rotup = new TGeoRotation();
599 rotup->RotateX(-90 + rotX * pi / 180);
600 rotup->RotateZ(180);
601 rotup->RotateY(90);
602 vol3->AddNode(volGas3, 1);
603 mainFrame->AddNode(vol3, 1,
604 new TGeoCombiTrans(*MakeTrans(-posX3, posY - Tan(rotX * pi / 180) * lenHalf3 + frameSizeHalf,
605 posZ1 + lenHalf3 + frameSizeHalf / 2),
606 rotup->Inverse()));
607 mainFrame->AddNode(vol3, 2,
608 new TGeoCombiTrans(*MakeTrans(-posX1, posY - Tan(rotX * pi / 180) * lenHalf3 + frameSizeHalf,
609 posZ1 + lenHalf3 + frameSizeHalf / 2),
610 rotup->Inverse()));
611 mainFrame->AddNode(vol3, 3,
612 new TGeoCombiTrans(*MakeTrans(posX1, posY - Tan(rotX * pi / 180) * lenHalf3 + frameSizeHalf,
613 posZ1 + lenHalf3 + frameSizeHalf / 2),
614 rotup->Inverse()));
615 mainFrame->AddNode(vol3, 4,
616 new TGeoCombiTrans(*MakeTrans(posX3, posY - Tan(rotX * pi / 180) * lenHalf3 + frameSizeHalf,
617 posZ1 + lenHalf3 + frameSizeHalf / 2),
618 rotup->Inverse()));
619 TGeoRotation* rotdown = new TGeoRotation();
620 rotdown->RotateX(-90 + rotX * pi / 180);
621 rotdown->RotateY(90);
622 mainFrame->AddNode(vol3, 5,
623 new TGeoCombiTrans(*MakeTrans(-posX3, -posY + Tan(rotX * pi / 180) * lenHalf3 - frameSizeHalf,
624 posZ1 + lenHalf3 + frameSizeHalf / 2),
625 rotdown->Inverse()));
626 mainFrame->AddNode(vol3, 6,
627 new TGeoCombiTrans(*MakeTrans(-posX1, -posY + Tan(rotX * pi / 180) * lenHalf3 - frameSizeHalf,
628 posZ1 + lenHalf3 + frameSizeHalf / 2),
629 rotdown->Inverse()));
630 mainFrame->AddNode(vol3, 7,
631 new TGeoCombiTrans(*MakeTrans(posX1, -posY + Tan(rotX * pi / 180) * lenHalf3 - frameSizeHalf,
632 posZ1 + lenHalf3 + frameSizeHalf / 2),
633 rotdown->Inverse()));
634 mainFrame->AddNode(vol3, 8,
635 new TGeoCombiTrans(*MakeTrans(posX3, -posY + Tan(rotX * pi / 180) * lenHalf3 - frameSizeHalf,
636 posZ1 + lenHalf3 + frameSizeHalf / 2),
637 rotdown->Inverse()));
638
639
640 // long vertical parts
641 TGeoBBox* pbGas4 =
642 new TGeoBBox("mainframe4_gas_PB", frameSizeHalfGas, richHeightHalf - coverThickness, frameSizeHalfGas);
643 TGeoBBox* pb4 = new TGeoBBox("mainframe4_PB", frameSizeHalf, richHeightHalf - coverThickness, frameSizeHalf);
644 TGeoVolume* volGas4 = new TGeoVolume("mainframe4_gas", pbGas4, medGas);
645 TGeoVolume* vol4 = new TGeoVolume("mainframe4", pb4, medAlum);
646 //if (fSetVolumeColors) vol4->SetLineColor(kBlue + 3);
647 //if (fSetVolumeColors) volGas4->SetLineColor(kBlue + 3);
648 vol4->AddNode(volGas4, 1);
649 mainFrame->AddNode(vol4, 1, MakeTrans(-posX3, 0., posZ4));
650 mainFrame->AddNode(vol4, 2, MakeTrans(posX3, 0., posZ4));
651 mainFrame->AddNode(vol4, 3, MakeTrans(-posX3, 0, posZ3));
652 mainFrame->AddNode(vol4, 4, MakeTrans(posX3, 0, posZ3));
653
654 // small vertical parts
655 TGeoTrap* pbGas5 = new TGeoTrap("mainframe5_gas_PB", frameSizeHalfGas, 0, 0, frameSizeHalfGas,
656 lenHalf5 - 1 / Tan((90 - rotX) * pi / 180) * frameSizeHalf,
657 lenHalf5 + 1 / Tan((90 - rotX) * pi / 180) * frameSizeHalf, 0, frameSizeHalfGas,
658 lenHalf5 - 1 / Tan((90 - rotX) * pi / 180) * frameSizeHalf,
659 lenHalf5 + 1 / Tan((90 - rotX) * pi / 180) * frameSizeHalf, 0);
660 TGeoTrap* pb5 = new TGeoTrap("mainframe5_PB", frameSizeHalf, 0, 0, frameSizeHalf,
661 lenHalf5 - 1 / Tan((90 - rotX) * pi / 180) * frameSizeHalf,
662 lenHalf5 + 1 / Tan((90 - rotX) * pi / 180) * frameSizeHalf, 0, frameSizeHalf,
663 lenHalf5 - 1 / Tan((90 - rotX) * pi / 180) * frameSizeHalf,
664 lenHalf5 + 1 / Tan((90 - rotX) * pi / 180) * frameSizeHalf, 0);
665 TGeoCompositeShape* sub5_1 =
666 MakeUnion("subtraction_mainframe5", crossingbox, crossingbox, MakeTrans(posY2, 0, 0), MakeTrans(posY3, 0, 0));
667 TGeoCompositeShape* sub5 =
668 MakeUnion("subtraction_mainframe5", sub5_1, sub5_1, nullptr, MakeCombiTrans(0, 0, 0, 0, 180, 0));
669 TGeoVolume* volGas5 =
670 new TGeoVolume("mainframe5_gas", MakeSubtraction("mainframe5_gas_PB", pbGas5, sub5, nullptr, nullptr), medGas);
671 TGeoVolume* vol5 =
672 new TGeoVolume("mainframe5", MakeSubtraction("mainframe5_PB", pb5, sub5, nullptr, nullptr), medAlum);
673 vol5->AddNode(volGas5, 1);
674 mainFrame->AddNode(vol5, 1, MakeCombiTrans(-posX1, 0., posZ1, 90, 0, 90));
675 mainFrame->AddNode(vol5, 2, MakeCombiTrans(posX1, 0., posZ1, 90, 0, 90));
676 mainFrame->AddNode(vol5, 3, MakeCombiTrans(-posX3, 0., posZ1, 90, 0, 90));
677 mainFrame->AddNode(vol5, 4, MakeCombiTrans(posX3, 0., posZ1, 90, 0, 90));
678
679 // small horizontal parts
680 TGeoBBox* pbGas6 = new TGeoBBox("mainframe6_gas_PB", frameSizeHalfGas, frameSizeHalfGas, lenHalf6 - frameSizeHalf);
681 TGeoBBox* pb6 = new TGeoBBox("mainframe6_PB", frameSizeHalf, frameSizeHalf, lenHalf6 - frameSizeHalf);
682 TGeoVolume* volGas6 = new TGeoVolume("mainframe6_gas", pbGas6, medGas);
683 TGeoVolume* vol6 = new TGeoVolume("mainframe6", pb6, medAlum);
684 //if (fSetVolumeColors) vol6->SetLineColor(kBlue - 2);
685 //if (fSetVolumeColors) volGas6->SetLineColor(kBlue - 2);
686 vol6->AddNode(volGas6, 1);
687 mainFrame->AddNode(vol6, 1, MakeTrans(-posX2, posY, posZ4 - lenHalf6));
688 mainFrame->AddNode(vol6, 2, MakeTrans(-posX2, -posY, posZ4 - lenHalf6));
689 mainFrame->AddNode(vol6, 3, MakeTrans(posX2, posY, posZ4 - lenHalf6));
690 mainFrame->AddNode(vol6, 4, MakeTrans(posX2, -posY, posZ4 - lenHalf6));
691 mainFrame->AddNode(vol6, 5, MakeTrans(-posX1, posY, posZ4 - lenHalf6));
692 mainFrame->AddNode(vol6, 6, MakeTrans(-posX1, -posY, posZ4 - lenHalf6));
693 mainFrame->AddNode(vol6, 7, MakeTrans(posX1, posY, posZ4 - lenHalf6));
694 mainFrame->AddNode(vol6, 8, MakeTrans(posX1, -posY, posZ4 - lenHalf6));
695 mainFrame->AddNode(vol6, 9, MakeTrans(0., posY, posZ4 - lenHalf6));
696 mainFrame->AddNode(vol6, 10, MakeTrans(0., -posY, posZ4 - lenHalf6));
697 mainFrame->AddNode(vol6, 11, MakeTrans(posX3, posY2, posZ4 - lenHalf6));
698 mainFrame->AddNode(vol6, 12, MakeTrans(posX3, -posY2, posZ4 - lenHalf6));
699 mainFrame->AddNode(vol6, 13, MakeTrans(-posX3, posY2, posZ4 - lenHalf6));
700 mainFrame->AddNode(vol6, 14, MakeTrans(-posX3, -posY2, posZ4 - lenHalf6));
701 mainFrame->AddNode(vol6, 15, MakeTrans(-posX3, posY, posZ4 - lenHalf6));
702 mainFrame->AddNode(vol6, 16, MakeTrans(-posX3, -posY, posZ4 - lenHalf6));
703 mainFrame->AddNode(vol6, 17, MakeTrans(posX3, posY, posZ4 - lenHalf6));
704 mainFrame->AddNode(vol6, 18, MakeTrans(posX3, -posY, posZ4 - lenHalf6));
705
706
707 // first parts along z-axis (long)
708 TGeoBBox* pbGas7 = new TGeoBBox("mainframe7_gas_PB", frameSizeHalfGas, frameSizeHalfGas, lenHalf2 + lenHalf3);
709 TGeoBBox* pb7 = new TGeoBBox("mainframe7_PB", frameSizeHalf, frameSizeHalf, lenHalf2 + lenHalf3);
710 TGeoVolume* volGas7 = new TGeoVolume("mainframe7_gas", pbGas7, medGas);
711 TGeoVolume* vol7 = new TGeoVolume("mainframe7", pb7, medAlum);
712 vol7->AddNode(volGas7, 1);
713 mainFrame->AddNode(vol7, 1, MakeTrans(posX3, posY2, posZ2 - lenHalf3 - frameSizeHalf));
714 mainFrame->AddNode(vol7, 2, MakeTrans(posX3, -posY2, posZ2 - lenHalf3 - frameSizeHalf));
715 mainFrame->AddNode(vol7, 3, MakeTrans(-posX3, posY2, posZ2 - lenHalf3 - frameSizeHalf));
716 mainFrame->AddNode(vol7, 4, MakeTrans(-posX3, -posY2, posZ2 - lenHalf3 - frameSizeHalf));
717
718 // left & right of shieldingbox along x-axis
719 TGeoBBox* pbGas8 = new TGeoBBox("mainframe8_gas_PB", lenHalf8, frameSizeHalfGas, frameSizeHalfGas);
720 TGeoBBox* pb8 = new TGeoBBox("mainframe8_PB", lenHalf8, frameSizeHalf, frameSizeHalf);
721 TGeoVolume* volGas8 = new TGeoVolume("mainframe8_gas", pbGas8, medGas);
722 TGeoVolume* vol8 = new TGeoVolume("mainframe8", pb8, medAlum);
723 vol8->AddNode(volGas8, 1);
724 mainFrame->AddNode(vol8, 1, MakeTrans(posX3 - lenHalf8 + frameSizeHalf, posY3, posZ1));
725 mainFrame->AddNode(vol8, 2, MakeTrans(-posX3 + lenHalf8 - frameSizeHalf, posY3, posZ1));
726 mainFrame->AddNode(vol8, 3, MakeTrans(posX3 - lenHalf8 + frameSizeHalf, -posY3, posZ1));
727 mainFrame->AddNode(vol8, 4, MakeTrans(-posX3 + lenHalf8 - frameSizeHalf, -posY3, posZ1));
728
729 return mainFrame;
730}
731
733{
734 double richLenHalf = fRichLength / 2.;
735 double richWidthHalf = fRichWidth / 2.;
736 double richHeightHalf = fRichHeight / 2.;
737
738 double x1 = richWidthHalf - fRichCoveringThickness;
739 double y1 = ((2. * richHeightHalf - fRichEntranceHeight) / 2. - 2. * fRichCoveringThickness) / 2.;
740 double z1 = fRichAddZ / 2. - fRichCoveringThickness / 2. + fRichEntranceThickness / 2.;
741 double y2 = (richHeightHalf + fRichEntranceHeight / 2.) / 2.;
742 double z2 = -richLenHalf - fRichAddZ / 2. + fRichCoveringThickness;
743
744 TGeoBBox* op0 = new TGeoBBox("rich_gas_PB_op0", x1, richHeightHalf - fRichCoveringThickness,
745 richLenHalf - fRichEntranceThickness / 2. - fRichExitThickness / 2.);
746 TGeoBBox* op1 = new TGeoBBox("rich_gas_PB_op1", x1, y1, z1);
747 TGeoCompositeShape* op01 = MakeUnion("rich_gas_PB_op01", op0, op1, nullptr, MakeTrans(0., y2, z2));
748 TGeoBBox* op2 = new TGeoBBox("rich_gas_PB_op2", x1, y1, z1);
749 TGeoCompositeShape* op012 = MakeUnion("rich_gas_PB_op012", op01, op2, nullptr, MakeTrans(0., -y2, z2));
750
751 TGeoConeSeg* op3 = new TGeoConeSeg("rich_gas_PB_op3", fPipeLength / 2., 0., fPipeOuterRadiusEntrance, 0.,
752 fPipeOuterRadiusExit, 0., 360.);
753 TGeoTranslation* tr = MakeTrans(0., 0., -(fRichEntranceThickness - fRichExitThickness) / 2.);
754 TGeoCompositeShape* gasPB = MakeSubtraction("rich_gas_PB", op012, op3, nullptr, tr);
755 TGeoVolume* gas = new TGeoVolume("rich_gas", gasPB, fMaterials.GetMedium("RICHgas_CO2_dis"));
756 //if (fSetVolumeColors) gas->SetLineColor(kYellow - 10);
757 return gas;
758}
759
761{
762 double y1 = (fRichHeight / 2. + fRichEntranceHeight / 2.) / 2.;
763 double z1 = -fRichLength / 2. - fRichAddZ / 2.;
764 double y2 = (fRichHeight - fRichEntranceHeight) / 4.;
765 TGeoBBox* op0 = new TGeoBBox("rich_cont_PB_op0", fRichWidth / 2., fRichHeight / 2., fRichLength / 2.);
766 TGeoBBox* op1 = new TGeoBBox("rich_cont_PB_op1", fRichWidth / 2., y2, fRichAddZ / 2.);
767 TGeoCompositeShape* op01 = MakeUnion("rich_cont_PB_op01", op0, op1, nullptr, MakeTrans(0., y1, z1));
768 TGeoBBox* op2 = new TGeoBBox("rich_cont_PB_op2", fRichWidth / 2., y2, fRichAddZ / 2.);
769 TGeoCompositeShape* pb = MakeUnion("rich_cont_PB", op01, op2, nullptr, MakeTrans(0., -y1, z1));
770 //double richLenHalf = fRichLength / 2;
771 TGeoConeSeg* pipePB =
772 new TGeoConeSeg("rich_pipe_subtract", fPipeLength / 2., 0, fPipeOuterRadiusEntrance - fPipeThicknessEntrance, 0,
774 TGeoCompositeShape* pb2 = MakeSubtraction("rich_cont_PB2", pb, pipePB, nullptr, MakeTrans(0, 0, 0));
775 TGeoVolume* richCont = new TGeoVolume("rich_cont", pb2, fMaterials.GetMedium("aluminium"));
776 //if (fSetVolumeColors) richCont->SetLineColor(kBlue - 10);
777 return richCont;
778}
779
781{
782 double richLenHalf = fRichLength / 2.;
783 TGeoBBox* op0 = new TGeoBBox("sens_plane_PB_op0", 170., 170., 0.05);
784 TGeoTube* op1 = new TGeoTube(0, (fPipeOuterRadiusExit + fPipeOuterRadiusEntrance) / 2, richLenHalf + 0.5);
785 TGeoTranslation* tr = MakeTrans(0., 0., (-fSensPlaneZ + (fRichExitThickness - fRichEntranceThickness) / 2.));
786 TGeoCompositeShape* sensPlanePB = MakeSubtraction("sens_plane_PB", op0, op1, nullptr, tr);
787 TGeoVolume* sensPlane = new TGeoVolume("sens_plane", sensPlanePB, fMaterials.GetMedium("RICHgas_CO2_dis+"));
788 //if (fSetVolumeColors) sensPlane->SetLineColor(kRed - 8);
789 return sensPlane;
790}
791
793{
794 double richLenHalf = fRichLength / 2.;
795 double richFlangeHalfThickness = 5.;
796
797 TGeoBBox* op_flange = new TGeoBBox("rich_entrance_PB_flange_op0", fRichEntranceWidth / 2. + richFlangeHalfThickness,
798 fRichEntranceHeight / 2. + richFlangeHalfThickness, 1.);
799 TGeoBBox* op1_flange =
800 new TGeoBBox("rich_entrance_PB_flange_op1", fRichEntranceWidth / 2., fRichEntranceHeight / 2., 2.);
801 TGeoBBox* op0 = new TGeoBBox("rich_entrance_PB_op0", fRichEntranceWidth / 2., fRichEntranceHeight / 2.,
803 TGeoTube* op1 = new TGeoTube(0, fPipeOuterRadiusEntrance, richLenHalf * 1.01);
804 TGeoTranslation* tr = MakeTrans(0., 0., richLenHalf - fRichEntranceThickness / 2.);
805 TGeoCompositeShape* pb_flange = MakeSubtraction("rich_entrance_PB_flange", op_flange, op1_flange, nullptr, nullptr);
806 TGeoCompositeShape* pb = MakeSubtraction("rich_entrance_PB", op0, op1, nullptr, tr);
807 TGeoVolume* entrance = new TGeoVolume("rich_entrance", pb_flange, fMaterials.GetMedium("aluminium"));
808 TGeoVolume* entrance_kapton = new TGeoVolume("rich_entrance_kapton", pb, fMaterials.GetMedium("kapton"));
809 entrance->AddNode(entrance_kapton, 1);
810 //if (fSetVolumeColors) entrance->SetLineColor(kGreen - 5);
811 return entrance;
812}
813
815{
816 double richLenHalf = fRichLength / 2.;
817 double richFlangeHalfThickness = 5.;
818
819 TGeoBBox* op_flange = new TGeoBBox("rich_exit_PB_flange_op0", fRichExitWidth / 2. + richFlangeHalfThickness,
820 fRichExitHeight / 2. + richFlangeHalfThickness, 1.);
821 TGeoBBox* op1_flange = new TGeoBBox("rich_exit_PB_flange_op1", fRichExitWidth / 2., fRichExitHeight / 2., 2.);
822 TGeoBBox* op0 = new TGeoBBox("rich_exit_PB_op0", fRichExitWidth / 2., fRichExitHeight / 2., fRichExitThickness / 2.);
823 TGeoTube* op1 = new TGeoTube(0, fPipeOuterRadiusExit, richLenHalf * 1.01);
824 TGeoTranslation* tr = MakeTrans(0., 0., -richLenHalf + fRichExitThickness / 2.);
825 TGeoCompositeShape* pb_flange = MakeSubtraction("rich_exit_PB_flange", op_flange, op1_flange, nullptr, nullptr);
826 TGeoCompositeShape* pb = MakeSubtraction("rich_exit_PB", op0, op1, nullptr, tr);
827 TGeoVolume* exit = new TGeoVolume("rich_exit", pb_flange, fMaterials.GetMedium("aluminium"));
828 TGeoVolume* exit_innerpart = new TGeoVolume("rich_exit_innerpart", pb, fMaterials.GetMedium("Polycarbonat"));
829 exit->AddNode(exit_innerpart, 1);
830 //if (fSetVolumeColors) exit->SetLineColor(kGreen - 5);
831 return exit;
832}
833
834TGeoVolume* RichGeoCreator::CreatePipe() // now used for the beampipe tunnel
835{
836 double pipeLenHalf = fPipeLength / 2;
837 TGeoConeSeg* pipePB = new TGeoConeSeg("rich_pipe_PB", pipeLenHalf, fPipeOuterRadiusEntrance - fPipeThicknessEntrance,
839 fPipeOuterRadiusExit, 0., 360.);
840 TGeoVolume* pipe = new TGeoVolume("rich_pipe", pipePB, fMaterials.GetMedium("carbon"));
841 //if (fSetVolumeColors) pipe->SetLineColor(kSpring + 4);
842 return pipe;
843}
844
846{
847 TGeoTubeSeg* pipeCylVacPB = new TGeoTubeSeg(
848 "rich_cyl_pipe_vac_PB", 0., fPipeOuterRadiusEntrance - fPipeThicknessEntrance, fPipeCylPartLen / 2., 0., 360.);
849 TGeoTubeSeg* pipeCylPB =
850 new TGeoTubeSeg("rich_cyl_pipe_PB", 0., fPipeOuterRadiusEntrance, fPipeCylPartLen / 2., 0., 360.);
851 TGeoVolume* pipeCylVac = new TGeoVolume("rich_cyl_pipe_vac", pipeCylVacPB, fMaterials.GetMedium("vacuum"));
852 TGeoVolume* pipeCyl = new TGeoVolume("rich_cyl_pipe", pipeCylPB, fMaterials.GetMedium("aluminium"));
853 //if (fSetVolumeColors) pipeCylVac->SetLineColor(kSpring + 5);
854 //if (fSetVolumeColors) pipeCyl->SetLineColor(kSpring + 4);
855 pipeCyl->AddNode(pipeCylVac, 1);
856 return pipeCyl;
857}
858
860{
861 double richLenHalf = fRichLength / 2.;
862
863 TGeoVolume* rich_gas = CreateGas();
864
865 TGeoVolumeAssembly* camCont = CreateCameraContainer();
866 double camY = fCameraOriginY + fCameraShiftY;
867 double camZ = -fRichOrigZ - richLenHalf + fCameraOriginZ + fCameraShiftZ;
868 rich_gas->AddNode(camCont, 1, MakeCombiTrans(0., camY, camZ, fCameraFullRotX, 0., 0.));
869 rich_gas->AddNode(camCont, 2, MakeCombiTrans(0., -camY, camZ, -fCameraFullRotX, 0., 0.));
870
871 double mirrorZ = -fRichOrigZ - richLenHalf + fMirrorOriginZ;
872 double beltsGapZ = 0.5; // cm
873
874 TGeoVolumeAssembly* mirrorHalf = CreateMirror();
875 rich_gas->AddNode(mirrorHalf, 1, MakeCombiTrans(0., fMirrorOriginY + fMirrorGapY / 2., mirrorZ, 0., -90., -90.));
876 rich_gas->AddNode(mirrorHalf, 2, MakeCombiTrans(0., -fMirrorOriginY - fMirrorGapY / 2., mirrorZ, 0., -90., 90.));
877
878 TGeoVolumeAssembly* belts_half_container = CreateMirrorSupportBelts();
879
880 rich_gas->AddNode(belts_half_container, 1,
881 MakeCombiTrans(0., fMirrorOriginY + fMirrorGapY, mirrorZ + beltsGapZ, 0., -90., -90.));
882 rich_gas->AddNode(belts_half_container, 2,
883 MakeCombiTrans(0., -fMirrorOriginY - fMirrorGapY, mirrorZ + beltsGapZ, 0., -90., 90.));
884
885 TGeoVolumeAssembly* pillars = CreateMirrorSupportPillars();
886 rich_gas->AddNode(pillars, 1);
887
888 TGeoVolume* sensPlane = CreateSensitivePlane();
889 rich_gas->AddNode(sensPlane, 1, MakeTrans(0., 0., fSensPlaneZ)); //-30.));
890
891 TGeoVolumeAssembly* mainFrame = CreateMainFrame();
892 rich_gas->AddNode(mainFrame, 1, MakeTrans(0., 0., 38.541939));
893
894 if (fAddShieldingBox) {
895 TGeoVolumeAssembly* shieldingBox = CreateShieldingBox();
896 double shieldingBoxZ = -(fRichEntranceThickness - fRichExitThickness / 2. + fRichOrigZ + richLenHalf);
897 rich_gas->AddNode(shieldingBox, 1, MakeTrans(0., 0., shieldingBoxZ));
898 rich_gas->AddNode(shieldingBox, 2, MakeCombiTrans(0., 0., shieldingBoxZ, 0., 0., 180.));
899 }
900
901 rich_gas->AddNode(CreateRichEntrance(), 1, MakeTrans(0., 0., -richLenHalf + fRichExitThickness / 2.));
902 rich_gas->AddNode(CreateRichExit(), 1, MakeTrans(0., 0., richLenHalf - fRichEntranceThickness / 2.));
903
904 TGeoVolume* richCont = CreateRichContainer();
905 richCont->AddNode(rich_gas, 1, MakeTrans(0., 0., (fRichEntranceThickness - fRichExitThickness) / 2.));
906 //richCont->AddNode(CreateRichEntrance(), 1, MakeTrans(0., 0., -richLenHalf + fRichEntranceThickness / 2.));
907 //richCont->AddNode(CreateRichExit(), 1, MakeTrans(0., 0., richLenHalf - fRichExitThickness / 2.));
908 richCont->AddNode(CreatePipe(), 1);
909
910 TGeoVolumeAssembly* rich = new TGeoVolumeAssembly(fGeoName.c_str());
911 rich->AddNode(richCont, 1, MakeTrans(0., 0., -40. + fRichOrigZ + richLenHalf));
912 // This pipe segment is removed to be compatible with new beam pipe.
913 // See https://git.cbm.gsi.de/CbmSoft/cbmroot_geometry/-/merge_requests/184
914 //rich->AddNode(CreatePipeCyl(), 1, MakeTrans(0., 0., -40. + fRichOrigZ - fPipeCylPartLen / 2.));
915
916 TGeoVolume* top = new TGeoVolumeAssembly(fGeoName.c_str());
917
918 gGeoManager->SetTopVolume(top);
919 top->AddNode(rich, 1);
920 gGeoManager->CloseGeometry();
921 gGeoManager->CheckOverlaps(0.0001);
922 gGeoManager->PrintOverlaps();
923 gGeoManager->Test();
924
925 string outputFile = fGeoName + ".geo.root";
926 top->Export((outputFile + "?reproducible").c_str());
927 LOG(info) << "Geometry file: " << outputFile;
928
929 //top->Draw("ogl");
930 gGeoManager->SetVisLevel(7);
931}
932
934{
935 // When converting GDML to root please look https://root.cern.ch/root/html520/src/TGDMLParse.cxx.htm
936 // Shielding box is created using a number of boolean operations with shapes
937 // All next shape is marked with increased number in name box1 to box 15
938
939 TGeoEltu* box1 = new TGeoEltu("box1", 183.0, 183.0, 61.3);
940 TGeoBBox* box2 = new TGeoBBox("box2", 229.3 / 2., 73.879 / 2., 113.3 / 2.);
941 TGeoCompositeShape* box3 = MakeIntersection("box3", box1, box2, nullptr, MakeTrans(0., 146.068, -4.65));
942
943 TGeoBBox* box4 = new TGeoBBox("box4", 227.3 / 2., 71.937 / 2., 102.0 / 2.);
944 TGeoCompositeShape* box5 = MakeSubtraction("box5", box3, box4, nullptr, MakeTrans(0., 147.097, 0.));
945
946 TGeoEltu* box6 = new TGeoEltu("box6", 172.0, 172.0, 4.65);
947 TGeoCompositeShape* box7 = MakeSubtraction("box7", box5, box6, nullptr, MakeTrans(0., 0., -56.65));
948
949 TGeoBBox* box8 = new TGeoBBox("box8", 75.0 / 2., 222.422 / 2., 104.0 / 2.);
950 TGeoCompositeShape* box9 = MakeSubtraction("box9", box7, box8, nullptr, MakeTrans(0., -0.082, 0.));
951
952 TGeoBBox* box10 = new TGeoBBox("box10", 145.0 / 2., 10.3 / 2., 11.0 / 2.);
953 TGeoCompositeShape* box11 =
954 MakeSubtraction("box11", box9, box10, nullptr, MakeCombiTrans(61.1525, 177.2736, -56.15, 0., 0., -31.26911));
955
956 TGeoBBox* box12 = new TGeoBBox("box12", 145.0 / 2., 10.3 / 2., 11.0 / 2.);
957 TGeoCompositeShape* box13 =
958 MakeSubtraction("box13", box11, box12, nullptr, MakeCombiTrans(-61.152, 177.274, -56.15, 0., 0., 31.27));
959
960 TGeoBBox* box14 = new TGeoBBox("box14", 145.0 / 2., 10.3 / 2., 16.0 / 2.);
961 TGeoCompositeShape* box15 =
962 MakeSubtraction("box15", box13, box14, nullptr, MakeCombiTrans(0., 181.2639, -59.75, -41.3565, 0., 0.));
963
964 TGeoVolume* shBox = new TGeoVolume("shielding_box", box15, fMaterials.GetMedium("iron"));
965 //if (fSetVolumeColors) shBox->SetLineColor(kBlue + 4);
966
967 // Wing part
968 TGeoBBox* wing1 = new TGeoBBox("wing1", 117.0 / 2., 8.9571 / 2., 13.7221 / 2.);
969 TGeoBBox* wing2 = new TGeoBBox("wing2", 117.0 / 2., 8.9571 / 2., 13.7221 / 2.);
970 TGeoCompositeShape* wing3 =
971 MakeSubtraction("wing3", wing1, wing2, nullptr, MakeCombiTrans(49.9989, 0., 3.206, 0., 18.90578, 0.));
972
973 TGeoBBox* wing4 = new TGeoBBox("wing4", 117.0 / 2., 8.9571 / 2., 13.7221 / 2.);
974 TGeoCompositeShape* wing5 =
975 MakeSubtraction("wing5", wing3, wing4, nullptr, MakeCombiTrans(-49.9989, 0., 3.206, 0., -18.90578, 0.));
976
977 TGeoVolume* wing = new TGeoVolume("shieling_wing", wing5, fMaterials.GetMedium("iron"));
978 //if (fSetVolumeColors) wing->SetLineColor(kBlue - 1);
979
980 TGeoVolumeAssembly* shBoxFinal = new TGeoVolumeAssembly("shielding_box");
981 shBoxFinal->AddNode(shBox, 1, MakeCombiTrans(0., 240.7246, 79.4162, 68.06551, 0., -180.0));
982 shBoxFinal->AddNode(wing, 1, MakeCombiTrans(0., 118.3074, 225.1717, -26.70901, 0., 0.));
983
984 return shBoxFinal;
985}
986
987TGeoCompositeShape* RichGeoCreator::MakeSubtraction(const string& name, TGeoShape* left, TGeoShape* right,
988 TGeoMatrix* lmat, TGeoMatrix* rmat)
989{
990 return new TGeoCompositeShape(name.c_str(), new TGeoSubtraction(left, right, lmat, rmat));
991}
992
993TGeoCompositeShape* RichGeoCreator::MakeUnion(const string& name, TGeoShape* left, TGeoShape* right, TGeoMatrix* lmat,
994 TGeoMatrix* rmat)
995{
996 return new TGeoCompositeShape(name.c_str(), new TGeoUnion(left, right, lmat, rmat));
997}
998
999TGeoCompositeShape* RichGeoCreator::MakeIntersection(const string& name, TGeoShape* left, TGeoShape* right,
1000 TGeoMatrix* lmat, TGeoMatrix* rmat)
1001{
1002 return new TGeoCompositeShape(name.c_str(), new TGeoIntersection(left, right, lmat, rmat));
1003}
1004
1005
1006TGeoCombiTrans* RichGeoCreator::MakeCombiTrans(double dx, double dy, double dz, double rotX, double rotY, double rotZ)
1007{
1008 // Note that rotX, rotY, rotZ should be provided as in GDML and in deg.
1009 // The rotation is done with oposite sign of rot(XYZ), first - Z, second - Y, third - X
1010 // Creation of TGeoCombiTrans is done with rot->Inverse()
1011 TGeoTranslation* tr = MakeTrans(dx, dy, dz);
1012 TGeoRotation* rot = new TGeoRotation();
1013 if (rotZ != 0.) rot->RotateZ(-rotZ);
1014 if (rotY != 0.) rot->RotateY(-rotY);
1015 if (rotX != 0.) rot->RotateX(-rotX);
1016 return new TGeoCombiTrans(*tr, rot->Inverse());
1017}
1018
1019TGeoTranslation* RichGeoCreator::MakeTrans(double dx, double dy, double dz) { return new TGeoTranslation(dx, dy, dz); }
1020
1021TGeoRotation* RichGeoCreator::MakeRot(double rotX, double rotY, double rotZ)
1022{
1023 TGeoRotation* rot = new TGeoRotation();
1024 if (rotZ != 0.) rot->RotateZ(-rotZ);
1025 if (rotY != 0.) rot->RotateY(-rotY);
1026 if (rotX != 0.) rot->RotateX(-rotX);
1027 return rot;
1028}
1029
ClassImp(CbmConverterManager)
friend fvec sqrt(const fvec &a)
friend fvec cos(const fvec &a)
friend fvec sin(const fvec &a)
const double pi
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()
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
double fRichEntranceHeight
virtual ~RichGeoCreator()
TGeoCompositeShape * MakeUnion(const std::string &name, TGeoShape *left, TGeoShape *right, TGeoMatrix *lmat=nullptr, TGeoMatrix *rmat=nullptr)
double fRichEntranceThickness
double fCameraTouchWidth
TGeoVolume * CreateRichContainer()
TGeoVolumeAssembly * CreateBeltAssembly()
TGeoMedium * GetMedium(const std::string &name)
Hash for CbmL1LinkKey.