Project
Loading...
Searching...
No Matches
HalfCone.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
17
18#include "TGeoBBox.h"
19#include "TGeoBoolNode.h"
20#include "TGeoCompositeShape.h"
21#include "TGeoCone.h"
22#include "TGeoManager.h"
23#include "TGeoMaterial.h"
24#include "TGeoMatrix.h"
25#include "TGeoMedium.h"
26#include "TGeoShape.h"
27#include "TGeoTrd1.h"
28#include "TGeoTube.h"
29#include "TGeoVolume.h"
30#include "TGeoXtru.h"
31#include "TMath.h"
32#include <TGeoArb8.h> // for TGeoTrap
35
36#include "MFTBase/Constants.h"
37#include "MFTBase/HalfCone.h"
38
39using namespace o2::mft;
40
42
43//_____________________________________________________________________________
44HalfCone::HalfCone() : mHalfCone(nullptr)
45{
46
47 // default constructor
48}
49
50//_____________________________________________________________________________
51HalfCone::~HalfCone() = default;
52
53//_____________________________________________________________________________
54TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half)
55{
56
57 auto* HalfConeVolume = new TGeoVolumeAssembly(Form("HalfConeVolume%d", half));
58
59 TGeoMedium* malu5083 = gGeoManager->GetMedium("MFT_Alu5083$");
60
61 // Rotation
62 TGeoRotation* rot1 = new TGeoRotation("rot1", 180, -180, 0);
63
64 rot1->RegisterYourself();
65 TGeoRotation* rot2 = new TGeoRotation("rot2", 90, -90, 0);
66 rot2->RegisterYourself();
67
68 TGeoRotation* rot3 = new TGeoRotation("rot3", 0, 90, 0);
69 rot3->RegisterYourself();
70
71 TGeoRotation* rot_90x = new TGeoRotation("rot_90x", 0, -90, 0);
72 rot_90x->RegisterYourself();
73
74 TGeoRotation* rot_base = new TGeoRotation("rot_base", 180, 180, 0);
75 rot_base->RegisterYourself();
76
77 TGeoCombiTrans* combi1 = new TGeoCombiTrans(0, -10.3, 1.29, rot1);
78 combi1->RegisterYourself();
79 TGeoCombiTrans* combi2 = new TGeoCombiTrans(-16.8, 0., 0., rot2);
80 combi2->RegisterYourself();
81
82 TGeoRotation* r0 = new TGeoRotation("r0", 10., 0., 0.);
83 r0->RegisterYourself();
84
85 // 1st piece Cross_beam_MB0
86
87 auto* Cross_mb0 = new TGeoVolumeAssembly("Cross_mb0");
88
89 // rectangular box
90 Double_t x_boxmb0 = 14.4; // dx= 7.2 cm
91 Double_t y_boxmb0 = 0.6;
92 Double_t z_boxmb0 = 0.6;
93
95 Double_t radin_1hmb0 = 0.;
96 Double_t radout_1hmb0 = 0.175;
97 Double_t high_1hmb0 = 0.7;
98
99 TGeoRotation* rot_1hole_mb0 = new TGeoRotation("rot_1hole_mb0", 0, 90, 0);
100 rot_1hole_mb0->RegisterYourself();
101 // h= hole
102 TGeoCombiTrans* acombi_1h_mb0 = new TGeoCombiTrans(5.2, 0, 0, rot_1hole_mb0);
103 acombi_1h_mb0->SetName("acombi_1h_mb0");
104 acombi_1h_mb0->RegisterYourself();
105 TGeoCombiTrans* bcombi_1h_mb0 = new TGeoCombiTrans(-5.2, 0, 0, rot_1hole_mb0);
106 bcombi_1h_mb0->SetName("bcombi_1h_mb0");
107 bcombi_1h_mb0->RegisterYourself();
108
109 // 2hole coaxial
110 Double_t radin_2hmb0 = 0.;
111 Double_t radout_2hmb0 = 0.15;
112 Double_t high_2hmb0 = 1.2;
113 TGeoRotation* rot_2hole_mb0 = new TGeoRotation("rot_2hole_mb0", 90, 90, 0);
114 rot_2hole_mb0->SetName("rot_2hole_mb0");
115 rot_2hole_mb0->RegisterYourself();
116
117 TGeoCombiTrans* combi_2hole_mb0 =
118 new TGeoCombiTrans(6.7, 0, 0, rot_2hole_mb0);
119 combi_2hole_mb0->SetName("combi_2hole_mb0");
120 combi_2hole_mb0->RegisterYourself();
121
122 TGeoCombiTrans* combi_2hole_mb0_b =
123 new TGeoCombiTrans(-6.7, 0, 0, rot_2hole_mb0);
124 combi_2hole_mb0_b->SetName("combi_2hole_mb0_b");
125 combi_2hole_mb0_b->RegisterYourself();
126
127 // shape for cross_mb0..
128 new TGeoBBox("box_mb0", x_boxmb0 / 2, y_boxmb0 / 2, z_boxmb0 / 2);
129 new TGeoTube("hole1_mb0", radin_1hmb0, radout_1hmb0, high_1hmb0 / 2);
130 new TGeoTube("hole2_mb0", radin_2hmb0, radout_2hmb0, high_2hmb0 / 2);
132
133 auto* c_mb0_Shape_0 = new TGeoCompositeShape(
134 "c_mb0_Shape_0",
135 "box_mb0 - hole2_mb0:combi_2hole_mb0 - "
136 "hole2_mb0:combi_2hole_mb0_b");
137
138 auto* cross_mb0_Volume =
139 new TGeoVolume("cross_mb0_Volume", c_mb0_Shape_0, malu5083);
140
141 Cross_mb0->AddNode(cross_mb0_Volume, 1);
142
143 // 2nd piece cross beam MFT (cbeam)
144 auto* Cross_mft = new TGeoVolumeAssembly("Cross_mft");
145 auto* Cross_mft_2 = new TGeoVolumeAssembly("Cross_mft_2");
146 auto* Cross_mft_3 = new TGeoVolumeAssembly("Cross_mft_3");
147 auto* Cross_mft_4 = new TGeoVolumeAssembly("Cross_mft_4");
148
149 // 2020_cross_beam
150 // tub-main
151 Double_t radin_cb = 0.;
152 Double_t radout_cb = 0.3;
153 Double_t high_cb = 14.2;
154
155 TGeoRotation* rot_cb = new TGeoRotation("rot_cb", 90, 90, 0);
156 rot_cb->SetName("rot_cb");
157 rot_cb->RegisterYourself();
158
159 // using the same "box" of the 1 piece
160 // 2hole coaxial
161 Double_t radin_hole_cbeam = 0.;
162 Double_t radout_hole_cbeam = 0.15;
163 Double_t high_hole_cbeam = 0.91;
164
165 // same rotation in tub aximatAl "rot_2hole_mb0"
166 TGeoCombiTrans* combi_hole_1cbeam =
167 new TGeoCombiTrans(6.8, 0, 0, rot_2hole_mb0);
168 combi_hole_1cbeam->SetName("combi_hole_1cbeam");
169 combi_hole_1cbeam->RegisterYourself();
170
171 TGeoCombiTrans* combi_hole_2cbeam =
172 new TGeoCombiTrans(-6.8, 0, 0, rot_2hole_mb0);
173 combi_hole_2cbeam->SetName("combi_hole_2cbeam");
174 combi_hole_2cbeam->RegisterYourself();
175
176 // shape for shape cross beam
177 new TGeoTube("hole_cbeam", radin_hole_cbeam, radout_hole_cbeam,
178 high_hole_cbeam / 2);
179 new TGeoTube("s_cb", radin_cb, radout_cb, high_cb / 2); // new
180
181 // composite shape for cross beam (using the same box of mb0)
182
183 auto* c_cbeam_Shape = new TGeoCompositeShape(
184 "c_cbeam_Shape",
185 " s_cb:rot_cb - hole_cbeam:combi_hole_1cbeam - "
186 "hole_cbeam:combi_hole_2cbeam");
187
188 auto* Cross_mft_Volume =
189 new TGeoVolume("Cross_mft_Volume", c_cbeam_Shape, malu5083);
190 auto* Cross_mft_Volume_2 =
191 new TGeoVolume("Cross_mft_Volume_2", c_cbeam_Shape, malu5083);
192 auto* Cross_mft_Volume_3 =
193 new TGeoVolume("Cross_mft_Volume_3", c_cbeam_Shape, malu5083);
194 auto* Cross_mft_Volume_4 =
195 new TGeoVolume("Cross_mft_Volume_4", c_cbeam_Shape, malu5083);
196
197 Cross_mft->AddNode(Cross_mft_Volume, 1);
198 Cross_mft_2->AddNode(Cross_mft_Volume_2, 1);
199 Cross_mft_3->AddNode(Cross_mft_Volume_3, 1);
200 Cross_mft_4->AddNode(Cross_mft_Volume_4, 1);
201
202 // 3th piece Framework front
203 auto* Fra_front = new TGeoVolumeAssembly("Fra_front");
204 auto* Fra_front_L = new TGeoVolumeAssembly("Fra_front_L");
205 auto* Fra_front_R = new TGeoVolumeAssembly("Fra_front_R");
206
207 // new fra_front seg tub
208 Double_t radin_fwf = 15.2;
209 Double_t radout_fwf = 15.9;
210 Double_t high_fwf = 0.6;
211 Double_t ang_in_fwf = 180. + 21.0; // 21.44
212 Double_t ang_fin_fwf = 180 + 60.21; //
213
214 // box to quit -inferior part
215 Double_t x_box_qdown = 1.6;
216 Double_t y_box_qdown = 1.6;
217 Double_t z_box_qdown = 0.65;
218
219 TGeoTranslation* tr_qdown =
220 new TGeoTranslation("tr_qdown", -7.1, -13.7985, 0.);
221 tr_qdown->RegisterYourself();
222
223 // box to add -inferior part
224 Double_t x_box_addown = 1.83;
225 Double_t y_box_addown = 0.6;
226 Double_t z_box_addown = 0.6;
227
228 TGeoTranslation* tr_addown =
229 new TGeoTranslation("tr_addown", -8.015, -12.6985, 0.);
230 tr_addown->RegisterYourself();
232 TGeoXtru* tria_fwf = new TGeoXtru(2);
233 tria_fwf->SetName("tria_fwf");
234
235 Double_t x_tria_fwf[3] = {-13.2, -10.3, -10.3};
236 Double_t y_tria_fwf[3] = {-8.0, -11.4, -8.0};
237 tria_fwf->DefinePolygon(3, x_tria_fwf, y_tria_fwf);
238 tria_fwf->DefineSection(0, -0.3, 0., 0., 1);
239 tria_fwf->DefineSection(1, 0.3, 0., 0., 1);
241 TGeoXtru* top_adfwf = new TGeoXtru(2);
242 top_adfwf->SetName("top_adfwf");
243
244 Double_t x_top_adfwf[4] = {-14.8, -14.2, -14.2, -14.8};
245 Double_t y_top_adfwf[4] = {-3.6 - 0.12, -3.6 - 0.12, -5.56, -5.83};
246 top_adfwf->DefinePolygon(4, x_top_adfwf, y_top_adfwf);
247 top_adfwf->DefineSection(0, -0.3, 0., 0.,
248 1); //(plane,-zplane/ +zplane, x0, y0,(x/y))
249 top_adfwf->DefineSection(1, 0.3, 0., 0., 1);
250
251 // box to quit up part
252 Double_t x_q_upbox = 0.4;
253 Double_t y_q_upbox = 4.;
254 Double_t z_q_upbox = 1.;
255
256 TGeoTranslation* tr_q_upbox =
257 new TGeoTranslation("tr_q_upbox", -14.8 - 0.2, -3.6 - 0.6, 0.);
258 tr_q_upbox->RegisterYourself();
259
260 TGeoRotation* rot_180yR = new TGeoRotation("rot_180yR", 180, -180, 0);
261 rot_180yR->RegisterYourself();
262 TGeoCombiTrans* combi_fwb_R = new TGeoCombiTrans(0, 0, 0, rot_180yR);
263 combi_fwb_R->SetName("combi_fwb_R");
264 combi_fwb_R->RegisterYourself();
265
267 Double_t x_box_up = 0.6; // cm
268 Double_t y_box_up = 0.605;
269 Double_t z_box_up = 2.84;
270 // hole up
271 Double_t dia_tub_up = 0.35;
272 Double_t high_tub_up = 0.65;
273 // hole down
274 Double_t dia_tubdown = 0.35;
275 Double_t high_tubdown = 0.68;
276 //
277 Double_t x_boxA_down = 0.8;
278 Double_t y_boxA_down = 0.6;
279 Double_t z_boxA_down = 0.6;
280
281 Double_t x_boxB_down = 0.6;
282 Double_t y_boxB_down = 0.605;
283 Double_t z_boxB_down = 1.26;
284 // seg tub
285 Double_t radin_segtub = 16.9;
286 Double_t radout_segtub = 17.5;
287 Double_t high_segtub = 0.6;
288 Double_t ang_in_segtub = 212.1;
289 Double_t ang_fin_segtub = 241.92;
290
291 // trans. rot.
292 TGeoCombiTrans* combi_3a = new TGeoCombiTrans(-7.4, 0, 8.975, rot2);
293 combi_3a->SetName("combi_3a");
294 combi_3a->RegisterYourself();
295
296 TGeoTranslation* tr1_up = new TGeoTranslation("tr1_up", -7.4, 0, 8.28);
297
298 tr1_up->RegisterYourself();
299
300 TGeoTranslation* tr1_tub1 = new TGeoTranslation("tr1_tub1", 0, 0., 3.075);
301 tr1_tub1->RegisterYourself();
302
303 TGeoCombiTrans* combi_3b = new TGeoCombiTrans(7.118, 0, 16.16, rot3);
304 combi_3b->SetName("combi_3b");
305 combi_3b->RegisterYourself();
306
307 TGeoTranslation* tr_2_box = new TGeoTranslation("tr_2_box", -0.4, 0, 0.7);
308 tr_2_box->RegisterYourself();
309
310 TGeoTranslation* tr3_box = new TGeoTranslation("tr3_box", -1.1, 0, 0.63);
311 tr3_box->RegisterYourself();
312
313 TGeoTranslation* tr_tubdown = new TGeoTranslation("tr_tubdown", -0.4, 0, 0.7);
314 tr_tubdown->RegisterYourself();
315
316 // shape for framewor front
317 auto* fwf_tub = new TGeoTubeSeg("fwf_tub", radin_fwf, radout_fwf,
318 high_fwf / 2, ang_in_fwf, ang_fin_fwf);
319 auto* box_qdown = new TGeoBBox("box_qdown", x_box_qdown / 2, y_box_qdown / 2,
320 z_box_qdown / 2);
321 auto* box_addown = new TGeoBBox("box_addown", x_box_addown / 2,
322 y_box_addown / 2, z_box_addown / 2);
323 auto* q_upbox =
324 new TGeoBBox("q_upbox", x_q_upbox / 2, y_q_upbox / 2, z_q_upbox / 2);
325
326 new TGeoBBox("box_up", x_box_up / 2, y_box_up / 2, z_box_up / 2);
327
328 new TGeoTube("tub_up", 0., dia_tub_up / 2, high_tub_up / 2); //
329 new TGeoTubeSeg("seg_tub", radin_segtub, radout_segtub, high_segtub / 2,
330 ang_in_segtub, ang_fin_segtub);
331
332 new TGeoBBox("boxB_down", x_boxB_down / 2, y_boxB_down / 2, z_boxB_down / 2);
333
334 new TGeoBBox("boxA_down", x_boxA_down / 2, y_boxA_down / 2, z_boxA_down / 2);
335
336 new TGeoTube("tubdown", 0., dia_tubdown / 2, high_tubdown / 2);
337
338 // Composite shapes for Fra_front
339 new TGeoCompositeShape("fra_front_Shape_0",
340 "box_up:tr1_up + seg_tub:combi_3b + boxB_down:tr3_box "
341 "+ boxA_down:tr_2_box");
342
343 auto* fra_front_Shape_1 = new TGeoCompositeShape(
344 "fra_front_Shape_1",
345 "fra_front_Shape_0 - tubdown:tr_tubdown - tub_up:combi_3a");
346
347 TGeoRotation* rot_z180x90 =
348 new TGeoRotation("rot_z180x90", 180, 90, 0); // half0_R
349 rot_z180x90->RegisterYourself();
350
351 TGeoRotation* rot_halfR =
352 new TGeoRotation("rot_halfR", 180, 180, 0); // half0_R
353 rot_halfR->RegisterYourself();
354 TGeoCombiTrans* combi_front_L =
355 new TGeoCombiTrans(-7.1, -16.2, 32.5 + 0.675, rot_90x);
356
357 combi_front_L->SetName("combi_front_L");
358 combi_front_L->RegisterYourself();
359
360 TGeoTranslation* tr_ff = new TGeoTranslation(
361 "tr_ff", 0, -2.5 - 0.31, 32.5 + 0.675); // 7.1 , -16.2 z32.5
362 tr_ff->RegisterYourself();
363
364 TGeoCombiTrans* combi_front_R =
365 new TGeoCombiTrans(0, -2.5 - 0.31, 32.5 + 0.675, rot_180yR);
366 combi_front_R->SetName("combi_front_R");
367 combi_front_R->RegisterYourself();
368
369 auto* fra_front_Shape_2 = new TGeoCompositeShape(
370 "Fra_front_Shape_2",
371 "fwf_tub - box_qdown:tr_qdown + box_addown:tr_addown + tria_fwf + "
372 "top_adfwf - q_upbox:tr_q_upbox");
373
374 auto* fra_front_Shape_3 = new TGeoCompositeShape(
375 "Fra_front_Shape_3", "Fra_front_Shape_2 + Fra_front_Shape_2:rot_180yR");
376
377 auto* Fra_front_Volume_R =
378 new TGeoVolume("Fra_front_Volume_R", fra_front_Shape_2, malu5083);
379 auto* Fra_front_Volume_L =
380 new TGeoVolume("Fra_front_Volume_L", fra_front_Shape_2, malu5083);
381
382 auto* Fra_front_Volume_RL =
383 new TGeoVolume("Fra_front_Volume_RL", fra_front_Shape_3, malu5083);
384
385 Fra_front->AddNode(Fra_front_Volume_RL, 1, tr_ff);
386
387 // 4th piece "BASE" framework half support
388 auto* base = new TGeoVolumeAssembly("base");
389
390 // seg tub disc
391 Double_t radin_disc = 23.6;
392 Double_t radout_disc = 30.3;
393 Double_t high_disc = 1.35;
394 Double_t ang_in_disc = 180;
395 Double_t ang_fin_disc = 360;
396
397 // holes tub 1hole tranversal o3.5
398 Double_t radin_holeB = 0.;
399 Double_t radout_holeB = 0.175; // diameter 3.5 H11
400 Double_t high_holeB = 1.5;
401 TGeoTranslation* tr1_holeB = new TGeoTranslation("tr1_holeB", -7.5, -28.8, 0);
402 tr1_holeB->RegisterYourself();
403
404 TGeoTranslation* tr2_holeB = new TGeoTranslation("tr2_holeB", 7.5, -28.8, 0);
405 tr2_holeB->RegisterYourself();
406
407 // box 1
408 Double_t x_1box = 61.0;
409 Double_t y_1box = 13.0;
410 Double_t z_1box = 1.4;
411 // box 2
412 Double_t x_2box = 51.2;
413 Double_t y_2box = 14.6;
414 Double_t z_2box = 1.4;
415 // box 3
416 Double_t x_3box = 45.1;
417 Double_t y_3box = 23.812;
418 Double_t z_3box = 1.4;
419 // seg tub hole
420 Double_t radin_1hole = 29.3;
421 Double_t radout_1hole = 30.3;
422 Double_t high_1hole = 1.4;
423 Double_t ang_in_1hole = 205;
424 Double_t ang_fin_1hole = 225;
425 // seg tub 2 hole
426 Double_t radin_2hole = 23.0;
427 Double_t radout_2hole = 25.5;
428 Double_t high_2hole = 1.4;
429 Double_t ang_in_2hole = 207.83;
430 Double_t ang_fin_2hole = 249.998;
431 // seg tub 3 ARC central xy SEG_3ARC U
432 Double_t radin_3hole = 25.5;
433 Double_t radout_3hole = 27.5;
434 Double_t high_3hole = 1.35;
435 Double_t ang_in_3hole = 255.253;
436 Double_t ang_fin_3hole = 284.746;
437 // hole central down |_| since x=-70 to 0
438 Double_t xc_box = 7.0;
439 Double_t yc_box = 5.772;
440 Double_t zc_box = 1.4;
441
442 TGeoTranslation* tr_cbox =
443 new TGeoTranslation("tr_cbox", -xc_box / 2, -radout_disc + 0.888, 0);
444 tr_cbox->RegisterYourself();
445 // box 4 lamine 1
446 Double_t x_labox = 60.0;
447 Double_t y_labox = 30.3;
448 Double_t z_labox = 0.305;
449 TGeoTranslation* tr_la =
450 new TGeoTranslation("tr_la", 0, -y_labox / 2 - 9.3, high_disc / 2);
451 tr_la->RegisterYourself();
452
453 // box 5 lamin 2
454 Double_t x_2labox = 51.2;
455 Double_t y_2labox = 2.8; // C-B
456 Double_t z_2labox = 0.303;
457 TGeoTranslation* tr_2la =
458 new TGeoTranslation("tr_2la", 0, -8.1, high_disc / 2);
459 tr_2la->RegisterYourself();
460
461 // circular border C SEG_BORD
462 // seg tub 3 xy
463 Double_t radin_bord = 0.5;
464 Double_t radout_bord = 0.9; //
465 Double_t high_bord = 1.355; // 13.5
466 Double_t ang_in_bord = 0;
467 Double_t ang_fin_bord = 90;
468 TGeoRotation* rot1_bord1 = new TGeoRotation("rot1_bord1", 14.8, 0, 0);
469 rot1_bord1->RegisterYourself();
470 TGeoCombiTrans* combi_bord1 =
471 new TGeoCombiTrans(-26.7995, -13.0215, 0, rot1_bord1); // y=
472 combi_bord1->SetName("combi_bord1");
473 combi_bord1->RegisterYourself();
474
475 TGeoRotation* rot2_bord1 = new TGeoRotation("rot2_bord1", -50, 0, 0);
476 rot2_bord1->RegisterYourself();
477 TGeoCombiTrans* combi2_bord1 =
478 new TGeoCombiTrans(-21.3795, -20.7636, 0, rot2_bord1);
479 combi2_bord1->SetName("combi2_bord1");
480 combi2_bord1->RegisterYourself();
481 //
482 TGeoRotation* rot1_bord2 = new TGeoRotation("rot1_bord2", 250, 0, 0);
483 rot1_bord2->RegisterYourself();
484 TGeoCombiTrans* combi1_bord2 =
485 new TGeoCombiTrans(-9.0527, -23.3006, 0, rot1_bord2);
486 combi1_bord2->SetName("combi1_bord2");
487 combi1_bord2->RegisterYourself();
488 // e|°____°|
489 TGeoRotation* rot_cent_bord = new TGeoRotation("rot_cent_bord", 90, 0, 0);
490 rot_cent_bord->RegisterYourself();
491 TGeoCombiTrans* combi_cent_bord =
492 new TGeoCombiTrans(-6.5, -27.094, 0, rot_cent_bord);
493 combi_cent_bord->SetName("combi_cent_bord");
494 combi_cent_bord->RegisterYourself();
495 // box tonge
496 Double_t x_tong = 2.0;
497 Double_t y_tong = 1.5;
498 Double_t z_tong = 1.35;
499 TGeoTranslation* tr_tong = new TGeoTranslation("tr_tong", 0, -26.75, 0); //
500 tr_tong->RegisterYourself();
501 // circular central hole1 to conexion with other parts
502 Double_t radin_hole1 = 0;
503 Double_t radout_hole1 = 0.4;
504 Double_t high_hole1 = 1.36;
505 TGeoTranslation* tr_hole1 = new TGeoTranslation("tr_hole1", 0, -28.0, 0);
506 tr_hole1->RegisterYourself();
507
508 TGeoTranslation* tr2_hole1 =
509 new TGeoTranslation("tr2_hole1", -26.5, -8.5, 0); // left
510 tr2_hole1->RegisterYourself();
511
512 TGeoTranslation* tr3_hole1 =
513 new TGeoTranslation("tr3_hole1", 26.5, -8.5, 0); // right
514 tr3_hole1->RegisterYourself();
515
516 // circular hole2 ; hole2 r=6.7
517 Double_t radin_hole2 = 0;
518 Double_t radout_hole2 = 0.335;
519 Double_t high_hole2 = 1.36;
520 TGeoTranslation* tr1_hole2 =
521 new TGeoTranslation("tr1_hole2", -28.0, -8.5, 0); //
522 tr1_hole2->RegisterYourself();
523
524 TGeoTranslation* tr2_hole2 =
525 new TGeoTranslation("tr2_hole2", 28.0, -8.5, 0); //
526 tr2_hole2->RegisterYourself();
527
529 Double_t radin_T1 = 0.325; // diam 0.65cm
530 Double_t radout_T1 = 0.55; // dia 1.1
531 Double_t high_T1 = 1.2; // dz 6
532
533 Double_t radin_T2 = 0;
534 Double_t radout_T2 = 1.1;
535 Double_t high_T2 = 1.2; // dz 6
536
537 Double_t radin_ccut = 27.5;
538 Double_t radout_ccut = 29.;
539 Double_t high_ccut = 1.4;
540 Double_t ang_in_ccut = 260;
541 Double_t ang_fin_ccut = 280;
542
543 // shape for base
544 new TGeoTubeSeg("disc", radin_disc, radout_disc, high_disc / 2, ang_in_disc,
545 ang_fin_disc);
546 new TGeoTubeSeg("c_cut", radin_ccut, radout_ccut, high_ccut / 2, ang_in_ccut,
547 ang_fin_ccut);
548
549 new TGeoBBox("box1", x_1box / 2, y_1box / 2, z_1box / 2);
550 new TGeoBBox("box2", x_2box / 2, y_2box / 2, z_2box / 2);
551 new TGeoBBox("box3", x_3box / 2, y_3box / 2, z_3box / 2);
552 new TGeoBBox("labox1", x_labox / 2, y_labox / 2, z_labox / 2);
553 new TGeoBBox("labox2", x_2labox / 2, y_2labox / 2, z_2labox / 2);
554 new TGeoBBox("cbox", xc_box / 2, yc_box / 2, zc_box / 2);
555 new TGeoBBox("tongbox", x_tong / 2, y_tong / 2, z_tong / 2);
556
557 new TGeoTubeSeg("seg_1hole", radin_1hole, radout_1hole, high_1hole / 2,
558 ang_in_1hole, ang_fin_1hole);
559 new TGeoTubeSeg("seg_2hole", radin_2hole, radout_2hole, high_2hole / 2,
560 ang_in_2hole, ang_fin_2hole);
561 new TGeoTubeSeg("seg_3hole", radin_3hole, radout_3hole, high_3hole / 2,
562 ang_in_3hole, ang_fin_3hole); // y|u|
563 new TGeoTubeSeg("seg_bord", radin_bord, radout_bord, high_bord / 2,
564 ang_in_bord, ang_fin_bord);
565
566 new TGeoTube("circ_hole1", radin_hole1, radout_hole1, high_hole1 / 2);
567
568 new TGeoTube("circ_hole2", radin_hole2, radout_hole2, high_hole2 / 2);
569
570 new TGeoTube("circ_holeB", radin_holeB, radout_holeB, high_holeB / 2);
571
572 // composite shape for base
573
574 new TGeoCompositeShape("base_Shape_0", " disc - box1 - box2 - box3");
575 new TGeoCompositeShape(
576 "base_Shape_1",
577 "(seg_1hole - seg_bord:combi_bord1 - seg_bord:combi2_bord1) + seg_2hole "
578 "-seg_bord:combi1_bord2 + cbox:tr_cbox");
579
580 new TGeoCompositeShape("base_Shape_2",
581 " seg_3hole + seg_bord:combi_cent_bord");
582
583 new TGeoCompositeShape("base_Shape_3", " labox1:tr_la + labox2:tr_2la ");
584
585 auto* base_Shape_4 = new TGeoCompositeShape(
586 "base_Shape_4",
587 "base_Shape_0 - base_Shape_1 - base_Shape_1:rot1 + base_Shape_2 - "
588 "base_Shape_3 + tongbox:tr_tong - c_cut");
589
590 auto* base4_Volume = new TGeoVolume("base4_Volume", base_Shape_4, malu5083);
591
592 base->AddNode(base4_Volume, 2, rot_base);
593
594 // 5th piece middle Framework middle
595 auto* middle = new TGeoVolumeAssembly("middle");
596 auto* middle_L = new TGeoVolumeAssembly("middle_L");
597 auto* middle_R = new TGeoVolumeAssembly("middle_R");
598
600 Double_t radin_fwm = 14.406;
601 Double_t radout_fwm = 15.185;
602 Double_t high_fwm = 0.6;
603 Double_t ang_in_fwm = 180. + 12.93;
604 Double_t ang_fin_fwm = 180. + 58.65;
605
607 Double_t x_fwm_1box = 0.8; // dx=4
608 Double_t y_fwm_1box = 1.45;
609 Double_t z_fwm_1box = 0.6; // 6.5 -> 6.6 to quit
610 TGeoTranslation* tr_fwm_1box =
611 new TGeoTranslation("tr_fwm_1box", -14.4, -3.398 + 1.45 / 2, 0);
612 tr_fwm_1box->RegisterYourself();
613
615 Double_t x_fwm_2box = 0.8; // dx=4
616 Double_t y_fwm_2box = 1.2;
617 Double_t z_fwm_2box = 0.7; // 6.5 -> 6.6 to quit
618 TGeoTranslation* tr_fwm_2box =
619 new TGeoTranslation("tr_fwm_2box", -14.4 + 6.9, -3.398 - 9.1, 0);
620 tr_fwm_2box->RegisterYourself();
621
622 TGeoXtru* tria_fwm = new TGeoXtru(2);
623 tria_fwm->SetName("tria_fwm");
624
625 Double_t x_tria_fwm[3] = {-13.5, -10., -10.};
626 Double_t y_tria_fwm[3] = {-5.94, -5.94, -10.8};
627 tria_fwm->DefinePolygon(3, x_tria_fwm, y_tria_fwm);
628 tria_fwm->DefineSection(0, -0.3, 0., 0., 1);
629 tria_fwm->DefineSection(1, 0.3, 0., 0., 1);
631
632 // box up to quit and to join
633 Double_t x_middle = 0.8;
634 Double_t y_middle = 3.495;
635 Double_t z_middle = 0.62;
636 // tr1 to join with arc
637 TGeoTranslation* tr1_middle_box =
638 new TGeoTranslation("tr1_middle_box", -14.4, -0.745, 0);
639 tr1_middle_box->RegisterYourself();
640 // tr2 to quiet
641 TGeoTranslation* tr2_middle_box =
642 new TGeoTranslation("tr2_middle_box", -15.2, -0.745, 0);
643 tr2_middle_box->RegisterYourself();
644
645 // box down_1
646 Double_t x_middle_d1box = 0.4; // dx=4
647 Double_t y_middle_d1box = 0.28;
648 Double_t z_middle_d1box = 0.66;
649 TGeoTranslation* tr_middle_d1box =
650 new TGeoTranslation("tr_middle_d1box", -7.3, -11.96, 0.);
651 tr_middle_d1box->RegisterYourself();
652
653 // box down_2
654 Double_t x_middle_d2box = 0.8; // dx=4
655 Double_t y_middle_d2box = 1.0;
656 Double_t z_middle_d2box = 0.66; //
657 TGeoTranslation* tr_middle_d2box =
658 new TGeoTranslation("tr_middle_d2box", -7.5, -12.6249, 0);
659 tr_middle_d2box->RegisterYourself();
660
661 // arc circ part
662 Double_t radin_middle = 14.0;
663 Double_t radout_middle = 15.0;
664 Double_t high_middle = 0.6;
665 Double_t ang_in_middle = 180;
666 Double_t ang_fin_middle = 238.21; // alfa=57.60
667
668 // circular hole1 ; hole_middle d=3.5
669 Double_t radin_mid_1hole = 0.;
670 Double_t radout_mid_1hole = 0.175;
671 Double_t high_mid_1hole = 1.5;
672
673 TGeoRotation* rot_mid_1hole = new TGeoRotation("rot_mid_1hole", 90, 90, 0);
674 rot_mid_1hole->RegisterYourself();
675 TGeoCombiTrans* combi_mid_1tubhole =
676 new TGeoCombiTrans(-14.2, 0.325, 0, rot_mid_1hole);
677 combi_mid_1tubhole->SetName("combi_mid_1tubhole");
678 combi_mid_1tubhole->RegisterYourself();
679
680 // circular hole2 ; hole_middle d=3
681 Double_t radin_mid_2hole = 0.;
682 Double_t radout_mid_2hole = 0.15;
683 Double_t high_mid_2hole = 1.8;
684
685 TGeoCombiTrans* combi_mid_2tubhole =
686 new TGeoCombiTrans(-7.7, -12.355, 0, rot_mid_1hole);
687 combi_mid_2tubhole->SetName("combi_mid_2tubhole");
688 combi_mid_2tubhole->RegisterYourself();
689
690 // shape for middle
691 new TGeoBBox("middle_box", x_middle / 2, y_middle / 2, z_middle / 2);
692
693 new TGeoBBox("middle_d1box", x_middle_d1box / 2, y_middle_d1box / 2,
694 z_middle_d1box / 2);
695
696 new TGeoBBox("middle_d2box", x_middle_d2box / 2, y_middle_d2box / 2,
697 z_middle_d2box / 2);
698
699 new TGeoTubeSeg("arc_middle", radin_middle, radout_middle, high_middle / 2,
700 ang_in_middle, ang_fin_middle);
701
702 new TGeoTube("mid_1tubhole", radin_mid_1hole, radout_mid_1hole,
703 high_mid_1hole / 2);
704
705 new TGeoTube("mid_2tubhole", radin_mid_2hole, radout_mid_2hole,
706 high_mid_2hole / 2);
707
708 auto* tube_fwm = new TGeoTubeSeg("tube_fwm", radin_fwm, radout_fwm,
709 high_fwm / 2, ang_in_fwm, ang_fin_fwm);
710 auto* fwm_1box =
711 new TGeoBBox("fwm_1box", x_fwm_1box / 2, y_fwm_1box / 2, z_fwm_1box / 2);
712 auto* fwm_2box =
713 new TGeoBBox("fwm_2box", x_fwm_2box / 2, y_fwm_2box / 2, z_fwm_2box / 2);
714
715 // composite shape for middle
716 new TGeoCompositeShape(
717 "middle_Shape_0",
718 " arc_middle + middle_box:tr1_middle_box - middle_box:tr2_middle_box - "
719 "middle_d1box:tr_middle_d1box - middle_d2box:tr_middle_d2box");
720
721 auto* middle_Shape_1 = new TGeoCompositeShape(
722 "middle_Shape_1",
723 " middle_Shape_0 "
724 "-mid_1tubhole:combi_mid_1tubhole-mid_2tubhole:combi_mid_2tubhole");
725
726 TGeoRotation* rot_middlez = new TGeoRotation("rot_middley", 180, 180, 0);
727 rot_middlez->RegisterYourself();
728 TGeoCombiTrans* combi_middle_L =
729 new TGeoCombiTrans(0, -7.625, 24.15 + 0.675, rot_90x);
730 combi_middle_L->SetName("combi_middle_L");
731 combi_middle_L->RegisterYourself();
732
733 TGeoTranslation* tr_middle_L =
734 new TGeoTranslation("tr_middle_L", 0, -4.45 - 0.1, 24.85 + 0.675);
735 tr_middle_L->RegisterYourself();
736
737 TGeoCombiTrans* combi_middle_R =
738 new TGeoCombiTrans(0, -4.45 - 0.1, 24.85 + 0.675, rot_middlez);
739 combi_middle_R->SetName("combi_middle_R");
740 combi_middle_R->RegisterYourself();
741
742 auto* middle_Shape_3 = new TGeoCompositeShape(
743 "middle_Shape_3",
744 " tube_fwm + fwm_1box:tr_fwm_1box - fwm_2box:tr_fwm_2box +tria_fwm");
745
746 auto* middle_Shape_4 = new TGeoCompositeShape(
747 "middle_Shape_4",
748 " tube_fwm + fwm_1box:tr_fwm_1box - fwm_2box:tr_fwm_2box +tria_fwm");
749
750 auto* middle_Volume_L =
751 new TGeoVolume("middle_Volume_L", middle_Shape_3, malu5083);
752 auto* middle_Volume_R =
753 new TGeoVolume("middle_Volume_R", middle_Shape_4, malu5083);
754
755 TGeoTranslation* tr_middle =
756 new TGeoTranslation("tr_middle", 0, -4.45 - 0.1, 24.85 + 0.675);
757 tr_middle->RegisterYourself();
758
759 middle_L->AddNode(middle_Volume_L, 1, tr_middle);
760 middle_R->AddNode(middle_Volume_R, 1, combi_middle_R); // combi_midle_R
761
762 middle->AddNode(middle_L, 1);
763 middle->AddNode(middle_R, 2);
764
765 // new piece _/ \_
766 // Support_rail_L & Support_rail_R
767
768 auto* rail_L_R = new TGeoVolumeAssembly("rail_L_R");
769
770 // 6 piece RAIL LEFT RL0000
771 auto* rail_L = new TGeoVolumeAssembly("rail_L");
772
773 // box down_2
774 Double_t x_RL_1box = 3.0; // dx=15
775 Double_t y_RL_1box = 1.21; // dy=6, -dy=6
776 Double_t z_RL_1box = 0.8; // dz=4 to quit
777 TGeoTranslation* tr_RL_1box = new TGeoTranslation(0, y_RL_1box / 2, 1.825);
778 tr_RL_1box->SetName("tr_RL_1box");
779 tr_RL_1box->RegisterYourself();
780
781 TGeoXtru* xtru_RL1 = new TGeoXtru(2);
782 xtru_RL1->SetName("S_XTRU_RL1");
783
784 Double_t x_RL1[5] = {-1.5, 1.5, 0.5, 0.5, -1.5};
785 Double_t y_RL1[5] = {1.2, 1.2, 2.2, 8.2, 8.2};
786 xtru_RL1->DefinePolygon(5, x_RL1, y_RL1);
787 xtru_RL1->DefineSection(0, -2.225, 0., 0., 1);
788 xtru_RL1->DefineSection(1, 2.225, 0., 0., 1);
789
790 // box knee
791 Double_t x_RL_kneebox = 1.5;
792 Double_t y_RL_kneebox = 3.5;
793 Double_t z_RL_kneebox = 1.5;
794 TGeoTranslation* tr_RL_kneebox = new TGeoTranslation(0, 0, 0);
795 tr_RL_kneebox->SetName("tr_RL_kneebox");
796 tr_RL_kneebox->RegisterYourself();
797
798 TGeoRotation* rot_knee = new TGeoRotation("rot_knee", -40, 0, 0);
799 rot_knee->SetName("rot_knee");
800 rot_knee->RegisterYourself();
801 TGeoCombiTrans* combi_knee =
802 new TGeoCombiTrans(0.96, 1.75 + 0.81864, 0, rot_knee);
803 combi_knee->SetName("combi_knee");
804 combi_knee->RegisterYourself();
805 // quit diagona-> qdi
806 Double_t x_qdi_box = 3.1; //
807 Double_t y_qdi_box = 7.159; //
808 Double_t z_qdi_box = 3.005; //
809
810 TGeoRotation* rot_qdi = new TGeoRotation("rot_qdi", 0, 24.775, 0);
811 rot_qdi->RegisterYourself();
812 TGeoCombiTrans* combi_qdi = new TGeoCombiTrans(0, 5.579, -2.087, rot_qdi);
813 combi_qdi->SetName("combi_qdi");
814 combi_qdi->RegisterYourself();
815 // knee small
816
817 TGeoXtru* xtru3_RL = new TGeoXtru(2);
818 xtru3_RL->SetName("xtru3_RL");
819
820 Double_t x_3RL[6] = {-0.75, 0.75, 0.75, 2.6487, 1.4997, -0.75};
821 Double_t y_3RL[6] = {-1.75, -1.75, 1.203, 3.465, 4.4311, 1.75};
822
823 xtru3_RL->DefinePolygon(6, x_3RL, y_3RL);
824 xtru3_RL->DefineSection(0, -0.75, 0, 0, 1);
825 xtru3_RL->DefineSection(1, 0.76, 0, 0, 1);
826
827 TGeoTranslation* tr_vol3_RL = new TGeoTranslation(-0.25, 12.66, 0);
828 tr_vol3_RL->SetName("tr_vol3_RL");
829 tr_vol3_RL->RegisterYourself();
830
831 // circular holes for rail R and L
832 // circular hole1_RL (a(6,22)); hole_midle d=6.5 H11
833 Double_t radin_RL1hole = 0.;
834 Double_t radout_RL1hole = 0.325;
835 Double_t high_RL1hole = 1.0;
836
837 TGeoRotation* rot_RL1hole = new TGeoRotation("rot_RL1hole", 0, 0, 0);
838 rot_RL1hole->RegisterYourself();
839 TGeoCombiTrans* combi_RL1hole =
840 new TGeoCombiTrans(0.7, 0.6, 1.85, rot_RL1hole);
841 combi_RL1hole->SetName("combi_RL1hole");
842 combi_RL1hole->RegisterYourself();
843 // similar hole for R Join.
844 // circular hole_ir. diameter=M3 (3 mm)) prof trou:8, tar:6mm
845 Double_t radin_ir_railL = 0.;
846 Double_t radout_ir_railL = 0.15;
847 Double_t high_ir_railL = 3.9;
848 TGeoRotation* rot_ir_RL = new TGeoRotation("rot_ir_RL", 90, 90, 0);
849 rot_ir_RL->RegisterYourself();
850
851 TGeoCombiTrans* combi_ir1_RL =
852 new TGeoCombiTrans(8.62, 24.75, 1.5, rot_ir_RL);
853 combi_ir1_RL->SetName("combi_ir1_RL");
854 combi_ir1_RL->RegisterYourself();
855
856 TGeoCombiTrans* combi_ir2_RL = new TGeoCombiTrans(8.6, 33.15, 1.5, rot_ir_RL);
857 combi_ir2_RL->SetName("combi_ir2_RL");
858 combi_ir2_RL->RegisterYourself();
859 //
860 TGeoXtru* xtru_RL2 = new TGeoXtru(2);
861 xtru_RL2->SetName("S_XTRU_RL2");
862
863 Double_t x_RL2[8] = {-1.5, 0.5, 0.5, 9.3, 9.3, 7.3, 7.3, -1.5};
864 Double_t y_RL2[8] = {8.2, 8.2, 13.863, 24.35, 25.65, 25.65, 25.078, 14.591};
865
866 xtru_RL2->DefinePolygon(8, x_RL2, y_RL2);
867 xtru_RL2->DefineSection(0, 0.7752, 0, 0, 1);
868 xtru_RL2->DefineSection(1, 2.225, 0, 0, 1);
869
870 // 2) modi adding box new element 1 box
871 TGeoXtru* adi1_RL = new TGeoXtru(2);
872 adi1_RL->SetName("S_ADI1_RL");
873
874 Double_t x_adi1RL[4] = {-1.5, -1.5, 0.5, 0.5};
875 Double_t y_adi1RL[4] = {2.2, 13.863, 13.863, 2.2};
876
877 adi1_RL->DefinePolygon(4, x_adi1RL, y_adi1RL);
878 adi1_RL->DefineSection(0, -0.75, 0, 0, 1);
879 adi1_RL->DefineSection(1, 0.775, 0, 0, 1);
880
882 TGeoXtru* adi2_RL = new TGeoXtru(2); //
883 adi2_RL->SetName("S_ADI2_RL");
884 Double_t x_adi2RL[6] = {-1.5, 0.5, 9.3, 9.3, 7.8, 7.8};
885 Double_t y_adi2RL[6] = {13.863, 13.863, 24.35, 25.65, 25.65, 25.078};
886
887 adi2_RL->DefinePolygon(6, x_adi2RL, y_adi2RL);
888 adi2_RL->DefineSection(0, -0.75, 0, 0, 1);
889 adi2_RL->DefineSection(1, 0.7755, 0, 0, 1);
890
891 // 4)modi to quit ---> trap
892 Double_t RL_dx1 = 2.66;
893 Double_t RL_dx2 = 1;
894 Double_t RL_dy = 2.2;
895 Double_t RL_dz = 1.5;
896
897 TGeoRotation* rot_RL_Z50 = new TGeoRotation("rot_RL_Z50", 50, 0, 0);
898 rot_RL_Z50->RegisterYourself();
899 TGeoCombiTrans* combi_RL_trap =
900 new TGeoCombiTrans(5, 18.633, -1.5 - 0.025, rot_RL_Z50);
901 combi_RL_trap->SetName("combi_RL_trap");
902 combi_RL_trap->RegisterYourself();
903
905 Double_t x_qinf_box = 10.66;
906 Double_t y_qinf_box = 10.2;
907 Double_t z_qinf_box = 3.;
908 auto* s_RL_qinf_box = new TGeoBBox("S_RL_QINF_BOX", x_qinf_box / 2,
909 y_qinf_box / 2, z_qinf_box / 2);
910 TGeoCombiTrans* combi_RL_qbox =
911 new TGeoCombiTrans(7, 23., -1.5 - 0.025, rot_RL_Z50);
912 combi_RL_qbox->SetName("combi_RL_qbox");
913 combi_RL_qbox->RegisterYourself();
914
915 // 6) modi. add penta face z
916 TGeoXtru* pentfa_RL = new TGeoXtru(2);
917 pentfa_RL->SetName("S_PENTFA_RL");
918 Double_t x_pentfaRL[5] = {-1., -1., 0.13, 1., 1.};
919 Double_t y_pentfaRL[5] = {1.125, 0.045, -1.125, -1.125, 1.125};
920
921 pentfa_RL->DefinePolygon(5, x_pentfaRL, y_pentfaRL);
922 pentfa_RL->DefineSection(0, -5.05, 0, 0, 1);
923 pentfa_RL->DefineSection(1, 5.055, 0, 0, 1);
924
925 TGeoRotation* rot_X90 = new TGeoRotation("rot_X90", 0, 90, 0);
926 rot_X90->RegisterYourself();
927 TGeoCombiTrans* combi_RL_pent =
928 new TGeoCombiTrans(8.3, 30.705, 1.125 - 0.025, rot_X90);
929 combi_RL_pent->SetName("combi_RL_pent");
930 combi_RL_pent->RegisterYourself();
931
932 // shape for Rail L geom
933 new TGeoBBox("RL_1box", x_RL_1box / 2, y_RL_1box / 2, z_RL_1box / 2);
934 new TGeoBBox("RL_kneebox", x_RL_kneebox / 2, y_RL_kneebox / 2,
935 z_RL_kneebox / 2);
936 new TGeoBBox("qdi_box", x_qdi_box / 2, y_qdi_box / 2, z_qdi_box / 2);
937 new TGeoTrd1("TRAP1", RL_dx1, RL_dx2, RL_dy, RL_dz);
938
939 // composite shape for rail L
940
941 auto* RL_Shape_0 = new TGeoCompositeShape(
942 "RL_Shape_0",
943 " S_XTRU_RL1 + S_XTRU_RL2 + RL_1box:tr_RL_1box - "
944 "qdi_box:combi_qdi + "
945 "S_ADI1_RL + S_ADI2_RL - TRAP1:combi_RL_trap - "
946 "S_RL_QINF_BOX:combi_RL_qbox + "
947 "S_PENTFA_RL:combi_RL_pent");
948
949 TGeoVolume* rail_L_vol0 = new TGeoVolume("RAIL_L_VOL0", RL_Shape_0, malu5083);
950
951 rail_L->AddNode(rail_L_vol0, 1, new TGeoTranslation(0., 0., 1.5));
952
953 // piece 7th RAIL RIGHT
954 Double_t x_RR_1box = 3.0; // dx=15
955 Double_t y_RR_1box = 1.2; // dy=6, -dy=6
956 Double_t z_RR_1box = 0.8; // dz=4 to quit
957 TGeoTranslation* tr_RR_1box =
958 new TGeoTranslation("tr_RR_1box", 0, 0.6, 1.825);
959 tr_RR_1box->RegisterYourself();
960
961 TGeoXtru* part_RR1 = new TGeoXtru(2);
962 part_RR1->SetName("part_RR1");
963
964 Double_t x_RR1[5] = {-1.5, -0.5, -0.5, 1.5, 1.5};
965 Double_t y_RR1[5] = {1.2, 2.2, 8.2, 8.2, 1.2};
966
967 part_RR1->DefinePolygon(5, x_RR1, y_RR1);
968 part_RR1->DefineSection(0, -2.225, 0, 0, 1);
969 part_RR1->DefineSection(1, 2.225, 0, 0, 1);
970
971 // knee (small)
972 TGeoXtru* part_RR3 = new TGeoXtru(2);
973 part_RR3->SetName("part_RR3");
974
975 Double_t x_3RR[6] = {1.0, 1.0, -1.2497, -2.2138, -0.5, -0.5};
976 Double_t y_3RR[6] = {10.91, 14.41, 17.0911, 15.9421, 13.86, 10.91};
977
978 part_RR3->DefinePolygon(6, x_3RR, y_3RR);
979 part_RR3->DefineSection(0, -0.75, 0, 0, 1);
980 part_RR3->DefineSection(1, 0.78, 0, 0, 1);
981
982 TGeoTranslation* tr_vol3_RR =
983 new TGeoTranslation("tr_vol3_RR", -0.25, 12.66, 0);
984 tr_vol3_RR->RegisterYourself();
985
986 // quit diagona-> qdi
987 Double_t x_qdi_Rbox = 3.1;
988 Double_t y_qdi_Rbox = 7.159;
989 Double_t z_qdi_Rbox = 3.005;
990
991 TGeoRotation* rot_Rqdi = new TGeoRotation("rot_Rqdi", 0, 24.775, 0);
992 rot_Rqdi->RegisterYourself();
993 TGeoCombiTrans* combi_Rqdi = new TGeoCombiTrans(0, 5.579, -2.087, rot_Rqdi);
994 combi_Rqdi->SetName("combi_Rqdi");
995 combi_Rqdi->RegisterYourself();
996
997 // holes circular hole_a. diameter=6.5 (a(6,22)); hole_midle d=6.5 H11
998 Double_t radin_a_rail = 0.;
999 Double_t radout_a_rail = 0.325;
1000 Double_t high_a_rail = 0.82;
1001
1002 TGeoTranslation* tr_a_RR = new TGeoTranslation("tr_a_RR", -0.7, 0.6, 1.825);
1003 tr_a_RR->RegisterYourself();
1004
1005 Double_t radin_ir_rail = 0.;
1006 Double_t radout_ir_rail = 0.15;
1007 Double_t high_ir_rail = 3.2;
1008 TGeoRotation* rot_ir_RR = new TGeoRotation("rot_ir_RR", 90, 90, 0);
1009 rot_ir_RR->RegisterYourself();
1010
1011 TGeoCombiTrans* combi_ir_RR =
1012 new TGeoCombiTrans(-8.62, 24.75, 1.5, rot_ir_RR);
1013 combi_ir_RR->SetName("combi_ir_RR");
1014 combi_ir_RR->RegisterYourself();
1015
1016 TGeoCombiTrans* combi_ir2_RR =
1017 new TGeoCombiTrans(-8.6, 33.15, 1.5, rot_ir_RR);
1018 combi_ir2_RR->SetName("combi_ir2_RR");
1019 combi_ir2_RR->RegisterYourself();
1020
1021 TGeoCombiTrans* combi_rail_R = new TGeoCombiTrans(24.1, -1.825, 0, rot_90x);
1022 combi_rail_R->SetName("combi_rail_R");
1023 combi_rail_R->RegisterYourself();
1024 TGeoCombiTrans* combi_rail_L = new TGeoCombiTrans(-24.1, -1.825, 0, rot_90x);
1025 combi_rail_L->SetName("combi_rail_L");
1026 combi_rail_L->RegisterYourself();
1027
1028 // trasl L and R
1029 TGeoTranslation* tr_sr_l = new TGeoTranslation("tr_sr_l", -15.01, 0, 0);
1030 tr_sr_l->RegisterYourself();
1031 TGeoTranslation* tr_sr_r = new TGeoTranslation("tr_sr_r", 15.01, 0, 0);
1032 tr_sr_r->RegisterYourself();
1033
1035 TGeoXtru* part_RR2 = new TGeoXtru(2);
1036 part_RR2->SetName("part_RR2");
1037
1038 Double_t x_RR2[8] = {-0.5, -0.5, -9.3, -9.3, -7.3, -7.3, 1.5, 1.5};
1039 Double_t y_RR2[8] = {8.2, 13.863, 24.35, 25.65, 25.65, 25.078, 14.591, 8.2};
1040
1041 part_RR2->DefinePolygon(8, x_RR2, y_RR2);
1042 part_RR2->DefineSection(0, 0.776, 0, 0, 1);
1043 part_RR2->DefineSection(1, 2.225, 0, 0, 1);
1044
1045 // 2b) modi adding box new element 1 box
1046 TGeoXtru* adi1_RR = new TGeoXtru(2);
1047 adi1_RR->SetName("S_ADI1_RR");
1048
1049 Double_t x_adi1RR[4] = {-0.5, -.5, 1.5, 1.5};
1050 Double_t y_adi1RR[4] = {2.2, 13.863, 13.863, 2.2};
1051
1052 adi1_RR->DefinePolygon(4, x_adi1RR, y_adi1RR);
1053 adi1_RR->DefineSection(0, -0.75, 0, 0, 1);
1054 adi1_RR->DefineSection(1, 0.775, 0, 0, 1);
1055
1056 // 3b) modi adding new knee new element
1057 TGeoXtru* adi2_RR = new TGeoXtru(2); //
1058 adi2_RR->SetName("S_ADI2_RR");
1059 Double_t x_adi2RR[6] = {1.5, -0.5, -9.3, -9.3, -7.8, -7.8};
1060 Double_t y_adi2RR[6] = {13.863, 13.863, 24.35, 25.65, 25.65, 25.078};
1061
1062 adi2_RR->DefinePolygon(6, x_adi2RR, y_adi2RR);
1063 adi2_RR->DefineSection(0, -0.75, 0, 0, 1);
1064 adi2_RR->DefineSection(1, 0.7755, 0, 0, 1);
1065
1066 // 4)modi to quit ---> trap
1067 TGeoRotation* rot_RR_Z310 = new TGeoRotation("rot_RR_Z310", -50, 0, 0);
1068 rot_RR_Z310->RegisterYourself();
1069 TGeoCombiTrans* combi_RR_trap =
1070 new TGeoCombiTrans(-5, 18.633, -1.5 - 0.025, rot_RR_Z310);
1071 combi_RR_trap->SetName("combi_RR_trap");
1072 combi_RR_trap->RegisterYourself();
1073
1074 // 5) modi to quit inferior part box
1075 TGeoCombiTrans* combi_RR_qbox =
1076 new TGeoCombiTrans(-7, 23., -1.5 - 0.025, rot_RR_Z310);
1077 combi_RR_qbox->SetName("combi_RR_qbox");
1078 combi_RR_qbox->RegisterYourself();
1079
1080 // 6) modi. add penta face z
1081 TGeoXtru* pentfa_RR = new TGeoXtru(2);
1082 pentfa_RR->SetName("S_PENTFA_RR");
1083 Double_t x_pentfaRR[5] = {1., 1., -0.13, -1., -1.};
1084 Double_t y_pentfaRR[5] = {1.125, 0.045, -1.125, -1.125, 1.125};
1085
1086 pentfa_RR->DefinePolygon(5, x_pentfaRR, y_pentfaRR);
1087 pentfa_RR->DefineSection(0, -5.05, 0, 0, 1);
1088 pentfa_RR->DefineSection(1, 5.055, 0, 0, 1);
1089
1090 TGeoCombiTrans* combi_RR_pent =
1091 new TGeoCombiTrans(-8.3, 30.705, 1.125 - 0.025, rot_X90);
1092 combi_RR_pent->SetName("combi_RR_pent");
1093 combi_RR_pent->RegisterYourself();
1094
1095 // shape for rail R
1096 new TGeoBBox("RR_1box", x_RR_1box / 2, y_RR_1box / 2, z_RR_1box / 2);
1097
1098 // composite shape for rail R
1099 new TGeoCompositeShape(
1100 "RR_Shape_0",
1101 "RR_1box:tr_RR_1box + part_RR1 + part_RR2 - qdi_box:combi_qdi + "
1102 "S_ADI1_RR + S_ADI2_RR - TRAP1:combi_RR_trap - "
1103 "S_RL_QINF_BOX:combi_RR_qbox +S_PENTFA_RR:combi_RR_pent ");
1104
1105 // JOIN only for show L and R parts
1106 auto* rail_L_R_Shape = new TGeoCompositeShape(
1107 "RAIL_L_R_Shape", " RL_Shape_0:combi_rail_L + RR_Shape_0:combi_rail_R");
1108
1109 TGeoVolume* rail_L_R_vol0 =
1110 new TGeoVolume("RAIL_L_R_VOL0", rail_L_R_Shape, malu5083);
1111
1112 TGeoRotation* rot_rLR = new TGeoRotation("rot_rLR", 180, 180, 0);
1113 rot_rLR->RegisterYourself();
1114 TGeoCombiTrans* combi_rLR = new TGeoCombiTrans(0, -6.9, -0.5, rot_rLR);
1115 combi_rLR->SetName("combi_rLR");
1116 combi_rLR->RegisterYourself();
1117
1118 rail_L_R->AddNode(rail_L_R_vol0, 2, combi_rLR);
1119
1120 // piece 8th support rail MB \_
1121
1122 auto* sup_rail_MBL = new TGeoVolumeAssembly("sup_rail_MBL");
1123
1125
1126 TGeoXtru* sup_MB_L = new TGeoXtru(2);
1127 sup_MB_L->SetName("sup_MB_L");
1128
1129 // vertices a,b,c,d,e,f,g,h new...
1130 Double_t x_sMB_L[11] = {0., 0., 8.12, 24.55, 24.55, 28.25,
1131 28.25, 34.55, 34.55, 31.737, 6.287};
1132 Double_t y_sMB_L[11] = {0., 1.8, 1.8, 9.934, 12.6, 12.6,
1133 13.4, 13.4, 12.6, 12.6, 0.};
1134
1135 sup_MB_L->DefinePolygon(11, x_sMB_L, y_sMB_L);
1136 sup_MB_L->DefineSection(0, -0.4, 0, 0, 1);
1137 sup_MB_L->DefineSection(1, 0.4, 0, 0, 1);
1138
1139 TGeoXtru* part_MBL_0 = new TGeoXtru(2);
1140 part_MBL_0->SetName("part_MBL_0");
1141
1142 Double_t x[8] = {0., 0, 6.1, 31.55, 34.55, 34.55, 31.946, 6.496};
1143 Double_t y[8] = {-0.4, 0.4, 0.4, 13.0, 13.0, 12.2, 12.2, -0.4};
1144
1145 part_MBL_0->DefinePolygon(8, x, y);
1146 part_MBL_0->DefineSection(0, -0.4, 0, 0, 1);
1147 part_MBL_0->DefineSection(1, 0.4, 0, 0, 1);
1148
1149 TGeoRotation* rot1_MBL_0 = new TGeoRotation("rot1_MBL_0", -90, -90, 90);
1150 rot1_MBL_0->RegisterYourself();
1151
1152 // quit box in diag
1153 Double_t x_mb_box = 0.8;
1154 Double_t y_mb_box = 0.8;
1155 Double_t z_mb_box = 0.81;
1156 TGeoTranslation* tr_mb_box = new TGeoTranslation("tr_mb_box", 24.05, 9.55, 0);
1157 tr_mb_box->RegisterYourself();
1158
1159 // lateral hole-box
1160 Double_t x_lat_box = 0.7;
1161 Double_t y_lat_box = 1.8;
1162 Double_t z_lat_box = 0.2;
1163 TGeoTranslation* tr_lat1L_box =
1164 new TGeoTranslation("tr_lat1L_box", 4.6, 0, 0.4);
1165 tr_lat1L_box->RegisterYourself();
1166 TGeoTranslation* tr_lat2L_box =
1167 new TGeoTranslation("tr_lat2L_box", 9.6, 1.65, 0.4);
1168 tr_lat2L_box->RegisterYourself();
1169
1170 TGeoTranslation* tr_lat3L_box =
1171 new TGeoTranslation("tr_lat3L_box", 17.35, 5.923, 0.4);
1172 tr_lat3L_box->RegisterYourself();
1173 TGeoTranslation* tr_lat4L_box =
1174 new TGeoTranslation("tr_lat4L_box", 26.45, 10, 0.4);
1175 tr_lat4L_box->RegisterYourself();
1176 TGeoTranslation* tr_lat5L_box =
1177 new TGeoTranslation("tr_lat5L_box", 29.9, 11.6, 0.4);
1178 tr_lat5L_box->RegisterYourself();
1179
1180 TGeoTranslation* tr_lat1R_box =
1181 new TGeoTranslation("tr_lat1R_box", 4.6, 0, -0.4);
1182 tr_lat1R_box->RegisterYourself();
1183 TGeoTranslation* tr_lat2R_box =
1184 new TGeoTranslation("tr_lat2R_box", 9.6, 1.65, -0.4);
1185 tr_lat2R_box->RegisterYourself();
1186
1187 TGeoTranslation* tr_lat3R_box =
1188 new TGeoTranslation("tr_lat3R_box", 17.35, 5.923, -0.4);
1189 tr_lat3R_box->RegisterYourself();
1190 TGeoTranslation* tr_lat4R_box =
1191 new TGeoTranslation("tr_lat4R_box", 26.45, 10, -0.4);
1192 tr_lat4R_box->RegisterYourself();
1193 TGeoTranslation* tr_lat5R_box =
1194 new TGeoTranslation("tr_lat5R_box", 29.9, 11.6, -0.4);
1195 tr_lat5R_box->RegisterYourself();
1196
1197 // circular hole_1mbl. diameter=3.5 H9
1198 Double_t radin_1mb = 0.;
1199 Double_t radout_1mb = 0.175;
1200 Double_t high_1mb = 2.825;
1201 TGeoTranslation* tr1_mb = new TGeoTranslation("tr1_mb", 18.48, 6.1, 0.);
1202 tr1_mb->RegisterYourself();
1203
1204 TGeoTranslation* tr2_mb = new TGeoTranslation("tr2_mb", 24.15, 8.9, 0.);
1205 tr2_mb->RegisterYourself();
1206
1207 // circular hole_2mbl inclined and hole-up.diameter=M3 (3 mm)) prof , tar:8mm
1208 Double_t radin_2mb = 0.;
1209 Double_t radout_2mb = 0.15;
1210 Double_t high_2mb = 0.82;
1211
1212 TGeoRotation* rot_hole2_MBL = new TGeoRotation("rot_hole2_MBL", 0, 90, 0);
1213 rot_hole2_MBL->RegisterYourself();
1214
1215 TGeoTranslation* tr_mbl = new TGeoTranslation("tr_mbl", -7.5, 0., 0.);
1216 tr_mbl->RegisterYourself();
1217
1218 TGeoTranslation* tr_mbr = new TGeoTranslation("tr_mbr", 7.5, 0, 0);
1219 tr_mbr->RegisterYourself();
1220
1221 // hole up || hup
1222 TGeoCombiTrans* combi_hup_mb = new TGeoCombiTrans(32.5, 12.6, 0, rot_90x);
1223 combi_hup_mb->SetName("combi_hup_mb");
1224 combi_hup_mb->RegisterYourself();
1225
1226 // shape for rail MB
1227 new TGeoBBox("mb_box", x_mb_box / 2, y_mb_box / 2, z_mb_box / 2);
1228 new TGeoTube("hole_1mbl", radin_1mb, radout_1mb, high_1mb / 2);
1229 new TGeoTube("hole_2mbl", radin_2mb, radout_2mb, high_2mb / 2);
1230 new TGeoBBox("lat_box", x_lat_box / 2, y_lat_box / 2, z_lat_box / 2);
1231
1232 // composite shape for rail_MB R + L
1233 auto* MB_Shape_0 = new TGeoCompositeShape(
1234 "MB_Shape_0", " sup_MB_L - hole_2mbl:combi_hup_mb ");
1235 auto* MB_Shape_0L = new TGeoCompositeShape(
1236 "MB_Shape_0L", "MB_Shape_0 - lat_box:tr_lat3L_box ");
1237 auto* MB_Shape_0R = new TGeoCompositeShape(
1238 "MB_Shape_0R", "MB_Shape_0 - lat_box:tr_lat3R_box ");
1239
1240 new TGeoCompositeShape("MB_Shape_1L", "MB_Shape_0L:rot1_MBL_0 - hole_2mbl");
1241 // left and right
1242 new TGeoCompositeShape("MB_Shape_1R", "MB_Shape_0R:rot1_MBL_0 - hole_2mbl");
1243
1244 auto* MB_Shape_2 = new TGeoCompositeShape(
1245 "MB_Shape_2", " MB_Shape_1L:tr_mbl + MB_Shape_1R:tr_mbr ");
1246
1247 TGeoVolume* sup_rail_MBL_vol =
1248 new TGeoVolume("SUPPORT_MBL_VOL", MB_Shape_2, malu5083);
1249
1250 sup_rail_MBL->AddNode(sup_rail_MBL_vol, 1, rot_halfR);
1251
1252 auto* stair = new TGeoVolumeAssembly("stair");
1253
1254 stair->AddNode(sup_rail_MBL, 1,
1255 new TGeoTranslation(0, 0 - 28.8 - 0.4, 0 + 0.675));
1256 stair->AddNode(Cross_mft, 1, new TGeoTranslation(0, -28.8, 4.55 + 0.675));
1257 stair->AddNode(Cross_mft_2, 2,
1258 new TGeoTranslation(0, 1.65 - 28.8, 9.55 + 0.675));
1259 stair->AddNode(Cross_mb0, 4,
1260 new TGeoTranslation(0, 5.423 - 28.8, 17.35 + 0.675));
1261 stair->AddNode(Cross_mft_3, 5,
1262 new TGeoTranslation(0, 11.7 - 28.8, 25.55 + 0.675));
1263 stair->AddNode(Cross_mft_4, 6,
1264 new TGeoTranslation(0, 12.5 - 28.8, 29.05 + 0.675));
1265
1266 Double_t t_final_x;
1267 Double_t t_final_y;
1268 Double_t t_final_z;
1269
1270 Double_t r_final_x;
1271 Double_t r_final_y;
1272 Double_t r_final_z;
1273
1274 Double_t tyMB0;
1275 Double_t tyMB0_3;
1276 Double_t tzMB0;
1277
1278 if (half == 0) {
1279 t_final_x = 0;
1280 t_final_y = 0.0;
1281 t_final_z = -80 - 0.675 - 0.15;
1282
1283 r_final_x = 0;
1284 r_final_y = 0;
1285 r_final_z = 0;
1286
1287 tyMB0 = -16.72;
1288 tyMB0_3 = -18.0;
1289 tzMB0 = -(45.3 + 46.7) / 2;
1290 }
1291
1292 if (half == 1) {
1293 t_final_x = 0;
1294 t_final_y = 0.0;
1295 t_final_z = -80 - 0.675 - 0.15;
1296
1297 r_final_x = 0;
1298 r_final_y = 0;
1299 r_final_z = 180;
1300
1301 tyMB0 = 16.72;
1302 tyMB0_3 = 18.0;
1303 tzMB0 = -(45.3 + 46.7) / 2;
1304 }
1305
1306 auto* t_final =
1307 new TGeoTranslation("t_final", t_final_x, t_final_y, t_final_z);
1308 auto* r_final = new TGeoRotation("r_final", r_final_x, r_final_y, r_final_z);
1309 auto* c_final = new TGeoCombiTrans(*t_final, *r_final);
1310
1311 // 9th new 2020 ELEMENT middle framework back -----------------------------
1312 auto* frame_back = new TGeoVolumeAssembly("frame_back");
1313
1314 // rectangular box1 to quit
1315 Double_t x_box_fwb = 15.8;
1316 Double_t y_box_fwb = 5;
1317 Double_t z_box_fwb = 1;
1318
1319 // rectangular box2 to add
1320 Double_t x_box2_fwb = 1.9;
1321 Double_t y_box2_fwb = 0.5;
1322 Double_t z_box2_fwb = 0.6;
1323
1325 Double_t radin_fwb = 25.75;
1326 Double_t radout_fwb = 26.75;
1327 Double_t high_fwb = 0.6;
1328
1329 // seg tub_back
1330 Double_t radin_stub = 23.6;
1331 Double_t radout_stub = 24.4;
1332 Double_t high_stub = 0.6;
1333 Double_t ang_in_stub = 288.9;
1334 Double_t ang_fin_stub = 342.;
1335
1336 TGeoRotation* rot_1hole_fwb = new TGeoRotation("rot_1hole_fwb", 0, 90, 0);
1337 rot_1hole_fwb->RegisterYourself();
1338
1339 TGeoCombiTrans* acombi_fwb = new TGeoCombiTrans(5.2, 0, 0, rot_1hole_fwb);
1340 acombi_fwb->SetName("acombi_1h_fwb");
1341 acombi_fwb->RegisterYourself();
1342
1343 TGeoTranslation* tr_box_y24 = new TGeoTranslation("tr_box_y24", 0, -24., 0.);
1344 tr_box_y24->RegisterYourself();
1345
1346 TGeoTranslation* tr_box2_fwb =
1347 new TGeoTranslation("tr_box2_fwb", 24.4 - 1.9 / 2, -7.121 - 0.5 / 2, 0.);
1348 tr_box2_fwb->RegisterYourself();
1349
1350 TGeoRotation* rot_Z180_X180 = new TGeoRotation("rot_Z180_X180", 180, 180, 0);
1351 rot_Z180_X180->RegisterYourself();
1352
1353 TGeoTranslation* tr_fb =
1354 new TGeoTranslation("tr_fb", 0, -2.3 - 0.06, 13.85 + 0.675);
1355 tr_fb->RegisterYourself();
1356
1357 auto* q_box_fwb =
1358 new TGeoBBox("q_box_fwb", x_box_fwb / 2, y_box_fwb / 2, z_box_fwb / 2);
1359 auto* box2_fwb =
1360 new TGeoBBox("box2_fwb", x_box2_fwb / 2, y_box2_fwb / 2, z_box2_fwb / 2);
1361 auto* s_tub_fwb =
1362 new TGeoTube("s_tub_fwb", radin_fwb, radout_fwb, high_fwb / 2);
1363
1364 auto* s_stub_fwb = new TGeoTubeSeg("s_stub_fwb", radin_stub, radout_stub,
1365 high_stub / 2, ang_in_stub, ang_fin_stub);
1366
1368
1369 auto* fwb_Shape_0 = new TGeoCompositeShape(
1370 "fwb_Shape_0",
1371 " s_stub_fwb - q_box_fwb:tr_box_y24 + box2_fwb:tr_box2_fwb ");
1372 auto* fwb_Shape_1 = new TGeoCompositeShape(
1373 "fwb_Shape_1", "fwb_Shape_0 + fwb_Shape_0:rot_Z180_X180");
1374
1375 auto* fwb_Volume = new TGeoVolume("fwb_Volume", fwb_Shape_1, malu5083);
1376 frame_back->AddNode(fwb_Volume, 1, tr_fb);
1377
1379 auto* colonne_mb = new TGeoVolumeAssembly("colonne_mb");
1380
1381 // rectangular box
1382 Double_t x_box_cmb = 1.9;
1383 Double_t y_box_cmb = 0.6;
1384 Double_t z_box_cmb = 2.2033;
1385
1387 Double_t radin_c_mb = 0.;
1388 Double_t radout_c_mb = 0.3;
1389 Double_t high_c_mb = 2.2033;
1390
1391 TGeoRotation* rot_1c_mb0 = new TGeoRotation("rot_1c_mb0", 0, 90, 0);
1392 rot_1c_mb0->RegisterYourself();
1393
1394 TGeoCombiTrans* acombi_1c_mb0 = new TGeoCombiTrans(0.95, 0, 0, rot_1c_mb0);
1395 acombi_1c_mb0->SetName("acombi_1c_mb0");
1396 acombi_1c_mb0->RegisterYourself();
1397 TGeoCombiTrans* bcombi_1c_mb0 = new TGeoCombiTrans(-0.95, 0, 0, rot_1c_mb0);
1398 bcombi_1c_mb0->SetName("bcombi_1c_mb0");
1399 bcombi_1c_mb0->RegisterYourself();
1400
1401 // box to cut
1402 Double_t x_boxq_cmb = 3.;
1403 Double_t y_boxq_cmb = 1.05;
1404 Double_t z_boxq_cmb = 4.;
1405
1406 TGeoRotation* rot_X19 = new TGeoRotation("rot_X19", 0, -19, 0);
1407 rot_X19->RegisterYourself();
1408 TGeoCombiTrans* combi_qbox =
1409 new TGeoCombiTrans(0, +2.1 / 2 + 0.5, 0, rot_X19);
1410 combi_qbox->SetName("combi_qbox");
1411 combi_qbox->RegisterYourself();
1412
1413 // shapes
1414 auto* box_cmb =
1415 new TGeoBBox("box_cmb", x_box_cmb / 2, y_box_cmb / 2, z_box_cmb / 2);
1416 auto* tub_cmb =
1417 new TGeoTube("tub_cmb", radin_c_mb, radout_c_mb, high_c_mb / 2);
1418 auto* boxq_cmb =
1419 new TGeoBBox("boxq_cmb", x_boxq_cmb / 2, y_boxq_cmb / 2, z_boxq_cmb / 2);
1420
1422 auto* c_mb_Shape_0 =
1423 new TGeoCompositeShape(
1424 "box_cmb:rot_1c_mb0 + tub_cmb:acombi_1c_mb0 + "
1425 "tub_cmb:bcombi_1c_mb0 - boxq_cmb:combi_qbox");
1426
1427 TGeoTranslation* tr_cmb = new TGeoTranslation(
1428 "tr_cmb", 0, 5.923 - 28.8 + 2.2033 / 2 - 0.2, 17.35 + 0.675);
1429 tr_cmb->RegisterYourself();
1431
1432 auto* colonne_mb_Volume =
1433 new TGeoVolume("colonne_mb_Volume", c_mb_Shape_0, malu5083);
1434 colonne_mb->AddNode(colonne_mb_Volume, 1, tr_cmb);
1435
1436 auto* Half_3 = new TGeoVolumeAssembly("Half_3");
1437
1438 // Shell radii
1439 Float_t Shell_rmax = 60.6 + .7;
1440 Float_t Shell_rmin = 37.5 + .7;
1441
1442 // Rotations and translations
1443 auto* tShell_0 =
1444 new TGeoTranslation("tShell_0", 0., 0., 3.1 + (25.15 + 1.) / 2.);
1445 auto* tShell_1 =
1446 new TGeoTranslation("tShell_1", 0., 0., -1.6 - (25.15 + 1.) / 2.);
1447 auto* tShellHole =
1448 new TGeoTranslation("tShellHole", 0., 0., 2. / 2. + (25.15 + 1.) / 2.);
1449 auto* tShellHole_0 =
1450 new TGeoTranslation("tShellHole_0", 0., -6.9, -26.1 / 2. - 6.2 / 2. - .1);
1451 auto* tShellHole_1 =
1452 new TGeoTranslation("tShellHole_1", 0., 0., -26.1 / 2. - 6.2 / 2. - .1);
1453 auto* tShell_Cut = new TGeoTranslation("tShell_Cut", 0., 25. / 2., 0.);
1454 auto* tShell_Cut_1 = new TGeoTranslation("tShell_Cut_1", -23., 0., -8.);
1455 auto* tShell_Cut_1_inv =
1456 new TGeoTranslation("tShell_Cut_1_inv", 23., 0., -8.);
1457 auto* Rz = new TGeoRotation("Rz", 50., 0., 0.);
1458 auto* Rz_inv = new TGeoRotation("Rz_inv", -50., 0., 0.);
1459 auto* RShell_Cut = new TGeoRotation("RShell_Cut", 90., 90. - 24., -7.5);
1460 auto* RShell_Cut_inv =
1461 new TGeoRotation("RShell_Cut_inv", 90., 90. + 24., -7.5);
1462
1463 auto* cShell_Cut = new TGeoCombiTrans(*tShell_Cut_1, *RShell_Cut);
1464 auto* cShell_Cut_inv = new TGeoCombiTrans(*tShell_Cut_1_inv, *RShell_Cut_inv);
1465
1466 tShell_0->RegisterYourself();
1467 tShell_1->RegisterYourself();
1468 tShellHole->RegisterYourself();
1469 tShellHole_0->RegisterYourself();
1470 tShellHole_1->RegisterYourself();
1471 tShell_Cut->RegisterYourself();
1472 Rz->RegisterYourself();
1473 Rz_inv->RegisterYourself();
1474 RShell_Cut->RegisterYourself();
1475 cShell_Cut->SetName("cShell_Cut");
1476 cShell_Cut->RegisterYourself();
1477 cShell_Cut_inv->SetName("cShell_Cut_inv");
1478 cShell_Cut_inv->RegisterYourself();
1479
1480 // Basic shapes for Half_3
1481 TGeoShape* Shell_0 = new TGeoTubeSeg("Shell_0", Shell_rmax / 2. - .1,
1482 Shell_rmax / 2., 6.2 / 2., 12., 168.);
1483 TGeoShape* Shell_1 = new TGeoTubeSeg("Shell_1", Shell_rmin / 2. - .1,
1484 Shell_rmin / 2., 3.2 / 2., 0., 180.);
1485 new TGeoConeSeg("Shell_2", (25.15 + 1.0) / 2., Shell_rmin / 2. - .1,
1486 Shell_rmin / 2., Shell_rmax / 2. - .1, Shell_rmax / 2., 0.,
1487 180.);
1488 TGeoShape* Shell_3 =
1489 new TGeoTube("Shell_3", 0., Shell_rmin / 2. + .1, .1 / 2.);
1490 TGeoShape* ShellHole_0 = new TGeoTrd1("ShellHole_0", 17.5 / 4., 42.5 / 4.,
1491 80. / 2., (25.15 + 1.) / 2.);
1492 TGeoShape* ShellHole_1 =
1493 new TGeoBBox("ShellHole_1", 42.5 / 4., 80. / 2., 2. / 2. + 0.00001);
1494 TGeoShape* ShellHole_2 = new TGeoBBox(
1495 "ShellHole_2", 58.9 / 4., (Shell_rmin - 2.25) / 2., .4 / 2. + 0.00001);
1496 TGeoShape* ShellHole_3 = new TGeoBBox(
1497 "ShellHole_3", 80. / 4., (Shell_rmin - 11.6) / 2., .4 / 2. + 0.00001);
1498
1499 // For the extra cut, not sure if this is the shape (apprx. distances)
1500 TGeoShape* Shell_Cut_0 = new TGeoTube("Shell_Cut_0", 0., 3.5, 5. / 2.);
1501 TGeoShape* Shell_Cut_1 =
1502 new TGeoBBox("Shell_Cut_1", 7. / 2., 25. / 2., 5. / 2.);
1503
1504 // Composite shapes for Half_3
1505 auto* Half_3_Shape_0 = new TGeoCompositeShape(
1506 "Half_3_Shape_0", "Shell_Cut_0+Shell_Cut_1:tShell_Cut");
1507 new TGeoCompositeShape(
1508 "Half_3_Shape_1",
1509 "Shell_2 - Half_3_Shape_0:cShell_Cut - Half_3_Shape_0:cShell_Cut_inv");
1510 auto* Half_3_Shape_2 = new TGeoCompositeShape(
1511 "Half_3_Shape_2", "ShellHole_0+ShellHole_1:tShellHole");
1512 new TGeoCompositeShape("Half_3_Shape_3",
1513 "Shell_3:tShellHole_1 -(ShellHole_2:tShellHole_1 + "
1514 "ShellHole_3:tShellHole_0)");
1515 auto* Half_3_Shape_4 = new TGeoCompositeShape(
1516 "Half_3_Shape_4",
1517 "(Shell_0:tShell_0 + Half_3_Shape_1+ Shell_1:tShell_1) - (Half_3_Shape_2 "
1518 "+ "
1519 "Half_3_Shape_2:Rz + Half_3_Shape_2:Rz_inv)+Half_3_Shape_3");
1520
1521 auto* Half_3_Volume =
1522 new TGeoVolume("Half_3_Volume", Half_3_Shape_4, malu5083);
1523
1524 TGeoRotation* rot_z180 = new TGeoRotation("rot_z180", 0, 180, 0);
1525 rot_z180->RegisterYourself();
1526
1527 TGeoCombiTrans* combi_coat = new TGeoCombiTrans(0, 0, 19.5 - 0.45, rot_z180);
1528 combi_coat->SetName("combi_coat");
1529 combi_coat->RegisterYourself();
1530
1531 Half_3->AddNode(Half_3_Volume, 1, combi_coat);
1532
1533 HalfConeVolume->AddNode(stair, 1, c_final);
1534 HalfConeVolume->AddNode(base, 2, c_final);
1535 HalfConeVolume->AddNode(rail_L_R, 3, c_final); // R&L
1536 HalfConeVolume->AddNode(Fra_front, 4, c_final);
1537 HalfConeVolume->AddNode(middle, 5, c_final);
1538 HalfConeVolume->AddNode(frame_back, 6, c_final);
1539 HalfConeVolume->AddNode(colonne_mb, 7, c_final);
1540
1541 // ======================== Mother Boards and Services =======================
1542 Int_t signe;
1543 if (half == 0) {
1544 signe = -1;
1545 }
1546 if (half == 1) {
1547 signe = +1;
1548 }
1549 auto& mftBaseParam = MFTBaseParam::Instance();
1550 if (mftBaseParam.buildServices) {
1551 makeMotherBoards(HalfConeVolume, half, signe, tyMB0, tyMB0_3, tzMB0);
1552 makeAirVentilation(HalfConeVolume, half, signe);
1553 makeFlexCables(HalfConeVolume, half, signe);
1554 makePowerCables(HalfConeVolume, half, signe);
1555 if (!mftBaseParam.minimal && mftBaseParam.buildCone && mftBaseParam.buildReadoutCables) {
1556 makeReadoutCables(HalfConeVolume, half, signe);
1557 }
1558 }
1559 // ===========================================================================
1560
1561 return HalfConeVolume;
1562}
1563
1564void HalfCone::makeAirVentilation(TGeoVolumeAssembly* HalfConeVolume, Int_t half, Int_t signe)
1565{
1566 TGeoMedium* mVentilation = gGeoManager->GetMedium("MFT_Polypropylene$");
1567 // Bottom
1568 TGeoSubtraction* vent_subB1;
1569 Float_t lB1 = 5.5; // half length
1570 Float_t xB1 = 0.3;
1571 Float_t yB1 = 0.4;
1572 auto* ventB1 = new TGeoBBox(Form("ventB1_H%d", half), xB1, yB1, lB1);
1573 auto* ventB1_int =
1574 new TGeoBBox(Form("ventB1_int_H%d", half), 0.2, 0.3, lB1 + 0.0001);
1575 vent_subB1 = new TGeoSubtraction(ventB1, ventB1_int, nullptr, nullptr);
1576 TGeoCompositeShape* vent_finalB1 =
1577 new TGeoCompositeShape(Form("vent_finalB1_H%d", half), vent_subB1);
1578 auto* vent_B1 =
1579 new TGeoVolume(Form("ventB1_H%d", half), vent_finalB1, mVentilation);
1580 vent_B1->SetLineColor(kGray);
1581 auto* t_airB1 = new TGeoTranslation("t_airB1", signe * (15.3 - xB1),
1582 -8.75 - yB1 - 0.1, -45.570 - lB1);
1583 t_airB1->RegisterYourself();
1584 auto* r_airB1 = new TGeoRotation("r_airB1", 0.0, 0.0, 0.0);
1585 r_airB1->RegisterYourself();
1586 auto* p_airB1 = new TGeoCombiTrans(*t_airB1, *r_airB1);
1587 p_airB1->RegisterYourself();
1588 HalfConeVolume->AddNode(vent_B1, 1, p_airB1);
1589
1590 TGeoSubtraction* vent_subB2;
1591 Float_t lB2 = 10.6; // half length
1592 auto* ventB2 = new TGeoBBox(Form("ventB2_H%d", half), yB1, xB1, lB2);
1593 auto* ventB2_int =
1594 new TGeoBBox(Form("ventB2_int_H%d", half), 0.3, 0.2, lB2 + 0.0001);
1595 vent_subB2 = new TGeoSubtraction(ventB2, ventB2_int, nullptr, nullptr);
1596 TGeoCompositeShape* vent_finalB2 =
1597 new TGeoCompositeShape(Form("vent_finalB2_H%d", half), vent_subB2);
1598 auto* vent_B2 =
1599 new TGeoVolume(Form("ventB2_H%d", half), vent_finalB2, mVentilation);
1600 vent_B2->SetLineColor(kGray);
1601 Float_t theta = -signe * 32.;
1602 Float_t phi = signe * 23.;
1603 Float_t thetaRad = theta * TMath::Pi() / 180.;
1604 Float_t phiRad = phi * TMath::Pi() / 180.;
1605 auto* r_airB2 = new TGeoRotation("r_airB2", 90.0 - phi, theta, 0.);
1606 r_airB2->RegisterYourself();
1607 Float_t XairB2 =
1608 signe *
1609 (15.3 + lB2 * TMath::Sin(TMath::Abs(thetaRad) * TMath::Cos(phiRad)));
1610 Float_t YairB2 =
1611 -8.75 - 2 * yB1 + TMath::Sin(phiRad) * TMath::Sin(thetaRad) * lB2 + 0.2;
1612 Float_t ZairB2 = -45.570 - 2 * lB1 - TMath::Cos(thetaRad) * lB2 - 0.2;
1613 auto* t_airB2 = new TGeoTranslation("t_airB2", XairB2, YairB2, ZairB2);
1614 t_airB2->RegisterYourself();
1615 auto* p_airB2 = new TGeoCombiTrans(*t_airB2, *r_airB2);
1616 p_airB2->RegisterYourself();
1617 HalfConeVolume->AddNode(vent_B2, 1, p_airB2);
1618
1619 TGeoSubtraction* vent_subB3;
1620 Float_t lB3 = 4.8; // half length
1621 auto* ventB3 = new TGeoBBox(Form("ventB3_H%d", half), yB1, xB1, lB3);
1622 auto* ventB3_int =
1623 new TGeoBBox(Form("ventB3_int_H%d", half), 0.3, 0.2, lB3 + 0.0001);
1624 vent_subB3 = new TGeoSubtraction(ventB3, ventB3_int, nullptr, nullptr);
1625 TGeoCompositeShape* vent_finalB3 =
1626 new TGeoCompositeShape(Form("vent_finalB3_H%d", half), vent_subB3);
1627 auto* vent_B3 =
1628 new TGeoVolume(Form("ventB3_H%d", half), vent_finalB3, mVentilation);
1629 vent_B3->SetLineColor(kGray);
1630 auto* r_airB3 = new TGeoRotation("r_airB3", 90.0 - phi, theta, 0.);
1631 r_airB3->RegisterYourself();
1632 Float_t XairB3 =
1633 signe *
1634 (15.3 +
1635 (2 * lB2 - lB3) * TMath::Sin(TMath::Abs(thetaRad) * TMath::Cos(phiRad)) -
1636 xB1);
1637 Float_t YairB3 = -8.75 - 2 * yB1 +
1638 TMath::Sin(phiRad) * TMath::Sin(thetaRad) * (2 * lB2 - lB3) +
1639 0.2 - 1.9 * yB1;
1640 Float_t ZairB3 =
1641 -45.570 - 2 * lB1 - TMath::Cos(thetaRad) * (2 * lB2 - lB3) - 0.2;
1642
1643 auto* t_airB3 = new TGeoTranslation("t_airB3", XairB3, YairB3, ZairB3);
1644
1645 t_airB3->RegisterYourself();
1646 auto* p_airB3 = new TGeoCombiTrans(*t_airB3, *r_airB3);
1647 p_airB3->RegisterYourself();
1648 HalfConeVolume->AddNode(vent_B3, 1, p_airB3);
1649
1650 TGeoSubtraction* vent_subB4;
1651 Float_t lB4 = 4.5; // half length
1652 Float_t xB4 = 0.3;
1653 Float_t yB4 = 0.8;
1654 auto* ventB4 = new TGeoBBox(Form("ventB4_H%d", half), yB4, xB4, lB4);
1655 auto* ventB4_int =
1656 new TGeoBBox(Form("ventB4_int_H%d", half), 0.7, 0.2, lB4 + 0.0001);
1657 vent_subB4 = new TGeoSubtraction(ventB4, ventB4_int, nullptr, nullptr);
1658 TGeoCompositeShape* vent_finalB4 =
1659 new TGeoCompositeShape(Form("vent_finalB4_H%d", half), vent_subB4);
1660 auto* vent_B4 =
1661 new TGeoVolume(Form("ventB3_H%d", half), vent_finalB4, mVentilation);
1662 vent_B4->SetLineColor(kGray);
1663 auto* r_airB4 =
1664 new TGeoRotation("r_airB4", 90.0 - signe * 25., -signe * 5, 0.);
1665 r_airB4->RegisterYourself();
1666 auto* t_airB4 = new TGeoTranslation(
1667 "t_airB4",
1668 XairB2 +
1669 signe * (lB2 * TMath::Sin(TMath::Abs(thetaRad) * TMath::Cos(phiRad)) +
1670 0.4),
1671 YairB2 + TMath::Sin(phiRad) * TMath::Sin(thetaRad) * lB2 - 0.6,
1672 ZairB3 - TMath::Cos(thetaRad) * lB2 * 0.965);
1673 t_airB4->RegisterYourself();
1674 auto* p_airB4 = new TGeoCombiTrans(*t_airB4, *r_airB4);
1675 p_airB4->RegisterYourself();
1676 HalfConeVolume->AddNode(vent_B4, 1, p_airB4);
1677
1678 // Top
1679 TGeoSubtraction* vent_subT1;
1680 auto* ventT1 = new TGeoBBox(Form("ventT1_H%d", half), xB1, yB1, lB1);
1681 auto* ventT1_int =
1682 new TGeoBBox(Form("ventT1_int_H%d", half), 0.2, 0.3, lB1 + 0.0001);
1683 vent_subT1 = new TGeoSubtraction(ventB1, ventB1_int, nullptr, nullptr);
1684 TGeoCompositeShape* vent_finalT1 =
1685 new TGeoCompositeShape(Form("vent_finalT1_H%d", half), vent_subT1);
1686 auto* vent_T1 =
1687 new TGeoVolume(Form("ventT1_H%d", half), vent_finalT1, mVentilation);
1688 vent_T1->SetLineColor(kGray);
1689 auto* t_airT1 = new TGeoTranslation("t_airT1", signe * (15.3 - xB1),
1690 -(-8.75 - yB1 - 0.1), -45.570 - lB1);
1691 t_airB1->RegisterYourself();
1692 auto* r_airT1 = new TGeoRotation("r_airT1", 0.0, 0.0, 0.0);
1693 r_airT1->RegisterYourself();
1694 auto* p_airT1 = new TGeoCombiTrans(*t_airT1, *r_airT1);
1695 p_airT1->RegisterYourself();
1696 HalfConeVolume->AddNode(vent_T1, 1, p_airT1);
1697
1698 TGeoSubtraction* vent_subT2;
1699 auto* ventT2 = new TGeoBBox(Form("ventT2_H%d", half), yB1, xB1, lB2);
1700 auto* ventT2_int =
1701 new TGeoBBox(Form("ventT2_int_H%d", half), 0.3, 0.2, lB2 + 0.0001);
1702 vent_subT2 = new TGeoSubtraction(ventT2, ventT2_int, nullptr, nullptr);
1703 TGeoCompositeShape* vent_finalT2 =
1704 new TGeoCompositeShape(Form("vent_finalT2_H%d", half), vent_subT2);
1705 auto* vent_T2 =
1706 new TGeoVolume(Form("ventT2_H%d", half), vent_finalT2, mVentilation);
1707 vent_T2->SetLineColor(kGray);
1708 theta = -signe * 32.;
1709 phi = signe * 23.;
1710 thetaRad = theta * TMath::Pi() / 180.;
1711 phiRad = phi * TMath::Pi() / 180.;
1712 auto* r_airT2 = new TGeoRotation("r_airT2", 90.0 - phi, -theta, 0.);
1713 r_airT2->RegisterYourself();
1714 auto* t_airT2 = new TGeoTranslation("t_airT2", -XairB2, -YairB2, ZairB2);
1715 t_airT2->RegisterYourself();
1716 auto* p_airT2 = new TGeoCombiTrans(*t_airT2, *r_airT2);
1717 p_airT2->RegisterYourself();
1718 HalfConeVolume->AddNode(vent_T2, 1, p_airT2);
1719
1720 TGeoSubtraction* vent_subT3;
1721 auto* ventT3 = new TGeoBBox(Form("ventT3_H%d", half), yB1, xB1, lB3);
1722 auto* ventT3_int =
1723 new TGeoBBox(Form("ventT3_int_H%d", half), 0.3, 0.2, lB3 + 0.0001);
1724 vent_subT3 = new TGeoSubtraction(ventT3, ventT3_int, nullptr, nullptr);
1725 TGeoCompositeShape* vent_finalT3 =
1726 new TGeoCompositeShape(Form("vent_finalT3_H%d", half), vent_subT3);
1727 auto* vent_T3 =
1728 new TGeoVolume(Form("ventT3_H%d", half), vent_finalT3, mVentilation);
1729 vent_T3->SetLineColor(kGray);
1730 auto* r_airT3 = new TGeoRotation("r_airT3", 90.0 - phi, -theta, 0.);
1731 r_airT3->RegisterYourself();
1732 auto* t_airT3 = new TGeoTranslation("t_airT3", -XairB3, -YairB3, ZairB3);
1733 t_airT3->RegisterYourself();
1734 auto* p_airT3 = new TGeoCombiTrans(*t_airT3, *r_airT3);
1735 p_airT3->RegisterYourself();
1736 HalfConeVolume->AddNode(vent_T3, 1, p_airT3);
1737
1738 TGeoSubtraction* vent_subT4;
1739 auto* ventT4 = new TGeoBBox(Form("ventT4_H%d", half), yB4, xB4, lB4);
1740 auto* ventT4_int =
1741 new TGeoBBox(Form("ventT4_int_H%d", half), 0.7, 0.2, lB4 + 0.0001);
1742 vent_subT4 = new TGeoSubtraction(ventT4, ventT4_int, nullptr, nullptr);
1743 TGeoCompositeShape* vent_finalT4 =
1744 new TGeoCompositeShape(Form("vent_finalT4_H%d", half), vent_subT4);
1745 auto* vent_T4 =
1746 new TGeoVolume(Form("ventT4_H%d", half), vent_finalT4, mVentilation);
1747 vent_T4->SetLineColor(kGray);
1748 auto* r_airT4 =
1749 new TGeoRotation("r_airT4", 90.0 - signe * 25., signe * 5, 0.);
1750 r_airT4->RegisterYourself();
1751 auto* t_airT4 = new TGeoTranslation(
1752 "t_airT4",
1753 -(XairB2 +
1754 signe * (lB2 * TMath::Sin(TMath::Abs(thetaRad) * TMath::Cos(phiRad)) +
1755 0.4)),
1756 -(YairB2 + TMath::Sin(phiRad) * TMath::Sin(thetaRad) * lB2 - 0.6),
1757 ZairB3 - TMath::Cos(thetaRad) * lB2 * 0.965);
1758 t_airT4->RegisterYourself();
1759 auto* p_airT4 = new TGeoCombiTrans(*t_airT4, *r_airT4);
1760 p_airT4->RegisterYourself();
1761 HalfConeVolume->AddNode(vent_T4, 1, p_airT4);
1762}
1763
1764void HalfCone::makeMotherBoards(TGeoVolumeAssembly* HalfConeVolume, Int_t half, Int_t signe, Double_t tyMB0, Double_t tyMB0_3, Double_t tzMB0)
1765{
1766 // ============= MotherBoard 0 and 1
1767 Double_t mMB0cu[3];
1768 Double_t mMB0fr4;
1769 Double_t mMB0pol;
1770 Double_t mMB0epo;
1771 // Sizes
1772 mMB0cu[0] = {14.00}; // 13.65 old
1773 mMB0cu[1] = {0.00615}; // 122.5 microns * taux d'occupation 50% = 61.5 microns
1774 mMB0cu[2] = {2.45}; // 2.39 old
1775 mMB0fr4 = 0.1; // 1 m
1776 mMB0pol = 0.0150; // 150 microns
1777 mMB0epo = 0.0225; // 225 microns
1778
1779 // Materials
1780 auto* mCu = gGeoManager->GetMedium("MFT_Cu$");
1781 auto* mFR4 = gGeoManager->GetMedium("MFT_FR4$");
1782 auto* mPol = gGeoManager->GetMedium("MFT_Polyimide$");
1783 auto* mEpo = gGeoManager->GetMedium("MFT_Epoxy$");
1784 auto* mInox = gGeoManager->GetMedium("MFT_Inox$");
1785 auto* mPolyu = gGeoManager->GetMedium("MFT_Polyurethane$");
1786
1787 // Mother boards connected to the first three disk
1788 auto* MotherBoard0 = new TGeoVolumeAssembly(Form("MotherBoard0_H%d", half));
1789 // 4 layers
1790 TGeoVolume* vMB0cu = gGeoManager->MakeBox("vMB0cu", mCu, mMB0cu[0] / 2, mMB0cu[1] / 2, mMB0cu[2] / 2);
1791 TGeoVolume* vMB0fr4 = gGeoManager->MakeBox("vMB0fr4", mFR4, mMB0cu[0] / 2, mMB0fr4 / 2, mMB0cu[2] / 2);
1792 TGeoVolume* vMB0pol = gGeoManager->MakeBox("vMB0pol", mPol, mMB0cu[0] / 2, mMB0pol / 2, mMB0cu[2] / 2);
1793 TGeoVolume* vMB0epo = gGeoManager->MakeBox("vMB0epo", mEpo, mMB0cu[0] / 2, mMB0epo / 2, mMB0cu[2] / 2);
1794
1795 // Screws = Head + Thread
1796 TGeoVolume* vMB0screwH = gGeoManager->MakeTube("vMB0screwH", mInox, 0.0, 0.7 / 2, 0.35 / 2); // tete
1797 TGeoVolume* vMB0screwT = gGeoManager->MakeTube("vMB0screwT", mInox, 0.0, 0.4 / 2, 0.95 / 2); // filetage
1798 // Insert Sertitec
1799 TGeoVolume* vMB0serti = gGeoManager->MakeTube("vMB0serti", mInox, 0.16 / 2, 0.556 / 2, 0.15 / 2); // tete
1800
1801 Float_t heigthConnector = 0.4; // male + female
1802 TGeoVolume* vConnector = gGeoManager->MakeBox("vConnector", mPolyu, 6.2 / 2, heigthConnector / 2, 1.4 / 2); // in liquid-crystal polymer --> polyurethane?
1803 vMB0cu->SetLineColor(kGreen);
1804 vMB0fr4->SetLineColor(kBlack);
1805 vMB0pol->SetLineColor(kBlue);
1806 vMB0epo->SetLineColor(kGreen);
1807 vMB0screwH->SetLineColor(kOrange);
1808 vMB0screwT->SetLineColor(kOrange);
1809 vMB0serti->SetLineColor(kOrange);
1810 vConnector->SetLineColor(kGray + 3);
1811
1812 // Positioning the layers
1813 MotherBoard0->AddNode(vMB0cu, 1);
1814
1815 auto* t_MB0fr4 = new TGeoTranslation("translation_fr4", 0.0, signe * (mMB0fr4 + mMB0cu[1]) / 2, 0.0);
1816 t_MB0fr4->RegisterYourself();
1817 MotherBoard0->AddNode(vMB0fr4, 1, t_MB0fr4);
1818 auto* t_MB0pol =
1819 new TGeoTranslation("translation_pol", 0.0, signe * (mMB0fr4 + (mMB0cu[1] + mMB0pol) / 2), 0.0);
1820 t_MB0pol->RegisterYourself();
1821 MotherBoard0->AddNode(vMB0pol, 1, t_MB0pol);
1822 auto* t_MB0epo = new TGeoTranslation("translation_epo", 0.0, signe * (mMB0fr4 + mMB0pol + (mMB0cu[1] + mMB0epo) / 2), 0.0);
1823 t_MB0epo->RegisterYourself();
1824 MotherBoard0->AddNode(vMB0epo, 1, t_MB0epo);
1825 auto* r_MB0screw = new TGeoRotation("rotation_vMB0screw", 0, 90, 0);
1826 auto* t_MB0screwH1 = new TGeoCombiTrans(mMB0cu[0] / 2 - 1.65, signe * (mMB0fr4 + mMB0pol + mMB0epo + (mMB0cu[1] + 0.35) / 2), 0.0, r_MB0screw);
1827 t_MB0screwH1->RegisterYourself();
1828 auto* t_MB0screwT1 = new TGeoCombiTrans(mMB0cu[0] / 2 - 1.65, -signe * (mMB0cu[1] + 0.95) / 2, 0.0, r_MB0screw);
1829 t_MB0screwT1->RegisterYourself();
1830 auto* t_MB0screwH2 = new TGeoCombiTrans(-(mMB0cu[0] / 2 - 1.65), signe * (mMB0fr4 + mMB0pol + mMB0epo + (mMB0cu[1] + 0.35) / 2), 0.0, r_MB0screw);
1831 t_MB0screwH2->RegisterYourself();
1832 auto* t_MB0screwT2 = new TGeoCombiTrans(-(mMB0cu[0] / 2 - 1.65), -signe * (mMB0cu[1] + 0.95) / 2, 0.0, r_MB0screw);
1833 t_MB0screwT2->RegisterYourself();
1834 auto* t_MB0serti1 = new TGeoCombiTrans(mMB0cu[0] / 2 - 2.65, signe * (mMB0fr4 + mMB0pol + mMB0epo + (mMB0cu[1] + 0.153) / 2), 0.0, r_MB0screw);
1835 t_MB0serti1->RegisterYourself();
1836 auto* t_MB0serti2 = new TGeoCombiTrans(-(mMB0cu[0] / 2 - 2.65), signe * (mMB0fr4 + mMB0pol + mMB0epo + (mMB0cu[1] + 0.153) / 2), 0.0, r_MB0screw);
1837 t_MB0serti2->RegisterYourself();
1838 auto* t_MB0Connector = new TGeoTranslation("translation_connector", 0.0, signe * (-mMB0cu[1] - 0.2), 0.0);
1839 t_MB0Connector->RegisterYourself();
1840
1841 MotherBoard0->AddNode(vMB0screwH, 1, t_MB0screwH1);
1842 MotherBoard0->AddNode(vMB0screwT, 1, t_MB0screwT1);
1843 MotherBoard0->AddNode(vMB0screwH, 1, t_MB0screwH2);
1844 MotherBoard0->AddNode(vMB0screwT, 1, t_MB0screwT2);
1845 MotherBoard0->AddNode(vMB0serti, 1, t_MB0serti1);
1846 MotherBoard0->AddNode(vMB0serti, 1, t_MB0serti2);
1847 MotherBoard0->AddNode(vConnector, 1, t_MB0Connector);
1848
1849 // Positioning the boards on the disks
1850 Float_t shift = 0.23;
1851 Float_t shift3 = 0.09;
1852 auto* t_disk0 = new TGeoTranslation("translation_disk0", 0.0, tyMB0 - signe * shift, tzMB0);
1853 t_disk0->RegisterYourself();
1854 auto* t_disk1 = new TGeoTranslation("translation_disk1", 0.0, tyMB0 - signe * shift, tzMB0 - 3.3);
1855 t_disk1->RegisterYourself();
1856 auto* t_disk2 = new TGeoTranslation("translation_disk2", 0.0, tyMB0_3 - signe * shift3, tzMB0 - 7.1);
1857 t_disk2->RegisterYourself();
1858 auto* r_MB0 = new TGeoRotation("rotation_MB0", 0.0, 0.0, 0.0);
1859 r_MB0->RegisterYourself();
1860 auto* p_disk0 = new TGeoCombiTrans(*t_disk0, *r_MB0);
1861 p_disk0->RegisterYourself();
1862 auto* p_disk1 = new TGeoCombiTrans(*t_disk1, *r_MB0);
1863 p_disk1->RegisterYourself();
1864 auto* p_disk2 = new TGeoCombiTrans(*t_disk2, *r_MB0);
1865 p_disk2->RegisterYourself();
1866 // Final addition of the boards
1867 HalfConeVolume->AddNode(MotherBoard0, 1, p_disk0);
1868 HalfConeVolume->AddNode(MotherBoard0, 1, p_disk1);
1869 HalfConeVolume->AddNode(MotherBoard0, 1, p_disk2);
1870
1871 // Small boards on to the main mother board
1872 auto* MotherBoard0_1 = new TGeoVolumeAssembly(Form("MotherBoard0_1_H%d", half));
1873 // 4 layers
1874 TGeoVolume* vMB0cu_1 =
1875 gGeoManager->MakeBox("vMB0cu_1", mCu, 18.0 / 2, mMB0cu[1] / 2, 1.2 / 2);
1876 TGeoVolume* vMB0fr4_1 =
1877 gGeoManager->MakeBox("vMB0fr4_1", mFR4, 18.0 / 2, mMB0fr4 / 2, 1.2 / 2);
1878 TGeoVolume* vMB0pol_1 =
1879 gGeoManager->MakeBox("vMB0pol_1", mPol, 18.0 / 2, mMB0pol / 2, 1.2 / 2);
1880 TGeoVolume* vMB0epo_1 =
1881 gGeoManager->MakeBox("vMB0epo_1", mEpo, 18.0 / 2, mMB0epo / 2, 1.2 / 2);
1882 vMB0cu_1->SetLineColor(kGreen);
1883 vMB0fr4_1->SetLineColor(kBlack);
1884 vMB0pol_1->SetLineColor(kBlue);
1885 vMB0epo_1->SetLineColor(kGreen);
1886 MotherBoard0_1->AddNode(vMB0cu_1, 1);
1887 MotherBoard0_1->AddNode(vMB0fr4_1, 1, t_MB0fr4);
1888 MotherBoard0_1->AddNode(vMB0pol_1, 1, t_MB0pol);
1889 MotherBoard0_1->AddNode(vMB0epo_1, 1, t_MB0epo);
1890
1891 // ================ Main Mother Board
1892 Double_t mMB2cu[4];
1893 Double_t mMB2fr4;
1894 Double_t mMB2pol;
1895 Double_t mMB2epo;
1896 // Sizes
1897 mMB2cu[0] = {24.0};
1898 mMB2cu[1] = {21.0};
1899 mMB2cu[2] = {0.0079}; // 315 microns * taux d'occupation 25% = 79 microns
1900 mMB2cu[3] = {8.5};
1901 mMB2fr4 = 0.2; // 2 mm
1902 mMB2pol = 0.0175; // 175 microns
1903 mMB2epo = 0.0075; // 75 microns
1904 auto* MotherBoard2 = new TGeoVolumeAssembly(Form("MotherBoard2_H%d", half));
1905 // 4 layers
1906 TGeoVolume* vMB2cu =
1907 gGeoManager->MakeTrd1("vMB2cu", mCu, mMB2cu[0] / 2, mMB2cu[1] / 2,
1908 mMB2cu[2] / 2, mMB2cu[3] / 2);
1909 TGeoVolume* vMB2fr4 =
1910 gGeoManager->MakeTrd1("vMB2fr4", mFR4, mMB2cu[0] / 2, mMB2cu[1] / 2,
1911 mMB2fr4 / 2, mMB2cu[3] / 2);
1912 TGeoVolume* vMB2pol =
1913 gGeoManager->MakeTrd1("vMB2pol", mPol, mMB2cu[0] / 2, mMB2cu[1] / 2,
1914 mMB2pol / 2, mMB2cu[3] / 2);
1915 TGeoVolume* vMB2epo =
1916 gGeoManager->MakeTrd1("vMB2epo", mEpo, mMB2cu[0] / 2, mMB2cu[1] / 2,
1917 mMB2epo / 2, mMB2cu[3] / 2);
1918 vMB2cu->SetLineColor(kGreen);
1919 vMB2fr4->SetLineColor(kBlack);
1920 vMB2pol->SetLineColor(kBlue);
1921 vMB2epo->SetLineColor(kGreen + 2);
1922 auto* t_MB2fr4 = new TGeoTranslation("translation_fr4", 0.0,
1923 signe * (mMB2fr4 + mMB2cu[2]) / 2, 0.0);
1924 t_MB2fr4->RegisterYourself();
1925 auto* t_MB2pol =
1926 new TGeoTranslation("translation_pol", 0.0,
1927 signe * (mMB2fr4 + (mMB2cu[2] + mMB2pol) / 2), 0.0);
1928 t_MB2pol->RegisterYourself();
1929 auto* t_MB2epo = new TGeoTranslation(
1930 "translation_epo", 0.0,
1931 signe * (mMB2fr4 + mMB2pol + (mMB2cu[2] + mMB2epo) / 2), 0.0);
1932 t_MB2epo->RegisterYourself();
1933 MotherBoard2->AddNode(vMB2cu, 1);
1934 MotherBoard2->AddNode(vMB2fr4, 1, t_MB2fr4);
1935 MotherBoard2->AddNode(vMB2pol, 1, t_MB2pol);
1936 MotherBoard2->AddNode(vMB2epo, 1, t_MB2epo);
1937
1938 for (Float_t i = -1; i < 3; i++) {
1939 auto* t_MB2serti1 = new TGeoTranslation(
1940 "translationMB2serti1", 8.5, -signe * (mMB2cu[2] + 0.153) / 2, 1.3 * i);
1941 t_MB2serti1->RegisterYourself();
1942 auto* t_MB2serti2 =
1943 new TGeoTranslation("translationMB2serti2", -8.5,
1944 -signe * (mMB2cu[2] + 0.153) / 2, 1.3 * i);
1945 t_MB2serti2->RegisterYourself();
1946 auto* p_MB2serti1 = new TGeoCombiTrans(*t_MB2serti1, *r_MB0screw);
1947 p_MB2serti1->RegisterYourself();
1948 auto* p_MB2serti2 = new TGeoCombiTrans(*t_MB2serti2, *r_MB0screw);
1949 p_MB2serti2->RegisterYourself();
1950 MotherBoard2->AddNode(vMB0serti, 1, p_MB2serti1);
1951 MotherBoard2->AddNode(vMB0serti, 1, p_MB2serti2);
1952 }
1953
1954 for (Float_t i = -2; i < 1; i++) {
1955 auto* t_MB2serti3 = new TGeoTranslation(
1956 "translationMB2serti3", 0.7, -signe * (mMB2cu[2] + 0.153) / 2, 1.3 * i);
1957 t_MB2serti3->RegisterYourself();
1958 auto* t_MB2serti4 =
1959 new TGeoTranslation("translationMB2serti4", -0.7,
1960 -signe * (mMB2cu[2] + 0.153) / 2, 1.3 * i);
1961 t_MB2serti4->RegisterYourself();
1962 auto* p_MB2serti3 = new TGeoCombiTrans(*t_MB2serti3, *r_MB0screw);
1963 p_MB2serti3->RegisterYourself();
1964 auto* p_MB2serti4 = new TGeoCombiTrans(*t_MB2serti4, *r_MB0screw);
1965 p_MB2serti4->RegisterYourself();
1966 MotherBoard2->AddNode(vMB0serti, 1, p_MB2serti3);
1967 MotherBoard2->AddNode(vMB0serti, 1, p_MB2serti4);
1968 }
1969
1970 for (Float_t i = -2; i < 2; i++) {
1971 auto* t_MB2serti5 =
1972 new TGeoTranslation("translationMB2serti5", 7.0 * i + 3.5,
1973 -signe * (mMB2cu[2] + 0.153) / 2, -2.5);
1974 t_MB2serti5->RegisterYourself();
1975 auto* p_MB2serti5 = new TGeoCombiTrans(*t_MB2serti5, *r_MB0screw);
1976 p_MB2serti5->RegisterYourself();
1977 auto* t_MB2serti6 =
1978 new TGeoTranslation("translationMB2serti6", 7.0 * i + 3.5,
1979 -signe * (mMB2cu[2] + 0.153) / 2, -3.5);
1980 t_MB2serti6->RegisterYourself();
1981 auto* p_MB2serti6 = new TGeoCombiTrans(*t_MB2serti6, *r_MB0screw);
1982 p_MB2serti6->RegisterYourself();
1983 MotherBoard2->AddNode(vMB0serti, 1, p_MB2serti5);
1984 MotherBoard2->AddNode(vMB0serti, 1, p_MB2serti6);
1985 }
1986 // Two boards (from the two first disks) located on the main mother board
1987 auto* t_MotherBoard0_1 =
1988 new TGeoTranslation("translation_MB0_1", 0.0, -signe * (-heigthConnector - mMB2cu[2] - mMB2fr4 - mMB2pol - mMB2epo), 3.5);
1989 t_MotherBoard0_1->RegisterYourself();
1990 auto* t_MotherBoard0_2 =
1991 new TGeoTranslation("translation_MB0_2", 0.0, -signe * (-heigthConnector - mMB2cu[2] - mMB2fr4 - mMB2pol - mMB2epo), 1.5);
1992
1993 t_MotherBoard0_2->RegisterYourself();
1994 MotherBoard2->AddNode(MotherBoard0_1, 1, t_MotherBoard0_1);
1995 MotherBoard2->AddNode(MotherBoard0_1, 2, t_MotherBoard0_2);
1996
1997 TGeoVolume* vConnector2 = gGeoManager->MakeBox("vConnector2", mPolyu, 12.00 / 2, heigthConnector / 2, 0.7 / 2);
1998 TGeoVolume* vConnector2p = gGeoManager->MakeBox("vConnector2p", mPolyu, 6.00 / 2, heigthConnector / 2, 0.7 / 2);
1999 // === Readout cables connectors ===
2000
2001 TGeoVolume* vConnectorRC = gGeoManager->MakeBox("vConnectorRC-MB2", mPolyu, 6.00 / 2, heigthConnector / 2, 1.4 / 2);
2002 // ==================================
2003 Double_t yMB2Connector = signe * (mMB2cu[2] / 2 + mMB2fr4 + mMB2pol + mMB2epo + heigthConnector / 2);
2004 auto* t_MB2Connector1 = new TGeoTranslation("translation_connector1", 0.0, yMB2Connector, 1.5);
2005 t_MB2Connector1->RegisterYourself();
2006 auto* t_MB2Connector2 = new TGeoTranslation("translation_connector2", 0.0, yMB2Connector, 3.5);
2007 t_MB2Connector2->RegisterYourself();
2008 auto* t_MB2ConnectorRC_1 = new TGeoTranslation("translation_connectorRC_1", 3.5, yMB2Connector, -0.5);
2009 t_MB2ConnectorRC_1->RegisterYourself();
2010 auto* t_MB2ConnectorRC_2 = new TGeoTranslation("translation_connectorRC_2", -3.5, yMB2Connector, -0.5);
2011 t_MB2ConnectorRC_1->RegisterYourself();
2012 auto* t_MB2ConnectorRC_3 = new TGeoTranslation("translation_connectorRC_3", 7.0, yMB2Connector, -3.5);
2013 t_MB2ConnectorRC_2->RegisterYourself();
2014 auto* t_MB2ConnectorRC_4 = new TGeoTranslation("translation_connectorRC_4", -7.0, yMB2Connector, -3.5);
2015 t_MB2ConnectorRC_2->RegisterYourself();
2016
2017 yMB2Connector = signe * (-mMB2cu[2] / 2 - heigthConnector / 2);
2018 auto* t_MB2ConnectorRCp_1 = new TGeoTranslation("translation_connectorRCp_1", 4.0, yMB2Connector, 0.5);
2019 t_MB2ConnectorRCp_1->RegisterYourself();
2020 auto* t_MB2ConnectorRCp_2 = new TGeoTranslation("translation_connectorRCp_2", -4.0, yMB2Connector, 0.5);
2021 t_MB2ConnectorRCp_2->RegisterYourself();
2022 auto* t_MB2ConnectorRCp_3 = new TGeoTranslation("translation_connectorRCp_3", 7.0, yMB2Connector, -3.5);
2023 t_MB2ConnectorRCp_3->RegisterYourself();
2024 auto* t_MB2ConnectorRCp_4 = new TGeoTranslation("translation_connectorRCp_4", -7.0, yMB2Connector, -3.5);
2025 t_MB2ConnectorRCp_4->RegisterYourself();
2026
2027 vConnector2->SetLineColor(kGray + 3);
2028 vConnectorRC->SetLineColor(kGray + 3);
2029 MotherBoard2->AddNode(vConnector2, 1, t_MB2Connector1);
2030 MotherBoard2->AddNode(vConnector2, 1, t_MB2Connector2);
2031 MotherBoard2->AddNode(vConnectorRC, 1, t_MB2ConnectorRC_1);
2032 MotherBoard2->AddNode(vConnectorRC, 1, t_MB2ConnectorRC_2);
2033 MotherBoard2->AddNode(vConnectorRC, 1, t_MB2ConnectorRC_3);
2034 MotherBoard2->AddNode(vConnectorRC, 1, t_MB2ConnectorRC_4);
2035 MotherBoard2->AddNode(vConnectorRC, 1, t_MB2ConnectorRCp_1);
2036 MotherBoard2->AddNode(vConnectorRC, 1, t_MB2ConnectorRCp_2);
2037 MotherBoard2->AddNode(vConnectorRC, 1, t_MB2ConnectorRCp_3);
2038 MotherBoard2->AddNode(vConnectorRC, 1, t_MB2ConnectorRCp_4);
2039
2040 // Positioning the main mother board
2041 auto* t_MotherBoard2 = new TGeoTranslation(
2042 "translation_MB2", 0.0,
2043 -signe * (-20.52 + mMB2fr4 + mMB2pol + mMB2epo + 2.2 * TMath::Sin(19.0)),
2044 -62.8 + 2.2 * TMath::Cos(19.0));
2045 t_MotherBoard2->RegisterYourself();
2046 auto* r_MotherBoard2 =
2047 new TGeoRotation("rotation_MB2", 0.0, -signe * (-19.0), 0.0);
2048 r_MotherBoard2->RegisterYourself();
2049 auto* p_MB2 = new TGeoCombiTrans(*t_MotherBoard2, *r_MotherBoard2);
2050 p_MB2->RegisterYourself();
2051 HalfConeVolume->AddNode(MotherBoard2, 1, p_MB2);
2052}
2053
2054void HalfCone::makeFlexCables(TGeoVolumeAssembly* HalfConeVolume, Int_t half, Int_t signe)
2055{
2056 auto* mCu = gGeoManager->GetMedium("MFT_Cu$");
2057 // Flat cables between disk 0 and main board
2058 Float_t width_flat = 1.0; // 4 flexs, fully arbitrary!
2059 Float_t thickness_flat = 0.0041; // 10 microns lines (228 lines, 0.0175x0.1 mm2) + 31 microns ground plane (~width 70 mm, thickness 0.0175mm)
2060 Double_t theta1 = -22.70 + signe * 16.5;
2061 Double_t theta2 = 22.60 + signe * 16.5;
2062 TGeoVolume* vFlat0_1 = gGeoManager->MakeTubs("vFlat0_1", mCu, 15.0, 15.0 + thickness_flat, width_flat / 2., theta1, theta2);
2063 TGeoVolume* vFlat0_2 = gGeoManager->MakeTubs("vFlat0_2", mCu, 15.0, 15.0 + thickness_flat, width_flat / 2., theta1, theta2);
2064 TGeoVolume* vFlat0_3 = gGeoManager->MakeTubs("vFlat0_3", mCu, 15.0, 15.0 + thickness_flat, width_flat / 2., theta1, theta2);
2065 TGeoVolume* vFlat0_4 = gGeoManager->MakeTubs("vFlat0_4", mCu, 15.0, 15.0 + thickness_flat, width_flat / 2., theta1, theta2);
2066 auto* t_flat0_1 = new TGeoTranslation("translation_flat0_1", 4.5, signe * 5.0, -56.73);
2067 t_flat0_1->RegisterYourself();
2068 auto* t_flat0_2 = new TGeoTranslation("translation_flat0_2", 1.5, signe * 5.0, -56.73);
2069 t_flat0_2->RegisterYourself();
2070 auto* t_flat0_3 = new TGeoTranslation("translation_flat0_3", -1.5, signe * 5.0, -56.73);
2071 t_flat0_3->RegisterYourself();
2072 auto* t_flat0_4 = new TGeoTranslation("translation_flat0_4", -4.5, signe * 5.0, -56.73);
2073 t_flat0_4->RegisterYourself();
2074 auto* r_flat0 = new TGeoRotation("rotation_flat0", signe * 90.0, signe * 90.0, 0.0);
2075 r_flat0->RegisterYourself();
2076 auto* p_flat0_1 = new TGeoCombiTrans(*t_flat0_1, *r_flat0);
2077 p_flat0_1->RegisterYourself();
2078 auto* p_flat0_2 = new TGeoCombiTrans(*t_flat0_2, *r_flat0);
2079 p_flat0_2->RegisterYourself();
2080 auto* p_flat0_3 = new TGeoCombiTrans(*t_flat0_3, *r_flat0);
2081 p_flat0_3->RegisterYourself();
2082 auto* p_flat0_4 = new TGeoCombiTrans(*t_flat0_4, *r_flat0);
2083 p_flat0_4->RegisterYourself();
2084 HalfConeVolume->AddNode(vFlat0_1, 1, p_flat0_1);
2085 HalfConeVolume->AddNode(vFlat0_2, 1, p_flat0_2);
2086 HalfConeVolume->AddNode(vFlat0_3, 1, p_flat0_3);
2087 HalfConeVolume->AddNode(vFlat0_4, 1, p_flat0_4);
2088
2089 // Flat lines between disk 1 and main board
2090 theta1 = -32.0 + signe * 24.69;
2091 theta2 = 32.7 + signe * 24.69;
2092 TGeoVolume* vFlat1_1 = gGeoManager->MakeTubs("vFlat1_1", mCu, 6.0, 6.00 + thickness_flat, width_flat / 2., theta1, theta2);
2093 TGeoVolume* vFlat1_2 = gGeoManager->MakeTubs("vFlat1_2", mCu, 6.0, 6.00 + thickness_flat, width_flat / 2., theta1, theta2);
2094 TGeoVolume* vFlat1_3 = gGeoManager->MakeTubs("vFlat1_3", mCu, 6.0, 6.00 + thickness_flat, width_flat / 2., theta1, theta2);
2095 TGeoVolume* vFlat1_4 = gGeoManager->MakeTubs("vFlat1_4", mCu, 6.0, 6.00 + thickness_flat, width_flat / 2., theta1, theta2);
2096 auto* t_flat1_1 = new TGeoTranslation("translation_flat1_1", 3., signe * 13.4, -55.6);
2097 t_flat1_1->RegisterYourself();
2098 auto* t_flat1_2 = new TGeoTranslation("translation_flat1_2", 1., signe * 13.4, -55.6);
2099 t_flat1_2->RegisterYourself();
2100 auto* t_flat1_3 = new TGeoTranslation("translation_flat1_3", -1., signe * 13.4, -55.6);
2101 t_flat1_3->RegisterYourself();
2102 auto* t_flat1_4 = new TGeoTranslation("translation_flat1_4", -3., signe * 13.4, -55.6);
2103 t_flat1_4->RegisterYourself();
2104 auto* r_flat1 = new TGeoRotation("rotation_flat1", signe * 90.0, signe * 90.0, 0.0);
2105 r_flat1->RegisterYourself();
2106 auto* p_flat1_1 = new TGeoCombiTrans(*t_flat1_1, *r_flat1);
2107 p_flat1_1->RegisterYourself();
2108 auto* p_flat1_2 = new TGeoCombiTrans(*t_flat1_2, *r_flat1);
2109 p_flat1_2->RegisterYourself();
2110 auto* p_flat1_3 = new TGeoCombiTrans(*t_flat1_3, *r_flat1);
2111 p_flat1_3->RegisterYourself();
2112 auto* p_flat1_4 = new TGeoCombiTrans(*t_flat1_4, *r_flat1);
2113 p_flat1_4->RegisterYourself();
2114 HalfConeVolume->AddNode(vFlat1_1, 1, p_flat1_1);
2115 HalfConeVolume->AddNode(vFlat1_2, 1, p_flat1_2);
2116 HalfConeVolume->AddNode(vFlat1_3, 1, p_flat1_3);
2117 HalfConeVolume->AddNode(vFlat1_4, 1, p_flat1_4);
2118
2119 // Flat lines between disk 2 and main board
2120 width_flat = 14.0;
2121 thickness_flat = 0.017; // 3 microns lines (268 lines, 0.0175x0.09 mm2), 14 microns ground plane (140 mm x 0.0175mm) including flex ~20% longer in o2!
2122 TGeoVolume* vFlat2 = gGeoManager->MakeBox("vFlat2", mCu, width_flat / 2, thickness_flat / 2, 2.3 / 2);
2123 auto* t_flat2 = new TGeoTranslation("translation_flat2", 0.0, -signe * 18.35, -55.45);
2124 t_flat2->RegisterYourself();
2125 auto* r_flat2 = new TGeoRotation("rotation_flat2", 0.0, -signe * (18.), 0.0);
2126 r_flat2->RegisterYourself();
2127 auto* p_flat2 = new TGeoCombiTrans(*t_flat2, *r_flat2);
2128 p_flat2->RegisterYourself();
2129 HalfConeVolume->AddNode(vFlat2, 1, p_flat2);
2130}
2131
2132void HalfCone::makeReadoutCables(TGeoVolumeAssembly* HalfConeVolume, Int_t half, Int_t signe)
2133{
2134 auto* mCu = gGeoManager->GetMedium("MFT_Cu$");
2135
2136 // Connector
2137 Float_t heigthConnector = 0.4; // male + female
2138 auto* mPolyu = gGeoManager->GetMedium("MFT_Polyurethane$");
2139 TGeoVolume* vConnectorRC = gGeoManager->MakeBox("vConnectorRC", mPolyu, 6.00 / 2, heigthConnector / 2, 1.4 / 2);
2140 vConnectorRC->SetLineColor(kGray + 3);
2141
2142 // Fondamental numbers for the sections of Copper in the 2 types of readout cables
2143 Double_t section_ROcable_48pairs = 0.26544; // in cm2
2144 Double_t section_ROcable_16pairs = 0.08848; // in cm2
2145
2146 // Starting from the MFT backside: from the patch panel to MB2
2147 Double_t mRO1[3];
2148 mRO1[0] = {14.0}; //width
2149 mRO1[1] = (16 * section_ROcable_48pairs + 6 * section_ROcable_16pairs) / mRO1[0]; // thickness
2150 mRO1[2] = {6.5}; // length
2151 TGeoVolume* vRO1 = gGeoManager->MakeBox("vRO1", mCu, mRO1[0] / 2, mRO1[1] / 2, mRO1[2] / 2);
2152 Double_t zRO1 = -80.20;
2153 auto* t_RO1 = new TGeoTranslation("translation_RO1", 0.0, -signe * 28.0, zRO1);
2154 t_RO1->RegisterYourself();
2155
2156 Double_t mRO2[3];
2157 mRO2[0] = mRO1[0];
2158 mRO2[1] = (14 * section_ROcable_48pairs + 5 * section_ROcable_16pairs) / mRO2[0];
2159 mRO2[2] = {3.0};
2160 TGeoVolume* vRO2 = gGeoManager->MakeBox("vRO2", mCu, mRO2[0] / 2, mRO2[1] / 2, mRO2[2] / 2);
2161 auto* t_RO2 = new TGeoTranslation("translation_RO2", 0.0, -signe * 28.0, zRO1 + mRO1[2] / 2 + mRO2[2] / 2);
2162 t_RO2->RegisterYourself();
2163
2164 Double_t mRO3[3];
2165 mRO3[0] = mRO1[0];
2166 mRO3[1] = (12 * section_ROcable_48pairs + 4 * section_ROcable_16pairs) / mRO3[0];
2167 mRO3[2] = {3.6};
2168 TGeoVolume* vRO3 = gGeoManager->MakeBox("vRO3", mCu, mRO3[0] / 2, mRO3[1] / 2, mRO3[2] / 2);
2169 auto* t_RO3 = new TGeoTranslation("translation_RO3", 0.0, -signe * 28.0, zRO1 + mRO1[2] / 2 + mRO2[2] + mRO3[2] / 2);
2170 t_RO3->RegisterYourself();
2171
2172 Double_t eRO4 = 12 * section_ROcable_48pairs / mRO1[0];
2173 TGeoVolume* vRO4 = gGeoManager->MakeTubs("vRO4", mCu, 6.5, 6.5 + eRO4, mRO1[0] / 2, -21.0 + signe * 26.11, 21.0 + signe * 26.11);
2174 auto* t_RO4 = new TGeoTranslation("translation_RO4", 0.0, signe * 21.4, -70.9);
2175 t_RO4->RegisterYourself();
2176 auto* r_RO4 = new TGeoRotation("rotation_RO4", signe * 90.0, signe * 90.0, 0.0);
2177 r_RO4->RegisterYourself();
2178 auto* p_RO4 = new TGeoCombiTrans(*t_RO4, *r_RO4);
2179 p_RO4->RegisterYourself();
2180 HalfConeVolume->AddNode(vRO4, 1, p_RO4);
2181
2182 // RO5 = cable connected to the upper part of MB2
2183 Double_t mRO5[3];
2184 mRO5[0] = {4.5};
2185 mRO5[1] = section_ROcable_48pairs / mRO5[0];
2186 mRO5[2] = {7.071};
2187 TGeoVolume* vRO5 = gGeoManager->MakeBox("vRO5", mCu, mRO5[0] / 2, mRO5[1] / 2, mRO5[2] / 2);
2188 auto* t_RO5_1 = new TGeoTranslation("translation_RO5_1", 3.5, -signe * (20.83 + mRO5[2] / 2 * TMath::Sin(45.0 * TMath::Pi() / 180)), -61 - mRO5[2] / 2 * TMath::Cos(45 * TMath::Pi() / 180));
2189 t_RO5_1->RegisterYourself();
2190 auto* t_RO5_2 = new TGeoTranslation("translation_RO5_1", -3.5, -signe * (20.83 + mRO5[2] / 2 * TMath::Sin(45.0 * TMath::Pi() / 180)), -61 - mRO5[2] / 2 * TMath::Cos(45 * TMath::Pi() / 180));
2191 t_RO5_2->RegisterYourself();
2192 auto* r_RO5 = new TGeoRotation("rotation_RO5", 0.0, -signe * (45.0), 0.0);
2193 r_RO5->RegisterYourself();
2194 auto* p_RO5_1 = new TGeoCombiTrans(*t_RO5_1, *r_RO5);
2195 p_RO5_1->RegisterYourself();
2196 auto* p_RO5_2 = new TGeoCombiTrans(*t_RO5_2, *r_RO5);
2197 p_RO5_2->RegisterYourself();
2198
2199 // =========== TGeoTrap ---> trapezoid shapes ===============
2200 Float_t length = 2.20 / 2;
2201 Float_t angleZ = 69.;
2202 Float_t angleXY = -signe * 50.;
2203 Float_t width = 3.5;
2204 Float_t thickness = (section_ROcable_48pairs / width) / TMath::Cos(angleXY * TMath::Pi() / 180); // special thickness!!
2205 TGeoVolume* vRO6 = new TGeoVolume("vRO6", new TGeoTrap(length, angleZ, angleXY, width / 2, thickness / 2, thickness / 2, 0., width / 2, thickness / 2, thickness / 2, 0.), mCu);
2206 Double_t yRO6 = -signe * (22.45 + length * 1.26 * TMath::Sin(angleZ * TMath::Pi() / 180));
2207 Double_t zRO6 = -64.1 - length * 2. * TMath::Cos(angleZ * TMath::Pi() / 180);
2208 auto* t_RO6 = new TGeoTranslation("translation_RO6", 5.3, yRO6, zRO6);
2209 t_RO6->RegisterYourself();
2210 auto* r_RO6 = new TGeoRotation("rotation_RO6", signe * 90.0, -signe * (0), 0.0);
2211 r_RO6->RegisterYourself();
2212 auto* p_RO6 = new TGeoCombiTrans(*t_RO6, *r_RO6);
2213 p_RO6->RegisterYourself();
2214
2215 TGeoVolume* vRO7 = new TGeoVolume("vRO7", new TGeoTrap(length, angleZ, -angleXY, width / 2, thickness / 2, thickness / 2, 0., width / 2, thickness / 2, thickness / 2, 0.), mCu);
2216 auto* t_RO7 = new TGeoTranslation("translation_RO6", -5.3, yRO6, zRO6);
2217 t_RO7->RegisterYourself();
2218 auto* r_RO7 = new TGeoRotation("rotation_RO7", signe * 90.0, -signe * (0), 0.0);
2219 r_RO7->RegisterYourself();
2220 auto* p_RO7 = new TGeoCombiTrans(*t_RO7, *r_RO7);
2221 p_RO7->RegisterYourself();
2222
2223 // ============= under the main mother board =============
2224 Double_t mRO8[3];
2225 mRO8[0] = mRO5[0]; // width
2226 mRO8[1] = 2 * section_ROcable_48pairs / mRO8[0]; // thickness, 2 cables coded in one cable
2227 mRO8[2] = {6.40}; // length
2228 TGeoVolume* vRO8 = gGeoManager->MakeBox("vRO8", mCu, mRO8[0] / 2, mRO8[1] / 2, mRO8[2] / 2);
2229 Double_t yRO8 = -signe * (19.1 + mRO8[2] / 2 * TMath::Sin(19.0 * TMath::Pi() / 180));
2230 Double_t zRO8 = -59.95 - mRO8[2] / 2 * TMath::Cos(19.0 * TMath::Pi() / 180);
2231 auto* t_RO8_1 = new TGeoTranslation("translation_RO8_1", 3.5, yRO8, zRO8);
2232 t_RO8_1->RegisterYourself();
2233 auto* t_RO8_2 = new TGeoTranslation("translation_RO8_1", -3.5, yRO8, zRO8);
2234 t_RO8_2->RegisterYourself();
2235 auto* r_RO8 = new TGeoRotation("rotation_RO8", 0.0, -signe * (19.0), 0.0);
2236 r_RO8->RegisterYourself();
2237 auto* p_RO8_1 = new TGeoCombiTrans(*t_RO8_1, *r_RO8);
2238 p_RO8_1->RegisterYourself();
2239 auto* p_RO8_2 = new TGeoCombiTrans(*t_RO8_2, *r_RO8);
2240 p_RO8_2->RegisterYourself();
2241
2242 Double_t mRO9[3];
2243 mRO9[0] = mRO5[0]; // width
2244 mRO9[1] = 2 * section_ROcable_48pairs / mRO9[0]; // thickness, 2 cables coded in one cable
2245 mRO9[2] = {4.5}; // length
2246 TGeoVolume* vRO9 = gGeoManager->MakeBox("vRO9", mCu, mRO9[0] / 2, mRO9[1] / 2, mRO9[2] / 2);
2247 auto* t_RO9_1 = new TGeoTranslation("translation_RO9_1", 3.5, -signe * (23.5), -66.15);
2248 t_RO9_1->RegisterYourself();
2249 auto* t_RO9_2 = new TGeoTranslation("translation_RO9_2", -3.5, -signe * (23.5), -66.15);
2250 t_RO9_2->RegisterYourself();
2251 auto* r_RO9 = new TGeoRotation("rotation_RO9", 0.0, -signe * (90.0), 0.0);
2252 r_RO9->RegisterYourself();
2253 auto* p_RO9_1 = new TGeoCombiTrans(*t_RO9_1, *r_RO9);
2254 p_RO9_1->RegisterYourself();
2255 auto* p_RO9_2 = new TGeoCombiTrans(*t_RO9_2, *r_RO9);
2256 p_RO9_2->RegisterYourself();
2257
2258 // =========== For the 2 latest disks ================
2259 // ============= Disk 3 ============
2260 length = 6.9 / 2;
2261 angleZ = -45.;
2262 angleXY = 0.;
2263 thickness = 3.5; // inversion width/thickness! this is the width
2264 width = section_ROcable_48pairs / thickness; // inversion width/thickness! this is the thickness
2265 // ==== front
2266 TGeoVolume* vRO_D3_1 = new TGeoVolume("vRO_D3_1", new TGeoTrap(length, angleZ + 10., angleXY, width / 2, thickness / 2, thickness / 2, 0., width / 2, thickness / 2, thickness / 2, 0.), mCu);
2267 auto* t_ROD3_1 = new TGeoTranslation("translation_ROD3_1", 4.5, -signe * (20.9 + length * TMath::Cos(angleZ * TMath::Pi() / 180)), -67.4);
2268 t_ROD3_1->RegisterYourself();
2269 auto* r_ROD3_1 = new TGeoRotation("rotation_ROD3_1", signe * 180.0, signe * (90), 0.0);
2270 r_ROD3_1->RegisterYourself();
2271 auto* p_ROD3_1 = new TGeoCombiTrans(*t_ROD3_1, *r_ROD3_1);
2272 p_ROD3_1->RegisterYourself();
2273
2274 TGeoVolume* vRO_D3_2 = new TGeoVolume("vRO_D3_2", new TGeoTrap(length, -angleZ - 10., angleXY, width / 2, thickness / 2, thickness / 2, 0., width / 2, thickness / 2, thickness / 2, 0.), mCu);
2275 auto* t_ROD3_2 = new TGeoTranslation("translation_ROD3_2", -4.5, -signe * (20.9 + length * TMath::Cos(angleZ * TMath::Pi() / 180)), -67.4);
2276 t_ROD3_2->RegisterYourself();
2277 auto* r_ROD3_2 = new TGeoRotation("rotation_ROD3_2", signe * 180.0, signe * (90), 0.0);
2278 r_ROD3_2->RegisterYourself();
2279 auto* p_ROD3_2 = new TGeoCombiTrans(*t_ROD3_2, *r_ROD3_2);
2280 p_ROD3_2->RegisterYourself();
2281
2282 // ===== rear
2283 TGeoVolume* vRO_D3_3 = new TGeoVolume("vRO_D3_3", new TGeoTrap(length + 0.4, angleZ + 10., angleXY, width / 2, thickness / 2, thickness / 2, 0., width / 2, thickness / 2, thickness / 2, 0.), mCu);
2284 auto* t_ROD3_3 = new TGeoTranslation("translation_ROD3_3", 4.5, -signe * (21.3 + length * TMath::Cos(angleZ * TMath::Pi() / 180)), -69.4);
2285 t_ROD3_3->RegisterYourself();
2286 auto* r_ROD3_3 = new TGeoRotation("rotation_ROD3_3", signe * 180.0, signe * (90), 0.0);
2287 r_ROD3_3->RegisterYourself();
2288 auto* p_ROD3_3 = new TGeoCombiTrans(*t_ROD3_3, *r_ROD3_3);
2289 p_ROD3_3->RegisterYourself();
2290
2291 TGeoVolume* vRO_D3_4 = new TGeoVolume("vRO_D3_4", new TGeoTrap(length + 0.4, -angleZ - 10., angleXY, width / 2, thickness / 2, thickness / 2, 0., width / 2, thickness / 2, thickness / 2, 0.), mCu);
2292 auto* t_ROD3_4 = new TGeoTranslation("translation_ROD3_4", -4.5, -signe * (21.3 + length * TMath::Cos(angleZ * TMath::Pi() / 180)), -69.4);
2293 t_ROD3_4->RegisterYourself();
2294 auto* r_ROD3_4 = new TGeoRotation("rotation_ROD3_4", signe * 180.0, signe * (90), 0.0);
2295 r_ROD3_4->RegisterYourself();
2296 auto* p_ROD3_4 = new TGeoCombiTrans(*t_ROD3_4, *r_ROD3_4);
2297 p_ROD3_4->RegisterYourself();
2298
2299 auto* t_ConnectorRC3_1 = new TGeoTranslation("translation_RC3_1", 5.9, -signe * (20.2), -67.87 + heigthConnector / 2);
2300 t_ConnectorRC3_1->RegisterYourself();
2301 auto* r_ConnectorRC3_1 = new TGeoRotation("rotation_RC3_1", 0.0, 90, 0.0);
2302 r_ConnectorRC3_1->RegisterYourself();
2303 auto* p_ConnectorRC3_1 = new TGeoCombiTrans(*t_ConnectorRC3_1, *r_ConnectorRC3_1);
2304 p_ConnectorRC3_1->RegisterYourself();
2305 auto* t_ConnectorRC3_2 = new TGeoTranslation("translation_RC3_2", -5.9, -signe * (20.2), -67.87 + heigthConnector / 2);
2306 t_ConnectorRC3_2->RegisterYourself();
2307 auto* p_ConnectorRC3_2 = new TGeoCombiTrans(*t_ConnectorRC3_2, *r_ConnectorRC3_1);
2308 p_ConnectorRC3_2->RegisterYourself();
2309 auto* t_ConnectorRC3_3 = new TGeoTranslation("translation_RC3_3", 5.9, -signe * (20.2), -68.93 - heigthConnector / 2);
2310 t_ConnectorRC3_3->RegisterYourself();
2311 auto* p_ConnectorRC3_3 = new TGeoCombiTrans(*t_ConnectorRC3_3, *r_ConnectorRC3_1);
2312 p_ConnectorRC3_3->RegisterYourself();
2313 auto* t_ConnectorRC3_4 = new TGeoTranslation("translation_RC3_4", -5.9, -signe * (20.2), -68.93 - heigthConnector / 2);
2314 t_ConnectorRC3_4->RegisterYourself();
2315 auto* p_ConnectorRC3_4 = new TGeoCombiTrans(*t_ConnectorRC3_4, *r_ConnectorRC3_1);
2316 p_ConnectorRC3_4->RegisterYourself();
2317
2318 // ============== Disk 4 ================
2319 length = 6.3 / 2;
2320 angleZ = -20.;
2321 angleXY = 0.;
2322 thickness = 3.5; // inversion width and thickness! this is the width
2323 width = section_ROcable_48pairs / thickness; // inversion width and thickness! this is the thickness
2324 Float_t xD4 = 6.1;
2325 Float_t yD4 = 21.6;
2326 // ===== front
2327 TGeoVolume* vRO_D4_1 = new TGeoVolume("vRO_D4_1", new TGeoTrap(length, angleZ, angleXY, width / 2, thickness / 2, thickness / 2, 0., width / 2, thickness / 2, thickness / 2, 0.), mCu);
2328 auto* t_ROD4_1 = new TGeoTranslation("translation_ROD4_1", xD4, -signe * (yD4 + length * TMath::Cos(angleZ * TMath::Pi() / 180)), -75.8);
2329 t_ROD4_1->RegisterYourself();
2330 auto* r_ROD4_1 = new TGeoRotation("rotation_ROD4_1", signe * 180.0, signe * (90), 0.0);
2331 r_ROD4_1->RegisterYourself();
2332 auto* p_ROD4_1 = new TGeoCombiTrans(*t_ROD4_1, *r_ROD3_1);
2333 p_ROD4_1->RegisterYourself();
2334
2335 TGeoVolume* vRO_D4_2 = new TGeoVolume("vRO_D4_2", new TGeoTrap(length, -angleZ, angleXY, width / 2, thickness / 2, thickness / 2, 0., width / 2, thickness / 2, thickness / 2, 0.), mCu);
2336 auto* t_ROD4_2 = new TGeoTranslation("translation_ROD4_2", -xD4, -signe * (yD4 + length * TMath::Cos(angleZ * TMath::Pi() / 180)), -75.8);
2337 t_ROD4_2->RegisterYourself();
2338 auto* r_ROD4_2 = new TGeoRotation("rotation_ROD4_2", signe * 180.0, signe * (90), 0.0);
2339 r_ROD4_2->RegisterYourself();
2340 auto* p_ROD4_2 = new TGeoCombiTrans(*t_ROD4_2, *r_ROD4_2);
2341 p_ROD4_2->RegisterYourself();
2342
2343 // ===== rear
2344 TGeoVolume* vRO_D4_3 = new TGeoVolume("vRO_D4_3", new TGeoTrap(length, angleZ, angleXY, width / 2, thickness / 2, thickness / 2, 0., width / 2, thickness / 2, thickness / 2, 0.), mCu);
2345 auto* t_ROD4_3 = new TGeoTranslation("translation_ROD4_3", xD4, -signe * (yD4 + length * TMath::Cos(angleZ * TMath::Pi() / 180)), -77.8);
2346 t_ROD4_3->RegisterYourself();
2347 auto* r_ROD4_3 = new TGeoRotation("rotation_ROD4_3", signe * 180.0, signe * (90), 0.0);
2348 r_ROD4_3->RegisterYourself();
2349 auto* p_ROD4_3 = new TGeoCombiTrans(*t_ROD4_3, *r_ROD3_3);
2350 p_ROD4_3->RegisterYourself();
2351
2352 TGeoVolume* vRO_D4_4 = new TGeoVolume("vRO_D4_4", new TGeoTrap(length, -angleZ, angleXY, width / 2, thickness / 2, thickness / 2, 0., width / 2, thickness / 2, thickness / 2, 0.), mCu);
2353 auto* t_ROD4_4 = new TGeoTranslation("translation_ROD4_4", -xD4, -signe * (yD4 + length * TMath::Cos(angleZ * TMath::Pi() / 180)), -77.8);
2354 t_ROD4_4->RegisterYourself();
2355 auto* r_ROD4_4 = new TGeoRotation("rotation_ROD4_4", signe * 180.0, signe * (90), 0.0);
2356 r_ROD4_4->RegisterYourself();
2357 auto* p_ROD4_4 = new TGeoCombiTrans(*t_ROD4_4, *r_ROD4_4);
2358 p_ROD4_4->RegisterYourself();
2359
2360 // Middle
2361 // 16 pairs cable
2362 width = section_ROcable_16pairs / thickness; // inversion width and thickness! this is thickness...
2363 TGeoVolume* vRO_D4_5 = new TGeoVolume("vRO_D4_5", new TGeoTrap(length, 0., 0., width / 2, thickness / 2, thickness / 2, 0., width / 2, thickness / 2, thickness / 2, 0.), mCu);
2364 auto* t_ROD4_5 = new TGeoTranslation("translation_ROD4_5", 0, -signe * (yD4 + length - 0.2), -75.8);
2365 t_ROD4_5->RegisterYourself();
2366 auto* r_ROD4_5 = new TGeoRotation("rotation_ROD4_5", signe * 180.0, signe * (90), 0.0);
2367 r_ROD4_5->RegisterYourself();
2368 auto* p_ROD4_5 = new TGeoCombiTrans(*t_ROD4_5, *r_ROD4_5);
2369 p_ROD4_5->RegisterYourself();
2370 TGeoVolume* vRO_D4_6 = new TGeoVolume("vRO_D4_6", new TGeoTrap(length, 0., 0., width / 2, thickness / 2, thickness / 2, 0., width / 2, thickness / 2, thickness / 2, 0.), mCu);
2371 auto* t_ROD4_6 = new TGeoTranslation("translation_ROD4_6", 0, -signe * (yD4 + length - 0.2), -77.8);
2372 t_ROD4_6->RegisterYourself();
2373 auto* r_ROD4_6 = new TGeoRotation("rotation_ROD4_6", signe * 180.0, signe * (90), 0.0);
2374 r_ROD4_6->RegisterYourself();
2375 auto* p_ROD4_6 = new TGeoCombiTrans(*t_ROD4_6, *r_ROD4_6);
2376 p_ROD4_6->RegisterYourself();
2377
2378 auto* t_ConnectorRC4_1 = new TGeoTranslation("translation_RC4_1", 7.5, -signe * (21.5), -76.26 + heigthConnector / 2);
2379 t_ConnectorRC4_1->RegisterYourself();
2380 auto* p_ConnectorRC4_1 = new TGeoCombiTrans(*t_ConnectorRC4_1, *r_ConnectorRC3_1);
2381 p_ConnectorRC4_1->RegisterYourself();
2382 auto* t_ConnectorRC4_2 = new TGeoTranslation("translation_RC4_2", -7.5, -signe * (21.5), -76.26 + heigthConnector / 2);
2383 t_ConnectorRC4_2->RegisterYourself();
2384 auto* p_ConnectorRC4_2 = new TGeoCombiTrans(*t_ConnectorRC4_2, *r_ConnectorRC3_1);
2385 p_ConnectorRC4_2->RegisterYourself();
2386 auto* t_ConnectorRC4_3 = new TGeoTranslation("translation_RC4_3", 7.5, -signe * (21.5), -77.34 - heigthConnector / 2);
2387 t_ConnectorRC4_3->RegisterYourself();
2388 auto* p_ConnectorRC4_3 = new TGeoCombiTrans(*t_ConnectorRC4_3, *r_ConnectorRC3_1);
2389 p_ConnectorRC4_3->RegisterYourself();
2390 auto* t_ConnectorRC4_4 = new TGeoTranslation("translation_RC4_4", -7.5, -signe * (21.5), -77.34 - heigthConnector / 2);
2391 t_ConnectorRC4_4->RegisterYourself();
2392 auto* p_ConnectorRC4_4 = new TGeoCombiTrans(*t_ConnectorRC4_4, *r_ConnectorRC3_1);
2393 p_ConnectorRC4_4->RegisterYourself();
2394 auto* t_ConnectorRC4_5 = new TGeoTranslation("translation_RC4_5", 0, -signe * (21.5), -76.26 + heigthConnector / 2);
2395 t_ConnectorRC4_5->RegisterYourself();
2396 auto* p_ConnectorRC4_5 = new TGeoCombiTrans(*t_ConnectorRC4_5, *r_ConnectorRC3_1);
2397 p_ConnectorRC4_5->RegisterYourself();
2398 auto* t_ConnectorRC4_6 = new TGeoTranslation("translation_RC4_6", 0, -signe * (21.5), -77.34 - heigthConnector / 2);
2399 t_ConnectorRC4_6->RegisterYourself();
2400 auto* p_ConnectorRC4_6 = new TGeoCombiTrans(*t_ConnectorRC4_6, *r_ConnectorRC3_1);
2401 p_ConnectorRC4_6->RegisterYourself();
2402
2403 // ========== For the RO Supply Unit (PSU) ==========
2404 length = 1.6 / 2;
2405 angleZ = 70.;
2406 angleXY = -signe * 25.;
2407 width = 3.5;
2408 thickness = section_ROcable_16pairs / width / TMath::Cos(angleZ * TMath::Pi() / 180);
2409 TGeoVolume* vRO_PSU_1 = new TGeoVolume("vRO_PSU_1", new TGeoTrap(length, angleZ, angleXY, width / 2, thickness / 2, thickness / 2, 0., width / 2, thickness / 2, thickness / 2, 0.), mCu);
2410 Double_t yPSU = -signe * (24.8 + length * 1.26 * TMath::Sin(angleZ * TMath::Pi() / 180));
2411 Double_t zPSU = -71.1 - length * 2. * TMath::Cos(angleZ * TMath::Pi() / 180);
2412 auto* t_RO_PSU_1 = new TGeoTranslation("translation_RO_PSU_1", 5.0, yPSU, zPSU);
2413 t_RO_PSU_1->RegisterYourself();
2414 auto* r_RO_PSU_1 = new TGeoRotation("rotation_RO_PSU_1", signe * 90.0, -signe * (0), 0.0);
2415 r_RO_PSU_1->RegisterYourself();
2416 auto* p_RO_PSU_1 = new TGeoCombiTrans(*t_RO_PSU_1, *r_RO_PSU_1);
2417 p_RO_PSU_1->RegisterYourself();
2418
2419 TGeoVolume* vRO_PSU_2 = new TGeoVolume("vRO_PSU_2", new TGeoTrap(length, angleZ, -angleXY, width / 2, thickness / 2, thickness / 2, 0., width / 2, thickness / 2, thickness / 2, 0.), mCu);
2420 auto* t_RO_PSU_2 = new TGeoTranslation("translation_RO_PSU_2", -5.0, yPSU, zPSU);
2421 t_RO_PSU_2->RegisterYourself();
2422 auto* r_RO_PSU_2 = new TGeoRotation("rotation_RO_PSU_2", signe * 90.0, -signe * (0), 0.0);
2423 r_RO_PSU_2->RegisterYourself();
2424 auto* p_RO_PSU_2 = new TGeoCombiTrans(*t_RO_PSU_2, *r_RO_PSU_2);
2425 p_RO_PSU_2->RegisterYourself();
2426
2427 zPSU = -72.98 - length * 2. * TMath::Cos(angleZ * TMath::Pi() / 180);
2428 TGeoVolume* vRO_PSU_3 = new TGeoVolume("vRO_PSU_3", new TGeoTrap(length, -angleZ, angleXY, width / 2, thickness / 2, thickness / 2, 0., width / 2, thickness / 2, thickness / 2, 0.), mCu);
2429 auto* t_RO_PSU_3 = new TGeoTranslation("translation_RO_PSU_3", 5.0, yPSU, zPSU);
2430 t_RO_PSU_3->RegisterYourself();
2431 auto* r_RO_PSU_3 = new TGeoRotation("rotation_RO_PSU_3", signe * 90.0, -signe * (0), 0.0);
2432 r_RO_PSU_3->RegisterYourself();
2433 auto* p_RO_PSU_3 = new TGeoCombiTrans(*t_RO_PSU_3, *r_RO_PSU_3);
2434 p_RO_PSU_3->RegisterYourself();
2435
2436 TGeoVolume* vRO_PSU_4 = new TGeoVolume("vRO_PSU_4", new TGeoTrap(length, -angleZ, -angleXY, width / 2, thickness / 2, thickness / 2, 0., width / 2, thickness / 2, thickness / 2, 0.), mCu);
2437 auto* t_RO_PSU_4 = new TGeoTranslation("translation_RO_PSU_4", -5.0, yPSU, zPSU);
2438 t_RO_PSU_4->RegisterYourself();
2439 auto* r_RO_PSU_4 = new TGeoRotation("rotation_RO_PSU_4", signe * 90.0, -signe * (0), 0.0);
2440 r_RO_PSU_4->RegisterYourself();
2441 auto* p_RO_PSU_4 = new TGeoCombiTrans(*t_RO_PSU_4, *r_RO_PSU_4);
2442 p_RO_PSU_4->RegisterYourself();
2443
2444 auto* t_ConnectorPSU_1 = new TGeoTranslation("translation_PSU_1", 6.9, -signe * (23.5), -70.44 - heigthConnector / 2);
2445 t_ConnectorPSU_1->RegisterYourself();
2446 auto* p_ConnectorPSU_1 = new TGeoCombiTrans(*t_ConnectorPSU_1, *r_ConnectorRC3_1);
2447 p_ConnectorPSU_1->RegisterYourself();
2448 auto* t_ConnectorPSU_2 = new TGeoTranslation("translation_PSU_2", -6.9, -signe * (23.5), -70.44 - heigthConnector / 2);
2449 t_ConnectorPSU_2->RegisterYourself();
2450 auto* p_ConnectorPSU_2 = new TGeoCombiTrans(*t_ConnectorPSU_2, *r_ConnectorRC3_1);
2451 p_ConnectorPSU_2->RegisterYourself();
2452 auto* t_ConnectorPSU_3 = new TGeoTranslation("translation_PSU_3", 6.9, -signe * (23.5), -74.77 + heigthConnector / 2);
2453 t_ConnectorPSU_3->RegisterYourself();
2454 auto* p_ConnectorPSU_3 = new TGeoCombiTrans(*t_ConnectorPSU_3, *r_ConnectorRC3_1);
2455 p_ConnectorPSU_3->RegisterYourself();
2456 auto* t_ConnectorPSU_4 = new TGeoTranslation("translation_PSU_4", -6.9, -signe * (23.5), -74.77 + heigthConnector / 2);
2457 t_ConnectorPSU_4->RegisterYourself();
2458 auto* p_ConnectorPSU_4 = new TGeoCombiTrans(*t_ConnectorPSU_4, *r_ConnectorRC3_1);
2459 p_ConnectorPSU_4->RegisterYourself();
2460
2461 vRO1->SetLineColor(kGray + 2);
2462 vRO2->SetLineColor(kGray + 2);
2463 vRO3->SetLineColor(kGray + 2);
2464 vRO4->SetLineColor(kGray + 2);
2465 vRO5->SetLineColor(kGray + 2);
2466 vRO6->SetLineColor(kGray + 2);
2467 vRO7->SetLineColor(kGray + 2);
2468 vRO8->SetLineColor(kGray + 2);
2469 vRO9->SetLineColor(kGray + 2);
2470 vRO_D3_1->SetLineColor(kGray + 2);
2471 vRO_D3_2->SetLineColor(kGray + 2);
2472 vRO_D3_3->SetLineColor(kGray + 2);
2473 vRO_D3_4->SetLineColor(kGray + 2);
2474 vRO_D4_1->SetLineColor(kGray + 2);
2475 vRO_D4_2->SetLineColor(kGray + 2);
2476 vRO_D4_3->SetLineColor(kGray + 2);
2477 vRO_D4_4->SetLineColor(kGray + 2);
2478 vRO_D4_5->SetLineColor(kGray + 2);
2479 vRO_D4_6->SetLineColor(kGray + 2);
2480 vRO_PSU_1->SetLineColor(kGray + 2);
2481 vRO_PSU_2->SetLineColor(kGray + 2);
2482 vRO_PSU_3->SetLineColor(kGray + 2);
2483 vRO_PSU_4->SetLineColor(kGray + 2);
2484
2485 HalfConeVolume->AddNode(vRO1, 1, t_RO1);
2486 HalfConeVolume->AddNode(vRO2, 1, t_RO2);
2487 HalfConeVolume->AddNode(vRO3, 1, t_RO3);
2488 HalfConeVolume->AddNode(vRO4, 1, p_RO4);
2489 HalfConeVolume->AddNode(vRO5, 1, p_RO5_1);
2490 HalfConeVolume->AddNode(vRO5, 1, p_RO5_2);
2491 HalfConeVolume->AddNode(vRO6, 1, p_RO6);
2492 HalfConeVolume->AddNode(vRO7, 1, p_RO7);
2493 HalfConeVolume->AddNode(vRO8, 1, p_RO8_1);
2494 HalfConeVolume->AddNode(vRO8, 1, p_RO8_2);
2495 HalfConeVolume->AddNode(vRO9, 1, p_RO9_1);
2496 HalfConeVolume->AddNode(vRO9, 1, p_RO9_2);
2497 HalfConeVolume->AddNode(vRO_D3_1, 1, p_ROD3_1);
2498 HalfConeVolume->AddNode(vRO_D3_2, 1, p_ROD3_2);
2499 HalfConeVolume->AddNode(vRO_D3_3, 1, p_ROD3_3);
2500 HalfConeVolume->AddNode(vRO_D3_4, 1, p_ROD3_4);
2501 HalfConeVolume->AddNode(vConnectorRC, 1, p_ConnectorRC3_1);
2502 HalfConeVolume->AddNode(vConnectorRC, 1, p_ConnectorRC3_2);
2503 HalfConeVolume->AddNode(vConnectorRC, 1, p_ConnectorRC3_3);
2504 HalfConeVolume->AddNode(vConnectorRC, 1, p_ConnectorRC3_4);
2505
2506 HalfConeVolume->AddNode(vRO_D4_1, 1, p_ROD4_1);
2507 HalfConeVolume->AddNode(vRO_D4_2, 1, p_ROD4_2);
2508 HalfConeVolume->AddNode(vRO_D4_3, 1, p_ROD4_3);
2509 HalfConeVolume->AddNode(vRO_D4_4, 1, p_ROD4_4);
2510 HalfConeVolume->AddNode(vRO_D4_5, 1, p_ROD4_5);
2511 HalfConeVolume->AddNode(vRO_D4_6, 1, p_ROD4_6);
2512 HalfConeVolume->AddNode(vConnectorRC, 1, p_ConnectorRC4_1);
2513 HalfConeVolume->AddNode(vConnectorRC, 1, p_ConnectorRC4_2);
2514 HalfConeVolume->AddNode(vConnectorRC, 1, p_ConnectorRC4_3);
2515 HalfConeVolume->AddNode(vConnectorRC, 1, p_ConnectorRC4_4);
2516 HalfConeVolume->AddNode(vConnectorRC, 1, p_ConnectorRC4_5);
2517 HalfConeVolume->AddNode(vConnectorRC, 1, p_ConnectorRC4_6);
2518
2519 HalfConeVolume->AddNode(vRO_PSU_1, 1, p_RO_PSU_1);
2520 HalfConeVolume->AddNode(vRO_PSU_2, 1, p_RO_PSU_2);
2521 HalfConeVolume->AddNode(vRO_PSU_3, 1, p_RO_PSU_3);
2522 HalfConeVolume->AddNode(vRO_PSU_4, 1, p_RO_PSU_4);
2523 HalfConeVolume->AddNode(vConnectorRC, 1, p_ConnectorPSU_1);
2524 HalfConeVolume->AddNode(vConnectorRC, 1, p_ConnectorPSU_2);
2525 HalfConeVolume->AddNode(vConnectorRC, 1, p_ConnectorPSU_3);
2526 HalfConeVolume->AddNode(vConnectorRC, 1, p_ConnectorPSU_4);
2527}
2528
2529void HalfCone::makePowerCables(TGeoVolumeAssembly* HalfConeVolume, Int_t half, Int_t signe)
2530{
2531 auto* mCu = gGeoManager->GetMedium("MFT_Cu$");
2532
2533 // ========= Cables for the first 3 disks ===========
2534 // ==================== Bottom side ===================
2535 Double_t xPC0 = 8.0;
2536 Double_t yPC0 = 0.0313;
2537 Double_t zPC0 = 2.0; // length
2538 Int_t side;
2539 if (signe == -1) {
2540 side = 1; // left
2541 }
2542 if (signe == 1) {
2543 side = 2; // right
2544 }
2545
2546 TGeoVolume* vPCb0 = gGeoManager->MakeBox(Form("vPCb0_S%d", side), mCu, xPC0 / 2, yPC0 / 2, zPC0 / 2);
2547 auto* r_PC0 = new TGeoRotation("rotation_PC0", 0., 0., 0.);
2548 r_PC0->RegisterYourself();
2549 Double_t XPC0 = signe * 18.5;
2550 Double_t YPC0 = -4. + yPC0 / 2;
2551 Double_t ZPC0 = -72.5;
2552 auto* p_PC0 = new TGeoCombiTrans(XPC0, YPC0, ZPC0, r_PC0);
2553
2554 //===================== first cable ===============================
2555 Double_t rmaxPC1 = 0.163;
2556 Double_t zPC1 = 5.5;
2557 TGeoVolume* vPCb1_1 = gGeoManager->MakeTube(Form("vPCb1_1_S%d", side), mCu, 0., rmaxPC1, zPC1 / 2);
2558 Double_t XPC1 = XPC0 + signe * (2 * rmaxPC1 - 0.3);
2559 Double_t YPC1 = YPC0;
2560 Double_t ZPC1 = ZPC0 + (zPC0 + zPC1) / 2;
2561 auto* p_PC1_1 = new TGeoCombiTrans(XPC1, YPC1, ZPC1, r_PC0);
2562 p_PC1_1->RegisterYourself();
2563 //===========
2564 Double_t rPC2 = 0.95;
2565 TGeoVolume* vPCb2_1 = gGeoManager->MakeTorus(Form("vPCb2_1_S%d", side), mCu, rPC2, 0., rmaxPC1, 0., 90.);
2566 auto* r_PC2 = new TGeoRotation("rotation_PC2", 90., -90., -90.);
2567 r_PC2->RegisterYourself();
2568 Double_t XPC2 = XPC1;
2569 Double_t YPC2 = YPC1 - rPC2;
2570 Double_t ZPC2 = ZPC1 + zPC1 / 2;
2571 auto* p_PC2_1 = new TGeoCombiTrans(XPC2, YPC2, ZPC2, r_PC2);
2572 p_PC2_1->RegisterYourself();
2573 //===========
2574 Double_t zPC3 = 2.6;
2575 TGeoVolume* vPCb3_1 = gGeoManager->MakeTube(Form("vPCb3_S%d", side), mCu, 0., rmaxPC1, zPC3 / 2);
2576 auto* r_PC3 = new TGeoRotation("rotation_PC3", 0., 90., 0.);
2577 r_PC3->RegisterYourself();
2578 Double_t XPC3 = XPC2;
2579 Double_t YPC3 = YPC2 - zPC3 / 2;
2580 Double_t ZPC3 = ZPC2 + rPC2;
2581 auto* p_PC3_1 = new TGeoCombiTrans(XPC3, YPC3, ZPC3, r_PC3);
2582 p_PC3_1->RegisterYourself();
2583 //===========
2584 Double_t rPC4 = 0.95;
2585 TGeoVolume* vPCb4_1 = gGeoManager->MakeTorus(Form("vPCb4_1_H%d", side), mCu, rPC2, 0., rmaxPC1, 0., 90.);
2586 auto* r_PC4 = new TGeoRotation("rotation_PC4", 90., -90. - signe * 45., 90.);
2587 r_PC4->RegisterYourself();
2588 Double_t XPC4 = XPC3 - signe * rPC4 * TMath::Sin(45. * TMath::Pi() / 180.);
2589 Double_t YPC4 = YPC3 - zPC3 / 2;
2590 Double_t ZPC4 = ZPC3 + rPC4 * TMath::Cos(45. * TMath::Pi() / 180.);
2591 auto* p_PC4_1 = new TGeoCombiTrans(XPC4, YPC4, ZPC4, r_PC4);
2592 p_PC4_1->RegisterYourself();
2593 //===========
2594 Double_t zPC5 = 8.1;
2595 TGeoVolume* vPCb5_1 = gGeoManager->MakeTube(Form("vPCb5_S%d", side), mCu, 0., rmaxPC1, zPC5 / 2);
2596 auto* r_PC5 = new TGeoRotation("rotation_PC5", 90., -signe * 45., 0);
2597 r_PC5->RegisterYourself();
2598 Double_t XPC5 = XPC4 - signe * zPC5 / 2 * TMath::Sin(45. * TMath::Pi() / 180.);
2599 Double_t YPC5 = YPC4 - rPC4;
2600 Double_t ZPC5 = ZPC4 + zPC5 / 2 * TMath::Cos(45. * TMath::Pi() / 180.);
2601 auto* p_PC5_1 = new TGeoCombiTrans(XPC5, YPC5, ZPC5, r_PC5);
2602 p_PC5_1->RegisterYourself();
2603 //===========
2604 Double_t rPC6 = 0.95;
2605 TGeoVolume* vPCb6_1 = gGeoManager->MakeTorus(Form("vPCb6_1_H%d", side), mCu, rPC2, 0.0, rmaxPC1, 45., 45.);
2606 auto* r_PC6 = new TGeoRotation("rotation_PC6", 0., -signe * 90., signe * 90.);
2607 r_PC6->RegisterYourself();
2608 Double_t XPC6 = XPC5 - signe * (zPC5 / 2 * TMath::Sin(45 * TMath::Pi() / 180.) - rPC6 * TMath::Cos(45. * TMath::Pi() / 180.));
2609 Double_t YPC6 = YPC5;
2610 Double_t ZPC6 = ZPC5 + zPC5 / 2 * TMath::Cos(45. * TMath::Pi() / 180.) + rPC6 * TMath::Sin(45. * TMath::Pi() / 180.);
2611 auto* p_PC6_1 = new TGeoCombiTrans(XPC6, YPC6, ZPC6, r_PC6);
2612 p_PC6_1->RegisterYourself();
2613 //===========
2614 Double_t zPC7 = 13.0;
2615 TGeoVolume* vPCb7_1 = gGeoManager->MakeTube(Form("vPCb7_1_H%d", side), mCu, 0., rmaxPC1, zPC7 / 2);
2616 auto* r_PC7 = new TGeoRotation("rotation_PC7", 0., 0., 0.);
2617 r_PC7->RegisterYourself();
2618 Double_t XPC7 = XPC6 - signe * rPC6;
2619 Double_t YPC7 = YPC6;
2620 Double_t ZPC7 = ZPC6 + zPC7 / 2;
2621 auto* p_PC7_1 = new TGeoCombiTrans(XPC7, YPC7, ZPC7, r_PC7);
2622 p_PC7_1->RegisterYourself();
2623
2624 //===================== second cable ==============================
2625 zPC1 = 5.5;
2626 TGeoVolume* vPCb1_2 = gGeoManager->MakeTube(Form("vPCb1_2_S%d", side), mCu, 0., rmaxPC1, zPC1 / 2);
2627 XPC1 = XPC0 + signe * (8 * rmaxPC1 - 0.3);
2628 auto* p_PC1_2 = new TGeoCombiTrans(XPC1, YPC1, ZPC1, r_PC0);
2629 p_PC1_2->RegisterYourself();
2630 //===========
2631 TGeoVolume* vPCb2_2 = gGeoManager->MakeTorus(Form("vPCb2_2_S%d", side), mCu, rPC2, 0.0, rmaxPC1, 0., 90.);
2632 XPC2 = XPC1;
2633 auto* p_PC2_2 = new TGeoCombiTrans(XPC2, YPC2, ZPC2, r_PC2);
2634 p_PC2_2->RegisterYourself();
2635 //===========
2636 TGeoVolume* vPCb3_2 = gGeoManager->MakeTube(Form("vPCb3_2_S%d", side), mCu, 0., rmaxPC1, zPC3 / 2);
2637 XPC3 = XPC2;
2638 YPC3 = YPC2 - zPC3 / 2;
2639 ZPC3 = ZPC2 + rPC2;
2640 auto* p_PC3_2 = new TGeoCombiTrans(XPC3, YPC3, ZPC3, r_PC3);
2641 p_PC3_2->RegisterYourself();
2642 //===========
2643 TGeoVolume* vPCb4_2 = gGeoManager->MakeTorus(Form("vPCb4_2_S%d", side), mCu, rPC2, 0., rmaxPC1, 0., 90.);
2644 XPC4 = XPC3 - signe * rPC4 * TMath::Sin(45. * TMath::Pi() / 180.);
2645 YPC4 = YPC3 - zPC3 / 2;
2646 ZPC4 = ZPC3 + rPC4 * TMath::Cos(45. * TMath::Pi() / 180.);
2647 auto* p_PC4_2 = new TGeoCombiTrans(XPC4, YPC4, ZPC4, r_PC4);
2648 p_PC4_2->RegisterYourself();
2649 //===========
2650 zPC5 = 8.1;
2651 TGeoVolume* vPCb5_2 = gGeoManager->MakeTube(Form("vPCb5_2_S%d", side), mCu, 0., rmaxPC1, zPC5 / 2);
2652 XPC5 = XPC4 - signe * zPC5 / 2 * TMath::Sin(45. * TMath::Pi() / 180.);
2653 YPC5 = YPC4 - rPC4;
2654 ZPC5 = ZPC4 + zPC5 / 2 * TMath::Cos(45. * TMath::Pi() / 180.);
2655 auto* p_PC5_2 = new TGeoCombiTrans(XPC5, YPC5, ZPC5, r_PC5);
2656 p_PC5_2->RegisterYourself();
2657 //===========
2658 TGeoVolume* vPCb6_2 = gGeoManager->MakeTorus(Form("vPCb6_2_S%d", side), mCu, rPC2, 0.0, rmaxPC1, 45., 45.);
2659 XPC6 = XPC5 - signe * (zPC5 / 2 * TMath::Sin(45. * TMath::Pi() / 180.) - rPC6 * TMath::Cos(45. * TMath::Pi() / 180.));
2660 YPC6 = YPC5;
2661 ZPC6 = ZPC5 + zPC5 / 2 * TMath::Cos(45. * TMath::Pi() / 180.) + rPC6 * TMath::Sin(45. * TMath::Pi() / 180.);
2662 auto* p_PC6_2 = new TGeoCombiTrans(XPC6, YPC6, ZPC6, r_PC6);
2663 p_PC6_2->RegisterYourself();
2664 //===========
2665 zPC7 = 9.8;
2666 TGeoVolume* vPCb7_2 = gGeoManager->MakeTube(Form("vPCb7_2_S%d", side), mCu, 0., rmaxPC1, zPC7 / 2);
2667 XPC7 = XPC6 - signe * rPC6;
2668 YPC7 = YPC6;
2669 ZPC7 = ZPC6 + zPC7 / 2;
2670 auto* p_PC7_2 = new TGeoCombiTrans(XPC7, YPC7, ZPC7, r_PC7);
2671 p_PC7_2->RegisterYourself();
2672
2673 //===================== third cable ==============================
2674 zPC1 = 5.5;
2675 TGeoVolume* vPCb1_3 = gGeoManager->MakeTube(Form("vPCb1_3_S%d", side), mCu, 0., rmaxPC1, zPC1 / 2);
2676 XPC1 = XPC0 + signe * (14 * rmaxPC1 - 0.3);
2677 auto* p_PC1_3 = new TGeoCombiTrans(XPC1, YPC1, ZPC1, r_PC0);
2678 p_PC1_3->RegisterYourself();
2679 //===========
2680 TGeoVolume* vPCb2_3 = gGeoManager->MakeTorus(Form("vPCb2_3_S%d", side), mCu, rPC2, 0., rmaxPC1, 0., 90.);
2681 XPC2 = XPC1;
2682 auto* p_PC2_3 = new TGeoCombiTrans(XPC2, YPC2, ZPC2, r_PC2);
2683 p_PC2_3->RegisterYourself();
2684 //===========
2685 zPC3 = 2.6;
2686 TGeoVolume* vPCb3_3 = gGeoManager->MakeTube(Form("vPCb3_3_S%d", side), mCu, 0., rmaxPC1, zPC3 / 2);
2687 XPC3 = XPC2;
2688 YPC3 = YPC2 - zPC3 / 2;
2689 ZPC3 = ZPC2 + rPC2;
2690 auto* p_PC3_3 = new TGeoCombiTrans(XPC3, YPC3, ZPC3, r_PC3);
2691 p_PC3_3->RegisterYourself();
2692 //===========
2693 TGeoVolume* vPCb4_3 = gGeoManager->MakeTorus(Form("vPCb4_3_S%d", side), mCu, rPC2, 0., rmaxPC1, 0., 90.);
2694 XPC4 = XPC3 - signe * rPC4 * TMath::Sin(45. * TMath::Pi() / 180.);
2695 YPC4 = YPC3 - zPC3 / 2;
2696 ZPC4 = ZPC3 + rPC4 * TMath::Cos(45. * TMath::Pi() / 180.);
2697 auto* p_PC4_3 = new TGeoCombiTrans(XPC4, YPC4, ZPC4, r_PC4);
2698 p_PC4_3->RegisterYourself();
2699 //===========
2700 zPC5 = 8.1 + 0.3;
2701 TGeoVolume* vPCb5_3 = gGeoManager->MakeTube(Form("vPCb5_3_S%d", side), mCu, 0., rmaxPC1, zPC5 / 2);
2702 XPC5 = XPC4 - signe * zPC5 / 2 * TMath::Sin(45. * TMath::Pi() / 180.);
2703 YPC5 = YPC4 - rPC4;
2704 ZPC5 = ZPC4 + zPC5 / 2 * TMath::Cos(45. * TMath::Pi() / 180.);
2705 auto* p_PC5_3 = new TGeoCombiTrans(XPC5, YPC5, ZPC5, r_PC5);
2706 p_PC5_3->RegisterYourself();
2707 //===========
2708 TGeoVolume* vPCb6_3 = gGeoManager->MakeTorus(Form("vPCb6_3_S%d", side), mCu, rPC2, 0.0, rmaxPC1, 45., 45.);
2709 XPC6 = XPC5 - signe * (zPC5 / 2 * TMath::Sin(45. * TMath::Pi() / 180.) - rPC6 * TMath::Cos(45. * TMath::Pi() / 180.));
2710 YPC6 = YPC5;
2711 ZPC6 = ZPC5 + zPC5 / 2 * TMath::Cos(45. * TMath::Pi() / 180.) + rPC6 * TMath::Sin(45. * TMath::Pi() / 180.);
2712 auto* p_PC6_3 = new TGeoCombiTrans(XPC6, YPC6, ZPC6, r_PC6);
2713 p_PC6_3->RegisterYourself();
2714 //===========
2715 zPC7 = 5.8;
2716 TGeoVolume* vPCb7_3 = gGeoManager->MakeTube(Form("vPCb7_3_S%d", side), mCu, 0., rmaxPC1, zPC7 / 2);
2717 XPC7 = XPC6 - signe * rPC6;
2718 YPC7 = YPC6;
2719 ZPC7 = ZPC6 + zPC7 / 2;
2720 auto* p_PC7_3 = new TGeoCombiTrans(XPC7, YPC7, ZPC7, r_PC7);
2721 p_PC7_3->RegisterYourself();
2722 //==========================================================
2723
2724 vPCb0->SetLineColor(kBlue);
2725 vPCb1_1->SetLineColor(kBlue);
2726 vPCb1_2->SetLineColor(kBlue);
2727 vPCb1_3->SetLineColor(kBlue);
2728 vPCb2_1->SetLineColor(kBlue);
2729 vPCb2_2->SetLineColor(kBlue);
2730 vPCb2_3->SetLineColor(kBlue);
2731 vPCb3_1->SetLineColor(kBlue);
2732 vPCb3_2->SetLineColor(kBlue);
2733 vPCb3_3->SetLineColor(kBlue);
2734 vPCb4_1->SetLineColor(kBlue);
2735 vPCb4_2->SetLineColor(kBlue);
2736 vPCb4_3->SetLineColor(kBlue);
2737 vPCb5_1->SetLineColor(kBlue);
2738 vPCb5_2->SetLineColor(kBlue);
2739 vPCb5_3->SetLineColor(kBlue);
2740 vPCb6_1->SetLineColor(kBlue);
2741 vPCb6_2->SetLineColor(kBlue);
2742 vPCb6_3->SetLineColor(kBlue);
2743 vPCb7_1->SetLineColor(kBlue);
2744 vPCb7_2->SetLineColor(kBlue);
2745 vPCb7_3->SetLineColor(kBlue);
2746 HalfConeVolume->AddNode(vPCb0, 1, p_PC0);
2747 HalfConeVolume->AddNode(vPCb1_1, 1, p_PC1_1);
2748 HalfConeVolume->AddNode(vPCb1_2, 1, p_PC1_2);
2749 HalfConeVolume->AddNode(vPCb1_3, 1, p_PC1_3);
2750 HalfConeVolume->AddNode(vPCb2_1, 1, p_PC2_1);
2751 HalfConeVolume->AddNode(vPCb2_2, 1, p_PC2_2);
2752 HalfConeVolume->AddNode(vPCb2_3, 1, p_PC2_3);
2753 HalfConeVolume->AddNode(vPCb3_1, 1, p_PC3_1);
2754 HalfConeVolume->AddNode(vPCb3_2, 1, p_PC3_2);
2755 HalfConeVolume->AddNode(vPCb3_3, 1, p_PC3_3);
2756 HalfConeVolume->AddNode(vPCb4_1, 1, p_PC4_1);
2757 HalfConeVolume->AddNode(vPCb4_2, 1, p_PC4_2);
2758 HalfConeVolume->AddNode(vPCb4_3, 1, p_PC4_3);
2759 HalfConeVolume->AddNode(vPCb5_1, 1, p_PC5_1);
2760 HalfConeVolume->AddNode(vPCb5_2, 1, p_PC5_2);
2761 HalfConeVolume->AddNode(vPCb5_3, 1, p_PC5_3);
2762 HalfConeVolume->AddNode(vPCb6_1, 1, p_PC6_1);
2763 HalfConeVolume->AddNode(vPCb6_2, 1, p_PC6_2);
2764 HalfConeVolume->AddNode(vPCb6_3, 1, p_PC6_3);
2765 HalfConeVolume->AddNode(vPCb7_1, 1, p_PC7_1);
2766 HalfConeVolume->AddNode(vPCb7_2, 1, p_PC7_2);
2767 HalfConeVolume->AddNode(vPCb7_3, 1, p_PC7_3);
2768
2769 // ==================== Top side ===================
2770 TGeoVolume* vPCt0 = gGeoManager->MakeBox(Form("vPCt0_S%d", side), mCu, xPC0 / 2, yPC0 / 2, zPC0 / 2);
2771 p_PC0 = new TGeoCombiTrans(XPC0, -YPC0, ZPC0, r_PC0);
2772
2773 //===================== first cable ===============================
2774 zPC1 = 5.5;
2775 TGeoVolume* vPCt1_1 = gGeoManager->MakeTube(Form("vPCt1_1_S%d", side), mCu, 0.0, rmaxPC1, zPC1 / 2);
2776 XPC1 = XPC0 + signe * (2 * rmaxPC1 - 0.3);
2777 p_PC1_1 = new TGeoCombiTrans(XPC1, -YPC1, ZPC1, r_PC0);
2778 p_PC1_1->RegisterYourself();
2779 //==========
2780 TGeoVolume* vPCt2_1 = gGeoManager->MakeTorus(Form("vPCt2_1_S%d", side), mCu, rPC2, 0., rmaxPC1, 0., 90.);
2781 r_PC2 = new TGeoRotation("rotation_PC2", 90., 90., 90.);
2782 r_PC2->RegisterYourself();
2783 XPC2 = XPC1;
2784 YPC2 = YPC1 - rPC2;
2785 ZPC2 = ZPC1 + zPC1 / 2;
2786 p_PC2_1 = new TGeoCombiTrans(XPC2, -YPC2, ZPC2, r_PC2);
2787 p_PC2_1->RegisterYourself();
2788 //===========
2789 zPC3 = 2.6;
2790 TGeoVolume* vPCt3_1 = gGeoManager->MakeTube(Form("vPCt3_S%d", side), mCu, 0., rmaxPC1, zPC3 / 2);
2791 r_PC3->RegisterYourself();
2792 XPC3 = XPC2;
2793 YPC3 = YPC2 - zPC3 / 2;
2794 ZPC3 = ZPC2 + rPC2;
2795 p_PC3_1 = new TGeoCombiTrans(XPC3, -YPC3, ZPC3, r_PC3);
2796 p_PC3_1->RegisterYourself();
2797 //===========
2798 rPC4 = 0.95;
2799 TGeoVolume* vPCt4_1 = gGeoManager->MakeTorus(Form("vPCt4_1_H%d", side), mCu, rPC2, 0., rmaxPC1, 0., 90.);
2800 r_PC4 = new TGeoRotation("rotation_PC4", 90., 90. - signe * 45., 180. + 90.);
2801 r_PC4->RegisterYourself();
2802 XPC4 = XPC3 - signe * rPC4 * TMath::Sin(45. * TMath::Pi() / 180.);
2803 YPC4 = YPC3 - zPC3 / 2;
2804 ZPC4 = ZPC3 + rPC4 * TMath::Cos(45. * TMath::Pi() / 180.);
2805 p_PC4_1 = new TGeoCombiTrans(XPC4, -YPC4, ZPC4, r_PC4);
2806 p_PC4_1->RegisterYourself();
2807 //===========
2808 zPC5 = 8.1;
2809 TGeoVolume* vPCt5_1 = gGeoManager->MakeTube(Form("vPCt5_S%d", side), mCu, 0.0, rmaxPC1, zPC5 / 2);
2810 r_PC5 = new TGeoRotation("rotation_PC5", 90., 180.0 - signe * 45., 180);
2811 r_PC5->RegisterYourself();
2812 XPC5 = XPC4 - signe * zPC5 / 2 * TMath::Sin(45. * TMath::Pi() / 180.);
2813 YPC5 = YPC4 - rPC4;
2814 ZPC5 = ZPC4 + zPC5 / 2 * TMath::Cos(45. * TMath::Pi() / 180.);
2815 p_PC5_1 = new TGeoCombiTrans(XPC5, -YPC5, ZPC5, r_PC5);
2816 p_PC5_1->RegisterYourself();
2817 //===========
2818 rPC6 = 0.95;
2819 TGeoVolume* vPCt6_1 = gGeoManager->MakeTorus(Form("vPCt6_1_H%d", side), mCu, rPC2, 0.0, rmaxPC1, 45., 45.);
2820 XPC6 = XPC5 - signe * (zPC5 / 2 * TMath::Sin(45.0 * TMath::Pi() / 180.) - rPC6 * TMath::Cos(45 * TMath::Pi() / 180.));
2821 YPC6 = YPC5;
2822 ZPC6 = ZPC5 + zPC5 / 2 * TMath::Cos(45. * TMath::Pi() / 180.) + rPC6 * TMath::Sin(45 * TMath::Pi() / 180.);
2823 p_PC6_1 = new TGeoCombiTrans(XPC6, -YPC6, ZPC6, r_PC6);
2824 p_PC6_1->RegisterYourself();
2825 //===========
2826 zPC7 = 13.0;
2827 TGeoVolume* vPCt7_1 = gGeoManager->MakeTube(Form("vPCt7_1_H%d", side), mCu, 0., rmaxPC1, zPC7 / 2);
2828 XPC7 = XPC6 - signe * rPC6;
2829 YPC7 = YPC6;
2830 ZPC7 = ZPC6 + zPC7 / 2;
2831 p_PC7_1 = new TGeoCombiTrans(XPC7, -YPC7, ZPC7, r_PC7);
2832 p_PC7_1->RegisterYourself();
2833
2834 //===================== second cable ==============================
2835 zPC1 = 5.5;
2836 TGeoVolume* vPCt1_2 = gGeoManager->MakeTube(Form("vPCt1_2_S%d", side), mCu, 0., rmaxPC1, zPC1 / 2);
2837 XPC1 = XPC0 + signe * (8 * rmaxPC1 - 0.3);
2838 p_PC1_2 = new TGeoCombiTrans(XPC1, -YPC1, ZPC1, r_PC0);
2839 p_PC1_2->RegisterYourself();
2840 //===========
2841 TGeoVolume* vPCt2_2 = gGeoManager->MakeTorus(Form("TorusPCt2_2_S%d", side), mCu, rPC2, 0.0, rmaxPC1, 0., 90.);
2842 XPC2 = XPC1;
2843 p_PC2_2 = new TGeoCombiTrans(XPC2, -YPC2, ZPC2, r_PC2);
2844 p_PC2_2->RegisterYourself();
2845 //===========
2846 TGeoVolume* vPCt3_2 = gGeoManager->MakeTube(Form("vPCt3_2_S%d", side), mCu, 0., rmaxPC1, zPC3 / 2);
2847 XPC3 = XPC2;
2848 p_PC3_2 = new TGeoCombiTrans(XPC3, -YPC3, ZPC3, r_PC3);
2849 p_PC3_2->RegisterYourself();
2850 //===========
2851 TGeoVolume* vPCt4_2 = gGeoManager->MakeTorus(Form("TorusPCt4_2_S%d", side), mCu, rPC2, 0.0, rmaxPC1, 0., 90.);
2852 XPC4 = XPC3 - signe * rPC4 * TMath::Sin(45. * TMath::Pi() / 180.);
2853 YPC4 = YPC3 - zPC3 / 2;
2854 ZPC4 = ZPC3 + rPC4 * TMath::Cos(45 * TMath::Pi() / 180.);
2855 p_PC4_2 = new TGeoCombiTrans(XPC4, -YPC4, ZPC4, r_PC4);
2856 p_PC4_2->RegisterYourself();
2857 //===========
2858 zPC5 = 8.1;
2859 TGeoVolume* vPCt5_2 = gGeoManager->MakeTube(Form("vPCt5_2_S%d", side), mCu, 0., rmaxPC1, zPC5 / 2);
2860 XPC5 = XPC4 - signe * zPC5 / 2 * TMath::Sin(45.0 * TMath::Pi() / 180.);
2861 YPC5 = YPC4 - rPC4;
2862 ZPC5 = ZPC4 + zPC5 / 2 * TMath::Cos(45.0 * TMath::Pi() / 180.);
2863 p_PC5_2 = new TGeoCombiTrans(XPC5, -YPC5, ZPC5, r_PC5);
2864 p_PC5_2->RegisterYourself();
2865 //===========
2866 TGeoVolume* vPCt6_2 = gGeoManager->MakeTorus(Form("TorusPCt6_2_S%d", side), mCu, rPC2, 0.0, rmaxPC1, 45., 45.);
2867 XPC6 = XPC5 - signe * (zPC5 / 2 * TMath::Sin(45.0 * TMath::Pi() / 180.) - rPC6 * TMath::Cos(45. * TMath::Pi() / 180.));
2868 YPC6 = YPC5;
2869 ZPC6 = ZPC5 + zPC5 / 2 * TMath::Cos(45. * TMath::Pi() / 180.) + rPC6 * TMath::Sin(45. * TMath::Pi() / 180.);
2870 p_PC6_2 = new TGeoCombiTrans(XPC6, -YPC6, ZPC6, r_PC6);
2871 p_PC6_2->RegisterYourself();
2872 //===========
2873 zPC7 = 9.8;
2874 TGeoVolume* vPCt7_2 = gGeoManager->MakeTube(Form("vPCt7_2_S%d", side), mCu, 0.0, rmaxPC1, zPC7 / 2);
2875 XPC7 = XPC6 - signe * rPC6;
2876 YPC7 = YPC6;
2877 ZPC7 = ZPC6 + zPC7 / 2;
2878 p_PC7_2 = new TGeoCombiTrans(XPC7, -YPC7, ZPC7, r_PC7);
2879 p_PC7_2->RegisterYourself();
2880
2881 //===================== third cable ==============================
2882 zPC1 = 5.5;
2883 TGeoVolume* vPCt1_3 = gGeoManager->MakeTube(Form("vPCt1_3_S%d", side), mCu, 0., rmaxPC1, zPC1 / 2);
2884 XPC1 = XPC0 + signe * (14 * rmaxPC1 - 0.3);
2885 p_PC1_3 = new TGeoCombiTrans(XPC1, -YPC1, ZPC1, r_PC0);
2886 p_PC1_3->RegisterYourself();
2887 //===========
2888 zPC3 = 2.6;
2889 TGeoVolume* vPCt2_3 = gGeoManager->MakeTorus(Form("TorusPCt2_3_S%d", side), mCu, rPC2, 0., rmaxPC1, 0., 90.);
2890 XPC2 = XPC1;
2891 p_PC2_3 = new TGeoCombiTrans(XPC2, -YPC2, ZPC2, r_PC2);
2892 p_PC2_3->RegisterYourself();
2893 //===========
2894 TGeoVolume* vPCt3_3 = gGeoManager->MakeTube(Form("vPCt3_3_S%d", side), mCu, 0., rmaxPC1, zPC3 / 2);
2895 XPC3 = XPC2;
2896 YPC3 = YPC2 - zPC3 / 2;
2897 ZPC3 = ZPC2 + rPC2;
2898 p_PC3_3 = new TGeoCombiTrans(XPC3, -YPC3, ZPC3, r_PC3);
2899 p_PC3_3->RegisterYourself();
2900 //===========
2901 TGeoVolume* vPCt4_3 = gGeoManager->MakeTorus(Form("TorusPCt4_3_S%d", side), mCu, rPC2, 0., rmaxPC1, 0., 90.);
2902 XPC4 = XPC3 - signe * rPC4 * TMath::Sin(45. * TMath::Pi() / 180.);
2903 YPC4 = YPC3 - zPC3 / 2;
2904 ZPC4 = ZPC3 + rPC4 * TMath::Cos(45.0 * TMath::Pi() / 180.);
2905 p_PC4_3 = new TGeoCombiTrans(XPC4, -YPC4, ZPC4, r_PC4);
2906 p_PC4_3->RegisterYourself();
2907 //===========
2908 zPC5 = 8.1 + 0.3;
2909 TGeoVolume* vPCt5_3 = gGeoManager->MakeTube(Form("vPCt5_3_S%d", side), mCu, 0., rmaxPC1, zPC5 / 2);
2910 XPC5 = XPC4 - signe * zPC5 / 2 * TMath::Sin(45. * TMath::Pi() / 180.);
2911 YPC5 = YPC4 - rPC4;
2912 ZPC5 = ZPC4 + zPC5 / 2 * TMath::Cos(45 * TMath::Pi() / 180.);
2913 p_PC5_3 = new TGeoCombiTrans(XPC5, -YPC5, ZPC5, r_PC5);
2914 p_PC5_3->RegisterYourself();
2915 //===========
2916 TGeoVolume* vPCt6_3 = gGeoManager->MakeTorus(Form("TorusPCt6_3_S%d", side), mCu, rPC2, 0., rmaxPC1, 45., 45.);
2917 XPC6 = XPC5 - signe * (zPC5 / 2 * TMath::Sin(45.0 * TMath::Pi() / 180.) - rPC6 * TMath::Cos(45. * TMath::Pi() / 180.));
2918 YPC6 = YPC5;
2919 ZPC6 = ZPC5 + zPC5 / 2 * TMath::Cos(45.0 * TMath::Pi() / 180.) + rPC6 * TMath::Sin(45. * TMath::Pi() / 180.);
2920 p_PC6_3 = new TGeoCombiTrans(XPC6, -YPC6, ZPC6, r_PC6);
2921 p_PC6_3->RegisterYourself();
2922 //===========
2923 zPC7 = 5.8;
2924 TGeoVolume* vPCt7_3 = gGeoManager->MakeTube(Form("vPCt7_3_S%d", side), mCu, 0., rmaxPC1, zPC7 / 2);
2925 XPC7 = XPC6 - signe * rPC6;
2926 YPC7 = YPC6;
2927 ZPC7 = ZPC6 + zPC7 / 2;
2928 p_PC7_3 = new TGeoCombiTrans(XPC7, -YPC7, ZPC7, r_PC7);
2929 p_PC7_3->RegisterYourself();
2930 //==========================================================
2931
2932 vPCt0->SetLineColor(kBlue);
2933 vPCt1_1->SetLineColor(kBlue);
2934 vPCt2_1->SetLineColor(kBlue);
2935 vPCt3_1->SetLineColor(kBlue);
2936 vPCt4_1->SetLineColor(kBlue);
2937 vPCt5_1->SetLineColor(kBlue);
2938 vPCt6_1->SetLineColor(kBlue);
2939 vPCt7_1->SetLineColor(kBlue);
2940 vPCt1_2->SetLineColor(kBlue);
2941 vPCt2_2->SetLineColor(kBlue);
2942 vPCt3_2->SetLineColor(kBlue);
2943 vPCt4_2->SetLineColor(kBlue);
2944 vPCt5_2->SetLineColor(kBlue);
2945 vPCt6_2->SetLineColor(kBlue);
2946 vPCt7_2->SetLineColor(kBlue);
2947 vPCt1_3->SetLineColor(kBlue);
2948 vPCt2_3->SetLineColor(kBlue);
2949 vPCt3_3->SetLineColor(kBlue);
2950 vPCt4_3->SetLineColor(kBlue);
2951 vPCt5_3->SetLineColor(kBlue);
2952 vPCt6_3->SetLineColor(kBlue);
2953 vPCt7_3->SetLineColor(kBlue);
2954 HalfConeVolume->AddNode(vPCt0, 1, p_PC0);
2955 HalfConeVolume->AddNode(vPCt1_1, 1, p_PC1_1);
2956 HalfConeVolume->AddNode(vPCt2_1, 1, p_PC2_1);
2957 HalfConeVolume->AddNode(vPCt3_1, 1, p_PC3_1);
2958 HalfConeVolume->AddNode(vPCt4_1, 1, p_PC4_1);
2959 HalfConeVolume->AddNode(vPCt5_1, 1, p_PC5_1);
2960 HalfConeVolume->AddNode(vPCt6_1, 1, p_PC6_1);
2961 HalfConeVolume->AddNode(vPCt7_1, 1, p_PC7_1);
2962 HalfConeVolume->AddNode(vPCt1_2, 1, p_PC1_2);
2963 HalfConeVolume->AddNode(vPCt2_2, 1, p_PC2_2);
2964 HalfConeVolume->AddNode(vPCt3_2, 1, p_PC3_2);
2965 HalfConeVolume->AddNode(vPCt4_2, 1, p_PC4_2);
2966 HalfConeVolume->AddNode(vPCt5_2, 1, p_PC5_2);
2967 HalfConeVolume->AddNode(vPCt6_2, 1, p_PC6_2);
2968 HalfConeVolume->AddNode(vPCt7_2, 1, p_PC7_2);
2969 HalfConeVolume->AddNode(vPCt1_3, 1, p_PC1_3);
2970 HalfConeVolume->AddNode(vPCt2_3, 1, p_PC2_3);
2971 HalfConeVolume->AddNode(vPCt3_3, 1, p_PC3_3);
2972 HalfConeVolume->AddNode(vPCt4_3, 1, p_PC4_3);
2973 HalfConeVolume->AddNode(vPCt5_3, 1, p_PC5_3);
2974 HalfConeVolume->AddNode(vPCt6_3, 1, p_PC6_3);
2975 HalfConeVolume->AddNode(vPCt7_3, 1, p_PC7_3);
2976
2977 // ==================================================
2978 // ========= Cables for the 2 latest disks ==========
2979 // ==================================================
2980 // PSU --> DISK3
2981 // one diagonal
2982 Double_t xPC_0 = 1.0; // width
2983 Double_t yPC_0 = 0.0836; // thickness
2984 Double_t zPC_0 = 5.0; // length
2985 TGeoVolume* vPC_0 = gGeoManager->MakeBox(Form("vPC_0_S%d", side), mCu, xPC_0 / 2, yPC_0 / 2, zPC_0 / 2);
2986 auto* r_PC_0 = new TGeoRotation("rotation_PC_0", -45., 0., 0.);
2987 r_PC_0->RegisterYourself();
2988 Double_t XPC_0 = signe * 19.7;
2989 Double_t YPC_0 = signe * 20.0;
2990 Double_t ZPC_0 = -71.0;
2991 auto* p_PC_0 = new TGeoCombiTrans(XPC_0, YPC_0, ZPC_0, r_PC_0);
2992 //===========
2993 Double_t xPC_1 = 4.8; // length
2994 Double_t yPC_1 = yPC_0;
2995 Double_t zPC_1 = xPC_0;
2996 TGeoVolume* vPC_1 = gGeoManager->MakeBox(Form("vPC_1_S%d", side), mCu, xPC_1 / 2, yPC_1 / 2, zPC_1 / 2);
2997 auto* r_PC_1 = new TGeoRotation("rotation_PC_1", 45., 90., 0.);
2998 r_PC_1->RegisterYourself();
2999 Double_t XPC_1 = XPC_0 - signe * xPC_1 / 2 * TMath::Cos(45. * TMath::Pi() / 180.);
3000 Double_t YPC_1 = YPC_0 - signe * xPC_1 / 2 * TMath::Sin(45. * TMath::Pi() / 180.);
3001 Double_t ZPC_1 = ZPC_0 + (zPC_0 + yPC_1) / 2;
3002 auto* p_PC_1 = new TGeoCombiTrans(XPC_1, YPC_1, ZPC_1, r_PC_1);
3003 //===========
3004 vPC_0->SetLineColor(kBlue);
3005 vPC_1->SetLineColor(kBlue);
3006 HalfConeVolume->AddNode(vPC_0, 1, p_PC_0);
3007 HalfConeVolume->AddNode(vPC_1, 1, p_PC_1);
3008
3009 // other diagonal
3010 TGeoVolume* vPC_P0 = gGeoManager->MakeBox(Form("vPC_P0_S%d", side), mCu, xPC_0 / 2, yPC_0 / 2, zPC_0 / 2);
3011 auto* r_PC_P0 = new TGeoRotation("rotation_PC_P0", 45., 0., 0.);
3012 r_PC_P0->RegisterYourself();
3013 Double_t XPC_P0 = -signe * 19.7;
3014 Double_t YPC_P0 = signe * 20.0;
3015 Double_t ZPC_P0 = -71.0;
3016 auto* p_PC_P0 = new TGeoCombiTrans(XPC_P0, YPC_P0, ZPC_P0, r_PC_P0);
3017 //===========
3018 Double_t xPC_P1 = xPC_0;
3019 Double_t yPC_P1 = yPC_0;
3020 Double_t zPC_P1 = 4.8;
3021 TGeoVolume* vPC_P1 = gGeoManager->MakeBox(Form("vPC_P1_S%d", side), mCu, xPC_P1 / 2, yPC_P1 / 2, zPC_P1 / 2);
3022 auto* r_PC_P1 = new TGeoRotation("rotation_PC_P1", 45., 90., 0.);
3023 r_PC_P1->RegisterYourself();
3024 Double_t XPC_P1 = XPC_P0 + signe * zPC_P1 / 2 * TMath::Cos(45 * TMath::Pi() / 180);
3025 Double_t YPC_P1 = YPC_P0 - signe * zPC_P1 / 2 * TMath::Sin(45 * TMath::Pi() / 180);
3026 Double_t ZPC_P1 = ZPC_P0 + (zPC_0 + yPC_P1) / 2;
3027 auto* p_PC_P1 = new TGeoCombiTrans(XPC_P1, YPC_P1, ZPC_P1, r_PC_P1);
3028 //===========
3029 vPC_P0->SetLineColor(kBlue);
3030 vPC_P1->SetLineColor(kBlue);
3031 HalfConeVolume->AddNode(vPC_P0, 1, p_PC_P0);
3032 HalfConeVolume->AddNode(vPC_P1, 1, p_PC_P1);
3033
3034 // PSU --> DISK4
3035 // one diagonal
3036 TGeoVolume* vPC_2 = gGeoManager->MakeBox(Form("vPC_2_S%d", side), mCu, xPC_0 / 2, yPC_0 / 2, zPC_0 / 2);
3037 auto* r_PC_2 = new TGeoRotation("rotation_PC_2", -39., 0., 0.);
3038 r_PC_2->RegisterYourself();
3039 Double_t XPC_2 = signe * 17.2;
3040 Double_t YPC_2 = signe * 22.0;
3041 Double_t ZPC_2 = -74.0;
3042 auto* p_PC_2 = new TGeoCombiTrans(XPC_2, YPC_2, ZPC_2, r_PC_2);
3043 //===========
3044 Double_t xPC_3 = 4.8; // length
3045 Double_t yPC_3 = yPC_0;
3046 Double_t zPC_3 = xPC_0;
3047 TGeoVolume* vPC_3 = gGeoManager->MakeBox(Form("vPC_3_S%d", side), mCu, xPC_3 / 2, yPC_3 / 2, zPC_3 / 2);
3048 auto* r_PC_3 = new TGeoRotation("rotation_PC_3", 90. - 39., 90., 0.);
3049 r_PC_3->RegisterYourself();
3050 Double_t XPC_3 = XPC_2 - signe * xPC_3 / 2 * TMath::Cos((90. - 39.) * TMath::Pi() / 180.);
3051 Double_t YPC_3 = YPC_2 - signe * xPC_3 / 2 * TMath::Sin((90. - 39.) * TMath::Pi() / 180.);
3052 Double_t ZPC_3 = ZPC_2 - (zPC_0 + yPC_3) / 2;
3053 auto* p_PC_3 = new TGeoCombiTrans(XPC_3, YPC_3, ZPC_3, r_PC_3);
3054 //===========
3055 vPC_2->SetLineColor(kBlue);
3056 vPC_3->SetLineColor(kBlue);
3057 HalfConeVolume->AddNode(vPC_2, 1, p_PC_2);
3058 HalfConeVolume->AddNode(vPC_3, 1, p_PC_3);
3059
3060 // other diagonal
3061 TGeoVolume* vPC_P2 = gGeoManager->MakeBox(Form("vPC_P2_S%d", side), mCu, xPC_0 / 2, yPC_0 / 2, zPC_0 / 2);
3062 auto* r_PC_P2 = new TGeoRotation("rotation_PC_P2", 39., 0., 0.);
3063 r_PC_P2->RegisterYourself();
3064 Double_t XPC_P2 = -signe * 17.2;
3065 Double_t YPC_P2 = signe * 22.0;
3066 Double_t ZPC_P2 = -74.0;
3067 auto* p_PC_P2 = new TGeoCombiTrans(XPC_P2, YPC_P2, ZPC_P2, r_PC_P2);
3068 //===========
3069 Double_t xPC_P3 = xPC_0;
3070 Double_t yPC_P3 = yPC_0;
3071 Double_t zPC_P3 = 4.8;
3072 TGeoVolume* vPC_P3 = gGeoManager->MakeBox(Form("vPC_P3_S%d", side), mCu, xPC_P1 / 2, yPC_P1 / 2, zPC_P1 / 2);
3073 auto* r_PC_P3 = new TGeoRotation("rotation_PC_P3", 39., 90., 0.);
3074 r_PC_P3->RegisterYourself();
3075 Double_t XPC_P3 = XPC_P2 + signe * zPC_P3 / 2 * TMath::Cos((90. - 39.) * TMath::Pi() / 180.);
3076 Double_t YPC_P3 = YPC_P2 - signe * zPC_P3 / 2 * TMath::Sin((90. - 39.) * TMath::Pi() / 180.);
3077 Double_t ZPC_P3 = ZPC_P2 - (zPC_0 + yPC_P3) / 2;
3078 auto* p_PC_P3 = new TGeoCombiTrans(XPC_P3, YPC_P3, ZPC_P3, r_PC_P3);
3079 //===========
3080 vPC_P2->SetLineColor(kBlue);
3081 vPC_P3->SetLineColor(kBlue);
3082 HalfConeVolume->AddNode(vPC_P2, 1, p_PC_P2);
3083 HalfConeVolume->AddNode(vPC_P3, 1, p_PC_P3);
3084
3085 // Cables for PSU from the patch panel
3086 // b :bottom
3087 Double_t xPC_PSUb0 = 2.5; // width
3088 Double_t yPC_PSUb0 = 0.0418; // thickness
3089 Double_t zPC_PSUb0 = 0.8; // length
3090 // on the PSU connectors
3091 TGeoVolume* vPC_PSUb0 = gGeoManager->MakeBox(Form("vPC_PSUb0_S%d", side), mCu, xPC_PSUb0 / 2, yPC_PSUb0 / 2, zPC_PSUb0 / 2);
3092 auto* r_PC_PSU = new TGeoRotation("rotation_PC_PSU", -signe * 52., 0., 0.);
3093 r_PC_PSU->RegisterYourself();
3094 Double_t XPC_PSUb0 = -signe * 22.4;
3095 Double_t YPC_PSUb0 = -16.4;
3096 Double_t ZPC_PSUb0 = -72.5 + signe * 1.;
3097 auto* p_PC_PSU = new TGeoCombiTrans(XPC_PSUb0, YPC_PSUb0, ZPC_PSUb0, r_PC_PSU);
3098 vPC_PSUb0->SetLineColor(kBlue);
3099 HalfConeVolume->AddNode(vPC_PSUb0, 1, p_PC_PSU);
3100 //===========
3101 Double_t xPC_PSUb1 = 2.1; // length
3102 Double_t yPC_PSUb1 = 0.274; // square side
3103 Double_t zPC_PSUb1 = yPC_PSUb1;
3104 TGeoVolume* vPC_PSUb1 = gGeoManager->MakeBox(Form("vPC_PSUb1_S%d", side), mCu, xPC_PSUb1 / 2, yPC_PSUb1 / 2, zPC_PSUb1 / 2);
3105 r_PC_PSU = new TGeoRotation("rotation_PC_PSU", 90. - signe * 52., 90., 0.);
3106 r_PC_PSU->RegisterYourself();
3107 Double_t XPC_PSUb1 = XPC_PSUb0 - signe * xPC_PSUb1 / 2 * TMath::Cos((90. - 52.) * TMath::Pi() / 180.);
3108 Double_t YPC_PSUb1 = YPC_PSUb0 - xPC_PSUb1 / 2 * TMath::Sin((90. - 52.) * TMath::Pi() / 180.);
3109 Double_t ZPC_PSUb1 = ZPC_PSUb0 - zPC_PSUb0 / 2 - yPC_PSUb1 / 2;
3110 p_PC_PSU = new TGeoCombiTrans(XPC_PSUb1, YPC_PSUb1, ZPC_PSUb1, r_PC_PSU);
3111 vPC_PSUb1->SetLineColor(kBlue);
3112 HalfConeVolume->AddNode(vPC_PSUb1, 1, p_PC_PSU);
3113 //===========
3114 Double_t xPC_PSUb2 = yPC_PSUb1;
3115 Double_t yPC_PSUb2 = yPC_PSUb1;
3116 Double_t zPC_PSUb2 = 11.; // length
3117 TGeoVolume* vPC_PSUb2 = gGeoManager->MakeBox(Form("vPC_PSUb0_S%d", side), mCu, xPC_PSUb2 / 2, yPC_PSUb2 / 2, zPC_PSUb2 / 2);
3118 r_PC_PSU = new TGeoRotation("rotation_PC_PSU", -signe * 52., 0., 0.);
3119 r_PC_PSU->RegisterYourself();
3120 Double_t XPC_PSUb2 = -signe * 24.2;
3121 Double_t YPC_PSUb2 = -17.8;
3122 Double_t ZPC_PSUb2 = ZPC_PSUb0 - zPC_PSUb0 / 2 - zPC_PSUb2 / 2;
3123 p_PC_PSU = new TGeoCombiTrans(XPC_PSUb2, YPC_PSUb2, ZPC_PSUb2, r_PC_PSU);
3124 vPC_PSUb2->SetLineColor(kBlue);
3125 HalfConeVolume->AddNode(vPC_PSUb2, 1, p_PC_PSU);
3126
3127 // t : top
3128 TGeoVolume* vPC_PSUt0 = gGeoManager->MakeBox(Form("vPC_PSUt0_S%d", side), mCu, xPC_PSUb0 / 2, yPC_PSUb0 / 2, zPC_PSUb0 / 2);
3129 r_PC_PSU = new TGeoRotation("rotation_PC_PSU", signe * 52., 0., 0.);
3130 r_PC_PSU->RegisterYourself();
3131 Double_t XPC_PSUt0 = -signe * 22.4;
3132 Double_t YPC_PSUt0 = 16.4;
3133 Double_t ZPC_PSUt0 = -72.5 - signe * 1.;
3134 p_PC_PSU = new TGeoCombiTrans(XPC_PSUt0, YPC_PSUt0, ZPC_PSUt0, r_PC_PSU);
3135 vPC_PSUt0->SetLineColor(kBlue);
3136 HalfConeVolume->AddNode(vPC_PSUt0, 1, p_PC_PSU);
3137 //===========
3138 TGeoVolume* vPC_PSUt1 = gGeoManager->MakeBox(Form("vPC_PSUt1_S%d", side), mCu, xPC_PSUb1 / 2, yPC_PSUb1 / 2, zPC_PSUb1 / 2);
3139 r_PC_PSU = new TGeoRotation("rotation_PC_PSU", -(90.0 - signe * 52.0), 90., 0.);
3140 r_PC_PSU->RegisterYourself();
3141 Double_t XPC_PSUt1 = XPC_PSUt0 - signe * xPC_PSUb1 / 2 * TMath::Cos((90. - 52.) * TMath::Pi() / 180);
3142 Double_t YPC_PSUt1 = YPC_PSUt0 + xPC_PSUb1 / 2 * TMath::Sin((90. - 52.) * TMath::Pi() / 180.);
3143 Double_t ZPC_PSUt1 = ZPC_PSUt0 - zPC_PSUb0 / 2 - yPC_PSUb1 / 2;
3144 p_PC_PSU = new TGeoCombiTrans(XPC_PSUt1, YPC_PSUt1, ZPC_PSUt1, r_PC_PSU);
3145 vPC_PSUt1->SetLineColor(kBlue);
3146 HalfConeVolume->AddNode(vPC_PSUt1, 1, p_PC_PSU);
3147 //===========
3148 TGeoVolume* vPC_PSUt2 = gGeoManager->MakeBox(Form("vPC_PSUt0_S%d", side), mCu, xPC_PSUb2 / 2, yPC_PSUb2 / 2, zPC_PSUb2 / 2);
3149 r_PC_PSU = new TGeoRotation("rotation_PC_PSU", signe * 52., 0., 0.);
3150 r_PC_PSU->RegisterYourself();
3151 Double_t XPC_PSUt2 = XPC_PSUb2;
3152 Double_t YPC_PSUt2 = -YPC_PSUb2;
3153 Double_t ZPC_PSUt2 = ZPC_PSUt0 - zPC_PSUb0 / 2 - zPC_PSUb2 / 2;
3154 p_PC_PSU = new TGeoCombiTrans(XPC_PSUt2, YPC_PSUt2, ZPC_PSUt2, r_PC_PSU);
3155 vPC_PSUt2->SetLineColor(kBlue);
3156 HalfConeVolume->AddNode(vPC_PSUt2, 1, p_PC_PSU);
3157}
Constants for the MFT; distance unit is cm.
int32_t i
Class describing MFT Geometry Builder.
ClassImp(o2::mft::HalfCone)
Class building geometry of one half of one MFT half-cone.
uint32_t side
Definition RawData.h:0
TGeoVolumeAssembly * createHalfCone(Int_t half)
Definition HalfCone.cxx:54
void makeFlexCables(TGeoVolumeAssembly *HalfConeVolume, Int_t half, Int_t signe)
void makeMotherBoards(TGeoVolumeAssembly *HalfConeVolume, Int_t half, Int_t signe, Double_t tyMB0, Double_t tyMB0_3, Double_t tzMB0)
void makePowerCables(TGeoVolumeAssembly *HalfConeVolume, Int_t half, Int_t signe)
void makeReadoutCables(TGeoVolumeAssembly *HalfConeVolume, Int_t half, Int_t signe)
void makeAirVentilation(TGeoVolumeAssembly *HalfConeVolume, Int_t half, Int_t signe)
GLint GLenum GLint x
Definition glcorearb.h:403
GLint GLsizei width
Definition glcorearb.h:270
GLuint GLsizei GLsizei * length
Definition glcorearb.h:790