100 Double_t cornerRadiusTop[5];
101 cornerRadiusTop[0] = 0.2;
102 cornerRadiusTop[1] = 0.2;
103 cornerRadiusTop[2] = 0.2;
104 cornerRadiusTop[3] = 0.2;
105 cornerRadiusTop[4] = 0.2;
107 Double_t thicknessTop[5];
108 thicknessTop[0] = 0.2;
109 thicknessTop[1] = 0.2;
110 thicknessTop[2] = 0.2;
111 thicknessTop[3] = 0.2;
112 thicknessTop[4] = 0.2;
114 Double_t thicknessMiddle[5];
115 thicknessMiddle[0] = 0.2;
116 thicknessMiddle[1] = 0.2;
117 thicknessMiddle[2] = 0.2;
118 thicknessMiddle[3] = 0.2;
119 thicknessMiddle[4] = 0.2;
121 Double_t thicknessBottom[5];
122 thicknessBottom[0] = 0.6;
123 thicknessBottom[1] = 0.6;
124 thicknessBottom[2] = 0.6;
125 thicknessBottom[3] = 0.6;
126 thicknessBottom[4] = 0.6;
128 Double_t widthTop1[5];
136 widthTop2 = widthTop1[disk] - 2 * cornerRadiusTop[disk];
138 Double_t widthMiddle1[5];
139 widthMiddle1[0] = 2.2;
140 widthMiddle1[1] = 2.2;
141 widthMiddle1[2] = 2.2;
142 widthMiddle1[3] = 2.2;
143 widthMiddle1[4] = 2.2;
145 Double_t widthBottom1[5];
146 widthBottom1[0] = 1.32;
147 widthBottom1[1] = 1.32;
148 widthBottom1[2] = 1.32;
149 widthBottom1[3] = 1.32;
150 widthBottom1[4] = 1.32;
152 Double_t lengthTop1[5];
153 lengthTop1[0] = 5.91;
154 lengthTop1[1] = 5.91;
155 lengthTop1[2] = 5.91;
158 lengthTop1[3] = 5.91;
159 lengthTop1[4] = 5.91;
162 lengthTop2 = cornerRadiusTop[disk];
164 Double_t lengthMiddle1[5];
165 lengthMiddle1[0] = mSupportYDimensions[0][0];
166 lengthMiddle1[1] = mSupportYDimensions[1][0];
167 lengthMiddle1[2] = mSupportYDimensions[2][0];
169 lengthMiddle1[3] = mSupportYDimensions[3][0];
170 lengthMiddle1[4] = mSupportYDimensions[4][0];
172 Double_t lengthBottom1;
173 lengthBottom1 = lengthMiddle1[disk];
175 auto* Top1 =
new TGeoBBox(Form(
"Top1MF%d", disk), lengthTop1[disk] / 2,
176 widthTop1[disk] / 2, thicknessTop[disk] / 2);
177 auto* Top2 =
new TGeoBBox(Form(
"Top2MF%d", disk), lengthTop2 / 2,
178 widthTop2 / 2, thicknessTop[disk] / 2);
179 auto* Top3 =
new TGeoTube(Form(
"Top3MF%d", disk), 0, cornerRadiusTop[disk],
180 thicknessTop[disk] / 2);
182 new TGeoBBox(Form(
"Middle1MF%d", disk), lengthMiddle1[disk] / 2,
183 widthMiddle1[disk] / 2, thicknessMiddle[disk] / 2);
185 new TGeoBBox(Form(
"Bottom1MF%d", disk), lengthBottom1 / 2,
186 widthBottom1[disk] / 2, thicknessBottom[disk] / 2);
188 TGeoTranslation* tTop[7];
190 new TGeoTranslation(Form(
"tTop1MF%d", disk), 0., 0.,
191 thicknessMiddle[disk] / 2 + thicknessTop[disk] / 2);
192 tTop[1] =
new TGeoTranslation(
193 Form(
"tTop2MF%d", disk), lengthTop1[disk] / 2 + lengthTop2 / 2, 0.,
194 thicknessMiddle[disk] / 2 + thicknessTop[disk] / 2);
196 new TGeoTranslation(Form(
"tTop3MF%d", disk), lengthTop1[disk] / 2,
197 widthTop1[disk] / 2 - cornerRadiusTop[disk],
198 thicknessMiddle[disk] / 2 + thicknessTop[disk] / 2);
200 new TGeoTranslation(Form(
"tTop4MF%d", disk), lengthTop1[disk] / 2,
201 -(widthTop1[disk] / 2 - cornerRadiusTop[disk]),
202 thicknessMiddle[disk] / 2 + thicknessTop[disk] / 2);
203 tTop[4] =
new TGeoTranslation(
204 Form(
"tTop5MF%d", disk), -(lengthTop1[disk] / 2 + lengthTop2 / 2), 0.,
205 thicknessMiddle[disk] / 2 + thicknessTop[disk] / 2);
207 new TGeoTranslation(Form(
"tTop6MF%d", disk), -lengthTop1[disk] / 2,
208 widthTop1[disk] / 2 - cornerRadiusTop[disk],
209 thicknessMiddle[disk] / 2 + thicknessTop[disk] / 2);
211 new TGeoTranslation(Form(
"tTop7MF%d", disk), -lengthTop1[disk] / 2,
212 -(widthTop1[disk] / 2 - cornerRadiusTop[disk]),
213 thicknessMiddle[disk] / 2 + thicknessTop[disk] / 2);
215 for (Int_t
i = 0;
i < 7; ++
i) {
216 tTop[
i]->RegisterYourself();
219 TGeoTranslation* tMiddle1 =
220 new TGeoTranslation(Form(
"tMiddle1MF%d", disk), 0, 0, 0);
221 TGeoTranslation* tBottom1 =
new TGeoTranslation(
222 Form(
"tBottom1MF%d", disk), 0, 0,
223 -(thicknessMiddle[disk] / 2 + thicknessBottom[disk] / 2));
224 tMiddle1->RegisterYourself();
225 tBottom1->RegisterYourself();
227 Double_t radiusPipeHole1[5];
228 radiusPipeHole1[0] = 0.192 / 2;
229 radiusPipeHole1[1] = 0.192 / 2;
230 radiusPipeHole1[2] = 0.192 / 2;
231 radiusPipeHole1[3] = 0.192 / 2;
232 radiusPipeHole1[4] = 0.192 / 2;
234 Double_t radiusPipeHole2[5];
235 radiusPipeHole2[0] = 0.300 / 2;
236 radiusPipeHole2[1] = 0.300 / 2;
237 radiusPipeHole2[2] = 0.300 / 2;
238 radiusPipeHole2[3] = 0.300 / 2;
239 radiusPipeHole2[4] = 0.300 / 2;
241 Double_t lengthPipeHole1[5];
242 lengthPipeHole1[0] = 0.95;
243 lengthPipeHole1[1] = 0.95;
244 lengthPipeHole1[2] = 0.95;
245 lengthPipeHole1[3] = 0.95;
246 lengthPipeHole1[4] = 0.95;
248 Double_t lengthPipeHole2 =
249 (thicknessTop[disk] + thicknessMiddle[disk] + thicknessBottom[disk]) -
250 lengthPipeHole1[disk];
253 new TGeoTube(
"Pipe1", 0, radiusPipeHole1[disk],
257 radiusPipeHole1[disk], 0, radiusPipeHole2[disk]);
259 TGeoTranslation* tPipePart1 =
260 new TGeoTranslation(Form(
"tPipePart1MF%d", disk), 0, 0, 0);
261 TGeoTranslation* tPipePart2 =
262 new TGeoTranslation(Form(
"tPipePart2MF%d", disk), 0, 0,
263 lengthPipeHole1[disk] / 2 + lengthPipeHole2 / 2);
264 tPipePart1->RegisterYourself();
265 tPipePart2->RegisterYourself();
267 TGeoCompositeShape* shapePipe =
new TGeoCompositeShape(
268 Form(
"shapePipeMF%d", disk),
269 Form(
"Pipe1:tPipePart1MF%d + Pipe2:tPipePart2MF%d", disk, disk));
278 TGeoTranslation* tPipe;
282 Double_t lengthBulge[5];
283 lengthBulge[0] = 0.395;
284 lengthBulge[1] = 0.395;
285 lengthBulge[2] = 0.395;
286 lengthBulge[3] = 0.395;
287 lengthBulge[4] = 0.395;
289 Double_t offsetPipeRow[5][5] = {};
290 offsetPipeRow[0][0] = mXPosition0[0] - lengthBulge[0] / 2;
291 offsetPipeRow[0][1] = mXPosition0[1] - lengthBulge[0] / 2;
292 offsetPipeRow[0][2] = mXPosition0[2] - lengthBulge[0] / 2;
294 offsetPipeRow[1][0] = mXPosition1[0] - lengthBulge[1] / 2;
295 offsetPipeRow[1][1] = mXPosition1[1] - lengthBulge[1] / 2;
296 offsetPipeRow[1][2] = mXPosition1[2] - lengthBulge[1] / 2;
298 offsetPipeRow[2][0] = mXPosition2[0] - lengthBulge[2] / 2;
299 offsetPipeRow[2][1] = mXPosition2[1] - lengthBulge[2] / 2;
300 offsetPipeRow[2][2] = mXPosition2[2] - lengthBulge[2] / 2;
302 offsetPipeRow[3][0] = mXPosition3[0] - lengthBulge[3] / 2;
303 offsetPipeRow[3][1] = mXPosition3[1] - lengthBulge[3] / 2;
304 offsetPipeRow[3][2] = mXPosition3[2] - lengthBulge[3] / 2;
305 offsetPipeRow[3][3] = mXPosition3[3] - lengthBulge[3] / 2;
307 offsetPipeRow[4][0] = mXPosition4[0] - lengthBulge[4] / 2;
308 offsetPipeRow[4][1] = mXPosition4[1] - lengthBulge[4] / 2;
309 offsetPipeRow[4][2] = mXPosition4[2] - lengthBulge[4] / 2;
310 offsetPipeRow[4][3] = mXPosition4[3] - lengthBulge[4] / 2;
311 offsetPipeRow[4][4] = mXPosition4[4] - lengthBulge[4] / 2;
313 Double_t deltaz = mHeatExchangerThickness -
315 2 * mCarbonThickness;
317 Double_t lengthTwoPipeCol[5];
318 lengthTwoPipeCol[0] = mZPlan[disk] + deltaz / 2. - mCarbonThickness -
322 lengthTwoPipeCol[1] = mZPlan[disk] + deltaz / 2. - mCarbonThickness -
326 lengthTwoPipeCol[2] = mZPlan[disk] + deltaz / 2. - mCarbonThickness -
330 lengthTwoPipeCol[3] = mZPlan[disk] + deltaz / 2. - mCarbonThickness -
334 lengthTwoPipeCol[4] = mZPlan[disk] + deltaz / 2. - mCarbonThickness -
339 TString namePipe =
"";
341 for (Int_t iPipeRow = 0; iPipeRow < nPipeRow[disk]; iPipeRow++) {
342 tPipe =
new TGeoTranslation(
343 Form(
"tPipe%dMF%d", iPipeRow + 1, disk),
344 lengthMiddle1[disk] / 2 - offsetPipeRow[disk][iPipeRow], 0, 0);
345 tPipe->RegisterYourself();
347 if (iPipeRow == nPipeRow[disk] - 1) {
348 namePipe += Form(
"shapePipeMF%d:tPipe%dMF%d", disk, iPipeRow + 1, disk);
350 namePipe += Form(
"shapePipeMF%d:tPipe%dMF%d +", disk, iPipeRow + 1, disk);
354 TGeoCompositeShape* posiPipeOneCol =
355 new TGeoCompositeShape(Form(
"posiPipeOneColMF%d", disk), namePipe);
357 tPipe =
new TGeoTranslation(Form(
"tPipeLeftMF%d", disk), 0,
358 -lengthTwoPipeCol[disk], 0);
359 tPipe->RegisterYourself();
360 tPipe =
new TGeoTranslation(Form(
"tPipeRightMF%d", disk), 0,
361 lengthTwoPipeCol[disk], 0);
362 tPipe->RegisterYourself();
364 TGeoCompositeShape* shapePipes =
new TGeoCompositeShape(
365 Form(
"shapePipesMF%d", disk), Form(
"posiPipeOneColMF%d:tPipeLeftMF%d + "
366 "posiPipeOneColMF%d:tPipeRightMF%d",
367 disk, disk, disk, disk));
368 TGeoCompositeShape* shapeBase =
new TGeoCompositeShape(
369 Form(
"shapeBaseMF%d", disk),
370 Form(
"Top1MF%d:tTop1MF%d + Top2MF%d:tTop2MF%d + Top3MF%d:tTop3MF%d + "
371 "Top3MF%d:tTop4MF%d + Top2MF%d:tTop5MF%d + Top3MF%d:tTop6MF%d + "
372 "Top3MF%d:tTop7MF%d + Middle1MF%d:tMiddle1MF%d + "
373 "Bottom1MF%d:tBottom1MF%d",
374 disk, disk, disk, disk, disk, disk, disk, disk, disk, disk, disk,
375 disk, disk, disk, disk, disk, disk, disk));
377 TGeoTranslation* tBase =
new TGeoTranslation(
378 Form(
"tBaseMF%d", disk), 0, 0,
379 -((thicknessTop[disk] + thicknessMiddle[disk] + thicknessBottom[disk]) /
381 (thicknessBottom[disk] + thicknessMiddle[disk] / 2)));
382 tBase->RegisterYourself();
383 TGeoTranslation* tPipes =
384 new TGeoTranslation(Form(
"tPiesMF%d", disk), 0, 0,
385 -((lengthPipeHole1[disk] + lengthPipeHole2) / 2 -
386 lengthPipeHole1[disk] / 2));
387 tPipes->RegisterYourself();
389 TGeoCompositeShape* shapeManifold1 =
new TGeoCompositeShape(
390 Form(
"shapeManifold1MF%d", disk),
391 Form(
"shapeBaseMF%d:tBaseMF%d - shapePipesMF%d:tPiesMF%d", disk, disk,
399 lengthBody = lengthMiddle1[disk];
401 widthBody = widthMiddle1[disk];
402 Double_t thicknessBody[5];
403 thicknessBody[0] = 0.8;
404 thicknessBody[1] = 0.8;
405 thicknessBody[2] = 0.8;
406 thicknessBody[3] = 0.8;
407 thicknessBody[4] = 0.8;
409 Double_t cornerRadiusBodyBathtub1[5];
410 cornerRadiusBodyBathtub1[0] = cornerRadiusTop[disk];
411 cornerRadiusBodyBathtub1[1] = cornerRadiusTop[disk];
412 cornerRadiusBodyBathtub1[2] = cornerRadiusTop[disk];
413 cornerRadiusBodyBathtub1[3] = cornerRadiusTop[disk];
414 cornerRadiusBodyBathtub1[4] = cornerRadiusTop[disk];
416 Double_t lengthBodyBathtub1;
417 lengthBodyBathtub1 = lengthTop1[disk];
418 Double_t widthBodyBathtub1;
419 widthBodyBathtub1 = widthTop1[disk];
420 Double_t thicknessBodyBathtub1[5];
421 thicknessBodyBathtub1[0] = 0.4;
422 thicknessBodyBathtub1[1] = 0.4;
423 thicknessBodyBathtub1[2] = 0.4;
424 thicknessBodyBathtub1[3] = 0.4;
425 thicknessBodyBathtub1[4] = 0.4;
427 Double_t lengthBodyBathtub2;
428 lengthBodyBathtub2 = cornerRadiusBodyBathtub1[disk];
429 Double_t widthBodyBathtub2;
430 widthBodyBathtub2 = widthTop1[disk] - 2 * cornerRadiusBodyBathtub1[disk];
431 Double_t thicknessBodyBathtub2[5];
432 thicknessBodyBathtub2[0] = 0.4;
433 thicknessBodyBathtub2[1] = 0.4;
434 thicknessBodyBathtub2[2] = 0.4;
435 thicknessBodyBathtub2[3] = 0.4;
436 thicknessBodyBathtub2[4] = 0.4;
438 auto* coverBody1 =
new TGeoBBox(Form(
"coverBody1MF%d", disk), lengthBody / 2,
439 widthBody / 2, thicknessBody[disk] / 2);
441 auto* coverBodyBathtub1 =
442 new TGeoBBox(Form(
"coverBodyBathtub1MF%d", disk),
446 auto* coverBodyBathtub2 =
447 new TGeoBBox(Form(
"coverBodyBathtub2MF%d", disk),
451 auto* coverBodyBathtub3 =
452 new TGeoTube(Form(
"coverBodyBathtub3MF%d", disk), 0,
456 TGeoTranslation* tcoverBodyBathtub[7];
457 tcoverBodyBathtub[0] =
458 new TGeoTranslation(Form(
"tcoverBodyBathtub1MF%d", disk), 0., 0., 0);
460 tcoverBodyBathtub[1] =
new TGeoTranslation(
461 Form(
"tcoverBodyBathtub2MF%d", disk),
462 lengthBodyBathtub1 / 2 + lengthBodyBathtub2 / 2, 0., 0.);
463 tcoverBodyBathtub[2] =
new TGeoTranslation(
464 Form(
"tcoverBodyBathtub3MF%d", disk), lengthBodyBathtub1 / 2,
465 widthBodyBathtub1 / 2 - cornerRadiusBodyBathtub1[disk], 0.);
466 tcoverBodyBathtub[3] =
new TGeoTranslation(
467 Form(
"tcoverBodyBathtub4MF%d", disk), lengthBodyBathtub1 / 2,
468 -(widthBodyBathtub1 / 2 - cornerRadiusBodyBathtub1[disk]), 0.);
470 tcoverBodyBathtub[4] =
new TGeoTranslation(
471 Form(
"tcoverBodyBathtub5MF%d", disk),
472 -(lengthBodyBathtub1 / 2 + lengthBodyBathtub2 / 2), 0., 0.);
473 tcoverBodyBathtub[5] =
new TGeoTranslation(
474 Form(
"tcoverBodyBathtub6MF%d", disk), -(lengthBodyBathtub1 / 2),
475 widthBodyBathtub1 / 2 - cornerRadiusBodyBathtub1[disk], 0.);
476 tcoverBodyBathtub[6] =
new TGeoTranslation(
477 Form(
"tcoverBodyBathtub7MF%d", disk), -(lengthBodyBathtub1 / 2),
478 -(widthBodyBathtub1 / 2 - cornerRadiusBodyBathtub1[disk]), 0.);
480 for (Int_t
i = 0;
i < 7; ++
i) {
481 tcoverBodyBathtub[
i]->RegisterYourself();
484 TGeoCompositeShape* shapeCoverBathtub =
new TGeoCompositeShape(
485 Form(
"shapeCoverBathtubMF%d", disk),
486 Form(
"coverBodyBathtub1MF%d + "
487 "coverBodyBathtub2MF%d:tcoverBodyBathtub2MF%d + "
488 "coverBodyBathtub3MF%d:tcoverBodyBathtub3MF%d + "
489 "coverBodyBathtub3MF%d:tcoverBodyBathtub4MF%d + "
490 "coverBodyBathtub2MF%d:tcoverBodyBathtub5MF%d + "
491 "coverBodyBathtub3MF%d:tcoverBodyBathtub6MF%d + "
492 "coverBodyBathtub3MF%d:tcoverBodyBathtub7MF%d",
493 disk, disk, disk, disk, disk, disk, disk, disk, disk, disk, disk,
496 TGeoTranslation* tcoverBathtub =
new TGeoTranslation(
497 Form(
"tcoverBathtubMF%d", disk), 0, 0,
498 thicknessBody[disk] / 2 - thicknessBodyBathtub1[disk] / 2);
499 tcoverBathtub->RegisterYourself();
501 Double_t cornerRadiusStep1[5];
502 cornerRadiusStep1[0] = 0.2;
503 cornerRadiusStep1[1] = 0.2;
504 cornerRadiusStep1[2] = 0.2;
505 cornerRadiusStep1[3] = 0.2;
506 cornerRadiusStep1[4] = 0.2;
508 Double_t lengthStep1[5];
509 lengthStep1[0] = 5.61;
510 lengthStep1[1] = 5.61;
511 lengthStep1[2] = 5.61;
512 lengthStep1[3] = 5.61;
513 lengthStep1[4] = 5.61;
514 Double_t widthStep1[5];
515 widthStep1[0] = 1.40;
516 widthStep1[1] = 1.40;
517 widthStep1[2] = 1.40;
518 widthStep1[3] = 1.40;
519 widthStep1[4] = 1.40;
520 Double_t thicknessStep1[5];
521 thicknessStep1[0] = 0.2;
522 thicknessStep1[1] = 0.2;
523 thicknessStep1[2] = 0.2;
524 thicknessStep1[3] = 0.2;
525 thicknessStep1[4] = 0.2;
527 Double_t lengthStep2;
528 lengthStep2 = cornerRadiusStep1[disk];
530 widthStep2 = widthStep1[disk] - cornerRadiusStep1[disk];
531 Double_t thicknessStep2;
532 thicknessStep2 = thicknessStep1[disk];
534 Double_t angleStep3 = 45. / 180. * TMath::Pi();
535 Double_t lengthStep3[5];
536 lengthStep3[0] = 0.3 / TMath::Cos(angleStep3);
537 lengthStep3[1] = 0.3 / TMath::Cos(angleStep3);
538 lengthStep3[2] = 0.3 / TMath::Cos(angleStep3);
539 lengthStep3[3] = 0.3 / TMath::Cos(angleStep3);
540 lengthStep3[4] = 0.3 / TMath::Cos(angleStep3);
542 widthStep3 = 0.3 / TMath::Cos(angleStep3);
543 Double_t thicknessStep3;
544 thicknessStep3 = thicknessStep1[disk];
546 auto* coverBodyStep1 =
new TGeoBBox(
547 Form(
"coverBodyStep1MF%d", disk),
551 auto* coverBodyStep2 =
new TGeoBBox(Form(
"coverBodyStep2MF%d", disk),
555 auto* coverBodyStep3 =
556 new TGeoTube(Form(
"coverBodyStep3MF%d", disk), 0,
559 auto* coverBodyStep4 =
560 new TGeoBBox(Form(
"coverBodyStep4MF%d", disk),
565 TGeoTranslation* tcoverBodyStep[4];
567 new TGeoTranslation(Form(
"tcoverBodyStep1MF%d", disk), 0., 0., 0);
568 tcoverBodyStep[1] =
new TGeoTranslation(
569 Form(
"tcoverBodyStep2MF%d", disk),
570 (lengthStep1[disk] - cornerRadiusStep1[disk]) / 2 + lengthStep2 / 2,
571 cornerRadiusStep1[disk] / 2, 0.);
572 tcoverBodyStep[2] =
new TGeoTranslation(
573 Form(
"tcoverBodyStep3MF%d", disk),
574 (lengthStep1[disk] - cornerRadiusStep1[disk]) / 2,
575 -(widthStep1[disk] / 2 - cornerRadiusStep1[disk]), 0.);
576 tcoverBodyStep[3] =
new TGeoTranslation(
577 Form(
"tcoverBodyStep4MF%d", disk), -(lengthStep1[disk] - lengthStep2) / 2,
578 -widthStep1[disk] / 2, 0.);
580 TGeoRotation* rcoverBodyStep =
581 new TGeoRotation(Form(
"rcoverBodyStep4MF%d", disk), 45, 0, 0);
582 rcoverBodyStep->RegisterYourself();
584 TGeoCombiTrans* combtcoverBodyStep[4];
585 combtcoverBodyStep[3] =
586 new TGeoCombiTrans(Form(
"combtcoverBodyStep4MF%d", disk),
587 -(lengthStep1[disk] - lengthStep2) / 2,
588 -widthStep1[disk] / 2, 0., rcoverBodyStep);
589 combtcoverBodyStep[3]->RegisterYourself();
591 for (Int_t
i = 0;
i < 4; ++
i) {
592 tcoverBodyStep[
i]->RegisterYourself();
595 TGeoCompositeShape* shapeStep =
new TGeoCompositeShape(
596 Form(
"shapeStepMF%d", disk),
597 Form(
"coverBodyStep1MF%d:tcoverBodyStep1MF%d + "
598 "coverBodyStep2MF%d:tcoverBodyStep2MF%d + "
599 "coverBodyStep3MF%d:tcoverBodyStep3MF%d + "
600 "coverBodyStep4MF%d:combtcoverBodyStep4MF%d",
601 disk, disk, disk, disk, disk, disk, disk, disk));
603 TGeoTranslation* tcoverStep =
new TGeoTranslation(
604 Form(
"tcoverStepMF%d", disk),
605 -(lengthMiddle1[disk] / 2 - (lengthStep1[disk] / 2 - lengthStep2 / 2)),
606 (widthBody / 2 - widthStep1[disk] / 2),
607 -(thicknessBody[disk] / 2 - thicknessStep1[disk] / 2));
608 tcoverStep->RegisterYourself();
610 Double_t widthBulge[5];
611 widthBulge[0] = 0.50;
612 widthBulge[1] = 0.50;
613 widthBulge[2] = 0.50;
614 widthBulge[3] = 0.50;
615 widthBulge[4] = 0.50;
616 Double_t thicknessBulge;
617 thicknessBulge = thicknessBody[disk];
618 Double_t lengthBulgeSub[5];
619 lengthBulgeSub[0] = 0.2;
620 lengthBulgeSub[1] = 0.2;
621 lengthBulgeSub[2] = 0.2;
622 lengthBulgeSub[3] = 0.2;
623 lengthBulgeSub[4] = 0.2;
624 Double_t widthBulgeSub;
625 widthBulgeSub = lengthBulgeSub[disk];
626 Double_t thicknessBulgeSub[5];
627 thicknessBulgeSub[0] = 0.5;
628 thicknessBulgeSub[1] = 0.5;
629 thicknessBulgeSub[2] = 0.5;
630 thicknessBulgeSub[3] = 0.5;
631 thicknessBulgeSub[4] = 0.5;
633 auto* coverBodyBulge =
634 new TGeoBBox(Form(
"coverBodyBulgeMF%d", disk), lengthBulge[disk] / 2,
635 widthBulge[disk] / 2, thicknessBulge / 2);
636 auto* coverBodyBulgeSub =
new TGeoBBox(
637 Form(
"coverBodyBulgeSubMF%d", disk), lengthBulgeSub[disk] / 2,
640 TGeoRotation* rcoverBodyBulgeSub =
641 new TGeoRotation(Form(
"rcoverBodyBulgeSubMF%d", disk), 0, 90, 45);
642 rcoverBodyBulgeSub->RegisterYourself();
644 TGeoTranslation* tcoverBodyBulgeSub =
new TGeoTranslation(
645 Form(
"tcoverBodyBulgeSubMF%d", disk), -lengthBulge[disk] / 2, 0, 0);
646 tcoverBodyBulgeSub->RegisterYourself();
648 TGeoCombiTrans* combtcoverBodyBulgeSub =
649 new TGeoCombiTrans(Form(
"combtcoverBodyBulgeSubMF%d", disk),
650 -lengthBulge[disk] / 2, 0, 0, rcoverBodyBulgeSub);
651 combtcoverBodyBulgeSub->RegisterYourself();
653 TGeoCompositeShape* shapeBulge =
new TGeoCompositeShape(
654 Form(
"shapeBulgeMF%d", disk),
655 Form(
"coverBodyBulgeMF%d - "
656 "coverBodyBulgeSubMF%d:combtcoverBodyBulgeSubMF%d",
659 TGeoTranslation* tcoverBulge =
660 new TGeoTranslation(Form(
"tcoverBulgeMF%d", disk),
661 -(lengthMiddle1[disk] / 2 + lengthBulge[disk] / 2),
662 -(widthBody / 2 - widthBulge[disk] / 2), 0);
663 tcoverBulge->RegisterYourself();
665 Double_t holeRadius[5];
666 holeRadius[0] = 0.25;
667 holeRadius[1] = 0.25;
668 holeRadius[2] = 0.25;
669 holeRadius[3] = 0.25;
670 holeRadius[4] = 0.25;
671 Double_t holeOffset[5];
672 holeOffset[0] = 0.65;
673 holeOffset[1] = 0.65;
674 holeOffset[2] = 0.65;
675 holeOffset[3] = 0.65;
676 holeOffset[4] = 0.65;
678 auto* coverBodyHole =
679 new TGeoTube(Form(
"coverBodyHoleMF%d", disk), 0, holeRadius[disk],
681 TGeoTranslation* tcoverBodyHole =
682 new TGeoTranslation(Form(
"tcoverBodyHoleMF%d", disk),
683 lengthBody / 2 - holeOffset[disk], 0, 0);
684 tcoverBodyHole->RegisterYourself();
686 TGeoCompositeShape* shapeManifold2 =
new TGeoCompositeShape(
687 Form(
"shapeManifold2MF%d", disk),
688 Form(
"coverBody1MF%d - coverBodyHoleMF%d:tcoverBodyHoleMF%d - "
689 "shapeCoverBathtubMF%d:tcoverBathtubMF%d - "
690 "shapeStepMF%d:tcoverStepMF%d + shapeBulgeMF%d:tcoverBulgeMF%d",
691 disk, disk, disk, disk, disk, disk, disk, disk, disk));
693 TGeoRotation* rshapeManifold2 =
694 new TGeoRotation(Form(
"rshapeManifold2MF%d", disk), 0, 180, 0);
695 rshapeManifold2->RegisterYourself();
697 TGeoTranslation* tshapeManifold1 =
new TGeoTranslation(
698 Form(
"tshapeManifold1MF%d", disk), 0, 0,
699 -((thicknessBody[disk] + thicknessMiddle[disk] + thicknessBottom[disk]) /
701 (thicknessTop[disk] + thicknessMiddle[disk] + thicknessBottom[disk]) /
703 tshapeManifold1->RegisterYourself();
705 TGeoTranslation* tshapeManifold2 =
new TGeoTranslation(
706 Form(
"tshapeManifold2MF%d", disk), 0, 0,
707 (thicknessBody[disk] + thicknessMiddle[disk] + thicknessBottom[disk]) /
709 thicknessBody[disk] / 2);
710 tshapeManifold2->RegisterYourself();
712 TGeoCombiTrans* combtshapeManifold2 =
new TGeoCombiTrans(
713 Form(
"combtshapeManifold2MF%d", disk), 0, 0,
714 (thicknessBody[disk] + thicknessMiddle[disk] + thicknessBottom[disk]) /
716 thicknessBody[disk] / 2,
718 combtshapeManifold2->RegisterYourself();
720 TGeoCompositeShape* shapeManifold =
new TGeoCompositeShape(
721 "shapeManifold", Form(
"shapeManifold1MF%d:tshapeManifold1MF%d + "
722 "shapeManifold2MF%d:combtshapeManifold2MF%d",
723 disk, disk, disk, disk));
729 Double_t innerRadiusPlug1 = 0.4 / 2.;
730 Double_t outerRadiusPlug1 = 0.6 / 2.;
731 Double_t thicknessPlug1 = 0.105;
733 auto* plug1 =
new TGeoTube(Form(
"plug1MF%d", disk), innerRadiusPlug1,
734 outerRadiusPlug1, thicknessPlug1 / 2);
736 Double_t innerRadiusPlug2 = innerRadiusPlug1;
737 Double_t outerMinRadiusPlug2 = 0.6 / 2.;
738 Double_t outerMaxRadiusPlug2 = outerRadiusPlug1;
739 Double_t thicknessPlug2 = 0.025;
741 auto* plug2 =
new TGeoCone(Form(
"plug2MF%d", disk), thicknessPlug2 / 2,
742 innerRadiusPlug2, outerMaxRadiusPlug2,
743 innerRadiusPlug2, outerMinRadiusPlug2);
745 Double_t innerRadiusPlug3 = innerRadiusPlug1;
746 Double_t outerRadiusPlug3 = 0.5 / 2;
747 Double_t thicknessPlug3 = 0.086;
749 auto* plug3 =
new TGeoTube(Form(
"plug3MF%d", disk), innerRadiusPlug3,
750 outerRadiusPlug3, thicknessPlug3 / 2);
752 Double_t innerRadiusPlug4 = innerRadiusPlug1;
753 Double_t outerRadiusPlug4 = 0.7 / 2.;
754 Double_t thicknessPlug4 = 0.1;
756 auto* plug4 =
new TGeoTube(Form(
"plug4MF%d", disk), innerRadiusPlug4,
757 outerRadiusPlug4, thicknessPlug4 / 2);
759 Double_t innerRadiusPlug5 = innerRadiusPlug1;
760 Double_t outerRadiusPlug5 = 0.9 / 2.;
761 Double_t thicknessPlug5 = 0.700;
763 auto* plug5main =
new TGeoTube(Form(
"plug5mainMF%d", disk), innerRadiusPlug5,
764 outerRadiusPlug5, thicknessPlug5 / 2);
766 const Int_t nSidePlug5 = 6;
767 Double_t anglesubPlug5 = 360. / nSidePlug5 / 2. * TMath::Pi() / 180.;
768 Double_t lengthPlug5sub = outerRadiusPlug5 * TMath::Cos(anglesubPlug5) * 2;
769 Double_t widthPlug5sub = outerRadiusPlug5 * (1 - TMath::Cos(anglesubPlug5));
772 auto* plug5sub =
new TGeoBBox(Form(
"plug5subMF%d", disk), lengthPlug5sub / 2,
773 widthPlug5sub / 2, thicknessPlug5sub / 2);
775 TGeoTranslation* tPlug5sub =
new TGeoTranslation(
776 Form(
"tPlug5subMF%d", disk), 0,
777 outerRadiusPlug5 * TMath::Cos(anglesubPlug5) +
778 outerRadiusPlug5 * (1 - TMath::Cos(anglesubPlug5)) / 2,
780 tPlug5sub->RegisterYourself();
782 TGeoRotation* rPlug5sub[nSidePlug5];
784 TString namePlug5 = Form(
"plug5mainMF%d", disk);
787 rPlug5sub[
index] =
new TGeoRotation(Form(
"rPlug5sub%dMF%d",
index, disk),
789 rPlug5sub[
index]->RegisterYourself();
790 TGeoCombiTrans* combtPlug5sub =
new TGeoCombiTrans(
791 Form(
"combtPlug5subMF%d", disk), 0,
792 outerRadiusPlug5 * TMath::Cos(anglesubPlug5) +
793 outerRadiusPlug5 * (1 - TMath::Cos(anglesubPlug5)) / 2,
794 0., rPlug5sub[
index]);
795 combtPlug5sub->RegisterYourself();
796 namePlug5 += Form(
" - plug5subMF%d:combtPlug5subMF%d", disk, disk);
799 TGeoCompositeShape* plug5 =
800 new TGeoCompositeShape(Form(
"plug5MF%d", disk), namePlug5);
802 Double_t innerRadiusPlug6 = 0;
803 Double_t outerRadiusPlug6 = 0.780 / 2;
804 Double_t thicknessPlug6 = 0.150;
806 auto* plug6 =
new TGeoTube(Form(
"plug6MF%d", disk), innerRadiusPlug6,
807 outerRadiusPlug6, thicknessPlug6 / 2);
809 Double_t innerRadiusPlug7 = innerRadiusPlug6;
810 Double_t outerMinRadiusPlug7 = 0.520 / 2;
811 Double_t outerMaxRadiusPlug7 = 0.638 / 2;
812 Double_t thicknessPlug7 = 0.050;
814 auto* plug7 =
new TGeoCone(Form(
"plug7MF%d", disk), thicknessPlug7 / 2,
815 innerRadiusPlug7, outerMaxRadiusPlug7,
816 innerRadiusPlug7, outerMinRadiusPlug7);
818 Double_t innerRadiusPlug8 = innerRadiusPlug6;
819 Double_t outerRadiusPlug8 = 0.413 / 2;
820 Double_t thicknessPlug8 = 0.042;
822 auto* plug8 =
new TGeoTube(Form(
"plug8MF%d", disk), innerRadiusPlug8,
823 outerRadiusPlug8, thicknessPlug8 / 2);
825 Double_t innerRadiusPlug9 = innerRadiusPlug6;
826 Double_t outerMinRadiusPlug9 = outerRadiusPlug8;
827 Double_t outerMaxRadiusPlug9 = 0.500 / 2;
828 Double_t thicknessPlug9 = 0.040;
830 auto* plug9 =
new TGeoCone(Form(
"plug9MF%d", disk), thicknessPlug9 / 2,
831 innerRadiusPlug9, outerMinRadiusPlug9,
832 innerRadiusPlug9, outerMaxRadiusPlug9);
834 Double_t innerRadiusPlug10 = innerRadiusPlug6;
835 Double_t outerRadiusPlug10 = outerMaxRadiusPlug9;
836 Double_t thicknessPlug10 = 0.125;
838 auto* plug10 =
new TGeoTube(Form(
"plug10MF%d", disk), innerRadiusPlug10,
839 outerRadiusPlug10, thicknessPlug10 / 2);
841 Double_t innerRadiusPlug11 = innerRadiusPlug6;
842 Double_t outerMinRadiusPlug11 = outerRadiusPlug8;
843 Double_t outerMaxRadiusPlug11 = 0.500 / 2;
844 Double_t thicknessPlug11 = 0.043;
846 auto* plug11 =
new TGeoCone(Form(
"plug11MF%d", disk), thicknessPlug11 / 2,
847 innerRadiusPlug11, outerMaxRadiusPlug11,
848 innerRadiusPlug11, outerMinRadiusPlug11);
850 Double_t innerRadiusPlug12 = 0;
851 Double_t outerRadiusPlug12 = 0.289 / 2;
852 Double_t thicknessPlug12 = thicknessPlug6 + thicknessPlug7 + thicknessPlug8 +
853 thicknessPlug9 + thicknessPlug10 + thicknessPlug11;
856 new TGeoTube(Form(
"plug12mainMF%d", disk), innerRadiusPlug12,
859 const Int_t nSidePlug12 = 6;
860 Double_t anglesubPlug12 = 360. / nSidePlug12 / 2. * TMath::Pi() / 180.;
861 Double_t lengthPlug12sub = outerRadiusPlug12 * TMath::Cos(anglesubPlug12) * 2;
862 Double_t widthPlug12sub =
863 outerRadiusPlug12 * (1 - TMath::Cos(anglesubPlug12));
864 Double_t thicknessPlug12sub = thicknessPlug12;
866 auto* plug12sub =
new TGeoBBox(Form(
"plug12subMF%d", disk),
867 lengthPlug12sub / 2, widthPlug12sub / 2,
870 TGeoTranslation* tPlug12sub =
new TGeoTranslation(
871 Form(
"tPlug12subMF%d", disk), 0,
872 outerRadiusPlug12 * TMath::Cos(anglesubPlug12) +
873 outerRadiusPlug12 * (1 - TMath::Cos(anglesubPlug12)) / 2,
875 tPlug12sub->RegisterYourself();
877 TGeoRotation* rPlug12sub[nSidePlug12];
879 TString namePlug12 = Form(
"plug12mainMF%d", disk);
882 rPlug12sub[
index] =
new TGeoRotation(Form(
"rPlug12sub%dMF%d",
index, disk),
884 rPlug12sub[
index]->RegisterYourself();
885 TGeoCombiTrans* combtPlug12sub =
new TGeoCombiTrans(
886 Form(
"combtPlug12subMF%d", disk), 0,
887 outerRadiusPlug12 * TMath::Cos(anglesubPlug12) +
888 outerRadiusPlug12 * (1 - TMath::Cos(anglesubPlug12)) / 2,
889 0., rPlug12sub[
index]);
890 combtPlug12sub->RegisterYourself();
891 namePlug12 += Form(
" - plug12subMF%d:combtPlug12subMF%d", disk, disk);
894 TGeoCompositeShape* plug12 =
895 new TGeoCompositeShape(Form(
"plug12MF%d", disk), namePlug12);
897 Double_t refposPlug =
898 (thicknessPlug1 + thicknessPlug2 + thicknessPlug3 + thicknessPlug4 +
899 thicknessPlug5 + thicknessPlug6 + thicknessPlug7 + thicknessPlug8 +
900 thicknessPlug9 + thicknessPlug10 + thicknessPlug11) /
903 TGeoTranslation* tPlug[12];
904 tPlug[0] =
new TGeoTranslation(Form(
"tPlug1MF%d", disk), 0, 0,
905 -refposPlug + thicknessPlug1 / 2);
907 new TGeoTranslation(Form(
"tPlug2MF%d", disk), 0, 0,
908 -refposPlug + thicknessPlug1 + thicknessPlug2 / 2);
909 tPlug[2] =
new TGeoTranslation(Form(
"tPlug3MF%d", disk), 0, 0,
910 -refposPlug + thicknessPlug1 + thicknessPlug2 +
912 tPlug[3] =
new TGeoTranslation(Form(
"tPlug4MF%d", disk), 0, 0,
913 -refposPlug + thicknessPlug1 + thicknessPlug2 +
914 thicknessPlug3 + thicknessPlug4 / 2);
915 tPlug[4] =
new TGeoTranslation(Form(
"tPlug5MF%d", disk), 0, 0,
916 -refposPlug + thicknessPlug1 + thicknessPlug2 +
917 thicknessPlug3 + thicknessPlug4 +
919 tPlug[5] =
new TGeoTranslation(Form(
"tPlug6MF%d", disk), 0, 0,
920 -refposPlug + thicknessPlug1 + thicknessPlug2 +
921 thicknessPlug3 + thicknessPlug4 +
922 thicknessPlug5 + thicknessPlug6 / 2);
924 new TGeoTranslation(Form(
"tPlug7MF%d", disk), 0, 0,
925 -refposPlug + thicknessPlug1 + thicknessPlug2 +
926 thicknessPlug3 + thicknessPlug4 + thicknessPlug5 +
927 thicknessPlug6 + thicknessPlug7 / 2);
928 tPlug[7] =
new TGeoTranslation(Form(
"tPlug8MF%d", disk), 0, 0,
929 -refposPlug + thicknessPlug1 + thicknessPlug2 +
930 thicknessPlug3 + thicknessPlug4 +
931 thicknessPlug5 + thicknessPlug6 +
932 thicknessPlug7 + thicknessPlug8 / 2);
933 tPlug[8] =
new TGeoTranslation(
934 Form(
"tPlug9MF%d", disk), 0, 0,
935 -refposPlug + thicknessPlug1 + thicknessPlug2 + thicknessPlug3 +
936 thicknessPlug4 + thicknessPlug5 + thicknessPlug6 + thicknessPlug7 +
937 thicknessPlug8 + thicknessPlug9 / 2);
938 tPlug[9] =
new TGeoTranslation(
939 Form(
"tPlug10MF%d", disk), 0, 0,
940 -refposPlug + thicknessPlug1 + thicknessPlug2 + thicknessPlug3 +
941 thicknessPlug4 + thicknessPlug5 + thicknessPlug6 + thicknessPlug7 +
942 thicknessPlug8 + thicknessPlug9 + thicknessPlug10 / 2);
943 tPlug[10] =
new TGeoTranslation(
944 Form(
"tPlug11MF%d", disk), 0, 0,
945 -refposPlug + thicknessPlug1 + thicknessPlug2 + thicknessPlug3 +
946 thicknessPlug4 + thicknessPlug5 + thicknessPlug6 + thicknessPlug7 +
947 thicknessPlug8 + thicknessPlug9 + thicknessPlug10 +
948 thicknessPlug11 / 2);
949 tPlug[11] =
new TGeoTranslation(
950 Form(
"tPlug12MF%d", disk), 0, 0,
951 -refposPlug + thicknessPlug1 + thicknessPlug2 + thicknessPlug3 +
952 thicknessPlug4 + thicknessPlug5 + thicknessPlug12 / 2);
954 TString namePlug =
"";
955 for (Int_t ipart = 0; ipart < 12; ++ipart) {
956 tPlug[ipart]->RegisterYourself();
958 namePlug += Form(
"plug1MF%d:tPlug1MF%d", disk, disk);
959 }
else if (ipart == 11) {
961 Form(
" - plug%dMF%d:tPlug%dMF%d", ipart + 1, disk, ipart + 1, disk);
964 Form(
" + plug%dMF%d:tPlug%dMF%d", ipart + 1, disk, ipart + 1, disk);
968 TGeoCompositeShape* shapePlug =
969 new TGeoCompositeShape(Form(
"shapePlugMF%d", disk), namePlug);
975 Double_t watherThickness[5];
976 watherThickness[0] = thicknessBodyBathtub2[0] - thicknessTop[0];
977 watherThickness[1] = thicknessBodyBathtub2[1] - thicknessTop[1];
978 watherThickness[2] = thicknessBodyBathtub2[2] - thicknessTop[2];
979 watherThickness[3] = thicknessBodyBathtub2[3] - thicknessTop[3];
980 watherThickness[4] = thicknessBodyBathtub2[4] - thicknessTop[4];
982 auto* water1 =
new TGeoBBox(Form(
"water1MF%d", disk), lengthBodyBathtub1 / 2,
983 widthBodyBathtub1 / 2, watherThickness[disk] / 2);
984 auto* water2 =
new TGeoBBox(Form(
"water2MF%d", disk), lengthBodyBathtub2 / 2,
985 widthBodyBathtub2 / 2, watherThickness[disk] / 2);
987 new TGeoTube(Form(
"water3MF%d", disk), 0, cornerRadiusBodyBathtub1[disk],
988 watherThickness[disk] / 2);
990 TGeoTranslation* twater[7];
991 twater[0] =
new TGeoTranslation(Form(
"twater1MF%d", disk), 0., 0., 0);
993 twater[1] =
new TGeoTranslation(
994 Form(
"twater2MF%d", disk),
995 lengthBodyBathtub1 / 2 + lengthBodyBathtub2 / 2, 0., 0.);
996 twater[2] =
new TGeoTranslation(
997 Form(
"twater3MF%d", disk), lengthBodyBathtub1 / 2,
998 widthBodyBathtub1 / 2 - cornerRadiusBodyBathtub1[disk], 0.);
999 twater[3] =
new TGeoTranslation(
1000 Form(
"twater4MF%d", disk), lengthBodyBathtub1 / 2,
1001 -(widthBodyBathtub1 / 2 - cornerRadiusBodyBathtub1[disk]), 0.);
1003 twater[4] =
new TGeoTranslation(
1004 Form(
"twater5MF%d", disk),
1005 -(lengthBodyBathtub1 / 2 + lengthBodyBathtub2 / 2), 0., 0.);
1006 twater[5] =
new TGeoTranslation(
1007 Form(
"twater6MF%d", disk), -(lengthBodyBathtub1 / 2),
1008 widthBodyBathtub1 / 2 - cornerRadiusBodyBathtub1[disk], 0.);
1009 twater[6] =
new TGeoTranslation(
1010 Form(
"twater7MF%d", disk), -(lengthBodyBathtub1 / 2),
1011 -(widthBodyBathtub1 / 2 - cornerRadiusBodyBathtub1[disk]), 0.);
1013 for (Int_t
i = 0;
i < 7; ++
i) {
1014 twater[
i]->RegisterYourself();
1017 TGeoCompositeShape* shapeWater =
new TGeoCompositeShape(
1018 Form(
"shapeCoverBathtubMF%d", disk),
1019 Form(
"water1MF%d + water2MF%d:twater2MF%d + water3MF%d:twater3MF%d + "
1020 "water3MF%d:twater4MF%d + water2MF%d:twater5MF%d +"
1021 "water3MF%d:twater6MF%d + water3MF%d:twater7MF%d",
1022 disk, disk, disk, disk, disk, disk, disk, disk, disk, disk, disk,
1025 TGeoCombiTrans* transformation1 =
nullptr;
1026 TGeoCombiTrans* transformation2 =
nullptr;
1027 TGeoCombiTrans* transformationplug1 =
nullptr;
1028 TGeoCombiTrans* transformationplug2 =
nullptr;
1029 TGeoCombiTrans* transformationwater1 =
nullptr;
1030 TGeoCombiTrans* transformationwater2 =
nullptr;
1031 TGeoRotation* rotation =
nullptr;
1033 TGeoMedium* kMedPeek = gGeoManager->GetMedium(
"MFT_PEEK$");
1034 TGeoMedium* kMed_plug = gGeoManager->GetMedium(
"MFT_Alu$");
1035 TGeoMedium* kMed_Water = gGeoManager->GetMedium(
"MFT_Water$");
1037 Double_t thicknessTotMF =
1038 (thicknessBody[disk] + thicknessMiddle[disk] + thicknessBottom[disk]);
1040 Double_t deltay = 0.2;
1045 Double_t mfZ = 1.7 - 0.85;
1047 Double_t fShift = 0;
1048 if (disk == 3 || disk == 4) {
1053 auto* MF01 =
new TGeoVolume(Form(
"MF%d1", disk), shapeManifold, kMedPeek);
1055 new TGeoVolume(Form(
"MFplug%d1", disk), shapePlug, kMed_plug);
1057 new TGeoVolume(Form(
"MFwater%d1", disk), shapeWater, kMed_Water);
1058 TGeoRotation* rotation1 =
1059 new TGeoRotation(Form(
"rotation1MF%d", disk), 90, 90., 180.);
1064 new TGeoCombiTrans(mSupportXDimensions[disk][0] / 2 + 0.1 +
1066 mHalfDiskGap + mSupportYDimensions[disk][0] / 2,
1067 mZPlan[disk], rotation1);
1068 mHalfDisk->AddNode(MF01, 1, transformation1);
1070 TGeoRotation* rotationplug1 =
1071 new TGeoRotation(Form(
"rotationplug1MF%d", disk), -90, 90., 90.);
1072 transformationplug1 =
1077 new TGeoCombiTrans(mSupportXDimensions[disk][0] / 2 + 0.1 +
1078 thicknessTotMF / 2 + thicknessTotMF / 2 +
1080 (thicknessPlug8 + thicknessPlug9 +
1081 thicknessPlug10 + thicknessPlug11),
1082 mHalfDiskGap + mSupportYDimensions[disk][0] / 2 -
1083 ((lengthBody) / 2 - holeOffset[3]),
1084 mZPlan[disk], rotationplug1);
1085 mHalfDisk->AddNode(MFplug01, 1, transformationplug1);
1087 transformationwater1 =
new TGeoCombiTrans(
1088 mSupportXDimensions[disk][0] / 2 + 0.1 + thicknessTotMF / 2 +
1089 (thicknessTotMF / 2 - watherThickness[disk] / 2) -
1090 (thicknessBody[disk] - thicknessTop[disk] - watherThickness[disk]),
1091 mHalfDiskGap + mSupportYDimensions[disk][0] / 2, mZPlan[disk], rotation1);
1092 mHalfDisk->AddNode(MFwater01, 1, transformationwater1);
1094 auto* MF02 =
new TGeoVolume(Form(
"MF%d2", disk), shapeManifold, kMedPeek);
1096 new TGeoVolume(Form(
"MFplug%d2", disk), shapePlug, kMed_plug);
1098 new TGeoVolume(Form(
"MFwater%d2", disk), shapeWater, kMed_Water);
1099 TGeoRotation* rotation2 =
1100 new TGeoRotation(Form(
"rotation2MF%d", disk), 90, 90., 0.);
1102 transformation2 =
new TGeoCombiTrans(
1103 mSupportXDimensions[disk][0] / 2 + 0.1 + thicknessTotMF / 2,
1104 -mHalfDiskGap - mSupportYDimensions[disk][0] / 2, mZPlan[disk],
1106 mHalfDisk->AddNode(MF02, 1, transformation2);
1108 TGeoRotation* rotationplug2 =
1109 new TGeoRotation(Form(
"rotationplug1MF%d", disk), -90, 90., 90.);
1110 transformationplug2 =
new TGeoCombiTrans(
1111 mSupportXDimensions[disk][0] / 2 + 0.1 + thicknessTotMF / 2 +
1112 thicknessTotMF / 2 + refposPlug -
1113 (thicknessPlug8 + thicknessPlug9 + thicknessPlug10 + thicknessPlug11),
1114 -mHalfDiskGap - mSupportYDimensions[disk][0] / 2 +
1115 ((lengthBody) / 2 - holeOffset[3]),
1116 mZPlan[disk], rotationplug2);
1117 mHalfDisk->AddNode(MFplug02, 1, transformationplug2);
1119 transformationwater2 =
new TGeoCombiTrans(
1120 mSupportXDimensions[disk][0] / 2 + 0.1 + thicknessTotMF / 2 +
1121 ((thicknessTotMF / 2 - watherThickness[disk] / 2) -
1122 (thicknessBody[disk] - thicknessTop[disk] - watherThickness[disk])),
1123 -mHalfDiskGap - mSupportYDimensions[disk][0] / 2, mZPlan[disk],
1125 mHalfDisk->AddNode(MFwater02, 1, transformationwater2);
1135 printf(
"Creating MFT heat exchanger for disk0 top\n");
1136 }
else if (half == Bottom) {
1137 printf(
"Creating MFT heat exchanger for disk0 bottom\n");
1139 printf(
"No valid option for MFT heat exchanger on disk0\n");
1142 mCarbon = gGeoManager->GetMedium(
"MFT_CarbonFiber$");
1143 mWater = gGeoManager->GetMedium(
"MFT_Water$");
1144 mRohacell = gGeoManager->GetMedium(
"MFT_Rohacell$");
1145 mPipe = gGeoManager->GetMedium(
"MFT_Polyimide$");
1146 mPeek = gGeoManager->GetMedium(
"MFT_PEEK$");
1148 auto* cooling =
new TGeoVolumeAssembly(Form(
"cooling_D0_H%d", half));
1150 TGeoTranslation* translation =
nullptr;
1151 TGeoRotation* rotation =
nullptr;
1158 Double_t ivolume = 0;
1159 Double_t mRadiusCentralTore[4];
1163 for (Int_t itube = 0; itube < 3; itube++) {
1164 TGeoVolume* waterTube1 =
1165 gGeoManager->MakeTube(Form(
"waterTube1%d_D0_H%d", itube, half),
mWater,
1166 0., mRWater, mLWater0[itube] / 2.);
1167 translation =
new TGeoTranslation(mXPosition0[itube] - mHalfDiskGap, 0.,
1168 mSupportXDimensions[0][0] / 2. +
1169 mMoreLength01 - mLWater0[itube] / 2.);
1170 cooling->AddNode(waterTube1, ivolume++, translation);
1172 TGeoVolume* waterTorus1 = gGeoManager->MakeTorus(
1173 Form(
"waterTorus1%d_D0_H%d", itube, half),
mWater, mRadius0[itube], 0.,
1174 mRWater, 0., mAngle0[itube]);
1175 rotation =
new TGeoRotation(
"rotation", 180., -90., 0.);
1177 mRadius0[itube] + mXPosition0[itube] - mHalfDiskGap, 0.,
1178 mSupportXDimensions[0][0] / 2. + mMoreLength01 - mLWater0[itube],
1182 TGeoVolume* waterTube2 =
1183 gGeoManager->MakeTube(Form(
"waterTube2%d_D0_H%d", itube, half),
mWater,
1184 0., mRWater, mLpartial0[itube] / 2.);
1185 rotation =
new TGeoRotation(
"rotation", 90., 180 - mAngle0[itube], 0.);
1188 mRadius0[itube] * TMath::Sin(mAngle0[itube] * TMath::DegToRad()) +
1189 mLpartial0[itube] / 2 * TMath::Cos(mAngle0[itube] * TMath::DegToRad());
1191 mXPosition0[itube] - mHalfDiskGap +
1192 mRadius0[itube] * (1 - TMath::Cos(mAngle0[itube] * TMath::DegToRad())) +
1193 mLpartial0[itube] / 2 * TMath::Sin(mAngle0[itube] * TMath::DegToRad());
1195 mSupportXDimensions[0][0] / 2. +
1196 mMoreLength01 - xPos0[itube],
1200 mRadiusCentralTore[itube] =
1201 (mSupportXDimensions[0][0] / 2. + mMoreLength01 - xPos0[itube] -
1202 mLpartial0[itube] / 2 *
1203 TMath::Cos(mAngle0[itube] * TMath::DegToRad())) /
1204 TMath::Sin(mAngle0[itube] * TMath::DegToRad());
1205 TGeoVolume* waterTorusCentral =
1206 gGeoManager->MakeTorus(Form(
"waterTorusCentral%d_D0_H%d", itube, half),
1207 mWater, mRadiusCentralTore[itube], 0., mRWater,
1208 -mAngle0[itube], 2. * mAngle0[itube]);
1209 rotation =
new TGeoRotation(
"rotation", 0., 90., 0.);
1212 mLpartial0[itube] / 2 *
1213 TMath::Sin(mAngle0[itube] * TMath::DegToRad()) -
1214 mRadiusCentralTore[itube] *
1215 TMath::Cos(mAngle0[itube] * TMath::DegToRad()),
1219 TGeoVolume* waterTube3 =
1220 gGeoManager->MakeTube(Form(
"waterTube3%d_D0_H%d", 2, half),
mWater, 0.,
1221 mRWater, mLpartial0[itube] / 2.);
1222 rotation =
new TGeoRotation(
"rotation", -90., 0 - mAngle0[itube], 0.);
1225 -(mSupportXDimensions[0][0] / 2. + mMoreLength01 - xPos0[itube]),
1229 TGeoVolume* waterTorus2 = gGeoManager->MakeTorus(
1230 Form(
"waterTorus2%d_D0_H%d", itube, half),
mWater, mRadius0[itube], 0.,
1231 mRWater, 0., mAngle0[itube]);
1232 rotation =
new TGeoRotation(
"rotation", 180., 90., 0.);
1234 mRadius0[itube] + mXPosition0[itube] - mHalfDiskGap, 0.,
1235 -(mSupportXDimensions[0][0] / 2. + mMoreLength01 - mLWater0[itube]),
1239 TGeoVolume* waterTube4 =
1240 gGeoManager->MakeTube(Form(
"waterTube4%d_D0_H%d", itube, half),
mWater,
1241 0., mRWater, mLWater0[itube] / 2.);
1242 translation =
new TGeoTranslation(mXPosition0[itube] - mHalfDiskGap, 0.,
1243 -(mSupportXDimensions[0][0] / 2. +
1244 mMoreLength01 - mLWater0[itube] / 2.));
1245 cooling->AddNode(waterTube4, ivolume++, translation);
1252 for (Int_t itube = 0; itube < 3; itube++) {
1253 TGeoVolume* pipeTube1 =
1254 gGeoManager->MakeTube(Form(
"pipeTube1%d_D0_H%d", itube, half),
mPipe, mRWater, mRWater + mDRPipe, mLWater0[itube] / 2.);
1255 translation =
new TGeoTranslation(mXPosition0[itube] - mHalfDiskGap, 0., mSupportXDimensions[0][0] / 2. + mMoreLength01 - mLWater0[itube] / 2.);
1256 cooling->AddNode(pipeTube1, ivolume++, translation);
1258 TGeoVolume* pipeTorus1 = gGeoManager->MakeTorus(
1259 Form(
"pipeTorus1%d_D0_H%d", itube, half),
mPipe, mRadius0[itube],
1260 mRWater, mRWater + mDRPipe, 0., mAngle0[itube]);
1261 rotation =
new TGeoRotation(
"rotation", 180., -90., 0.);
1263 mRadius0[itube] + mXPosition0[itube] - mHalfDiskGap, 0.,
1264 mSupportXDimensions[0][0] / 2. + mMoreLength01 - mLWater0[itube],
1268 TGeoVolume* pipeTube2 = gGeoManager->MakeTube(
1269 Form(
"pipeTube2%d_D0_H%d", itube, half),
mPipe, mRWater,
1270 mRWater + mDRPipe, mLpartial0[itube] / 2.);
1271 rotation =
new TGeoRotation(
"rotation", 90., 180 - mAngle0[itube], 0.);
1274 mRadius0[itube] * TMath::Sin(mAngle0[itube] * TMath::DegToRad()) +
1275 mLpartial0[itube] / 2 * TMath::Cos(mAngle0[itube] * TMath::DegToRad());
1277 mXPosition0[itube] - mHalfDiskGap +
1278 mRadius0[itube] * (1 - TMath::Cos(mAngle0[itube] * TMath::DegToRad())) +
1279 mLpartial0[itube] / 2 * TMath::Sin(mAngle0[itube] * TMath::DegToRad());
1281 mSupportXDimensions[0][0] / 2. +
1282 mMoreLength01 - xPos0[itube],
1286 mRadiusCentralTore[itube] =
1287 (mSupportXDimensions[0][0] / 2. + mMoreLength01 - xPos0[itube] -
1288 mLpartial0[itube] / 2 *
1289 TMath::Cos(mAngle0[itube] * TMath::DegToRad())) /
1290 TMath::Sin(mAngle0[itube] * TMath::DegToRad());
1291 TGeoVolume* pipeTorusCentral = gGeoManager->MakeTorus(
1292 Form(
"pipeTorusCentral%d_D0_H%d", itube, half),
mPipe,
1293 mRadiusCentralTore[itube], mRWater, mRWater + mDRPipe, -mAngle0[itube],
1294 2. * mAngle0[itube]);
1295 rotation =
new TGeoRotation(
"rotation", 0., 90., 0.);
1298 mLpartial0[itube] / 2 *
1299 TMath::Sin(mAngle0[itube] * TMath::DegToRad()) -
1300 mRadiusCentralTore[itube] *
1301 TMath::Cos(mAngle0[itube] * TMath::DegToRad()),
1305 TGeoVolume* pipeTube3 = gGeoManager->MakeTube(
1306 Form(
"pipeTube3%d_D0_H%d", 2, half),
mPipe, mRWater, mRWater + mDRPipe,
1307 mLpartial0[itube] / 2.);
1308 rotation =
new TGeoRotation(
"rotation", -90., 0 - mAngle0[itube], 0.);
1311 -(mSupportXDimensions[0][0] / 2. + mMoreLength01 - xPos0[itube]),
1315 TGeoVolume* pipeTorus2 = gGeoManager->MakeTorus(
1316 Form(
"pipeTorus2%d_D0_H%d", itube, half),
mPipe, mRadius0[itube],
1317 mRWater, mRWater + mDRPipe, 0., mAngle0[itube]);
1318 rotation =
new TGeoRotation(
"rotation", 180., 90., 0.);
1320 mRadius0[itube] + mXPosition0[itube] - mHalfDiskGap, 0.,
1321 -(mSupportXDimensions[0][0] / 2. + mMoreLength01 - mLWater0[itube]),
1325 TGeoVolume* pipeTube4 =
1326 gGeoManager->MakeTube(Form(
"pipeTube4%d_D0_H%d", itube, half),
mPipe,
1327 mRWater, mRWater + mDRPipe, mLWater0[itube] / 2.);
1328 translation =
new TGeoTranslation(mXPosition0[itube] - mHalfDiskGap, 0.,
1329 -(mSupportXDimensions[0][0] / 2. +
1330 mMoreLength01 - mLWater0[itube] / 2.));
1331 cooling->AddNode(pipeTube4, ivolume++, translation);
1335 Double_t deltaz = mHeatExchangerThickness -
1339 rotation =
new TGeoRotation(
"rotation", -90., 90., 0.);
1342 mZPlan[disk] + deltaz / 2. - mCarbonThickness - mRWater - mDRPipe -
1348 mZPlan[disk] - deltaz / 2. + mCarbonThickness + mRWater + mDRPipe +
1355 auto* carbonPlate =
new TGeoVolumeAssembly(Form(
"carbonPlate_D0_H%d", half));
1358 Double_t mReducedX = 0.;
1359 if (mftBaseParam.buildAlignment) {
1363 auto* carbonBase0 =
new TGeoBBox(
1364 Form(
"carbonBase0_D0_H%d", half),
1365 (mSupportXDimensions[disk][0] / 2. + mMoreLength01 - mReducedX),
1366 (mSupportYDimensions[disk][0]) / 2., mCarbonThickness);
1367 auto* t01 =
new TGeoTranslation(
1368 "t01", 0., (mSupportYDimensions[disk][0]) / 2. + mHalfDiskGap, 0.);
1369 t01->RegisterYourself();
1372 new TGeoTubeSeg(Form(
"holeCarbon0_D0_H%d", half), 0., mRMin[disk],
1373 mCarbonThickness + 0.000001, 0, 180.);
1374 auto* t02 =
new TGeoTranslation(
"t02", 0., -mHalfDiskGap, 0.);
1375 t02->RegisterYourself();
1377 auto* carbonhole0 =
new TGeoSubtraction(carbonBase0, holeCarbon0, t01, t02);
1378 auto* ch0 =
new TGeoCompositeShape(Form(
"Carbon0_D0_H%d", half), carbonhole0);
1379 auto* carbonBaseWithHole0 =
1380 new TGeoVolume(Form(
"carbonBaseWithHole_D0_H%d", half), ch0,
mCarbon);
1382 carbonBaseWithHole0->SetLineColor(kGray + 3);
1383 rotation =
new TGeoRotation(
"rotation", 0., 0., 0.);
1385 carbonPlate->AddNode(carbonBaseWithHole0, 0,
1386 new TGeoTranslation(0., 0., mZPlan[disk]));
1388 Double_t ty = mSupportYDimensions[disk][0];
1390 for (Int_t ipart = 1; ipart < mNPart[disk]; ipart++) {
1391 ty += mSupportYDimensions[disk][ipart] / 2.;
1392 TGeoVolume* partCarbon = gGeoManager->MakeBox(
1393 Form(
"partCarbon_D0_H%d_%d", half, ipart),
mCarbon,
1394 mSupportXDimensions[disk][ipart] / 2.,
1395 mSupportYDimensions[disk][ipart] / 2., mCarbonThickness);
1396 partCarbon->SetLineColor(kGray + 3);
1397 auto* t =
new TGeoTranslation(
"t", 0, ty + mHalfDiskGap, mZPlan[disk]);
1398 carbonPlate->AddNode(partCarbon, ipart, t);
1399 ty += mSupportYDimensions[disk][ipart] / 2.;
1402 rotation =
new TGeoRotation(
"rotation", 180., 0., 0.);
1403 transformation =
new TGeoCombiTrans(0., 0., deltaz / 2., rotation);
1405 transformation =
new TGeoCombiTrans(0., 0., -deltaz / 2., rotation);
1410 TGeoMedium* mGlueRohacellCarbon = gGeoManager->GetMedium(
"MFT_Epoxy$");
1411 auto* glueRohacellCarbon =
1412 new TGeoVolumeAssembly(Form(
"glueRohacellCarbon_D0_H%d", half));
1413 auto* glueRohacellCarbonBase0 =
1414 new TGeoBBox(Form(
"glueRohacellCarbonBase0_D0_H%d", half),
1415 (mSupportXDimensions[disk][0]) / 2. - mReducedX,
1416 (mSupportYDimensions[disk][0]) / 2.,
1419 auto* translation_gluRC01 =
new TGeoTranslation(
1420 "translation_gluRC01", 0.,
1421 (mSupportYDimensions[disk][0]) / 2. + mHalfDiskGap, 0.);
1422 translation_gluRC01->RegisterYourself();
1423 auto* translation_gluRC02 =
1424 new TGeoTranslation(
"translation_gluRC02", 0., -mHalfDiskGap, 0.);
1425 translation_gluRC02->RegisterYourself();
1427 auto* holeglueRohacellCarbon0 =
new TGeoTubeSeg(
1428 Form(
"holeglueRohacellCarbon0_D0_H%d", half), 0., mRMin[disk],
1431 auto* glueRohacellCarbonhole0 =
1432 new TGeoSubtraction(glueRohacellCarbonBase0, holeglueRohacellCarbon0,
1433 translation_gluRC01, translation_gluRC02);
1434 auto* gRC0 =
new TGeoCompositeShape(Form(
"glueRohacellCarbon0_D0_H%d", half),
1435 glueRohacellCarbonhole0);
1436 auto* glueRohacellCarbonBaseWithHole0 =
1437 new TGeoVolume(Form(
"glueRohacellCarbonWithHole_D0_H%d", half), gRC0,
1438 mGlueRohacellCarbon);
1440 glueRohacellCarbonBaseWithHole0->SetLineColor(kGreen);
1441 rotation =
new TGeoRotation(
"rotation", 0., 0., 0.);
1443 glueRohacellCarbon->AddNode(glueRohacellCarbonBaseWithHole0, 0,
1444 new TGeoTranslation(0., 0., mZPlan[disk]));
1446 Double_t tyGRC = mSupportYDimensions[disk][0];
1448 for (Int_t ipart = 1; ipart < mNPart[disk]; ipart++) {
1449 tyGRC += mSupportYDimensions[disk][ipart] / 2.;
1450 TGeoVolume* partGlueRohacellCarbon = gGeoManager->MakeBox(
1451 Form(
"partGlueRohacellCarbon_D0_H%d_%d", half, ipart),
1452 mGlueRohacellCarbon, mSupportXDimensions[disk][ipart] / 2.,
1453 mSupportYDimensions[disk][ipart] / 2.,
1455 partGlueRohacellCarbon->SetLineColor(kGreen);
1456 auto* t =
new TGeoTranslation(
"t", 0, tyGRC + mHalfDiskGap, mZPlan[disk]);
1457 glueRohacellCarbon->AddNode(partGlueRohacellCarbon, ipart, t);
1458 tyGRC += mSupportYDimensions[disk][ipart] / 2.;
1461 rotation =
new TGeoRotation(
"rotation", 180., 0., 0.);
1468 -(deltaz / 2. - mCarbonThickness -
1475 TGeoMedium* mKaptonOnCarbon = gGeoManager->GetMedium(
"MFT_Kapton$");
1476 auto* kaptonOnCarbon =
1477 new TGeoVolumeAssembly(Form(
"kaptonOnCarbon_D0_H%d", half));
1478 auto* kaptonOnCarbonBase0 =
new TGeoBBox(
1479 Form(
"kaptonOnCarbonBase0_D0_H%d", half),
1480 (mSupportXDimensions[disk][0] / 2. + mMoreLength01 - mReducedX),
1483 auto* translation_KC01 =
new TGeoTranslation(
1484 "translation_KC01", 0.,
1485 (mSupportYDimensions[disk][0]) / 2. + mHalfDiskGap, 0.);
1486 translation_KC01->RegisterYourself();
1487 auto* translation_KC02 =
1488 new TGeoTranslation(
"translation_KC02", 0., -mHalfDiskGap, 0.);
1489 translation_KC02->RegisterYourself();
1491 auto* holekaptonOnCarbon0 =
1492 new TGeoTubeSeg(Form(
"holekaptonOnCarbon0_D0_H%d", half), 0., mRMin[disk],
1495 auto* kaptonOnCarbonhole0 =
1496 new TGeoSubtraction(kaptonOnCarbonBase0, holekaptonOnCarbon0,
1497 translation_KC01, translation_KC02);
1498 auto* KC0 =
new TGeoCompositeShape(Form(
"kaptonOnCarbon_D0_H%d", half),
1499 kaptonOnCarbonhole0);
1500 auto* kaptonOnCarbonBaseWithHole0 =
new TGeoVolume(
1501 Form(
"kaptonOnCarbonWithHole_D0_H%d", half), KC0, mKaptonOnCarbon);
1503 kaptonOnCarbonBaseWithHole0->SetLineColor(kMagenta);
1504 rotation =
new TGeoRotation(
"rotation", 0., 0., 0.);
1506 kaptonOnCarbon->AddNode(kaptonOnCarbonBaseWithHole0, 0,
1507 new TGeoTranslation(0., 0., mZPlan[disk]));
1509 Double_t tyKC = mSupportYDimensions[disk][0];
1511 for (Int_t ipart = 1; ipart < mNPart[disk]; ipart++) {
1512 tyKC += mSupportYDimensions[disk][ipart] / 2.;
1513 TGeoVolume* partkaptonOnCarbonBase = gGeoManager->MakeBox(
1514 Form(
"partkaptonOnCarbon_D0_H%d_%d", half, ipart), mKaptonOnCarbon,
1515 mSupportXDimensions[disk][ipart] / 2.,
1516 mSupportYDimensions[disk][ipart] / 2.,
1518 partkaptonOnCarbonBase->SetLineColor(kMagenta);
1519 auto* t =
new TGeoTranslation(
"t", 0, tyKC + mHalfDiskGap, mZPlan[disk]);
1520 kaptonOnCarbon->AddNode(partkaptonOnCarbonBase, ipart, t);
1521 tyKC += mSupportYDimensions[disk][ipart] / 2.;
1524 rotation =
new TGeoRotation(
"rotation", 180., 0., 0.);
1540 TGeoMedium* mGlueKaptonCarbon = gGeoManager->GetMedium(
"MFT_Epoxy$");
1541 auto* glueKaptonCarbon =
1542 new TGeoVolumeAssembly(Form(
"glueKaptonCarbon_D0_H%d", half));
1543 auto* glueKaptonCarbonBase0 =
new TGeoBBox(
1544 Form(
"glueKaptonCarbonBase0_D0_H%d", half),
1545 (mSupportXDimensions[disk][0] / 2. + mMoreLength01 - mReducedX),
1548 auto* translation_gluKC01 =
new TGeoTranslation(
1549 "translation_gluKC01", 0.,
1550 (mSupportYDimensions[disk][0]) / 2. + mHalfDiskGap, 0.);
1551 translation_gluKC01->RegisterYourself();
1552 auto* translation_gluKC02 =
1553 new TGeoTranslation(
"translation_gluKC02", 0., -mHalfDiskGap, 0.);
1554 translation_gluKC02->RegisterYourself();
1556 auto* holeglueKaptonCarbon0 =
new TGeoTubeSeg(
1557 Form(
"holeglueKaptonCarbon0_D0_H%d", half), 0., mRMin[disk],
1560 auto* glueKaptonCarbonhole0 =
1561 new TGeoSubtraction(glueKaptonCarbonBase0, holeglueKaptonCarbon0,
1562 translation_gluKC01, translation_gluKC02);
1563 auto* gKC0 =
new TGeoCompositeShape(Form(
"glueKaptonCarbon0_D0_H%d", half),
1564 glueKaptonCarbonhole0);
1565 auto* glueKaptonCarbonBaseWithHole0 =
new TGeoVolume(
1566 Form(
"glueKaptonCarbonWithHole_D0_H%d", half), gKC0, mGlueKaptonCarbon);
1568 glueKaptonCarbonBaseWithHole0->SetLineColor(kGreen);
1569 rotation =
new TGeoRotation(
"rotation", 0., 0., 0.);
1571 glueKaptonCarbon->AddNode(glueKaptonCarbonBaseWithHole0, 0,
1572 new TGeoTranslation(0., 0., mZPlan[disk]));
1574 Double_t tyGKC = mSupportYDimensions[disk][0];
1576 for (Int_t ipart = 1; ipart < mNPart[disk]; ipart++) {
1577 tyGKC += mSupportYDimensions[disk][ipart] / 2.;
1578 TGeoVolume* partGlueKaptonCarbon = gGeoManager->MakeBox(
1579 Form(
"partGlueKaptonCarbon_D0_H%d_%d", half, ipart), mGlueKaptonCarbon,
1580 mSupportXDimensions[disk][ipart] / 2.,
1582 partGlueKaptonCarbon->SetLineColor(kGreen);
1583 auto* t =
new TGeoTranslation(
"t", 0, tyGKC + mHalfDiskGap, mZPlan[disk]);
1584 glueKaptonCarbon->AddNode(partGlueKaptonCarbon, ipart, t);
1585 tyGKC += mSupportYDimensions[disk][ipart] / 2.;
1588 rotation =
new TGeoRotation(
"rotation", 180., 0., 0.);
1596 auto* rohacellPlate =
new TGeoVolumeAssembly(Form(
"rohacellPlate_D0_H%d", half));
1597 auto* rohacellBase0 =
new TGeoBBox(Form(
"rohacellBase0_D0_H%d", half), (mSupportXDimensions[disk][0]) / 2., (mSupportYDimensions[disk][0]) / 2., mRohacellThickness);
1598 auto* holeRohacell0 =
new TGeoTubeSeg(Form(
"holeRohacell0_D0_H%d", half), 0., mRMin[disk], mRohacellThickness + 0.000001, 0, 180.);
1603 Double_t diameter = 0.21;
1604 Double_t epsilon = 0.06;
1606 Double_t mPosition[4];
1607 TGeoCombiTrans* transfo[7][3];
1608 TGeoTube* grooveTube[7][3];
1609 TGeoTorus* grooveTorus[7][3];
1610 TGeoSubtraction* rohacellBaseGroove[300];
1611 TGeoCompositeShape* rohacellGroove[300];
1613 for (Int_t igroove = 0; igroove < 3; igroove++) {
1614 grooveTube[0][igroove] =
new TGeoTube(
"linear", 0., diameter, mLWater0[igroove] / 2.);
1615 grooveTorus[1][igroove] =
new TGeoTorus(
"SideTorus", mRadius0[igroove], 0., diameter, 0., mAngle0[igroove]);
1616 grooveTube[2][igroove] =
new TGeoTube(
"tiltedLinear", 0., diameter, mLpartial0[igroove] / 2.);
1617 grooveTorus[3][igroove] =
new TGeoTorus(
"centralTorus", mRadiusCentralTore[igroove], 0., diameter, -mAngle0[igroove], 2. * mAngle0[igroove]);
1618 grooveTube[4][igroove] =
new TGeoTube(
"tiltedLinear", 0., diameter, mLpartial0[igroove] / 2.);
1619 grooveTorus[5][igroove] =
new TGeoTorus(
"SideTorus", mRadius0[igroove], 0., diameter, 0., mAngle0[igroove]);
1620 grooveTube[6][igroove] =
new TGeoTube(
"linear", 0., diameter, mLWater0[igroove] / 2.);
1624 TGeoRotation* rotationLinear =
new TGeoRotation(
"rotation", -90., 90., 0.);
1625 TGeoRotation* rotationSideTorusL =
new TGeoRotation(
"rotationSideTorusLeft", -90., 0., 0.);
1626 TGeoRotation* rotationSideTorusR =
new TGeoRotation(
"rotationSideTorusRight", 90., 180., 180.);
1627 TGeoRotation* rotationCentralTorus =
new TGeoRotation(
"rotationCentralTorus", 90., 0., 0.);
1628 TGeoRotation* rotationTiltedLinearR;
1629 TGeoRotation* rotationTiltedLinearL;
1633 for (Int_t iface = 1; iface > -2; iface -= 2) {
1634 for (Int_t igroove = 0; igroove < 3; igroove++) {
1635 mPosition[igroove] = mXPosition0[igroove] - mSupportYDimensions[disk][0] / 2. - mHalfDiskGap - diameter / 2.;
1636 for (Int_t ip = 0; ip < 7; ip++) {
1640 transfo[ip][igroove] =
new TGeoCombiTrans(mSupportXDimensions[disk][0] / 2. + mMoreLength01 -
1641 mLWater0[igroove] / 2.,
1642 mPosition[igroove], iface * (mRohacellThickness + epsilon), rotationLinear);
1643 if (igroove == 0 && iface == 1) {
1644 rohacellBaseGroove[0] =
new TGeoSubtraction(rohacellBase0, grooveTube[ip][igroove],
nullptr, transfo[ip][igroove]);
1645 rohacellGroove[0] =
new TGeoCompositeShape(Form(
"rohacell0Groove%d_G%d_F%d_H%d", ip, igroove, iface, half),
1646 rohacellBaseGroove[0]);
1650 transfo[ip][igroove] =
new TGeoCombiTrans(mSupportXDimensions[disk][0] / 2. + mMoreLength01 - mLWater0[igroove],
1651 mRadius0[igroove] + mXPosition0[igroove] -
1652 mSupportYDimensions[disk][0] / 2. - mHalfDiskGap - diameter / 2.,
1653 iface * (mRohacellThickness + epsilon), rotationSideTorusR);
1656 rotationTiltedLinearR =
new TGeoRotation(
"rotationTiltedLinearRight", 90. - mAngle0[igroove], 90., 0.);
1657 transfo[ip][igroove] =
new TGeoCombiTrans(mSupportXDimensions[disk][0] / 2. + mMoreLength01 - xPos0[igroove],
1658 yPos0[igroove] - mSupportYDimensions[disk][0] / 2. - mHalfDiskGap,
1659 iface * (mRohacellThickness + epsilon), rotationTiltedLinearR);
1662 transfo[ip][igroove] =
new TGeoCombiTrans(0., yPos0[igroove] + mLpartial0[igroove] / 2 * TMath::Sin(mAngle0[igroove] * TMath::DegToRad()) - mRadiusCentralTore[igroove] * TMath::Cos(mAngle0[igroove] * TMath::DegToRad()) - mSupportYDimensions[disk][0] / 2. - mHalfDiskGap,
1663 iface * (mRohacellThickness + epsilon), rotationCentralTorus);
1666 rotationTiltedLinearL =
new TGeoRotation(
1667 "rotationTiltedLinearLeft", 90. + mAngle0[igroove], 90., 0.);
1668 transfo[ip][igroove] =
new TGeoCombiTrans(-(mSupportXDimensions[disk][0] / 2. + mMoreLength01 - xPos0[igroove]),
1669 yPos0[igroove] - mSupportYDimensions[disk][0] / 2. - mHalfDiskGap,
1670 iface * (mRohacellThickness + epsilon), rotationTiltedLinearL);
1673 transfo[ip][igroove] =
new TGeoCombiTrans(-(mSupportXDimensions[disk][0] / 2. + mMoreLength01 - mLWater0[igroove]),
1674 mRadius0[igroove] + mPosition[igroove],
1675 iface * (mRohacellThickness + epsilon), rotationSideTorusL);
1678 transfo[ip][igroove] =
new TGeoCombiTrans(
1679 -(mSupportXDimensions[disk][0] / 2. + mMoreLength01 -
1680 mLWater0[igroove] / 2.),
1681 mPosition[igroove], iface * (mRohacellThickness + epsilon),
1686 if (!(ip == 0 && igroove == 0 && iface == 1)) {
1688 rohacellBaseGroove[iCount] =
new TGeoSubtraction(
1689 rohacellGroove[iCount - 1], grooveTorus[ip][igroove],
nullptr,
1690 transfo[ip][igroove]);
1692 rohacellBaseGroove[iCount] =
new TGeoSubtraction(
1693 rohacellGroove[iCount - 1], grooveTube[ip][igroove],
nullptr,
1694 transfo[ip][igroove]);
1696 rohacellGroove[iCount] =
1697 new TGeoCompositeShape(Form(
"rohacell0Groove%d_G%d_F%d_H%d",
1698 iCount, igroove, iface, half),
1699 rohacellBaseGroove[iCount]);
1709 TGeoBoolNode* rohacellBase;
1712 rohacellBase =
new TGeoSubtraction(rohacellBase0, holeRohacell0, t01, t02);
1715 rohacellBase =
new TGeoSubtraction(rohacellGroove[iCount - 1], holeRohacell0, t01, t02);
1718 auto* rh0 =
new TGeoCompositeShape(Form(
"rohacellTore%d_D0_H%d", 0, half),
1720 auto* rohacellBaseWithHole =
1721 new TGeoVolume(Form(
"rohacellBaseWithHole_D0_H%d", half), rh0,
mRohacell);
1723 TGeoVolume* partRohacell;
1724 rohacellBaseWithHole->SetLineColor(kGray);
1725 rotation =
new TGeoRotation(
"rotation", 0., 0., 0.);
1727 rohacellPlate->AddNode(rohacellBaseWithHole, 0,
1728 new TGeoTranslation(0., 0., mZPlan[disk]));
1730 ty = mSupportYDimensions[disk][0];
1732 for (Int_t ipart = 1; ipart < mNPart[disk]; ipart++) {
1733 ty += mSupportYDimensions[disk][ipart] / 2.;
1734 auto* t =
new TGeoTranslation(
"t", 0, ty + mHalfDiskGap, mZPlan[disk]);
1735 auto* partRohacell0 =
new TGeoBBox(Form(
"rohacellBase0_D0_H%d_%d", half, ipart),
1736 mSupportXDimensions[disk][ipart] / 2.,
1737 mSupportYDimensions[disk][ipart] / 2., mRohacellThickness);
1743 for (Int_t iface = 1; iface > -2; iface -= 2) {
1744 for (Int_t igroove = 0; igroove < 3; igroove++) {
1746 mPosition[ipart] = mXPosition0[igroove] - mSupportYDimensions[disk][ipart] / 2. - mHalfDiskGap - mSupportYDimensions[disk][ipart - 1];
1747 mShift = -mSupportYDimensions[disk][ipart - 1];
1750 mPosition[ipart] = mXPosition0[igroove] - mSupportYDimensions[disk][ipart] / 2. -
1751 mHalfDiskGap - mSupportYDimensions[disk][ipart - 1] - mSupportYDimensions[disk][ipart - 2];
1752 mShift = -mSupportYDimensions[disk][ipart - 1] - mSupportYDimensions[disk][ipart - 2];
1755 mPosition[ipart] = mXPosition0[igroove] - mSupportYDimensions[disk][ipart] / 2. -
1756 mHalfDiskGap - mSupportYDimensions[disk][ipart - 1] - mSupportYDimensions[disk][ipart - 2] -
1757 mSupportYDimensions[disk][ipart - 3];
1758 mShift = -mSupportYDimensions[disk][ipart - 1] - mSupportYDimensions[disk][ipart - 2] -
1759 mSupportYDimensions[disk][ipart - 3];
1762 for (Int_t ip = 0; ip < 7; ip++) {
1766 transfo[ip][igroove] =
new TGeoCombiTrans(mSupportXDimensions[0][0] / 2. - mLWater0[igroove] / 2.,
1767 mPosition[ipart], iface * (mRohacellThickness + epsilon),
1769 if (igroove == 0 && iface == 1) {
1770 rohacellBaseGroove[iCount] =
new TGeoSubtraction(partRohacell0, grooveTube[ip][igroove],
1771 nullptr, transfo[ip][igroove]);
1772 rohacellGroove[iCount] =
new TGeoCompositeShape(Form(
"rohacell0Groove%d_G%d_F%d_H%d", ip, igroove, iface, half),
1773 rohacellBaseGroove[iCount]);
1777 transfo[ip][igroove] =
new TGeoCombiTrans(mSupportXDimensions[0][0] / 2. + mMoreLength01 -
1779 mPosition[ipart] + mRadius0[igroove] - diameter / 2.,
1780 iface * (mRohacellThickness + epsilon), rotationSideTorusR);
1783 rotationTiltedLinearR =
new TGeoRotation(
"rotationTiltedLinearRight", 90. - mAngle0[igroove], 90., 0.);
1784 transfo[ip][igroove] =
new TGeoCombiTrans(mSupportXDimensions[0][0] / 2. + mMoreLength01 - xPos0[igroove],
1785 yPos0[igroove] + mShift - mHalfDiskGap -
1786 mSupportYDimensions[disk][ipart] / 2.,
1787 iface * (mRohacellThickness + epsilon), rotationTiltedLinearR);
1790 transfo[ip][igroove] =
new TGeoCombiTrans(0., mPosition[ipart] + yPos0[igroove] + mLpartial0[igroove] / 2 * TMath::Sin(mAngle0[igroove] * TMath::DegToRad()) - mRadiusCentralTore[igroove] * TMath::Cos(mAngle0[igroove] * TMath::DegToRad()) - mXPosition0[igroove],
1791 iface * (mRohacellThickness + epsilon), rotationCentralTorus);
1794 rotationTiltedLinearL =
new TGeoRotation(
1795 "rotationTiltedLinearLeft", 90. + mAngle0[igroove], 90., 0.);
1796 transfo[ip][igroove] =
new TGeoCombiTrans(-(mSupportXDimensions[0][0] / 2. + mMoreLength01 - xPos0[igroove]),
1797 yPos0[igroove] + mPosition[ipart] - mXPosition0[igroove],
1798 iface * (mRohacellThickness + epsilon),
1799 rotationTiltedLinearL);
1802 transfo[ip][igroove] =
new TGeoCombiTrans(
1803 -(mSupportXDimensions[0][0] / 2. + mMoreLength01 - mLWater0[igroove]),
1804 mRadius0[igroove] + mPosition[ipart] - diameter / 2.,
1805 iface * (mRohacellThickness + epsilon), rotationSideTorusL);
1808 transfo[ip][igroove] =
new TGeoCombiTrans(
1809 -(mSupportXDimensions[0][0] / 2. + mMoreLength01 - mLWater0[igroove] / 2.),
1810 mPosition[ipart], iface * (mRohacellThickness + epsilon),
1814 if (!(ip == 0 && igroove == 0 && iface == 1)) {
1816 rohacellBaseGroove[iCount] =
new TGeoSubtraction(rohacellGroove[iCount - 1], grooveTorus[ip][igroove],
1817 nullptr, transfo[ip][igroove]);
1819 rohacellBaseGroove[iCount] =
new TGeoSubtraction(rohacellGroove[iCount - 1], grooveTube[ip][igroove],
1820 nullptr, transfo[ip][igroove]);
1823 rohacellGroove[iCount] =
new TGeoCompositeShape(Form(
"rohacell0Groove%d_G%d_F%d_H%d", iCount, igroove, iface, half),
1824 rohacellBaseGroove[iCount]);
1833 TGeoVolume* partRohacellNotch;
1834 TGeoSubtraction* partRohacellini;
1835 TGeoBBox* notchRohacell0;
1836 TGeoTranslation* tnotch0;
1837 if (ipart == (mNPart[disk] - 1)) {
1838 notchRohacell0 =
new TGeoBBox(Form(
"notchRohacell0_D0_H%d", half), 1.1,
1839 0.4, mRohacellThickness + 0.000001);
1840 tnotch0 =
new TGeoTranslation(
"tnotch0", 0., mSupportYDimensions[disk][ipart] / 2., 0.);
1841 tnotch0->RegisterYourself();
1846 if (ipart == (mNPart[disk] - 1)) {
1847 partRohacellini =
new TGeoSubtraction(partRohacell0, notchRohacell0,
1849 auto* rhinit =
new TGeoCompositeShape(Form(
"rhinit%d_D0_H%d", 0, half), partRohacellini);
1850 partRohacell =
new TGeoVolume(Form(
"partRohacelli_D0_H%d_%d", half, ipart), rhinit,
mRohacell);
1852 if (ipart < (mNPart[disk] - 1)) {
1853 partRohacell =
new TGeoVolume(Form(
"partRohacelli_D0_H%d_%d", half, ipart),
1859 if (ipart == (mNPart[disk] - 1)) {
1860 partRohacellini =
new TGeoSubtraction(rohacellGroove[iCount - 1],
1861 notchRohacell0,
nullptr, tnotch0);
1862 auto* rhinit =
new TGeoCompositeShape(Form(
"rhinit%d_D0_H%d", 0, half), partRohacellini);
1863 partRohacell =
new TGeoVolume(Form(
"partRohacelli_D0_H%d_%d", half, ipart), rhinit,
mRohacell);
1865 if (ipart < (mNPart[disk] - 1)) {
1866 partRohacell =
new TGeoVolume(Form(
"partRohacelli_D0_H%d_%d", half, ipart), rohacellGroove[iCount - 1],
mRohacell);
1871 partRohacell->SetLineColor(kGray);
1872 rohacellPlate->AddNode(partRohacell, ipart, t);
1873 ty += mSupportYDimensions[disk][ipart] / 2.;
1877 if (ipart == (mNPart[disk] - 1)) {
1878 TGeoTranslation* tinsert0;
1879 TGeoVolume* insert0 = gGeoManager->MakeBox(Form(
"insert0_H%d_%d", half, ipart),
mPeek, 1.0,
1880 0.35 / 2., mRohacellThickness);
1881 Double_t ylocation = mSupportYDimensions[disk][0] + mHalfDiskGap - 0.35 / 2.;
1882 for (Int_t ip = 1; ip < mNPart[disk]; ip++) {
1883 ylocation = ylocation + mSupportYDimensions[disk][ip];
1885 tinsert0 =
new TGeoTranslation(
"tinsert0", 0., -ylocation, 0.);
1886 tinsert0->RegisterYourself();
1887 mHalfDisk->AddNode(insert0, 0., tinsert0);
1892 rotation =
new TGeoRotation(
"rotation", 180., 0., 0.);
1907 printf(
"Creating MFT heat exchanger for disk1 top\n");
1908 }
else if (half == Bottom) {
1909 printf(
"Creating MFT heat exchanger for disk1 bottom\n");
1911 printf(
"No valid option for MFT heat exchanger on disk1\n");
1914 mCarbon = gGeoManager->GetMedium(
"MFT_CarbonFiber$");
1915 mWater = gGeoManager->GetMedium(
"MFT_Water$");
1916 mRohacell = gGeoManager->GetMedium(
"MFT_Rohacell$");
1917 mPipe = gGeoManager->GetMedium(
"MFT_Polyimide$");
1918 mPeek = gGeoManager->GetMedium(
"MFT_PEEK$");
1920 auto* cooling =
new TGeoVolumeAssembly(Form(
"cooling_D1_H%d", half));
1922 TGeoTranslation* translation =
nullptr;
1923 TGeoRotation* rotation =
nullptr;
1930 Double_t ivolume = 100;
1931 Double_t mRadiusCentralTore[4];
1935 for (Int_t itube = 0; itube < 3; itube++) {
1936 TGeoVolume* waterTube1 =
1937 gGeoManager->MakeTube(Form(
"waterTube1%d_D1_H%d", itube, half),
mWater,
1938 0., mRWater, mLWater1[itube] / 2.);
1939 translation =
new TGeoTranslation(mXPosition1[itube] - mHalfDiskGap, 0.,
1940 mSupportXDimensions[1][0] / 2. +
1941 mMoreLength01 - mLWater1[itube] / 2.);
1942 cooling->AddNode(waterTube1, ivolume++, translation);
1944 TGeoVolume* waterTorus1 = gGeoManager->MakeTorus(
1945 Form(
"waterTorus1%d_D1_H%d", itube, half),
mWater, mRadius1[itube], 0.,
1946 mRWater, 0., mAngle1[itube]);
1947 rotation =
new TGeoRotation(
"rotation", 180., -90., 0.);
1949 mRadius1[itube] + mXPosition1[itube] - mHalfDiskGap, 0.,
1950 mSupportXDimensions[1][0] / 2. + mMoreLength01 - mLWater1[itube],
1954 TGeoVolume* waterTube2 =
1955 gGeoManager->MakeTube(Form(
"waterTube2%d_D1_H%d", itube, half),
mWater,
1956 0., mRWater, mLpartial1[itube] / 2.);
1957 rotation =
new TGeoRotation(
"rotation", 90., 180 - mAngle1[itube], 0.);
1960 mRadius1[itube] * TMath::Sin(mAngle1[itube] * TMath::DegToRad()) +
1961 mLpartial1[itube] / 2 * TMath::Cos(mAngle1[itube] * TMath::DegToRad());
1963 mXPosition1[itube] - mHalfDiskGap +
1964 mRadius1[itube] * (1 - TMath::Cos(mAngle1[itube] * TMath::DegToRad())) +
1965 mLpartial1[itube] / 2 * TMath::Sin(mAngle1[itube] * TMath::DegToRad());
1967 mSupportXDimensions[1][0] / 2. +
1968 mMoreLength01 - xPos1[itube],
1972 mRadiusCentralTore[itube] =
1973 (mSupportXDimensions[1][0] / 2. + mMoreLength01 - xPos1[itube] -
1974 mLpartial1[itube] / 2 *
1975 TMath::Cos(mAngle1[itube] * TMath::DegToRad())) /
1976 TMath::Sin(mAngle1[itube] * TMath::DegToRad());
1977 TGeoVolume* waterTorusCentral =
1978 gGeoManager->MakeTorus(Form(
"waterTorusCentral%d_D1_H%d", itube, half),
1979 mWater, mRadiusCentralTore[itube], 0., mRWater,
1980 -mAngle1[itube], 2. * mAngle1[itube]);
1981 rotation =
new TGeoRotation(
"rotation", 0., 90., 0.);
1984 mLpartial1[itube] / 2 *
1985 TMath::Sin(mAngle1[itube] * TMath::DegToRad()) -
1986 mRadiusCentralTore[itube] *
1987 TMath::Cos(mAngle1[itube] * TMath::DegToRad()),
1991 TGeoVolume* waterTube3 =
1992 gGeoManager->MakeTube(Form(
"waterTube3%d_D1_H%d", 2, half),
mWater, 0.,
1993 mRWater, mLpartial1[itube] / 2.);
1994 rotation =
new TGeoRotation(
"rotation", -90., 0 - mAngle1[itube], 0.);
1997 -(mSupportXDimensions[1][0] / 2. + mMoreLength01 - xPos1[itube]),
2001 TGeoVolume* waterTorus2 = gGeoManager->MakeTorus(
2002 Form(
"waterTorus2%d_D1_H%d", itube, half),
mWater, mRadius1[itube], 0.,
2003 mRWater, 0., mAngle1[itube]);
2004 rotation =
new TGeoRotation(
"rotation", 180., 90., 0.);
2006 mRadius1[itube] + mXPosition1[itube] - mHalfDiskGap, 0.,
2007 -(mSupportXDimensions[1][0] / 2. + mMoreLength01 - mLWater1[itube]),
2011 TGeoVolume* waterTube4 =
2012 gGeoManager->MakeTube(Form(
"waterTube4%d_D1_H%d", itube, half),
mWater,
2013 0., mRWater, mLWater1[itube] / 2.);
2014 translation =
new TGeoTranslation(mXPosition1[itube] - mHalfDiskGap, 0.,
2015 -(mSupportXDimensions[1][0] / 2. +
2016 mMoreLength01 - mLWater1[itube] / 2.));
2017 cooling->AddNode(waterTube4, ivolume++, translation);
2024 for (Int_t itube = 0; itube < 3; itube++) {
2025 TGeoVolume* pipeTube1 =
2026 gGeoManager->MakeTube(Form(
"pipeTube1%d_D1_H%d", itube, half),
mPipe,
2027 mRWater, mRWater + mDRPipe, mLWater1[itube] / 2.);
2028 translation =
new TGeoTranslation(mXPosition1[itube] - mHalfDiskGap, 0.,
2029 mSupportXDimensions[1][0] / 2. +
2030 mMoreLength01 - mLWater1[itube] / 2.);
2031 cooling->AddNode(pipeTube1, ivolume++, translation);
2033 TGeoVolume* pipeTorus1 = gGeoManager->MakeTorus(
2034 Form(
"pipeTorus1%d_D1_H%d", itube, half),
mPipe, mRadius1[itube],
2035 mRWater, mRWater + mDRPipe, 0., mAngle1[itube]);
2036 rotation =
new TGeoRotation(
"rotation", 180., -90., 0.);
2038 mRadius1[itube] + mXPosition1[itube] - mHalfDiskGap, 0.,
2039 mSupportXDimensions[1][0] / 2. + mMoreLength01 - mLWater1[itube],
2043 TGeoVolume* pipeTube2 = gGeoManager->MakeTube(
2044 Form(
"pipeTube2%d_D1_H%d", itube, half),
mPipe, mRWater,
2045 mRWater + mDRPipe, mLpartial1[itube] / 2.);
2046 rotation =
new TGeoRotation(
"rotation", 90., 180 - mAngle1[itube], 0.);
2049 mRadius1[itube] * TMath::Sin(mAngle1[itube] * TMath::DegToRad()) +
2050 mLpartial1[itube] / 2 * TMath::Cos(mAngle1[itube] * TMath::DegToRad());
2052 mXPosition1[itube] - mHalfDiskGap +
2053 mRadius1[itube] * (1 - TMath::Cos(mAngle1[itube] * TMath::DegToRad())) +
2054 mLpartial1[itube] / 2 * TMath::Sin(mAngle1[itube] * TMath::DegToRad());
2056 mSupportXDimensions[1][0] / 2. +
2057 mMoreLength01 - xPos1[itube],
2061 mRadiusCentralTore[itube] =
2062 (mSupportXDimensions[1][0] / 2. + mMoreLength01 - xPos1[itube] -
2063 mLpartial1[itube] / 2 *
2064 TMath::Cos(mAngle1[itube] * TMath::DegToRad())) /
2065 TMath::Sin(mAngle1[itube] * TMath::DegToRad());
2066 TGeoVolume* pipeTorusCentral = gGeoManager->MakeTorus(
2067 Form(
"pipeTorusCentral%d_D1_H%d", itube, half),
mPipe,
2068 mRadiusCentralTore[itube], mRWater, mRWater + mDRPipe, -mAngle1[itube],
2069 2. * mAngle1[itube]);
2070 rotation =
new TGeoRotation(
"rotation", 0., 90., 0.);
2073 mLpartial1[itube] / 2 *
2074 TMath::Sin(mAngle1[itube] * TMath::DegToRad()) -
2075 mRadiusCentralTore[itube] *
2076 TMath::Cos(mAngle1[itube] * TMath::DegToRad()),
2080 TGeoVolume* pipeTube3 = gGeoManager->MakeTube(
2081 Form(
"pipeTube3%d_D1_H%d", 2, half),
mPipe, mRWater, mRWater + mDRPipe,
2082 mLpartial1[itube] / 2.);
2083 rotation =
new TGeoRotation(
"rotation", -90., 0 - mAngle1[itube], 0.);
2086 -(mSupportXDimensions[1][0] / 2. + mMoreLength01 - xPos1[itube]),
2090 TGeoVolume* pipeTorus2 = gGeoManager->MakeTorus(
2091 Form(
"pipeTorus2%d_D1_H%d", itube, half),
mPipe, mRadius1[itube],
2092 mRWater, mRWater + mDRPipe, 0., mAngle1[itube]);
2093 rotation =
new TGeoRotation(
"rotation", 180., 90., 0.);
2095 mRadius1[itube] + mXPosition1[itube] - mHalfDiskGap, 0.,
2096 -(mSupportXDimensions[1][0] / 2. + mMoreLength01 - mLWater1[itube]),
2100 TGeoVolume* pipeTube4 =
2101 gGeoManager->MakeTube(Form(
"pipeTube4%d_D1_H%d", itube, half),
mPipe,
2102 mRWater, mRWater + mDRPipe, mLWater1[itube] / 2.);
2103 translation =
new TGeoTranslation(mXPosition1[itube] - mHalfDiskGap, 0.,
2104 -(mSupportXDimensions[1][0] / 2. +
2105 mMoreLength01 - mLWater1[itube] / 2.));
2106 cooling->AddNode(pipeTube4, ivolume++, translation);
2110 Double_t deltaz = mHeatExchangerThickness -
2114 rotation =
new TGeoRotation(
"rotation", -90., 90., 0.);
2117 mZPlan[disk] + deltaz / 2. - mCarbonThickness - mRWater - mDRPipe -
2123 mZPlan[disk] - deltaz / 2. + mCarbonThickness + mRWater + mDRPipe +
2130 auto* carbonPlate =
new TGeoVolumeAssembly(Form(
"carbonPlate_D1_H%d", half));
2133 Double_t mReducedX = 0.;
2134 if (mftBaseParam.buildAlignment) {
2138 auto* carbonBase1 =
new TGeoBBox(
2139 Form(
"carbonBase1_D1_H%d", half),
2140 (mSupportXDimensions[disk][0]) / 2. + mMoreLength01 - mReducedX,
2141 (mSupportYDimensions[disk][0]) / 2., mCarbonThickness);
2142 auto* t11 =
new TGeoTranslation(
2143 "t11", 0., (mSupportYDimensions[disk][0]) / 2. + mHalfDiskGap, 0.);
2144 t11->RegisterYourself();
2147 new TGeoTubeSeg(Form(
"holeCarbon1_D1_H%d", half), 0., mRMin[disk],
2148 mCarbonThickness + 0.000001, 0, 180.);
2149 auto* t12 =
new TGeoTranslation(
"t12", 0., -mHalfDiskGap, 0.);
2150 t12->RegisterYourself();
2152 auto* carbonhole1 =
new TGeoSubtraction(carbonBase1, holeCarbon1, t11, t12);
2153 auto* ch1 =
new TGeoCompositeShape(Form(
"Carbon1_D1_H%d", half), carbonhole1);
2154 auto* carbonBaseWithHole1 =
2155 new TGeoVolume(Form(
"carbonBaseWithHole_D1_H%d", half), ch1,
mCarbon);
2157 carbonBaseWithHole1->SetLineColor(kGray + 3);
2158 rotation =
new TGeoRotation(
"rotation", 0., 0., 0.);
2160 carbonPlate->AddNode(carbonBaseWithHole1, 0,
2161 new TGeoTranslation(0., 0., mZPlan[disk]));
2163 Double_t ty = mSupportYDimensions[disk][0];
2165 for (Int_t ipart = 1; ipart < mNPart[disk]; ipart++) {
2166 ty += mSupportYDimensions[disk][ipart] / 2.;
2167 TGeoVolume* partCarbon = gGeoManager->MakeBox(
2168 Form(
"partCarbon_D1_H%d_%d", half, ipart),
mCarbon,
2169 mSupportXDimensions[disk][ipart] / 2.,
2170 mSupportYDimensions[disk][ipart] / 2., mCarbonThickness);
2171 partCarbon->SetLineColor(kGray + 3);
2172 auto* t =
new TGeoTranslation(
"t", 0, ty + mHalfDiskGap, mZPlan[disk]);
2173 carbonPlate->AddNode(partCarbon, ipart, t);
2174 ty += mSupportYDimensions[disk][ipart] / 2.;
2177 rotation =
new TGeoRotation(
"rotation", 180., 0., 0.);
2178 transformation =
new TGeoCombiTrans(0., 0., deltaz / 2., rotation);
2180 transformation =
new TGeoCombiTrans(0., 0., -deltaz / 2., rotation);
2186 TGeoMedium* mGlueRohacellCarbon = gGeoManager->GetMedium(
"MFT_Epoxy$");
2188 auto* glueRohacellCarbon =
2189 new TGeoVolumeAssembly(Form(
"glueRohacellCarbon_D0_H%d", half));
2191 auto* glueRohacellCarbonBase0 =
2192 new TGeoBBox(Form(
"glueRohacellCarbonBase0_D0_H%d", half),
2193 (mSupportXDimensions[disk][0]) / 2. - mReducedX,
2194 (mSupportYDimensions[disk][0]) / 2.,
2197 auto* translation_gluRC01 =
new TGeoTranslation(
2198 "translation_gluRC01", 0.,
2199 (mSupportYDimensions[disk][0]) / 2. + mHalfDiskGap, 0.);
2200 translation_gluRC01->RegisterYourself();
2201 auto* translation_gluRC02 =
2202 new TGeoTranslation(
"translation_gluRC02", 0., -mHalfDiskGap, 0.);
2203 translation_gluRC02->RegisterYourself();
2205 auto* holeglueRohacellCarbon0 =
new TGeoTubeSeg(
2206 Form(
"holeglueRohacellCarbon0_D0_H%d", half), 0., mRMin[disk],
2209 auto* glueRohacellCarbonhole0 =
2210 new TGeoSubtraction(glueRohacellCarbonBase0, holeglueRohacellCarbon0,
2211 translation_gluRC01, translation_gluRC02);
2212 auto* gRC0 =
new TGeoCompositeShape(Form(
"glueRohacellCarbon0_D0_H%d", half),
2213 glueRohacellCarbonhole0);
2214 auto* glueRohacellCarbonBaseWithHole0 =
2215 new TGeoVolume(Form(
"glueRohacellCarbonWithHole_D0_H%d", half), gRC0,
2216 mGlueRohacellCarbon);
2218 glueRohacellCarbonBaseWithHole0->SetLineColor(kGreen);
2219 rotation =
new TGeoRotation(
"rotation", 0., 0., 0.);
2221 glueRohacellCarbon->AddNode(glueRohacellCarbonBaseWithHole0, 0,
2222 new TGeoTranslation(0., 0., mZPlan[disk]));
2224 Double_t tyGRC = mSupportYDimensions[disk][0];
2226 for (Int_t ipart = 1; ipart < mNPart[disk]; ipart++) {
2227 tyGRC += mSupportYDimensions[disk][ipart] / 2.;
2228 TGeoVolume* partGlueRohacellCarbon = gGeoManager->MakeBox(
2229 Form(
"partGlueRohacellCarbon_D0_H%d_%d", half, ipart),
2230 mGlueRohacellCarbon, mSupportXDimensions[disk][ipart] / 2.,
2231 mSupportYDimensions[disk][ipart] / 2.,
2233 partGlueRohacellCarbon->SetLineColor(kGreen);
2234 auto* t =
new TGeoTranslation(
"t", 0, tyGRC + mHalfDiskGap, mZPlan[disk]);
2235 glueRohacellCarbon->AddNode(partGlueRohacellCarbon, ipart, t);
2236 tyGRC += mSupportYDimensions[disk][ipart] / 2.;
2239 rotation =
new TGeoRotation(
"rotation", 180., 0., 0.);
2246 -(deltaz / 2. - mCarbonThickness -
2253 TGeoMedium* mKaptonOnCarbon = gGeoManager->GetMedium(
"MFT_Kapton$");
2254 auto* kaptonOnCarbon =
2255 new TGeoVolumeAssembly(Form(
"kaptonOnCarbon_D0_H%d", half));
2256 auto* kaptonOnCarbonBase0 =
new TGeoBBox(
2257 Form(
"kaptonOnCarbonBase0_D0_H%d", half),
2258 (mSupportXDimensions[disk][0]) / 2. + mMoreLength01 - mReducedX,
2261 auto* translation_KC01 =
new TGeoTranslation(
2262 "translation_KC01", 0.,
2263 (mSupportYDimensions[disk][0]) / 2. + mHalfDiskGap, 0.);
2264 translation_KC01->RegisterYourself();
2265 auto* translation_KC02 =
2266 new TGeoTranslation(
"translation_KC02", 0., -mHalfDiskGap, 0.);
2267 translation_KC02->RegisterYourself();
2269 auto* holekaptonOnCarbon0 =
2270 new TGeoTubeSeg(Form(
"holekaptonOnCarbon0_D0_H%d", half), 0., mRMin[disk],
2273 auto* kaptonOnCarbonhole0 =
2274 new TGeoSubtraction(kaptonOnCarbonBase0, holekaptonOnCarbon0,
2275 translation_KC01, translation_KC02);
2276 auto* KC0 =
new TGeoCompositeShape(Form(
"kaptonOnCarbon_D0_H%d", half),
2277 kaptonOnCarbonhole0);
2278 auto* kaptonOnCarbonBaseWithHole0 =
new TGeoVolume(
2279 Form(
"kaptonOnCarbonWithHole_D0_H%d", half), KC0, mKaptonOnCarbon);
2281 kaptonOnCarbonBaseWithHole0->SetLineColor(kMagenta);
2282 rotation =
new TGeoRotation(
"rotation", 0., 0., 0.);
2284 kaptonOnCarbon->AddNode(kaptonOnCarbonBaseWithHole0, 0,
2285 new TGeoTranslation(0., 0., mZPlan[disk]));
2287 Double_t tyKC = mSupportYDimensions[disk][0];
2289 for (Int_t ipart = 1; ipart < mNPart[disk]; ipart++) {
2290 tyKC += mSupportYDimensions[disk][ipart] / 2.;
2291 TGeoVolume* partkaptonOnCarbonBase = gGeoManager->MakeBox(
2292 Form(
"partkaptonOnCarbon_D0_H%d_%d", half, ipart), mKaptonOnCarbon,
2293 mSupportXDimensions[disk][ipart] / 2.,
2294 mSupportYDimensions[disk][ipart] / 2.,
2296 partkaptonOnCarbonBase->SetLineColor(kMagenta);
2297 auto* t =
new TGeoTranslation(
"t", 0, tyKC + mHalfDiskGap, mZPlan[disk]);
2298 kaptonOnCarbon->AddNode(partkaptonOnCarbonBase, ipart, t);
2299 tyKC += mSupportYDimensions[disk][ipart] / 2.;
2302 rotation =
new TGeoRotation(
"rotation", 180., 0., 0.);
2318 TGeoMedium* mGlueKaptonCarbon = gGeoManager->GetMedium(
"MFT_Epoxy$");
2319 auto* glueKaptonCarbon =
2320 new TGeoVolumeAssembly(Form(
"glueKaptonCarbon_D0_H%d", half));
2321 auto* glueKaptonCarbonBase0 =
new TGeoBBox(
2322 Form(
"glueKaptonCarbonBase0_D0_H%d", half),
2323 (mSupportXDimensions[disk][0]) / 2. - mReducedX,
2326 auto* translation_gluKC01 =
new TGeoTranslation(
2327 "translation_gluKC01", 0.,
2328 (mSupportYDimensions[disk][0]) / 2. + mHalfDiskGap, 0.);
2329 translation_gluKC01->RegisterYourself();
2330 auto* translation_gluKC02 =
2331 new TGeoTranslation(
"translation_gluKC02", 0., -mHalfDiskGap, 0.);
2332 translation_gluKC02->RegisterYourself();
2334 auto* holeglueKaptonCarbon0 =
new TGeoTubeSeg(
2335 Form(
"holeglueKaptonCarbon0_D0_H%d", half), 0., mRMin[disk],
2338 auto* glueKaptonCarbonhole0 =
2339 new TGeoSubtraction(glueKaptonCarbonBase0, holeglueKaptonCarbon0,
2340 translation_gluKC01, translation_gluKC02);
2341 auto* gKC0 =
new TGeoCompositeShape(Form(
"glueKaptonCarbon0_D0_H%d", half),
2342 glueKaptonCarbonhole0);
2343 auto* glueKaptonCarbonBaseWithHole0 =
new TGeoVolume(
2344 Form(
"glueKaptonCarbonWithHole_D0_H%d", half), gKC0, mGlueKaptonCarbon);
2346 glueKaptonCarbonBaseWithHole0->SetLineColor(kGreen);
2347 rotation =
new TGeoRotation(
"rotation", 0., 0., 0.);
2349 glueKaptonCarbon->AddNode(glueKaptonCarbonBaseWithHole0, 0,
2350 new TGeoTranslation(0., 0., mZPlan[disk]));
2352 Double_t tyGKC = mSupportYDimensions[disk][0];
2354 for (Int_t ipart = 1; ipart < mNPart[disk]; ipart++) {
2355 tyGKC += mSupportYDimensions[disk][ipart] / 2.;
2356 TGeoVolume* partGlueKaptonCarbon = gGeoManager->MakeBox(
2357 Form(
"partGlueKaptonCarbon_D0_H%d_%d", half, ipart), mGlueKaptonCarbon,
2358 mSupportXDimensions[disk][ipart] / 2.,
2360 partGlueKaptonCarbon->SetLineColor(kGreen);
2361 auto* t =
new TGeoTranslation(
"t", 0, tyGKC + mHalfDiskGap, mZPlan[disk]);
2362 glueKaptonCarbon->AddNode(partGlueKaptonCarbon, ipart, t);
2363 tyGKC += mSupportYDimensions[disk][ipart] / 2.;
2366 rotation =
new TGeoRotation(
"rotation", 180., 0., 0.);
2379 auto* rohacellPlate =
2380 new TGeoVolumeAssembly(Form(
"rohacellPlate_D1_H%d", half));
2381 auto* rohacellBase1 =
2382 new TGeoBBox(
"rohacellBase1", (mSupportXDimensions[disk][0]) / 2.,
2383 (mSupportYDimensions[disk][0]) / 2., mRohacellThickness);
2384 auto* holeRohacell1 =
new TGeoTubeSeg(
"holeRohacell1", 0., mRMin[disk],
2385 mRohacellThickness + 0.000001, 0, 180.);
2389 Double_t diameter = 0.21;
2390 Double_t epsilon = 0.06;
2392 Double_t mPosition[4];
2393 TGeoCombiTrans* transfo[7][3];
2394 TGeoTube* grooveTube[7][3];
2395 TGeoTorus* grooveTorus[7][3];
2396 TGeoSubtraction* rohacellBaseGroove[300];
2397 TGeoCompositeShape* rohacellGroove[300];
2399 for (Int_t igroove = 0; igroove < 3; igroove++) {
2400 grooveTube[0][igroove] =
2401 new TGeoTube(
"linear", 0., diameter, mLWater1[igroove] / 2.);
2402 grooveTorus[1][igroove] =
new TGeoTorus(
"SideTorus", mRadius1[igroove], 0.,
2403 diameter, 0., mAngle1[igroove]);
2404 grooveTube[2][igroove] =
2405 new TGeoTube(
"tiltedLinear", 0., diameter, mLpartial1[igroove] / 2.);
2406 grooveTorus[3][igroove] =
2407 new TGeoTorus(
"centralTorus", mRadiusCentralTore[igroove], 0., diameter,
2408 -mAngle1[igroove], 2. * mAngle1[igroove]);
2409 grooveTube[4][igroove] =
2410 new TGeoTube(
"tiltedLinear", 0., diameter, mLpartial1[igroove] / 2.);
2411 grooveTorus[5][igroove] =
new TGeoTorus(
"SideTorus", mRadius1[igroove], 0.,
2412 diameter, 0., mAngle1[igroove]);
2413 grooveTube[6][igroove] =
2414 new TGeoTube(
"linear", 0., diameter, mLWater1[igroove] / 2.);
2418 TGeoRotation* rotationLinear =
new TGeoRotation(
"rotation", -90., 90., 0.);
2419 TGeoRotation* rotationSideTorusL =
2420 new TGeoRotation(
"rotationSideTorusLeft", -90., 0., 0.);
2421 TGeoRotation* rotationSideTorusR =
2422 new TGeoRotation(
"rotationSideTorusRight", 90., 180., 180.);
2423 TGeoRotation* rotationCentralTorus =
2424 new TGeoRotation(
"rotationCentralTorus", 90., 0., 0.);
2425 TGeoRotation* rotationTiltedLinearR;
2426 TGeoRotation* rotationTiltedLinearL;
2430 for (Int_t iface = 1; iface > -2; iface -= 2) {
2431 for (Int_t igroove = 0; igroove < 3; igroove++) {
2432 mPosition[igroove] = mXPosition1[igroove] - mSupportYDimensions[disk][0] / 2. - mHalfDiskGap - diameter / 2.;
2433 for (Int_t ip = 0; ip < 7; ip++) {
2437 transfo[ip][igroove] =
new TGeoCombiTrans(
2438 mSupportXDimensions[1][0] / 2. + mMoreLength01 -
2439 mLWater1[igroove] / 2.,
2440 mPosition[igroove], iface * (mRohacellThickness + epsilon),
2442 if (igroove == 0 && iface == 1) {
2443 rohacellBaseGroove[0] =
2444 new TGeoSubtraction(rohacellBase1, grooveTube[ip][igroove],
2445 nullptr, transfo[ip][igroove]);
2447 new TGeoCompositeShape(Form(
"rohacell1Groove%d_G%d_F%d_H%d",
2448 ip, igroove, iface, half),
2449 rohacellBaseGroove[0]);
2453 transfo[ip][igroove] =
new TGeoCombiTrans(
2454 mSupportXDimensions[1][0] / 2. + mMoreLength01 -
2456 mRadius1[igroove] + mXPosition1[igroove] -
2457 mSupportYDimensions[disk][0] / 2. - mHalfDiskGap - diameter / 2.,
2458 iface * (mRohacellThickness + epsilon), rotationSideTorusR);
2461 rotationTiltedLinearR =
new TGeoRotation(
2462 "rotationTiltedLinearRight", 90. - mAngle1[igroove], 90., 0.);
2463 transfo[ip][igroove] =
new TGeoCombiTrans(
2464 mSupportXDimensions[1][0] / 2. + mMoreLength01 - xPos1[igroove],
2465 yPos1[igroove] - mSupportYDimensions[disk][0] / 2. -
2467 iface * (mRohacellThickness + epsilon), rotationTiltedLinearR);
2470 transfo[ip][igroove] =
new TGeoCombiTrans(
2473 mLpartial1[igroove] / 2 *
2474 TMath::Sin(mAngle1[igroove] * TMath::DegToRad()) -
2475 mRadiusCentralTore[igroove] *
2476 TMath::Cos(mAngle1[igroove] * TMath::DegToRad()) -
2477 mSupportYDimensions[disk][0] / 2. - mHalfDiskGap,
2478 iface * (mRohacellThickness + epsilon), rotationCentralTorus);
2481 rotationTiltedLinearL =
new TGeoRotation(
2482 "rotationTiltedLinearLeft", 90. + mAngle1[igroove], 90., 0.);
2483 transfo[ip][igroove] =
new TGeoCombiTrans(
2484 -(mSupportXDimensions[1][0] / 2. + mMoreLength01 -
2486 yPos1[igroove] - mSupportYDimensions[disk][0] / 2. -
2488 iface * (mRohacellThickness + epsilon), rotationTiltedLinearL);
2491 transfo[ip][igroove] =
new TGeoCombiTrans(
2492 -(mSupportXDimensions[1][0] / 2. + mMoreLength01 -
2494 mRadius1[igroove] + mPosition[igroove],
2495 iface * (mRohacellThickness + epsilon), rotationSideTorusL);
2498 transfo[ip][igroove] =
new TGeoCombiTrans(
2499 -(mSupportXDimensions[1][0] / 2. + mMoreLength01 -
2500 mLWater1[igroove] / 2.),
2501 mPosition[igroove], iface * (mRohacellThickness + epsilon),
2506 if (!(ip == 0 && igroove == 0 && iface == 1)) {
2508 rohacellBaseGroove[iCount] =
new TGeoSubtraction(
2509 rohacellGroove[iCount - 1], grooveTorus[ip][igroove],
nullptr,
2510 transfo[ip][igroove]);
2512 rohacellBaseGroove[iCount] =
new TGeoSubtraction(
2513 rohacellGroove[iCount - 1], grooveTube[ip][igroove],
nullptr,
2514 transfo[ip][igroove]);
2516 rohacellGroove[iCount] =
2517 new TGeoCompositeShape(Form(
"rohacell1Groove%d_G%d_F%d_H%d",
2518 iCount, igroove, iface, half),
2519 rohacellBaseGroove[iCount]);
2529 TGeoBoolNode* rohacellBase;
2531 rohacellBase =
new TGeoSubtraction(rohacellBase1, holeRohacell1, t11, t12);
2534 rohacellBase =
new TGeoSubtraction(rohacellGroove[iCount - 1],
2535 holeRohacell1, t11, t12);
2538 new TGeoCompositeShape(Form(
"rohacellBase1_D1_H%d", half), rohacellBase);
2539 auto* rohacellBaseWithHole =
2540 new TGeoVolume(Form(
"rohacellBaseWithHole_D1_H%d", half), rh1,
mRohacell);
2542 TGeoVolume* partRohacell;
2543 rohacellBaseWithHole->SetLineColor(kGray);
2544 rotation =
new TGeoRotation(
"rotation", 0., 0., 0.);
2546 rohacellPlate->AddNode(rohacellBaseWithHole, 0,
2547 new TGeoTranslation(0., 0., mZPlan[disk]));
2549 ty = mSupportYDimensions[disk][0];
2551 for (Int_t ipart = 1; ipart < mNPart[disk]; ipart++) {
2552 ty += mSupportYDimensions[disk][ipart] / 2.;
2553 auto* t =
new TGeoTranslation(
"t", 0, ty + mHalfDiskGap, mZPlan[disk]);
2557 auto* partRohacell0 =
2558 new TGeoBBox(Form(
"rohacellBase0_D1_H%d_%d", half, ipart),
2559 mSupportXDimensions[disk][ipart] / 2.,
2560 mSupportYDimensions[disk][ipart] / 2., mRohacellThickness);
2566 for (Int_t iface = 1; iface > -2; iface -= 2) {
2567 for (Int_t igroove = 0; igroove < 3; igroove++) {
2570 mXPosition1[igroove] - mSupportYDimensions[disk][ipart] / 2. -
2571 mHalfDiskGap - mSupportYDimensions[disk][ipart - 1];
2572 mShift = -mSupportYDimensions[disk][ipart - 1];
2576 mXPosition1[igroove] - mSupportYDimensions[disk][ipart] / 2. -
2577 mHalfDiskGap - mSupportYDimensions[disk][ipart - 1] -
2578 mSupportYDimensions[disk][ipart - 2];
2579 mShift = -mSupportYDimensions[disk][ipart - 1] -
2580 mSupportYDimensions[disk][ipart - 2];
2584 mXPosition1[igroove] - mSupportYDimensions[disk][ipart] / 2. -
2585 mHalfDiskGap - mSupportYDimensions[disk][ipart - 1] -
2586 mSupportYDimensions[disk][ipart - 2] -
2587 mSupportYDimensions[disk][ipart - 3];
2588 mShift = -mSupportYDimensions[disk][ipart - 1] -
2589 mSupportYDimensions[disk][ipart - 2] -
2590 mSupportYDimensions[disk][ipart - 3];
2593 for (Int_t ip = 0; ip < 7; ip++) {
2597 transfo[ip][igroove] =
new TGeoCombiTrans(
2598 mSupportXDimensions[disk][0] / 2. + mMoreLength01 -
2599 mLWater1[igroove] / 2.,
2600 mPosition[ipart], iface * (mRohacellThickness + epsilon),
2602 if (igroove == 0 && iface == 1) {
2603 rohacellBaseGroove[iCount] =
2604 new TGeoSubtraction(partRohacell0, grooveTube[ip][igroove],
2605 nullptr, transfo[ip][igroove]);
2606 rohacellGroove[iCount] =
2607 new TGeoCompositeShape(Form(
"rohacell1Groove%d_G%d_F%d_H%d",
2608 ip, igroove, iface, half),
2609 rohacellBaseGroove[iCount]);
2613 transfo[ip][igroove] =
new TGeoCombiTrans(
2614 mSupportXDimensions[disk][0] / 2. + mMoreLength01 -
2616 mPosition[ipart] + mRadius1[igroove] - diameter / 2.,
2617 iface * (mRohacellThickness + epsilon), rotationSideTorusR);
2620 rotationTiltedLinearR =
new TGeoRotation(
2621 "rotationTiltedLinearRight", 90. - mAngle1[igroove], 90., 0.);
2622 transfo[ip][igroove] =
2623 new TGeoCombiTrans(mSupportXDimensions[disk][0] / 2. +
2624 mMoreLength01 - xPos1[igroove],
2625 yPos1[igroove] + mShift - mHalfDiskGap -
2626 mSupportYDimensions[disk][ipart] / 2.,
2627 iface * (mRohacellThickness + epsilon),
2628 rotationTiltedLinearR);
2631 transfo[ip][igroove] =
new TGeoCombiTrans(
2633 mPosition[ipart] + yPos1[igroove] +
2634 mLpartial1[igroove] / 2 *
2635 TMath::Sin(mAngle1[igroove] * TMath::DegToRad()) -
2636 mRadiusCentralTore[igroove] *
2637 TMath::Cos(mAngle1[igroove] * TMath::DegToRad()) -
2638 mXPosition1[igroove],
2639 iface * (mRohacellThickness + epsilon), rotationCentralTorus);
2642 rotationTiltedLinearL =
new TGeoRotation(
2643 "rotationTiltedLinearLeft", 90. + mAngle1[igroove], 90., 0.);
2644 transfo[ip][igroove] =
new TGeoCombiTrans(
2645 -(mSupportXDimensions[disk][0] / 2. + mMoreLength01 -
2647 yPos1[igroove] + mPosition[ipart] - mXPosition1[igroove],
2648 iface * (mRohacellThickness + epsilon),
2649 rotationTiltedLinearL);
2652 transfo[ip][igroove] =
new TGeoCombiTrans(
2653 -(mSupportXDimensions[disk][0] / 2. + mMoreLength01 -
2655 mRadius1[igroove] + mPosition[ipart] - diameter / 2.,
2656 iface * (mRohacellThickness + epsilon), rotationSideTorusL);
2659 transfo[ip][igroove] =
new TGeoCombiTrans(
2660 -(mSupportXDimensions[disk][0] / 2. + mMoreLength01 -
2661 mLWater1[igroove] / 2.),
2662 mPosition[ipart], iface * (mRohacellThickness + epsilon),
2666 if (!(ip == 0 && igroove == 0 && iface == 1)) {
2668 rohacellBaseGroove[iCount] =
new TGeoSubtraction(
2669 rohacellGroove[iCount - 1], grooveTorus[ip][igroove],
2670 nullptr, transfo[ip][igroove]);
2672 rohacellBaseGroove[iCount] =
new TGeoSubtraction(
2673 rohacellGroove[iCount - 1], grooveTube[ip][igroove],
2674 nullptr, transfo[ip][igroove]);
2677 rohacellGroove[iCount] =
2678 new TGeoCompositeShape(Form(
"rohacell1Groove%d_G%d_F%d_H%d",
2679 iCount, igroove, iface, half),
2680 rohacellBaseGroove[iCount]);
2688 TGeoVolume* partRohacellNotch;
2689 TGeoSubtraction* partRohacellini;
2690 TGeoBBox* notchRohacell1;
2691 TGeoTranslation* tnotch1;
2692 if (ipart == (mNPart[disk] - 1)) {
2693 notchRohacell1 =
new TGeoBBox(Form(
"notchRohacell1_D1_H%d", half), 1.1,
2694 0.4, mRohacellThickness + 0.000001);
2695 tnotch1 =
new TGeoTranslation(
"tnotch1", 0.,
2696 mSupportYDimensions[disk][ipart] / 2., 0.);
2697 tnotch1->RegisterYourself();
2702 if (ipart == (mNPart[disk] - 1)) {
2703 partRohacellini =
new TGeoSubtraction(partRohacell0, notchRohacell1,
2705 auto* rhinit =
new TGeoCompositeShape(Form(
"rhinit%d_D1_H%d", 0, half),
2707 partRohacell =
new TGeoVolume(
2708 Form(
"partRohacelli_D1_H%d_%d", half, ipart), rhinit,
mRohacell);
2710 if (ipart < (mNPart[disk] - 1)) {
2712 new TGeoVolume(Form(
"partRohacelli_D1_H%d_%d", half, ipart),
2717 if (ipart == (mNPart[disk] - 1)) {
2718 partRohacellini =
new TGeoSubtraction(rohacellGroove[iCount - 1],
2719 notchRohacell1,
nullptr, tnotch1);
2720 auto* rhinit =
new TGeoCompositeShape(Form(
"rhinit%d_D1_H%d", 0, half),
2722 partRohacell =
new TGeoVolume(
2723 Form(
"partRohacelli_D1_H%d_%d", half, ipart), rhinit,
mRohacell);
2725 if (ipart < (mNPart[disk] - 1)) {
2727 new TGeoVolume(Form(
"partRohacelli_D1_H%d_%d", half, ipart),
2734 partRohacell->SetLineColor(kGray);
2735 rohacellPlate->AddNode(partRohacell, ipart, t);
2736 ty += mSupportYDimensions[disk][ipart] / 2.;
2740 if (ipart == (mNPart[disk] - 1)) {
2741 TGeoTranslation* tinsert1;
2742 TGeoVolume* insert1 =
2743 gGeoManager->MakeBox(Form(
"insert1_H%d_%d", half, ipart),
mPeek, 1.0,
2744 0.35 / 2., mRohacellThickness);
2745 Double_t ylocation =
2746 mSupportYDimensions[disk][0] + mHalfDiskGap - 0.35 / 2.;
2747 for (Int_t ip = 1; ip < mNPart[disk]; ip++) {
2748 ylocation = ylocation + mSupportYDimensions[disk][ip];
2750 tinsert1 =
new TGeoTranslation(
"tinsert1", 0., -ylocation, 0.);
2751 tinsert1->RegisterYourself();
2752 mHalfDisk->AddNode(insert1, 0., tinsert1);
2757 rotation =
new TGeoRotation(
"rotation", 180., 0., 0.);
2772 printf(
"Creating MFT heat exchanger for disk2 top\n");
2773 }
else if (half == Bottom) {
2774 printf(
"Creating MFT heat exchanger for disk2 bottom\n");
2776 printf(
"No valid option for MFT heat exchanger on disk2\n");
2779 mCarbon = gGeoManager->GetMedium(
"MFT_CarbonFiber$");
2780 mWater = gGeoManager->GetMedium(
"MFT_Water$");
2781 mRohacell = gGeoManager->GetMedium(
"MFT_Rohacell$");
2782 mPipe = gGeoManager->GetMedium(
"MFT_Polyimide$");
2783 mPeek = gGeoManager->GetMedium(
"MFT_PEEK$");
2785 auto* cooling =
new TGeoVolumeAssembly(Form(
"cooling_D2_H%d", half));
2787 TGeoTranslation* translation =
nullptr;
2788 TGeoRotation* rotation =
nullptr;
2795 Double_t ivolume = 200;
2796 Double_t mRadiusCentralTore[4];
2800 for (Int_t itube = 0; itube < 3; itube++) {
2801 TGeoVolume* waterTube1 =
2802 gGeoManager->MakeTube(Form(
"waterTube1%d_D2_H%d", itube, half),
mWater,
2803 0., mRWater, mLWater2[itube] / 2.);
2804 translation =
new TGeoTranslation(mXPosition2[itube] - mHalfDiskGap, 0.,
2805 mSupportXDimensions[2][0] / 2. +
2806 mMoreLength - mLWater2[itube] / 2.);
2807 cooling->AddNode(waterTube1, ivolume++, translation);
2809 TGeoVolume* waterTorus1 = gGeoManager->MakeTorus(
2810 Form(
"waterTorus1%d_D2_H%d", itube, half),
mWater, mRadius2[itube], 0.,
2811 mRWater, 0., mAngle2[itube]);
2812 rotation =
new TGeoRotation(
"rotation", 180., -90., 0.);
2814 mRadius2[itube] + mXPosition2[itube] - mHalfDiskGap, 0.,
2815 mSupportXDimensions[2][0] / 2. + mMoreLength - mLWater2[itube],
2819 TGeoVolume* waterTube2 =
2820 gGeoManager->MakeTube(Form(
"waterTube2%d_D2_H%d", itube, half),
mWater,
2821 0., mRWater, mLpartial2[itube] / 2.);
2822 rotation =
new TGeoRotation(
"rotation", 90., 180 - mAngle2[itube], 0.);
2825 mRadius2[itube] * TMath::Sin(mAngle2[itube] * TMath::DegToRad()) +
2826 mLpartial2[itube] / 2 * TMath::Cos(mAngle2[itube] * TMath::DegToRad());
2828 mXPosition2[itube] - mHalfDiskGap +
2829 mRadius2[itube] * (1 - TMath::Cos(mAngle2[itube] * TMath::DegToRad())) +
2830 mLpartial2[itube] / 2 * TMath::Sin(mAngle2[itube] * TMath::DegToRad());
2833 mSupportXDimensions[2][0] / 2. + mMoreLength - xPos2[itube], rotation);
2836 mRadiusCentralTore[itube] =
2837 (mSupportXDimensions[2][0] / 2. + mMoreLength - xPos2[itube] -
2838 mLpartial2[itube] / 2 *
2839 TMath::Cos(mAngle2[itube] * TMath::DegToRad())) /
2840 TMath::Sin(mAngle2[itube] * TMath::DegToRad());
2841 TGeoVolume* waterTorusCentral =
2842 gGeoManager->MakeTorus(Form(
"waterTorusCentral%d_D2_H%d", itube, half),
2843 mWater, mRadiusCentralTore[itube], 0., mRWater,
2844 -mAngle2[itube], 2. * mAngle2[itube]);
2845 rotation =
new TGeoRotation(
"rotation", 0., 90., 0.);
2848 mLpartial2[itube] / 2 *
2849 TMath::Sin(mAngle2[itube] * TMath::DegToRad()) -
2850 mRadiusCentralTore[itube] *
2851 TMath::Cos(mAngle2[itube] * TMath::DegToRad()),
2855 TGeoVolume* waterTube3 =
2856 gGeoManager->MakeTube(Form(
"waterTube3%d_D2_H%d", 2, half),
mWater, 0.,
2857 mRWater, mLpartial2[itube] / 2.);
2858 rotation =
new TGeoRotation(
"rotation", -90., 0 - mAngle2[itube], 0.);
2861 -(mSupportXDimensions[2][0] / 2. + mMoreLength - xPos2[itube]),
2865 TGeoVolume* waterTorus2 = gGeoManager->MakeTorus(
2866 Form(
"waterTorus2%d_D2_H%d", itube, half),
mWater, mRadius2[itube], 0.,
2867 mRWater, 0., mAngle2[itube]);
2868 rotation =
new TGeoRotation(
"rotation", 180., 90., 0.);
2870 mRadius2[itube] + mXPosition2[itube] - mHalfDiskGap, 0.,
2871 -(mSupportXDimensions[2][0] / 2. + mMoreLength - mLWater2[itube]),
2875 TGeoVolume* waterTube4 =
2876 gGeoManager->MakeTube(Form(
"waterTube4%d_D2_H%d", itube, half),
mWater,
2877 0., mRWater, mLWater2[itube] / 2.);
2878 translation =
new TGeoTranslation(
2879 mXPosition2[itube] - mHalfDiskGap, 0.,
2880 -(mSupportXDimensions[2][0] / 2. + mMoreLength - mLWater2[itube] / 2.));
2881 cooling->AddNode(waterTube4, ivolume++, translation);
2888 for (Int_t itube = 0; itube < 3; itube++) {
2889 TGeoVolume* pipeTube1 =
2890 gGeoManager->MakeTube(Form(
"pipeTube1%d_D2_H%d", itube, half),
mPipe,
2891 mRWater, mRWater + mDRPipe, mLWater2[itube] / 2.);
2892 translation =
new TGeoTranslation(mXPosition2[itube] - mHalfDiskGap, 0.,
2893 mSupportXDimensions[2][0] / 2. +
2894 mMoreLength - mLWater2[itube] / 2.);
2895 cooling->AddNode(pipeTube1, ivolume++, translation);
2897 TGeoVolume* pipeTorus1 = gGeoManager->MakeTorus(
2898 Form(
"pipeTorus1%d_D2_H%d", itube, half),
mPipe, mRadius2[itube],
2899 mRWater, mRWater + mDRPipe, 0., mAngle2[itube]);
2900 rotation =
new TGeoRotation(
"rotation", 180., -90., 0.);
2902 mRadius2[itube] + mXPosition2[itube] - mHalfDiskGap, 0.,
2903 mSupportXDimensions[2][0] / 2. + mMoreLength - mLWater2[itube],
2907 TGeoVolume* pipeTube2 = gGeoManager->MakeTube(
2908 Form(
"pipeTube2%d_D2_H%d", itube, half),
mPipe, mRWater,
2909 mRWater + mDRPipe, mLpartial2[itube] / 2.);
2910 rotation =
new TGeoRotation(
"rotation", 90., 180 - mAngle2[itube], 0.);
2913 mRadius2[itube] * TMath::Sin(mAngle2[itube] * TMath::DegToRad()) +
2914 mLpartial2[itube] / 2 * TMath::Cos(mAngle2[itube] * TMath::DegToRad());
2916 mXPosition2[itube] - mHalfDiskGap +
2917 mRadius2[itube] * (1 - TMath::Cos(mAngle2[itube] * TMath::DegToRad())) +
2918 mLpartial2[itube] / 2 * TMath::Sin(mAngle2[itube] * TMath::DegToRad());
2921 mSupportXDimensions[2][0] / 2. + mMoreLength - xPos2[itube], rotation);
2924 mRadiusCentralTore[itube] =
2925 (mSupportXDimensions[2][0] / 2. + mMoreLength - xPos2[itube] -
2926 mLpartial2[itube] / 2 *
2927 TMath::Cos(mAngle2[itube] * TMath::DegToRad())) /
2928 TMath::Sin(mAngle2[itube] * TMath::DegToRad());
2929 TGeoVolume* pipeTorusCentral = gGeoManager->MakeTorus(
2930 Form(
"pipeTorusCentral%d_D2_H%d", itube, half),
mPipe,
2931 mRadiusCentralTore[itube], mRWater, mRWater + mDRPipe, -mAngle2[itube],
2932 2. * mAngle2[itube]);
2933 rotation =
new TGeoRotation(
"rotation", 0., 90., 0.);
2936 mLpartial2[itube] / 2 *
2937 TMath::Sin(mAngle2[itube] * TMath::DegToRad()) -
2938 mRadiusCentralTore[itube] *
2939 TMath::Cos(mAngle2[itube] * TMath::DegToRad()),
2943 TGeoVolume* pipeTube3 = gGeoManager->MakeTube(
2944 Form(
"pipeTube3%d_D2_H%d", 2, half),
mPipe, mRWater, mRWater + mDRPipe,
2945 mLpartial2[itube] / 2.);
2946 rotation =
new TGeoRotation(
"rotation", -90., 0 - mAngle2[itube], 0.);
2949 -(mSupportXDimensions[2][0] / 2. + mMoreLength - xPos2[itube]),
2953 TGeoVolume* pipeTorus2 = gGeoManager->MakeTorus(
2954 Form(
"pipeTorus2%d_D2_H%d", itube, half),
mPipe, mRadius2[itube],
2955 mRWater, mRWater + mDRPipe, 0., mAngle2[itube]);
2956 rotation =
new TGeoRotation(
"rotation", 180., 90., 0.);
2958 mRadius2[itube] + mXPosition2[itube] - mHalfDiskGap, 0.,
2959 -(mSupportXDimensions[2][0] / 2. + mMoreLength - mLWater2[itube]),
2963 TGeoVolume* pipeTube4 =
2964 gGeoManager->MakeTube(Form(
"pipeTube4%d_D2_H%d", itube, half),
mPipe,
2965 mRWater, mRWater + mDRPipe, mLWater2[itube] / 2.);
2966 translation =
new TGeoTranslation(
2967 mXPosition2[itube] - mHalfDiskGap, 0.,
2968 -(mSupportXDimensions[2][0] / 2. + mMoreLength - mLWater2[itube] / 2.));
2969 cooling->AddNode(pipeTube4, ivolume++, translation);
2973 Double_t deltaz = mHeatExchangerThickness -
2977 rotation =
new TGeoRotation(
"rotation", -90., 90., 0.);
2980 mZPlan[disk] + deltaz / 2. - mCarbonThickness - mRWater - mDRPipe -
2986 mZPlan[disk] - deltaz / 2. + mCarbonThickness + mRWater + mDRPipe +
2993 auto* carbonPlate =
new TGeoVolumeAssembly(Form(
"carbonPlate_D2_H%d", half));
2996 Double_t mReducedX = 0.;
2997 if (mftBaseParam.buildAlignment) {
3001 auto* carbonBase2 =
new TGeoBBox(
3002 Form(
"carbonBase2_D2_H%d", half),
3003 (mSupportXDimensions[disk][0]) / 2. + mMoreLength - mReducedX,
3004 (mSupportYDimensions[disk][0]) / 2., mCarbonThickness);
3005 auto* t21 =
new TGeoTranslation(
3006 "t21", 0., (mSupportYDimensions[disk][0]) / 2. + mHalfDiskGap, 0.);
3007 t21->RegisterYourself();
3010 new TGeoTubeSeg(Form(
"holeCarbon2_D2_H%d", half), 0., mRMin[disk],
3011 mCarbonThickness + 0.000001, 0, 180.);
3012 auto* t22 =
new TGeoTranslation(
"t22", 0., -mHalfDiskGap, 0.);
3013 t22->RegisterYourself();
3015 auto* carbonhole2 =
new TGeoSubtraction(carbonBase2, holeCarbon2, t21, t22);
3016 auto* cs2 =
new TGeoCompositeShape(Form(
"Carbon2_D2_H%d", half), carbonhole2);
3017 auto* carbonBaseWithHole2 =
3018 new TGeoVolume(Form(
"carbonBaseWithHole_D2_H%d", half), cs2,
mCarbon);
3020 carbonBaseWithHole2->SetLineColor(kGray + 3);
3021 rotation =
new TGeoRotation(
"rotation", 0., 0., 0.);
3023 carbonPlate->AddNode(carbonBaseWithHole2, 0,
3024 new TGeoTranslation(0., 0., mZPlan[disk]));
3026 Double_t ty = mSupportYDimensions[disk][0];
3028 for (Int_t ipart = 1; ipart < mNPart[disk]; ipart++) {
3029 ty += mSupportYDimensions[disk][ipart] / 2.;
3032 new TGeoBBox(Form(
"partCarbon0_D2_H%d_%d", half, ipart),
3033 mSupportXDimensions[disk][ipart] / 2.,
3034 mSupportYDimensions[disk][ipart] / 2., mCarbonThickness);
3036 auto* t =
new TGeoTranslation(
"t", 0, ty + mHalfDiskGap, mZPlan[disk]);
3039 TGeoVolume* partCarbonNotch;
3040 TGeoSubtraction* partCarbonini;
3041 TGeoBBox* notchCarbon2;
3042 TGeoTranslation* tnotch2;
3043 if (ipart == (mNPart[disk] - 1)) {
3044 notchCarbon2 =
new TGeoBBox(Form(
"notchCarbon2_D2_H%d", half), 2.3, 0.6,
3045 mCarbonThickness + 0.000001);
3046 tnotch2 =
new TGeoTranslation(
"tnotch2", 0.,
3047 mSupportYDimensions[disk][ipart] / 2., 0.);
3048 tnotch2->RegisterYourself();
3051 new TGeoSubtraction(partCarbon0, notchCarbon2,
nullptr, tnotch2);
3052 auto* carbinit =
new TGeoCompositeShape(
3053 Form(
"carbinit%d_D2_H%d", 0, half), partCarbonini);
3054 partCarbonNotch =
new TGeoVolume(
3055 Form(
"partCarbonNotch_D2_H%d_%d", half, ipart), carbinit,
mCarbon);
3056 partCarbonNotch->SetLineColor(kGray + 3);
3057 carbonPlate->AddNode(partCarbonNotch, ipart, t);
3059 if (ipart < (mNPart[disk] - 1)) {
3060 auto* partCarbon =
new TGeoVolume(
3061 Form(
"partCarbonNotch_D2_H%d_%d", half, ipart), partCarbon0,
mCarbon);
3062 partCarbon->SetLineColor(kGray + 3);
3063 carbonPlate->AddNode(partCarbon, ipart, t);
3066 ty += mSupportYDimensions[disk][ipart] / 2.;
3069 rotation =
new TGeoRotation(
"rotation", 180., 0., 0.);
3070 transformation =
new TGeoCombiTrans(0., 0., deltaz / 2., rotation);
3072 transformation =
new TGeoCombiTrans(0., 0., -deltaz / 2., rotation);
3077 TGeoMedium* mGlueRohacellCarbon = gGeoManager->GetMedium(
"MFT_Epoxy$");
3078 auto* glueRohacellCarbon =
3079 new TGeoVolumeAssembly(Form(
"glueRohacellCarbon_D0_H%d", half));
3080 auto* glueRohacellCarbonBase0 =
3081 new TGeoBBox(Form(
"glueRohacellCarbonBase0_D0_H%d", half),
3082 (mSupportXDimensions[disk][0]) / 2. - mReducedX,
3083 (mSupportYDimensions[disk][0]) / 2.,
3086 auto* translation_gluRC01 =
new TGeoTranslation(
3087 "translation_gluRC01", 0.,
3088 (mSupportYDimensions[disk][0]) / 2. + mHalfDiskGap, 0.);
3089 translation_gluRC01->RegisterYourself();
3090 auto* translation_gluRC02 =
3091 new TGeoTranslation(
"translation_gluRC02", 0., -mHalfDiskGap, 0.);
3092 translation_gluRC02->RegisterYourself();
3094 auto* holeglueRohacellCarbon0 =
new TGeoTubeSeg(
3095 Form(
"holeglueRohacellCarbon0_D0_H%d", half), 0., mRMin[disk],
3098 auto* glueRohacellCarbonhole0 =
3099 new TGeoSubtraction(glueRohacellCarbonBase0, holeglueRohacellCarbon0,
3100 translation_gluRC01, translation_gluRC02);
3101 auto* gRC0 =
new TGeoCompositeShape(Form(
"glueRohacellCarbon0_D0_H%d", half),
3102 glueRohacellCarbonhole0);
3104 auto* glueRohacellCarbonBaseWithHole0 =
3105 new TGeoVolume(Form(
"glueRohacellCarbonWithHole_D0_H%d", half), gRC0,
3106 mGlueRohacellCarbon);
3108 glueRohacellCarbonBaseWithHole0->SetLineColor(kGreen);
3109 rotation =
new TGeoRotation(
"rotation", 0., 0., 0.);
3111 glueRohacellCarbon->AddNode(glueRohacellCarbonBaseWithHole0, 0,
3112 new TGeoTranslation(0., 0., mZPlan[disk]));
3114 Double_t tyGRC = mSupportYDimensions[disk][0];
3116 for (Int_t ipart = 1; ipart < mNPart[disk]; ipart++) {
3117 tyGRC += mSupportYDimensions[disk][ipart] / 2.;
3118 auto* partGlueRohacellCarbon =
3119 new TGeoBBox(Form(
"partGlueRohacellCarbon_D0_H%d_%d", half, ipart),
3120 mSupportXDimensions[disk][ipart] / 2.,
3121 mSupportYDimensions[disk][ipart] / 2.,
3125 TGeoVolume* partGlueCarbonNotch;
3126 TGeoSubtraction* partGlueCarbonini;
3127 TGeoBBox* notchGlueCarbon2;
3128 TGeoTranslation* tnotch2;
3129 if (ipart == (mNPart[disk] - 1)) {
3131 new TGeoBBox(Form(
"notchGlueCarbon2_D2_H%d", half), 2.3, 0.6,
3133 tnotch2 =
new TGeoTranslation(
"tnotch2", 0.,
3134 mSupportYDimensions[disk][ipart] / 2., 0.);
3135 tnotch2->RegisterYourself();
3137 partGlueCarbonini =
new TGeoSubtraction(
3138 partGlueRohacellCarbon, notchGlueCarbon2,
nullptr, tnotch2);
3139 auto* gluecarbinit =
new TGeoCompositeShape(
3140 Form(
"gluecarbinit%d_D2_H%d", 0, half), partGlueCarbonini);
3141 partGlueCarbonNotch =
3142 new TGeoVolume(Form(
"partGlueCarbonNotch_D2_H%d_%d", half, ipart),
3143 gluecarbinit, mGlueRohacellCarbon);
3144 partGlueCarbonNotch->SetLineColor(kGray + 3);
3147 auto* t =
new TGeoTranslation(
"t", 0, tyGRC + mHalfDiskGap, mZPlan[disk]);
3148 if (ipart == (mNPart[disk] - 1)) {
3149 partGlueCarbonNotch->SetLineColor(kGreen);
3150 glueRohacellCarbon->AddNode(partGlueCarbonNotch, ipart, t);
3152 if (ipart < (mNPart[disk] - 1)) {
3153 auto* partGlueCarbon =
3154 new TGeoVolume(Form(
"partGlueCarbon_D2_H%d_%d", half, ipart),
3155 partGlueRohacellCarbon, mGlueRohacellCarbon);
3156 partGlueCarbon->SetLineColor(kGreen);
3157 glueRohacellCarbon->AddNode(partGlueCarbon, ipart, t);
3160 tyGRC += mSupportYDimensions[disk][ipart] / 2.;
3163 rotation =
new TGeoRotation(
"rotation", 180., 0., 0.);
3170 -(deltaz / 2. - mCarbonThickness -
3177 TGeoMedium* mKaptonOnCarbon = gGeoManager->GetMedium(
"MFT_Kapton$");
3179 auto* kaptonOnCarbon =
3180 new TGeoVolumeAssembly(Form(
"kaptonOnCarbon_D0_H%d", half));
3181 auto* kaptonOnCarbonBase0 =
new TGeoBBox(
3182 Form(
"kaptonOnCarbonBase0_D0_H%d", half),
3183 (mSupportXDimensions[disk][0]) / 2. + mMoreLength - mReducedX,
3186 auto* translation_KC01 =
new TGeoTranslation(
3187 "translation_KC01", 0.,
3188 (mSupportYDimensions[disk][0]) / 2. + mHalfDiskGap, 0.);
3189 translation_KC01->RegisterYourself();
3190 auto* translation_KC02 =
3191 new TGeoTranslation(
"translation_KC02", 0., -mHalfDiskGap, 0.);
3192 translation_KC02->RegisterYourself();
3194 auto* holekaptonOnCarbon0 =
3195 new TGeoTubeSeg(Form(
"holekaptonOnCarbon0_D0_H%d", half), 0., mRMin[disk],
3198 auto* kaptonOnCarbonhole0 =
3199 new TGeoSubtraction(kaptonOnCarbonBase0, holekaptonOnCarbon0,
3200 translation_KC01, translation_KC02);
3201 auto* KC0 =
new TGeoCompositeShape(Form(
"kaptonOnCarbon_D0_H%d", half),
3202 kaptonOnCarbonhole0);
3203 auto* kaptonOnCarbonBaseWithHole0 =
new TGeoVolume(
3204 Form(
"kaptonOnCarbonWithHole_D0_H%d", half), KC0, mKaptonOnCarbon);
3206 kaptonOnCarbonBaseWithHole0->SetLineColor(kMagenta);
3207 rotation =
new TGeoRotation(
"rotation", 0., 0., 0.);
3209 kaptonOnCarbon->AddNode(kaptonOnCarbonBaseWithHole0, 0,
3210 new TGeoTranslation(0., 0., mZPlan[disk]));
3212 Double_t tyKC = mSupportYDimensions[disk][0];
3214 for (Int_t ipart = 1; ipart < mNPart[disk]; ipart++) {
3215 tyKC += mSupportYDimensions[disk][ipart] / 2.;
3217 auto* partKaptonOnCarbonBase =
3218 new TGeoBBox(Form(
"partKaptonOnCarbon_D0_H%d_%d", half, ipart),
3219 mSupportXDimensions[disk][ipart] / 2.,
3220 mSupportYDimensions[disk][ipart] / 2.,
3224 TGeoVolume* partKaptonNotch;
3225 TGeoSubtraction* partKaptonini;
3226 TGeoBBox* notchKapton2;
3227 TGeoTranslation* tnotch2;
3228 if (ipart == (mNPart[disk] - 1)) {
3230 new TGeoBBox(Form(
"notchKapton2_D2_H%d", half), 2.3, 0.6,
3232 tnotch2 =
new TGeoTranslation(
"tnotch2", 0.,
3233 mSupportYDimensions[disk][ipart] / 2., 0.);
3234 tnotch2->RegisterYourself();
3236 partKaptonini =
new TGeoSubtraction(partKaptonOnCarbonBase, notchKapton2,
3238 auto* kaptinit =
new TGeoCompositeShape(
3239 Form(
"kaptinit%d_D2_H%d", 0, half), partKaptonini);
3241 new TGeoVolume(Form(
"partKaptonNotch_D2_H%d_%d", half, ipart),
3242 kaptinit, mKaptonOnCarbon);
3245 auto* t =
new TGeoTranslation(
"t", 0, tyKC + mHalfDiskGap, mZPlan[disk]);
3246 if (ipart == (mNPart[disk] - 1)) {
3247 partKaptonNotch->SetLineColor(kMagenta);
3248 kaptonOnCarbon->AddNode(partKaptonNotch, ipart, t);
3250 if (ipart < (mNPart[disk] - 1)) {
3252 new TGeoVolume(Form(
"partKapton_D2_H%d_%d", half, ipart),
3253 partKaptonOnCarbonBase, mKaptonOnCarbon);
3254 partKapton->SetLineColor(kMagenta);
3255 kaptonOnCarbon->AddNode(partKapton, ipart, t);
3258 tyKC += mSupportYDimensions[disk][ipart] / 2.;
3261 rotation =
new TGeoRotation(
"rotation", 180., 0., 0.);
3277 TGeoMedium* mGlueKaptonCarbon = gGeoManager->GetMedium(
"MFT_Epoxy$");
3278 auto* glueKaptonCarbon =
3279 new TGeoVolumeAssembly(Form(
"glueKaptonCarbon_D0_H%d", half));
3280 auto* glueKaptonCarbonBase0 =
new TGeoBBox(
3281 Form(
"glueKaptonCarbonBase0_D0_H%d", half),
3282 (mSupportXDimensions[disk][0]) / 2. - mReducedX,
3285 auto* translation_gluKC01 =
new TGeoTranslation(
3286 "translation_gluKC01", 0.,
3287 (mSupportYDimensions[disk][0]) / 2. + mHalfDiskGap, 0.);
3288 translation_gluKC01->RegisterYourself();
3289 auto* translation_gluKC02 =
3290 new TGeoTranslation(
"translation_gluKC02", 0., -mHalfDiskGap, 0.);
3291 translation_gluKC02->RegisterYourself();
3293 auto* holeglueKaptonCarbon0 =
new TGeoTubeSeg(
3294 Form(
"holeglueKaptonCarbon0_D0_H%d", half), 0., mRMin[disk],
3297 auto* glueKaptonCarbonhole0 =
3298 new TGeoSubtraction(glueKaptonCarbonBase0, holeglueKaptonCarbon0,
3299 translation_gluKC01, translation_gluKC02);
3300 auto* gKC0 =
new TGeoCompositeShape(Form(
"glueKaptonCarbon0_D0_H%d", half),
3301 glueKaptonCarbonhole0);
3302 auto* glueKaptonCarbonBaseWithHole0 =
new TGeoVolume(
3303 Form(
"glueKaptonCarbonWithHole_D0_H%d", half), gKC0, mGlueKaptonCarbon);
3305 glueKaptonCarbonBaseWithHole0->SetLineColor(kGreen);
3306 rotation =
new TGeoRotation(
"rotation", 0., 0., 0.);
3308 glueKaptonCarbon->AddNode(glueKaptonCarbonBaseWithHole0, 0,
3309 new TGeoTranslation(0., 0., mZPlan[disk]));
3311 Double_t tyGKC = mSupportYDimensions[disk][0];
3313 for (Int_t ipart = 1; ipart < mNPart[disk]; ipart++) {
3314 tyGKC += mSupportYDimensions[disk][ipart] / 2.;
3316 auto* partGlueKaptonCarbon =
new TGeoBBox(
3317 Form(
"partGlueKaptonCarbon_D0_H%d_%d", half, ipart),
3318 mSupportXDimensions[disk][ipart] / 2.,
3322 TGeoVolume* partGlueKaptonNotch;
3323 TGeoSubtraction* partGlueKaptonini;
3324 TGeoBBox* notchGlueKapton2;
3325 TGeoTranslation* tnotch2;
3326 if (ipart == (mNPart[disk] - 1)) {
3328 new TGeoBBox(Form(
"notchGlueKapton2_D2_H%d", half), 2.3, 0.6,
3330 tnotch2 =
new TGeoTranslation(
"tnotch2", 0.,
3331 mSupportYDimensions[disk][ipart] / 2., 0.);
3332 tnotch2->RegisterYourself();
3334 partGlueKaptonini =
new TGeoSubtraction(
3335 partGlueKaptonCarbon, notchGlueKapton2,
nullptr, tnotch2);
3336 auto* gluekaptinit =
new TGeoCompositeShape(
3337 Form(
"gluekaptinit%d_D2_H%d", 0, half), partGlueKaptonini);
3338 partGlueKaptonNotch =
3339 new TGeoVolume(Form(
"partGlueKaptonNotch_D2_H%d_%d", half, ipart),
3340 gluekaptinit, mGlueKaptonCarbon);
3343 auto* t =
new TGeoTranslation(
"t", 0, tyGKC + mHalfDiskGap, mZPlan[disk]);
3345 if (ipart == (mNPart[disk] - 1)) {
3346 partGlueKaptonNotch->SetLineColor(kGreen);
3347 glueKaptonCarbon->AddNode(partGlueKaptonNotch, ipart, t);
3349 if (ipart < (mNPart[disk] - 1)) {
3350 auto* partGlueKapton =
3351 new TGeoVolume(Form(
"partGlueKapton_D2_H%d_%d", half, ipart),
3352 partGlueKaptonCarbon, mGlueKaptonCarbon);
3353 partGlueKapton->SetLineColor(kGreen);
3354 glueKaptonCarbon->AddNode(partGlueKapton, ipart, t);
3357 tyGKC += mSupportYDimensions[disk][ipart] / 2.;
3360 rotation =
new TGeoRotation(
"rotation", 180., 0., 0.);
3373 auto* rohacellPlate =
3374 new TGeoVolumeAssembly(Form(
"rohacellPlate_D2_H%d", half));
3375 auto* rohacellBase2 =
new TGeoBBox(
3376 Form(
"rohacellBase2_D2_H%d", half), (mSupportXDimensions[disk][0]) / 2.,
3377 (mSupportYDimensions[disk][0]) / 2., mRohacellThickness);
3378 auto* holeRohacell2 =
3379 new TGeoTubeSeg(Form(
"holeRohacell2_D2_H%d", half), 0., mRMin[disk],
3380 mRohacellThickness + 0.000001, 0, 180.);
3384 Double_t diameter = 0.21;
3385 Double_t epsilon = 0.06;
3387 Double_t mPosition[4];
3388 TGeoCombiTrans* transfo[7][3];
3389 TGeoTube* grooveTube[7][3];
3390 TGeoTorus* grooveTorus[7][3];
3391 TGeoSubtraction* rohacellBaseGroove[300];
3392 TGeoCompositeShape* rohacellGroove[300];
3394 for (Int_t igroove = 0; igroove < 3; igroove++) {
3395 grooveTube[0][igroove] =
3396 new TGeoTube(
"linear", 0., diameter, mLWater2[igroove] / 2.);
3397 grooveTorus[1][igroove] =
new TGeoTorus(
"SideTorus", mRadius2[igroove], 0.,
3398 diameter, 0., mAngle2[igroove]);
3399 grooveTube[2][igroove] =
3400 new TGeoTube(
"tiltedLinear", 0., diameter, mLpartial2[igroove] / 2.);
3401 grooveTorus[3][igroove] =
3402 new TGeoTorus(
"centralTorus", mRadiusCentralTore[igroove], 0., diameter,
3403 -mAngle2[igroove], 2. * mAngle2[igroove]);
3404 grooveTube[4][igroove] =
3405 new TGeoTube(
"tiltedLinear", 0., diameter, mLpartial2[igroove] / 2.);
3406 grooveTorus[5][igroove] =
new TGeoTorus(
"SideTorus", mRadius2[igroove], 0.,
3407 diameter, 0., mAngle2[igroove]);
3408 grooveTube[6][igroove] =
3409 new TGeoTube(
"linear", 0., diameter, mLWater2[igroove] / 2.);
3413 TGeoRotation* rotationLinear =
new TGeoRotation(
"rotation", -90., 90., 0.);
3414 TGeoRotation* rotationSideTorusL =
3415 new TGeoRotation(
"rotationSideTorusLeft", -90., 0., 0.);
3416 TGeoRotation* rotationSideTorusR =
3417 new TGeoRotation(
"rotationSideTorusRight", 90., 180., 180.);
3418 TGeoRotation* rotationCentralTorus =
3419 new TGeoRotation(
"rotationCentralTorus", 90., 0., 0.);
3420 TGeoRotation* rotationTiltedLinearR;
3421 TGeoRotation* rotationTiltedLinearL;
3425 for (Int_t iface = 1; iface > -2; iface -= 2) {
3426 for (Int_t igroove = 0; igroove < 3; igroove++) {
3427 mPosition[igroove] = mXPosition2[igroove] -
3428 mSupportYDimensions[disk][0] / 2. - mHalfDiskGap - diameter / 2.;
3429 for (Int_t ip = 0; ip < 7; ip++) {
3433 transfo[ip][igroove] =
new TGeoCombiTrans(
3434 mSupportXDimensions[disk][0] / 2. + mMoreLength -
3435 mLWater2[igroove] / 2.,
3436 mPosition[igroove], iface * (mRohacellThickness + epsilon),
3438 if (igroove == 0 && iface == 1) {
3439 rohacellBaseGroove[0] =
3440 new TGeoSubtraction(rohacellBase2, grooveTube[ip][igroove],
3441 nullptr, transfo[ip][igroove]);
3443 new TGeoCompositeShape(Form(
"rohacell2Groove%d_G%d_F%d_H%d",
3444 ip, igroove, iface, half),
3445 rohacellBaseGroove[0]);
3449 transfo[ip][igroove] =
new TGeoCombiTrans(
3450 mSupportXDimensions[disk][0] / 2. + mMoreLength -
3452 mRadius2[igroove] + mXPosition2[igroove] -
3453 mSupportYDimensions[disk][0] / 2. - mHalfDiskGap - diameter / 2.,
3454 iface * (mRohacellThickness + epsilon), rotationSideTorusR);
3457 rotationTiltedLinearR =
new TGeoRotation(
3458 "rotationTiltedLinearRight", 90. - mAngle2[igroove], 90., 0.);
3459 transfo[ip][igroove] =
new TGeoCombiTrans(
3460 mSupportXDimensions[disk][0] / 2. + mMoreLength -
3462 yPos2[igroove] - mSupportYDimensions[disk][0] / 2. -
3464 iface * (mRohacellThickness + epsilon), rotationTiltedLinearR);
3467 transfo[ip][igroove] =
new TGeoCombiTrans(
3470 mLpartial2[igroove] / 2 *
3471 TMath::Sin(mAngle2[igroove] * TMath::DegToRad()) -
3472 mRadiusCentralTore[igroove] *
3473 TMath::Cos(mAngle2[igroove] * TMath::DegToRad()) -
3474 mSupportYDimensions[disk][0] / 2. - mHalfDiskGap,
3475 iface * (mRohacellThickness + epsilon), rotationCentralTorus);
3478 rotationTiltedLinearL =
new TGeoRotation(
3479 "rotationTiltedLinearLeft", 90. + mAngle2[igroove], 90., 0.);
3480 transfo[ip][igroove] =
new TGeoCombiTrans(
3481 -(mSupportXDimensions[disk][0] / 2. + mMoreLength -
3483 yPos2[igroove] - mSupportYDimensions[disk][0] / 2. -
3485 iface * (mRohacellThickness + epsilon), rotationTiltedLinearL);
3488 transfo[ip][igroove] =
new TGeoCombiTrans(
3489 -(mSupportXDimensions[disk][0] / 2. + mMoreLength -
3491 mRadius2[igroove] + mPosition[igroove],
3492 iface * (mRohacellThickness + epsilon), rotationSideTorusL);
3495 transfo[ip][igroove] =
new TGeoCombiTrans(
3496 -(mSupportXDimensions[disk][0] / 2. + mMoreLength -
3497 mLWater2[igroove] / 2.),
3498 mPosition[igroove], iface * (mRohacellThickness + epsilon),
3503 if (!(ip == 0 && igroove == 0 && iface == 1)) {
3505 rohacellBaseGroove[iCount] =
new TGeoSubtraction(
3506 rohacellGroove[iCount - 1], grooveTorus[ip][igroove],
nullptr,
3507 transfo[ip][igroove]);
3509 rohacellBaseGroove[iCount] =
new TGeoSubtraction(
3510 rohacellGroove[iCount - 1], grooveTube[ip][igroove],
nullptr,
3511 transfo[ip][igroove]);
3513 rohacellGroove[iCount] =
3514 new TGeoCompositeShape(Form(
"rohacell2Groove%d_G%d_F%d_H%d",
3515 iCount, igroove, iface, half),
3516 rohacellBaseGroove[iCount]);
3526 TGeoBoolNode* rohacellBase;
3528 rohacellBase =
new TGeoSubtraction(rohacellBase2, holeRohacell2, t21, t22);
3531 rohacellBase =
new TGeoSubtraction(rohacellGroove[iCount - 1],
3532 holeRohacell2, t21, t22);
3534 auto* rh2 =
new TGeoCompositeShape(Form(
"rohacellTore%d_D2_H%d", 0, half),
3536 auto* rohacellBaseWithHole =
3537 new TGeoVolume(Form(
"rohacellBaseWithHole_D2_H%d", half), rh2,
mRohacell);
3539 TGeoVolume* partRohacell;
3540 rohacellBaseWithHole->SetLineColor(kGray);
3541 rotation =
new TGeoRotation(
"rotation", 0., 0., 0.);
3543 rohacellPlate->AddNode(rohacellBaseWithHole, 0,
3544 new TGeoTranslation(0., 0., mZPlan[disk]));
3546 ty = mSupportYDimensions[disk][0];
3548 for (Int_t ipart = 1; ipart < mNPart[disk]; ipart++) {
3549 ty += mSupportYDimensions[disk][ipart] / 2.;
3550 auto* t =
new TGeoTranslation(
"t", 0, ty + mHalfDiskGap, mZPlan[disk]);
3554 auto* partRohacell0 =
3555 new TGeoBBox(Form(
"rohacellBase0_D2_H%d_%d", half, ipart),
3556 mSupportXDimensions[disk][ipart] / 2.,
3557 mSupportYDimensions[disk][ipart] / 2., mRohacellThickness);
3563 for (Int_t iface = 1; iface > -2; iface -= 2) {
3564 for (Int_t igroove = 0; igroove < 3; igroove++) {
3567 mXPosition2[igroove] - mSupportYDimensions[disk][ipart] / 2. -
3568 mHalfDiskGap - mSupportYDimensions[disk][ipart - 1];
3569 mShift = -mSupportYDimensions[disk][ipart - 1];
3573 mXPosition2[igroove] - mSupportYDimensions[disk][ipart] / 2. -
3574 mHalfDiskGap - mSupportYDimensions[disk][ipart - 1] -
3575 mSupportYDimensions[disk][ipart - 2];
3576 mShift = -mSupportYDimensions[disk][ipart - 1] -
3577 mSupportYDimensions[disk][ipart - 2];
3581 mXPosition2[igroove] - mSupportYDimensions[disk][ipart] / 2. -
3582 mHalfDiskGap - mSupportYDimensions[disk][ipart - 1] -
3583 mSupportYDimensions[disk][ipart - 2] -
3584 mSupportYDimensions[disk][ipart - 3];
3585 mShift = -mSupportYDimensions[disk][ipart - 1] -
3586 mSupportYDimensions[disk][ipart - 2] -
3587 mSupportYDimensions[disk][ipart - 3];
3590 for (Int_t ip = 0; ip < 7; ip++) {
3594 transfo[ip][igroove] =
new TGeoCombiTrans(
3595 mSupportXDimensions[disk][0] / 2. + mMoreLength -
3596 mLWater2[igroove] / 2.,
3597 mPosition[ipart], iface * (mRohacellThickness + epsilon),
3599 if (igroove == 0 && iface == 1) {
3600 rohacellBaseGroove[iCount] =
3601 new TGeoSubtraction(partRohacell0, grooveTube[ip][igroove],
3602 nullptr, transfo[ip][igroove]);
3603 rohacellGroove[iCount] =
3604 new TGeoCompositeShape(Form(
"rohacell2Groove%d_G%d_F%d_H%d",
3605 ip, igroove, iface, half),
3606 rohacellBaseGroove[iCount]);
3610 transfo[ip][igroove] =
new TGeoCombiTrans(
3611 mSupportXDimensions[2][0] / 2. + mMoreLength -
3613 mPosition[ipart] + mRadius2[igroove] - diameter / 2.,
3614 iface * (mRohacellThickness + epsilon), rotationSideTorusR);
3617 rotationTiltedLinearR =
new TGeoRotation(
3618 "rotationTiltedLinearRight", 90. - mAngle2[igroove], 90., 0.);
3619 transfo[ip][igroove] =
3620 new TGeoCombiTrans(mSupportXDimensions[disk][0] / 2. +
3621 mMoreLength - xPos2[igroove],
3622 yPos2[igroove] + mShift - mHalfDiskGap -
3623 mSupportYDimensions[disk][ipart] / 2.,
3624 iface * (mRohacellThickness + epsilon),
3625 rotationTiltedLinearR);
3628 transfo[ip][igroove] =
new TGeoCombiTrans(
3630 mPosition[ipart] + yPos2[igroove] +
3631 mLpartial2[igroove] / 2 *
3632 TMath::Sin(mAngle2[igroove] * TMath::DegToRad()) -
3633 mRadiusCentralTore[igroove] *
3634 TMath::Cos(mAngle2[igroove] * TMath::DegToRad()) -
3635 mXPosition2[igroove],
3636 iface * (mRohacellThickness + epsilon), rotationCentralTorus);
3639 rotationTiltedLinearL =
new TGeoRotation(
3640 "rotationTiltedLinearLeft", 90. + mAngle2[igroove], 90., 0.);
3641 transfo[ip][igroove] =
new TGeoCombiTrans(
3642 -(mSupportXDimensions[disk][0] / 2. + mMoreLength -
3644 yPos2[igroove] + mPosition[ipart] - mXPosition2[igroove],
3645 iface * (mRohacellThickness + epsilon),
3646 rotationTiltedLinearL);
3649 transfo[ip][igroove] =
new TGeoCombiTrans(
3650 -(mSupportXDimensions[disk][0] / 2. + mMoreLength -
3652 mRadius2[igroove] + mPosition[ipart] - diameter / 2.,
3653 iface * (mRohacellThickness + epsilon), rotationSideTorusL);
3656 transfo[ip][igroove] =
new TGeoCombiTrans(
3657 -(mSupportXDimensions[disk][0] / 2. + mMoreLength -
3658 mLWater2[igroove] / 2.),
3659 mPosition[ipart], iface * (mRohacellThickness + epsilon),
3663 if (!(ip == 0 && igroove == 0 && iface == 1)) {
3665 rohacellBaseGroove[iCount] =
new TGeoSubtraction(
3666 rohacellGroove[iCount - 1], grooveTorus[ip][igroove],
3667 nullptr, transfo[ip][igroove]);
3669 rohacellBaseGroove[iCount] =
new TGeoSubtraction(
3670 rohacellGroove[iCount - 1], grooveTube[ip][igroove],
3671 nullptr, transfo[ip][igroove]);
3674 rohacellGroove[iCount] =
3675 new TGeoCompositeShape(Form(
"rohacell2Groove%d_G%d_F%d_H%d",
3676 iCount, igroove, iface, half),
3677 rohacellBaseGroove[iCount]);
3687 TGeoVolume* partRohacellNotch;
3688 TGeoSubtraction* partRohacellini1;
3689 TGeoSubtraction* partRohacellini2;
3690 TGeoBBox* notchRohacell21;
3691 TGeoTranslation* tnotch21;
3692 TGeoBBox* notchRohacell22;
3693 TGeoTranslation* tnotch22;
3694 if (ipart == (mNPart[disk] - 1)) {
3695 notchRohacell21 =
new TGeoBBox(Form(
"notchRohacell21_D2_H%d", half), 2.3,
3696 0.6, mRohacellThickness + 0.000001);
3697 tnotch21 =
new TGeoTranslation(
"tnotch21", 0.,
3698 mSupportYDimensions[disk][ipart] / 2., 0.);
3699 tnotch21->RegisterYourself();
3700 notchRohacell22 =
new TGeoBBox(Form(
"notchRohacell22_D2_H%d", half), 1.1,
3701 0.6, mRohacellThickness + 0.000001);
3702 tnotch22 =
new TGeoTranslation(
3703 "tnotch22", 0., mSupportYDimensions[disk][ipart] / 2. - 0.4, 0.);
3704 tnotch22->RegisterYourself();
3709 if (ipart == (mNPart[disk] - 1)) {
3710 partRohacellini1 =
new TGeoSubtraction(partRohacell0, notchRohacell21,
3712 auto* rhinit1 =
new TGeoCompositeShape(
3713 Form(
"rhinit1%d_D2_H%d", 0, half), partRohacellini1);
3715 new TGeoSubtraction(rhinit1, notchRohacell22,
nullptr, tnotch22);
3716 auto* rhinit2 =
new TGeoCompositeShape(
3717 Form(
"rhinit2%d_D2_H%d", 0, half), partRohacellini2);
3718 partRohacell =
new TGeoVolume(
3719 Form(
"partRohacelli_D2_H%d_%d", half, ipart), rhinit2,
mRohacell);
3721 if (ipart < (mNPart[disk] - 1)) {
3723 new TGeoVolume(Form(
"partRohacelli_D2_H%d_%d", half, ipart),
3728 if (ipart == (mNPart[disk] - 1)) {
3729 partRohacellini1 =
new TGeoSubtraction(
3730 rohacellGroove[iCount - 1], notchRohacell21,
nullptr, tnotch21);
3731 auto* rhinit1 =
new TGeoCompositeShape(
3732 Form(
"rhinit1%d_D2_H%d", 0, half), partRohacellini1);
3734 new TGeoSubtraction(rhinit1, notchRohacell22,
nullptr, tnotch22);
3735 auto* rhinit2 =
new TGeoCompositeShape(
3736 Form(
"rhinit2%d_D2_H%d", 0, half), partRohacellini2);
3737 partRohacell =
new TGeoVolume(
3738 Form(
"partRohacelli_D2_H%d_%d", half, ipart), rhinit2,
mRohacell);
3740 if (ipart < (mNPart[disk] - 1)) {
3742 new TGeoVolume(Form(
"partRohacelli_D2_H%d_%d", half, ipart),
3749 partRohacell->SetLineColor(kGray);
3750 rohacellPlate->AddNode(partRohacell, ipart, t);
3751 ty += mSupportYDimensions[disk][ipart] / 2.;
3755 if (ipart == (mNPart[disk] - 1)) {
3756 TGeoTranslation* tinsert2;
3757 TGeoVolume* insert2 =
3758 gGeoManager->MakeBox(Form(
"insert2_H%d_%d", half, ipart),
mPeek, 1.0,
3759 0.40 / 2., mRohacellThickness);
3760 Double_t ylocation = mSupportYDimensions[disk][0] + mHalfDiskGap - 0.80;
3761 for (Int_t ip = 1; ip < mNPart[disk]; ip++) {
3762 ylocation = ylocation + mSupportYDimensions[disk][ip];
3764 tinsert2 =
new TGeoTranslation(
"tinsert2", 0., -ylocation, 0.);
3765 tinsert2->RegisterYourself();
3766 mHalfDisk->AddNode(insert2, 0., tinsert2);
3771 rotation =
new TGeoRotation(
"rotation", 180., 0., 0.);
3786 printf(
"Creating MFT heat exchanger for disk3 top\n");
3787 }
else if (half == Bottom) {
3788 printf(
"Creating MFT heat exchanger for disk3 bottom\n");
3790 printf(
"No valid option for MFT heat exchanger on disk3\n");
3793 mCarbon = gGeoManager->GetMedium(
"MFT_CarbonFiber$");
3794 mWater = gGeoManager->GetMedium(
"MFT_Water$");
3795 mRohacell = gGeoManager->GetMedium(
"MFT_Rohacell$");
3796 mPipe = gGeoManager->GetMedium(
"MFT_Polyimide$");
3797 mPeek = gGeoManager->GetMedium(
"MFT_PEEK$");
3799 auto* cooling =
new TGeoVolumeAssembly(Form(
"cooling_D3_H%d", half));
3801 TGeoTranslation* translation =
nullptr;
3802 TGeoRotation* rotation =
nullptr;
3809 Double_t ivolume = 300;
3810 Double_t mRadiusCentralTore[4];
3814 for (Int_t itube = 0; itube < 4; itube++) {
3815 TGeoVolume* waterTube1 =
3816 gGeoManager->MakeTube(Form(
"waterTube1%d_D3_H%d", itube, half),
mWater,
3817 0., mRWater, mLWater3[itube] / 2.);
3818 translation =
new TGeoTranslation(mXPosition3[itube] - mHalfDiskGap, 0.,
3819 mSupportXDimensions[3][0] / 2. +
3820 mMoreLength - mLWater3[itube] / 2.);
3821 cooling->AddNode(waterTube1, ivolume++, translation);
3823 TGeoVolume* waterTorus1 = gGeoManager->MakeTorus(
3824 Form(
"waterTorus1%d_D3_H%d", itube, half),
mWater, mRadius3[itube], 0.,
3825 mRWater, 0., mAngle3[itube]);
3826 rotation =
new TGeoRotation(
"rotation", 180., -90., 0.);
3828 mRadius3[itube] + mXPosition3[itube] - mHalfDiskGap, 0.,
3829 mSupportXDimensions[3][0] / 2. + mMoreLength - mLWater3[itube],
3833 TGeoVolume* waterTube2 =
3834 gGeoManager->MakeTube(Form(
"waterTube2%d_D3_H%d", itube, half),
mWater,
3835 0., mRWater, mLpartial3[itube] / 2.);
3836 rotation =
new TGeoRotation(
"rotation", 90., 180 - mAngle3[itube], 0.);
3839 mRadius3[itube] * TMath::Sin(mAngle3[itube] * TMath::DegToRad()) +
3840 mLpartial3[itube] / 2 * TMath::Cos(mAngle3[itube] * TMath::DegToRad());
3842 mXPosition3[itube] - mHalfDiskGap +
3843 mRadius3[itube] * (1 - TMath::Cos(mAngle3[itube] * TMath::DegToRad())) +
3844 mLpartial3[itube] / 2 * TMath::Sin(mAngle3[itube] * TMath::DegToRad());
3847 mSupportXDimensions[3][0] / 2. + mMoreLength - xPos3[itube], rotation);
3850 mRadiusCentralTore[itube] =
3851 (mSupportXDimensions[3][0] / 2. + mMoreLength - xPos3[itube] -
3852 mLpartial3[itube] / 2 *
3853 TMath::Cos(mAngle3[itube] * TMath::DegToRad())) /
3854 TMath::Sin(mAngle3[itube] * TMath::DegToRad());
3855 TGeoVolume* waterTorusCentral =
3856 gGeoManager->MakeTorus(Form(
"waterTorusCentral%d_D3_H%d", itube, half),
3857 mWater, mRadiusCentralTore[itube], 0., mRWater,
3858 -mAngle3[itube], 2. * mAngle3[itube]);
3859 rotation =
new TGeoRotation(
"rotation", 0., 90., 0.);
3862 mLpartial3[itube] / 2 *
3863 TMath::Sin(mAngle3[itube] * TMath::DegToRad()) -
3864 mRadiusCentralTore[itube] *
3865 TMath::Cos(mAngle3[itube] * TMath::DegToRad()),
3869 TGeoVolume* waterTube3 =
3870 gGeoManager->MakeTube(Form(
"waterTube3%d_D3_H%d", 2, half),
mWater, 0.,
3871 mRWater, mLpartial3[itube] / 2.);
3872 rotation =
new TGeoRotation(
"rotation", -90., 0 - mAngle3[itube], 0.);
3875 -(mSupportXDimensions[3][0] / 2. + mMoreLength - xPos3[itube]),
3879 TGeoVolume* waterTorus2 = gGeoManager->MakeTorus(
3880 Form(
"waterTorus2%d_D3_H%d", itube, half),
mWater, mRadius3[itube], 0.,
3881 mRWater, 0., mAngle3[itube]);
3882 rotation =
new TGeoRotation(
"rotation", 180., 90., 0.);
3884 mRadius3[itube] + mXPosition3[itube] - mHalfDiskGap, 0.,
3885 -(mSupportXDimensions[3][0] / 2. + mMoreLength - mLWater3[itube]),
3889 TGeoVolume* waterTube4 =
3890 gGeoManager->MakeTube(Form(
"waterTube4%d_D3_H%d", itube, half),
mWater,
3891 0., mRWater, mLWater3[itube] / 2.);
3892 translation =
new TGeoTranslation(
3893 mXPosition3[itube] - mHalfDiskGap, 0.,
3894 -(mSupportXDimensions[3][0] / 2. + mMoreLength - mLWater3[itube] / 2.));
3895 cooling->AddNode(waterTube4, ivolume++, translation);
3902 for (Int_t itube = 0; itube < 4; itube++) {
3903 TGeoVolume* pipeTube1 =
3904 gGeoManager->MakeTube(Form(
"pipeTube1%d_D3_H%d", itube, half),
mPipe,
3905 mRWater, mRWater + mDRPipe, mLWater3[itube] / 2.);
3906 translation =
new TGeoTranslation(mXPosition3[itube] - mHalfDiskGap, 0.,
3907 mSupportXDimensions[3][0] / 2. +
3908 mMoreLength - mLWater3[itube] / 2.);
3909 cooling->AddNode(pipeTube1, ivolume++, translation);
3911 TGeoVolume* pipeTorus1 = gGeoManager->MakeTorus(
3912 Form(
"pipeTorus1%d_D3_H%d", itube, half),
mPipe, mRadius3[itube],
3913 mRWater, mRWater + mDRPipe, 0., mAngle3[itube]);
3914 rotation =
new TGeoRotation(
"rotation", 180., -90., 0.);
3916 mRadius3[itube] + mXPosition3[itube] - mHalfDiskGap, 0.,
3917 mSupportXDimensions[3][0] / 2. + mMoreLength - mLWater3[itube],
3921 TGeoVolume* pipeTube2 = gGeoManager->MakeTube(
3922 Form(
"pipeTube2%d_D3_H%d", itube, half),
mPipe, mRWater,
3923 mRWater + mDRPipe, mLpartial3[itube] / 2.);
3924 rotation =
new TGeoRotation(
"rotation", 90., 180 - mAngle3[itube], 0.);
3927 mRadius3[itube] * TMath::Sin(mAngle3[itube] * TMath::DegToRad()) +
3928 mLpartial3[itube] / 2 * TMath::Cos(mAngle3[itube] * TMath::DegToRad());
3930 mXPosition3[itube] - mHalfDiskGap +
3931 mRadius3[itube] * (1 - TMath::Cos(mAngle3[itube] * TMath::DegToRad())) +
3932 mLpartial3[itube] / 2 * TMath::Sin(mAngle3[itube] * TMath::DegToRad());
3935 mSupportXDimensions[3][0] / 2. + mMoreLength - xPos3[itube], rotation);
3938 mRadiusCentralTore[itube] =
3939 (mSupportXDimensions[3][0] / 2. + mMoreLength - xPos3[itube] -
3940 mLpartial3[itube] / 2 *
3941 TMath::Cos(mAngle3[itube] * TMath::DegToRad())) /
3942 TMath::Sin(mAngle3[itube] * TMath::DegToRad());
3943 TGeoVolume* pipeTorusCentral = gGeoManager->MakeTorus(
3944 Form(
"pipeTorusCentral%d_D3_H%d", itube, half),
mPipe,
3945 mRadiusCentralTore[itube], mRWater, mRWater + mDRPipe, -mAngle3[itube],
3946 2. * mAngle3[itube]);
3947 rotation =
new TGeoRotation(
"rotation", 0., 90., 0.);
3950 mLpartial3[itube] / 2 *
3951 TMath::Sin(mAngle3[itube] * TMath::DegToRad()) -
3952 mRadiusCentralTore[itube] *
3953 TMath::Cos(mAngle3[itube] * TMath::DegToRad()),
3957 TGeoVolume* pipeTube3 = gGeoManager->MakeTube(
3958 Form(
"pipeTube3%d_D3_H%d", 2, half),
mPipe, mRWater, mRWater + mDRPipe,
3959 mLpartial3[itube] / 2.);
3960 rotation =
new TGeoRotation(
"rotation", -90., 0 - mAngle3[itube], 0.);
3963 -(mSupportXDimensions[3][0] / 2. + mMoreLength - xPos3[itube]),
3967 TGeoVolume* pipeTorus2 = gGeoManager->MakeTorus(
3968 Form(
"pipeTorus2%d_D3_H%d", itube, half),
mPipe, mRadius3[itube],
3969 mRWater, mRWater + mDRPipe, 0., mAngle3[itube]);
3970 rotation =
new TGeoRotation(
"rotation", 180., 90., 0.);
3972 mRadius3[itube] + mXPosition3[itube] - mHalfDiskGap, 0.,
3973 -(mSupportXDimensions[3][0] / 2. + mMoreLength - mLWater3[itube]),
3977 TGeoVolume* pipeTube4 =
3978 gGeoManager->MakeTube(Form(
"pipeTube4%d_D3_H%d", itube, half),
mPipe,
3979 mRWater, mRWater + mDRPipe, mLWater3[itube] / 2.);
3980 translation =
new TGeoTranslation(
3981 mXPosition3[itube] - mHalfDiskGap, 0.,
3982 -(mSupportXDimensions[3][0] / 2. + mMoreLength - mLWater3[itube] / 2.));
3983 cooling->AddNode(pipeTube4, ivolume++, translation);
3987 Double_t deltaz = mHeatExchangerThickness -
3991 rotation =
new TGeoRotation(
"rotation", -90., 90., 0.);
3994 mZPlan[disk] + deltaz / 2. - mCarbonThickness - mRWater - mDRPipe -
4000 mZPlan[disk] - deltaz / 2. + mCarbonThickness + mRWater + mDRPipe +
4007 auto* carbonPlate =
new TGeoVolumeAssembly(Form(
"carbonPlate_D3_H%d", half));
4010 Double_t mReducedX = 0.;
4011 if (mftBaseParam.buildAlignment) {
4015 auto* carbonBase3 =
new TGeoBBox(
4016 Form(
"carbonBase3_D3_H%d", half),
4017 (mSupportXDimensions[disk][0]) / 2. + mMoreLength - mReducedX,
4018 (mSupportYDimensions[disk][0]) / 2., mCarbonThickness);
4019 auto* t31 =
new TGeoTranslation(
4020 "t31", 0., (mSupportYDimensions[disk][0]) / 2. + mHalfDiskGap, 0.);
4021 t31->RegisterYourself();
4024 new TGeoTubeSeg(Form(
"holeCarbon3_D3_H%d", half), 0., mRMin[disk],
4025 mCarbonThickness + 0.000001, 0, 180.);
4026 auto* t32 =
new TGeoTranslation(
"t32", 0., -mHalfDiskGap, 0.);
4027 t32->RegisterYourself();
4029 auto* carbonhole3 =
new TGeoSubtraction(carbonBase3, holeCarbon3, t31, t32);
4030 auto* cs3 =
new TGeoCompositeShape(Form(
"Carbon3_D3_H%d", half), carbonhole3);
4031 auto* carbonBaseWithHole3 =
4032 new TGeoVolume(Form(
"carbonBaseWithHole_D3_H%d", half), cs3,
mCarbon);
4034 carbonBaseWithHole3->SetLineColor(kGray + 3);
4035 rotation =
new TGeoRotation(
"rotation", 0., 0., 0.);
4037 carbonPlate->AddNode(carbonBaseWithHole3, 0,
4038 new TGeoTranslation(0., 0., mZPlan[disk]));
4040 Double_t ty = mSupportYDimensions[disk][0];
4042 for (Int_t ipart = 1; ipart < mNPart[disk]; ipart++) {
4043 ty += mSupportYDimensions[disk][ipart] / 2.;
4044 TGeoVolume* partCarbon = gGeoManager->MakeBox(
4045 Form(
"partCarbon_D3_H%d_%d", half, ipart),
mCarbon,
4046 mSupportXDimensions[disk][ipart] / 2.,
4047 mSupportYDimensions[disk][ipart] / 2., mCarbonThickness);
4048 partCarbon->SetLineColor(kGray + 3);
4049 auto* t =
new TGeoTranslation(
"t", 0, ty + mHalfDiskGap, mZPlan[disk]);
4050 carbonPlate->AddNode(partCarbon, ipart, t);
4051 ty += mSupportYDimensions[disk][ipart] / 2.;
4054 rotation =
new TGeoRotation(
"rotation", 180., 0., 0.);
4055 transformation =
new TGeoCombiTrans(0., 0., deltaz / 2., rotation);
4057 transformation =
new TGeoCombiTrans(0., 0., -deltaz / 2., rotation);
4062 TGeoMedium* mGlueRohacellCarbon = gGeoManager->GetMedium(
"MFT_Epoxy$");
4063 auto* glueRohacellCarbon =
4064 new TGeoVolumeAssembly(Form(
"glueRohacellCarbon_D0_H%d", half));
4065 auto* glueRohacellCarbonBase0 =
4066 new TGeoBBox(Form(
"glueRohacellCarbonBase0_D0_H%d", half),
4067 (mSupportXDimensions[disk][0]) / 2. - mReducedX,
4068 (mSupportYDimensions[disk][0]) / 2.,
4071 auto* translation_gluRC01 =
new TGeoTranslation(
4072 "translation_gluRC01", 0.,
4073 (mSupportYDimensions[disk][0]) / 2. + mHalfDiskGap, 0.);
4074 translation_gluRC01->RegisterYourself();
4075 auto* translation_gluRC02 =
4076 new TGeoTranslation(
"translation_gluRC02", 0., -mHalfDiskGap, 0.);
4077 translation_gluRC02->RegisterYourself();
4079 auto* holeglueRohacellCarbon0 =
new TGeoTubeSeg(
4080 Form(
"holeglueRohacellCarbon0_D0_H%d", half), 0., mRMin[disk],
4083 auto* glueRohacellCarbonhole0 =
4084 new TGeoSubtraction(glueRohacellCarbonBase0, holeglueRohacellCarbon0,
4085 translation_gluRC01, translation_gluRC02);
4086 auto* gRC0 =
new TGeoCompositeShape(Form(
"glueRohacellCarbon0_D0_H%d", half),
4087 glueRohacellCarbonhole0);
4088 auto* glueRohacellCarbonBaseWithHole0 =
4089 new TGeoVolume(Form(
"glueRohacellCarbonWithHole_D0_H%d", half), gRC0,
4090 mGlueRohacellCarbon);
4092 glueRohacellCarbonBaseWithHole0->SetLineColor(kGreen);
4093 rotation =
new TGeoRotation(
"rotation", 0., 0., 0.);
4095 glueRohacellCarbon->AddNode(glueRohacellCarbonBaseWithHole0, 0,
4096 new TGeoTranslation(0., 0., mZPlan[disk]));
4098 Double_t tyGRC = mSupportYDimensions[disk][0];
4100 for (Int_t ipart = 1; ipart < mNPart[disk]; ipart++) {
4101 tyGRC += mSupportYDimensions[disk][ipart] / 2.;
4102 TGeoVolume* partGlueRohacellCarbon = gGeoManager->MakeBox(
4103 Form(
"partGlueRohacellCarbon_D0_H%d_%d", half, ipart),
4104 mGlueRohacellCarbon, mSupportXDimensions[disk][ipart] / 2.,
4105 mSupportYDimensions[disk][ipart] / 2.,
4107 partGlueRohacellCarbon->SetLineColor(kGreen);
4108 auto* t =
new TGeoTranslation(
"t", 0, tyGRC + mHalfDiskGap, mZPlan[disk]);
4109 glueRohacellCarbon->AddNode(partGlueRohacellCarbon, ipart, t);
4110 tyGRC += mSupportYDimensions[disk][ipart] / 2.;
4113 rotation =
new TGeoRotation(
"rotation", 180., 0., 0.);
4120 -(deltaz / 2. - mCarbonThickness -
4127 TGeoMedium* mKaptonOnCarbon = gGeoManager->GetMedium(
"MFT_Kapton$");
4128 auto* kaptonOnCarbon =
4129 new TGeoVolumeAssembly(Form(
"kaptonOnCarbon_D0_H%d", half));
4130 auto* kaptonOnCarbonBase0 =
new TGeoBBox(
4131 Form(
"kaptonOnCarbonBase0_D0_H%d", half),
4132 (mSupportXDimensions[disk][0]) / 2. + mMoreLength - mReducedX,
4135 auto* translation_KC01 =
new TGeoTranslation(
4136 "translation_KC01", 0.,
4137 (mSupportYDimensions[disk][0]) / 2. + mHalfDiskGap, 0.);
4138 translation_KC01->RegisterYourself();
4139 auto* translation_KC02 =
4140 new TGeoTranslation(
"translation_KC02", 0., -mHalfDiskGap, 0.);
4141 translation_KC02->RegisterYourself();
4143 auto* holekaptonOnCarbon0 =
4144 new TGeoTubeSeg(Form(
"holekaptonOnCarbon0_D0_H%d", half), 0., mRMin[disk],
4147 auto* kaptonOnCarbonhole0 =
4148 new TGeoSubtraction(kaptonOnCarbonBase0, holekaptonOnCarbon0,
4149 translation_KC01, translation_KC02);
4150 auto* KC0 =
new TGeoCompositeShape(Form(
"kaptonOnCarbon_D0_H%d", half),
4151 kaptonOnCarbonhole0);
4152 auto* kaptonOnCarbonBaseWithHole0 =
new TGeoVolume(
4153 Form(
"kaptonOnCarbonWithHole_D0_H%d", half), KC0, mKaptonOnCarbon);
4155 kaptonOnCarbonBaseWithHole0->SetLineColor(kMagenta);
4156 rotation =
new TGeoRotation(
"rotation", 0., 0., 0.);
4158 kaptonOnCarbon->AddNode(kaptonOnCarbonBaseWithHole0, 0,
4159 new TGeoTranslation(0., 0., mZPlan[disk]));
4161 Double_t tyKC = mSupportYDimensions[disk][0];
4163 for (Int_t ipart = 1; ipart < mNPart[disk]; ipart++) {
4164 tyKC += mSupportYDimensions[disk][ipart] / 2.;
4165 TGeoVolume* partkaptonOnCarbonBase = gGeoManager->MakeBox(
4166 Form(
"partkaptonOnCarbon_D0_H%d_%d", half, ipart), mKaptonOnCarbon,
4167 mSupportXDimensions[disk][ipart] / 2.,
4168 mSupportYDimensions[disk][ipart] / 2.,
4170 partkaptonOnCarbonBase->SetLineColor(kMagenta);
4171 auto* t =
new TGeoTranslation(
"t", 0, tyKC + mHalfDiskGap, mZPlan[disk]);
4172 kaptonOnCarbon->AddNode(partkaptonOnCarbonBase, ipart, t);
4173 tyKC += mSupportYDimensions[disk][ipart] / 2.;
4176 rotation =
new TGeoRotation(
"rotation", 180., 0., 0.);
4192 TGeoMedium* mGlueKaptonCarbon = gGeoManager->GetMedium(
"MFT_Epoxy$");
4193 auto* glueKaptonCarbon =
4194 new TGeoVolumeAssembly(Form(
"glueKaptonCarbon_D0_H%d", half));
4195 auto* glueKaptonCarbonBase0 =
new TGeoBBox(
4196 Form(
"glueKaptonCarbonBase0_D0_H%d", half),
4197 (mSupportXDimensions[disk][0]) / 2. - mReducedX,
4200 auto* translation_gluKC01 =
new TGeoTranslation(
4201 "translation_gluKC01", 0.,
4202 (mSupportYDimensions[disk][0]) / 2. + mHalfDiskGap, 0.);
4203 translation_gluKC01->RegisterYourself();
4204 auto* translation_gluKC02 =
4205 new TGeoTranslation(
"translation_gluKC02", 0., -mHalfDiskGap, 0.);
4206 translation_gluKC02->RegisterYourself();
4208 auto* holeglueKaptonCarbon0 =
new TGeoTubeSeg(
4209 Form(
"holeglueKaptonCarbon0_D0_H%d", half), 0., mRMin[disk],
4212 auto* glueKaptonCarbonhole0 =
4213 new TGeoSubtraction(glueKaptonCarbonBase0, holeglueKaptonCarbon0,
4214 translation_gluKC01, translation_gluKC02);
4215 auto* gKC0 =
new TGeoCompositeShape(Form(
"glueKaptonCarbon0_D0_H%d", half),
4216 glueKaptonCarbonhole0);
4217 auto* glueKaptonCarbonBaseWithHole0 =
new TGeoVolume(
4218 Form(
"glueKaptonCarbonWithHole_D0_H%d", half), gKC0, mGlueKaptonCarbon);
4220 glueKaptonCarbonBaseWithHole0->SetLineColor(kGreen);
4221 rotation =
new TGeoRotation(
"rotation", 0., 0., 0.);
4223 glueKaptonCarbon->AddNode(glueKaptonCarbonBaseWithHole0, 0,
4224 new TGeoTranslation(0., 0., mZPlan[disk]));
4226 Double_t tyGKC = mSupportYDimensions[disk][0];
4228 for (Int_t ipart = 1; ipart < mNPart[disk]; ipart++) {
4229 tyGKC += mSupportYDimensions[disk][ipart] / 2.;
4230 TGeoVolume* partGlueKaptonCarbon = gGeoManager->MakeBox(
4231 Form(
"partGlueKaptonCarbon_D0_H%d_%d", half, ipart), mGlueKaptonCarbon,
4232 mSupportXDimensions[disk][ipart] / 2.,
4234 partGlueKaptonCarbon->SetLineColor(kGreen);
4235 auto* t =
new TGeoTranslation(
"t", 0, tyGKC + mHalfDiskGap, mZPlan[disk]);
4236 glueKaptonCarbon->AddNode(partGlueKaptonCarbon, ipart, t);
4237 tyGKC += mSupportYDimensions[disk][ipart] / 2.;
4240 rotation =
new TGeoRotation(
"rotation", 180., 0., 0.);
4253 auto* rohacellPlate =
4254 new TGeoVolumeAssembly(Form(
"rohacellPlate_D3_H%d", half));
4255 auto* rohacellBase3 =
new TGeoBBox(
4256 Form(
"rohacellBase3_D3_H%d", half), (mSupportXDimensions[disk][0]) / 2.,
4257 (mSupportYDimensions[disk][0]) / 2., mRohacellThickness);
4259 auto* holeRohacell3 =
4260 new TGeoTubeSeg(Form(
"holeRohacell3_D3_H%d", half), 0., mRMin[disk],
4261 mRohacellThickness + 0.000001, 0, 180.);
4266 Double_t diameter = 0.21;
4267 Double_t epsilon = 0.06;
4269 Double_t mPosition[4];
4270 TGeoCombiTrans* transfo[7][4];
4271 TGeoTube* grooveTube[7][4];
4272 TGeoTorus* grooveTorus[7][4];
4273 TGeoSubtraction* rohacellBaseGroove[300];
4274 TGeoCompositeShape* rohacellGroove[300];
4276 for (Int_t igroove = 0; igroove < 4; igroove++) {
4277 grooveTube[0][igroove] =
4278 new TGeoTube(
"linear", 0., diameter, mLWater3[igroove] / 2.);
4279 grooveTorus[1][igroove] =
new TGeoTorus(
"SideTorus", mRadius3[igroove], 0.,
4280 diameter, 0., mAngle3[igroove]);
4281 grooveTube[2][igroove] =
4282 new TGeoTube(
"tiltedLinear", 0., diameter, mLpartial3[igroove] / 2.);
4283 grooveTorus[3][igroove] =
4284 new TGeoTorus(
"centralTorus", mRadiusCentralTore[igroove], 0., diameter,
4285 -mAngle3[igroove], 2. * mAngle3[igroove]);
4286 grooveTube[4][igroove] =
4287 new TGeoTube(
"tiltedLinear", 0., diameter, mLpartial3[igroove] / 2.);
4288 grooveTorus[5][igroove] =
new TGeoTorus(
"SideTorus", mRadius3[igroove], 0.,
4289 diameter, 0., mAngle3[igroove]);
4290 grooveTube[6][igroove] =
4291 new TGeoTube(
"linear", 0., diameter, mLWater3[igroove] / 2.);
4295 TGeoRotation* rotationLinear =
new TGeoRotation(
"rotation", -90., 90., 0.);
4296 TGeoRotation* rotationSideTorusL =
4297 new TGeoRotation(
"rotationSideTorusLeft", -90., 0., 0.);
4298 TGeoRotation* rotationSideTorusR =
4299 new TGeoRotation(
"rotationSideTorusRight", 90., 180., 180.);
4300 TGeoRotation* rotationCentralTorus =
4301 new TGeoRotation(
"rotationCentralTorus", 90., 0., 0.);
4302 TGeoRotation* rotationTiltedLinearR;
4303 TGeoRotation* rotationTiltedLinearL;
4307 for (Int_t iface = 1; iface > -2; iface -= 2) {
4308 for (Int_t igroove = 0; igroove < 4; igroove++) {
4309 mPosition[igroove] = mXPosition3[igroove] -
4310 mSupportYDimensions[disk][0] / 2. - mHalfDiskGap - diameter / 2.;
4311 for (Int_t ip = 0; ip < 7; ip++) {
4315 transfo[ip][igroove] =
new TGeoCombiTrans(
4316 mSupportXDimensions[3][0] / 2. + mMoreLength -
4317 mLWater3[igroove] / 2.,
4318 mPosition[igroove], iface * (mRohacellThickness + epsilon),
4320 if (igroove == 0 && iface == 1) {
4321 rohacellBaseGroove[0] =
4322 new TGeoSubtraction(rohacellBase3, grooveTube[ip][igroove],
4323 nullptr, transfo[ip][igroove]);
4325 new TGeoCompositeShape(Form(
"rohacell3Groove%d_G%d_F%d_H%d",
4326 ip, igroove, iface, half),
4327 rohacellBaseGroove[0]);
4331 transfo[ip][igroove] =
new TGeoCombiTrans(
4332 mSupportXDimensions[3][0] / 2. + mMoreLength -
4334 mRadius3[igroove] + mXPosition3[igroove] -
4335 mSupportYDimensions[disk][0] / 2. - mHalfDiskGap - diameter / 2.,
4336 iface * (mRohacellThickness + epsilon), rotationSideTorusR);
4339 rotationTiltedLinearR =
new TGeoRotation(
4340 "rotationTiltedLinearRight", 90. - mAngle3[igroove], 90., 0.);
4341 transfo[ip][igroove] =
new TGeoCombiTrans(
4342 mSupportXDimensions[3][0] / 2. + mMoreLength - xPos3[igroove],
4343 yPos3[igroove] - mSupportYDimensions[disk][0] / 2. -
4345 iface * (mRohacellThickness + epsilon), rotationTiltedLinearR);
4348 transfo[ip][igroove] =
new TGeoCombiTrans(
4351 mLpartial3[igroove] / 2 *
4352 TMath::Sin(mAngle3[igroove] * TMath::DegToRad()) -
4353 mRadiusCentralTore[igroove] *
4354 TMath::Cos(mAngle3[igroove] * TMath::DegToRad()) -
4355 mSupportYDimensions[disk][0] / 2. - mHalfDiskGap,
4356 iface * (mRohacellThickness + epsilon), rotationCentralTorus);
4359 rotationTiltedLinearL =
new TGeoRotation(
4360 "rotationTiltedLinearLeft", 90. + mAngle3[igroove], 90., 0.);
4361 transfo[ip][igroove] =
new TGeoCombiTrans(
4362 -(mSupportXDimensions[3][0] / 2. + mMoreLength -
4364 yPos3[igroove] - mSupportYDimensions[disk][0] / 2. -
4366 iface * (mRohacellThickness + epsilon), rotationTiltedLinearL);
4369 transfo[ip][igroove] =
new TGeoCombiTrans(
4370 -(mSupportXDimensions[3][0] / 2. + mMoreLength -
4372 mRadius3[igroove] + mPosition[igroove],
4373 iface * (mRohacellThickness + epsilon), rotationSideTorusL);
4376 transfo[ip][igroove] =
new TGeoCombiTrans(
4377 -(mSupportXDimensions[3][0] / 2. + mMoreLength -
4378 mLWater3[igroove] / 2.),
4379 mPosition[igroove], iface * (mRohacellThickness + epsilon),
4384 if (!(ip == 0 && igroove == 0 && iface == 1)) {
4386 rohacellBaseGroove[iCount] =
new TGeoSubtraction(
4387 rohacellGroove[iCount - 1], grooveTorus[ip][igroove],
nullptr,
4388 transfo[ip][igroove]);
4390 rohacellBaseGroove[iCount] =
new TGeoSubtraction(
4391 rohacellGroove[iCount - 1], grooveTube[ip][igroove],
nullptr,
4392 transfo[ip][igroove]);
4394 rohacellGroove[iCount] =
4395 new TGeoCompositeShape(Form(
"rohacell3Groove%d_G%d_F%d_H%d",
4396 iCount, igroove, iface, half),
4397 rohacellBaseGroove[iCount]);
4406 TGeoBoolNode* rohacellBase;
4408 rohacellBase =
new TGeoSubtraction(rohacellBase3, holeRohacell3, t31, t32);
4411 rohacellBase =
new TGeoSubtraction(rohacellGroove[iCount - 1],
4412 holeRohacell3, t31, t32);
4414 auto* rh3 =
new TGeoCompositeShape(Form(
"rohacellTore%d_D0_H%d", 0, half),
4416 auto* rohacellBaseWithHole =
4417 new TGeoVolume(Form(
"rohacellBaseWithHole_D3_H%d", half), rh3,
mRohacell);
4419 rohacellBaseWithHole->SetLineColor(kGray);
4420 rotation =
new TGeoRotation(
"rotation", 0., 0., 0.);
4422 rohacellPlate->AddNode(rohacellBaseWithHole, 0,
4423 new TGeoTranslation(0., 0., mZPlan[disk]));
4425 ty = mSupportYDimensions[disk][0];
4427 TGeoVolume* partRohacell;
4428 for (Int_t ipart = 1; ipart < mNPart[disk]; ipart++) {
4429 ty += mSupportYDimensions[disk][ipart] / 2.;
4430 auto* t =
new TGeoTranslation(
"t", 0, ty + mHalfDiskGap, mZPlan[disk]);
4434 auto* partRohacell0 =
4435 new TGeoBBox(Form(
"rohacellBase0_D3_H%d_%d", half, ipart),
4436 mSupportXDimensions[disk][ipart] / 2.,
4437 mSupportYDimensions[disk][ipart] / 2., mRohacellThickness);
4443 for (Int_t iface = 1; iface > -2; iface -= 2) {
4444 for (Int_t igroove = 0; igroove < 4; igroove++) {
4447 mXPosition3[igroove] - mSupportYDimensions[disk][ipart] / 2. -
4448 mHalfDiskGap - mSupportYDimensions[disk][ipart - 1];
4449 mShift = -mSupportYDimensions[disk][ipart - 1];
4453 mXPosition3[igroove] - mSupportYDimensions[disk][ipart] / 2. -
4454 mHalfDiskGap - mSupportYDimensions[disk][ipart - 1] -
4455 mSupportYDimensions[disk][ipart - 2];
4456 mShift = -mSupportYDimensions[disk][ipart - 1] -
4457 mSupportYDimensions[disk][ipart - 2];
4461 mXPosition3[igroove] - mSupportYDimensions[disk][ipart] / 2. -
4462 mHalfDiskGap - mSupportYDimensions[disk][ipart - 1] -
4463 mSupportYDimensions[disk][ipart - 2] -
4464 mSupportYDimensions[disk][ipart - 3];
4465 mShift = -mSupportYDimensions[disk][ipart - 1] -
4466 mSupportYDimensions[disk][ipart - 2] -
4467 mSupportYDimensions[disk][ipart - 3];
4470 for (Int_t ip = 0; ip < 7; ip++) {
4474 transfo[ip][igroove] =
new TGeoCombiTrans(
4475 mSupportXDimensions[3][0] / 2. + mMoreLength -
4476 mLWater3[igroove] / 2.,
4477 mPosition[ipart], iface * (mRohacellThickness + epsilon),
4479 if (igroove == 0 && iface == 1) {
4480 rohacellBaseGroove[iCount] =
4481 new TGeoSubtraction(partRohacell0, grooveTube[ip][igroove],
4482 nullptr, transfo[ip][igroove]);
4483 rohacellGroove[iCount] =
4484 new TGeoCompositeShape(Form(
"rohacell3Groove%d_G%d_F%d_H%d",
4485 ip, igroove, iface, half),
4486 rohacellBaseGroove[iCount]);
4490 transfo[ip][igroove] =
new TGeoCombiTrans(
4491 mSupportXDimensions[3][0] / 2. + mMoreLength -
4493 mPosition[ipart] + mRadius3[igroove] - diameter / 2.,
4494 iface * (mRohacellThickness + epsilon), rotationSideTorusR);
4497 rotationTiltedLinearR =
new TGeoRotation(
4498 "rotationTiltedLinearRight", 90. - mAngle3[igroove], 90., 0.);
4499 transfo[ip][igroove] =
new TGeoCombiTrans(
4500 mSupportXDimensions[3][0] / 2. + mMoreLength - xPos3[igroove],
4501 yPos3[igroove] + mShift - mHalfDiskGap -
4502 mSupportYDimensions[disk][ipart] / 2.,
4503 iface * (mRohacellThickness + epsilon),
4504 rotationTiltedLinearR);
4507 transfo[ip][igroove] =
new TGeoCombiTrans(
4509 mPosition[ipart] + yPos3[igroove] +
4510 mLpartial3[igroove] / 2 *
4511 TMath::Sin(mAngle3[igroove] * TMath::DegToRad()) -
4512 mRadiusCentralTore[igroove] *
4513 TMath::Cos(mAngle3[igroove] * TMath::DegToRad()) -
4514 mXPosition3[igroove],
4515 iface * (mRohacellThickness + epsilon), rotationCentralTorus);
4518 rotationTiltedLinearL =
new TGeoRotation(
4519 "rotationTiltedLinearLeft", 90. + mAngle3[igroove], 90., 0.);
4520 transfo[ip][igroove] =
new TGeoCombiTrans(
4521 -(mSupportXDimensions[3][0] / 2. + mMoreLength -
4523 yPos3[igroove] + mPosition[ipart] - mXPosition3[igroove],
4524 iface * (mRohacellThickness + epsilon),
4525 rotationTiltedLinearL);
4528 transfo[ip][igroove] =
new TGeoCombiTrans(
4529 -(mSupportXDimensions[3][0] / 2. + mMoreLength -
4531 mRadius3[igroove] + mPosition[ipart] - diameter / 2.,
4532 iface * (mRohacellThickness + epsilon), rotationSideTorusL);
4535 transfo[ip][igroove] =
new TGeoCombiTrans(
4536 -(mSupportXDimensions[3][0] / 2. + mMoreLength -
4537 mLWater3[igroove] / 2.),
4538 mPosition[ipart], iface * (mRohacellThickness + epsilon),
4542 if (!(ip == 0 && igroove == 0 && iface == 1)) {
4544 rohacellBaseGroove[iCount] =
new TGeoSubtraction(
4545 rohacellGroove[iCount - 1], grooveTorus[ip][igroove],
4546 nullptr, transfo[ip][igroove]);
4548 rohacellBaseGroove[iCount] =
new TGeoSubtraction(
4549 rohacellGroove[iCount - 1], grooveTube[ip][igroove],
4550 nullptr, transfo[ip][igroove]);
4553 rohacellGroove[iCount] =
4554 new TGeoCompositeShape(Form(
"rohacell3Groove%d_G%d_F%d_H%d",
4555 iCount, igroove, iface, half),
4556 rohacellBaseGroove[iCount]);
4565 TGeoVolume* partRohacellNotch;
4566 TGeoSubtraction* partRohacellini;
4567 TGeoBBox* notchRohacell0;
4568 TGeoTranslation* tnotch0;
4569 Double_t xnotch, ynotch;
4572 if (ipart == (mNPart[disk] - 1)) {
4573 notchRohacell0 =
new TGeoBBox(Form(
"notchRohacell0_D3_H%d", half), xnotch,
4574 ynotch, mRohacellThickness + 0.000001);
4575 tnotch0 =
new TGeoTranslation(
"tnotch0", 0.,
4576 mSupportYDimensions[disk][ipart] / 2., 0.);
4577 tnotch0->RegisterYourself();
4582 if (ipart == (mNPart[disk] - 1)) {
4583 partRohacellini =
new TGeoSubtraction(partRohacell0, notchRohacell0,
4585 auto* rhinit =
new TGeoCompositeShape(Form(
"rhinit%d_D3_H%d", 0, half),
4587 partRohacell =
new TGeoVolume(
4588 Form(
"partRohacelli_D3_H%d_%d", half, ipart), rhinit,
mRohacell);
4590 if (ipart < (mNPart[disk] - 1)) {
4592 new TGeoVolume(Form(
"partRohacelli_D3_H%d_%d", half, ipart),
4597 if (ipart == (mNPart[disk] - 1)) {
4598 partRohacellini =
new TGeoSubtraction(rohacellGroove[iCount - 1],
4599 notchRohacell0,
nullptr, tnotch0);
4600 auto* rhinit =
new TGeoCompositeShape(Form(
"rhinit%d_D3_H%d", 0, half),
4602 partRohacell =
new TGeoVolume(
4603 Form(
"partRohacelli_D3_H%d_%d", half, ipart), rhinit,
mRohacell);
4605 if (ipart < (mNPart[disk] - 1)) {
4607 new TGeoVolume(Form(
"partRohacelli_D3_H%d_%d", half, ipart),
4614 partRohacell->SetLineColor(kGray);
4615 rohacellPlate->AddNode(partRohacell, ipart, t);
4619 if (ipart == (mNPart[disk] - 1)) {
4620 TGeoTranslation* tinsert3;
4621 TGeoVolume* insert3 =
4622 gGeoManager->MakeBox(Form(
"insert3_H%d_%d", half, ipart),
mPeek,
4623 4.0 / 2., 0.44 / 2., mRohacellThickness);
4624 Double_t ylocation =
4625 mSupportYDimensions[disk][0] + mHalfDiskGap + 0.44 / 2. - ynotch;
4626 for (Int_t ip = 1; ip < mNPart[disk]; ip++) {
4627 ylocation = ylocation + mSupportYDimensions[disk][ip];
4629 tinsert3 =
new TGeoTranslation(
"tinsert3", 0., -ylocation, 0.);
4630 tinsert3->RegisterYourself();
4631 mHalfDisk->AddNode(insert3, 0., tinsert3);
4634 ty += mSupportYDimensions[disk][ipart] / 2.;
4637 rotation =
new TGeoRotation(
"rotation", 180., 0., 0.);
4652 printf(
"Creating MFT heat exchanger for disk4 top\n");
4653 }
else if (half == Bottom) {
4654 printf(
"Creating MFT heat exchanger for disk4 bottom\n");
4656 printf(
"No valid option for MFT heat exchanger on disk4\n");
4659 mCarbon = gGeoManager->GetMedium(
"MFT_CarbonFiber$");
4660 mWater = gGeoManager->GetMedium(
"MFT_Water$");
4661 mRohacell = gGeoManager->GetMedium(
"MFT_Rohacell$");
4662 mPipe = gGeoManager->GetMedium(
"MFT_Polyimide$");
4663 mPeek = gGeoManager->GetMedium(
"MFT_PEEK$");
4665 auto* cooling =
new TGeoVolumeAssembly(Form(
"cooling_D4_H%d", half));
4667 TGeoTranslation* translation =
nullptr;
4668 TGeoRotation* rotation =
nullptr;
4675 Double_t ivolume = 400;
4676 Double_t mRadiusCentralTore[4];
4680 for (Int_t itube = 0; itube < 4; itube++) {
4681 TGeoVolume* waterTube1 =
4682 gGeoManager->MakeTube(Form(
"waterTube1%d_D4_H%d", itube, half),
mWater,
4683 0., mRWater, mLWater4[itube] / 2.);
4684 translation =
new TGeoTranslation(mXPosition4[itube] - mHalfDiskGap, 0.,
4685 mSupportXDimensions[4][0] / 2. +
4686 mMoreLength - mLWater4[itube] / 2.);
4687 cooling->AddNode(waterTube1, ivolume++, translation);
4689 TGeoVolume* waterTorus1 = gGeoManager->MakeTorus(
4690 Form(
"waterTorus1%d_D4_H%d", itube, half),
mWater, mRadius4[itube], 0.,
4691 mRWater, 0., mAngle4[itube]);
4692 rotation =
new TGeoRotation(
"rotation", 180., -90., 0.);
4694 mRadius4[itube] + mXPosition4[itube] - mHalfDiskGap, 0.,
4695 mSupportXDimensions[4][0] / 2. + mMoreLength - mLWater4[itube],
4699 TGeoVolume* waterTube2 =
4700 gGeoManager->MakeTube(Form(
"waterTube2%d_D4_H%d", itube, half),
mWater,
4701 0., mRWater, mLpartial4[itube] / 2.);
4702 rotation =
new TGeoRotation(
"rotation", 90., 180 - mAngle4[itube], 0.);
4705 mRadius4[itube] * TMath::Sin(mAngle4[itube] * TMath::DegToRad()) +
4706 mLpartial4[itube] / 2 * TMath::Cos(mAngle4[itube] * TMath::DegToRad());
4708 mXPosition4[itube] - mHalfDiskGap +
4709 mRadius4[itube] * (1 - TMath::Cos(mAngle4[itube] * TMath::DegToRad())) +
4710 mLpartial4[itube] / 2 * TMath::Sin(mAngle4[itube] * TMath::DegToRad());
4713 mSupportXDimensions[4][0] / 2. + mMoreLength - xPos4[itube], rotation);
4716 mRadiusCentralTore[itube] =
4717 (mSupportXDimensions[4][0] / 2. + mMoreLength - xPos4[itube] -
4718 mLpartial4[itube] / 2 *
4719 TMath::Cos(mAngle4[itube] * TMath::DegToRad())) /
4720 TMath::Sin(mAngle4[itube] * TMath::DegToRad());
4721 TGeoVolume* waterTorusCentral =
4722 gGeoManager->MakeTorus(Form(
"waterTorusCentral%d_D4_H%d", itube, half),
4723 mWater, mRadiusCentralTore[itube], 0., mRWater,
4724 -mAngle4[itube], 2. * mAngle4[itube]);
4725 rotation =
new TGeoRotation(
"rotation", 0., 90., 0.);
4728 mLpartial4[itube] / 2 *
4729 TMath::Sin(mAngle4[itube] * TMath::DegToRad()) -
4730 mRadiusCentralTore[itube] *
4731 TMath::Cos(mAngle4[itube] * TMath::DegToRad()),
4735 TGeoVolume* waterTube3 =
4736 gGeoManager->MakeTube(Form(
"waterTube3%d_D4_H%d", 2, half),
mWater, 0.,
4737 mRWater, mLpartial4[itube] / 2.);
4738 rotation =
new TGeoRotation(
"rotation", -90., 0 - mAngle4[itube], 0.);
4741 -(mSupportXDimensions[4][0] / 2. + mMoreLength - xPos4[itube]),
4745 TGeoVolume* waterTorus2 = gGeoManager->MakeTorus(
4746 Form(
"waterTorus2%d_D4_H%d", itube, half),
mWater, mRadius4[itube], 0.,
4747 mRWater, 0., mAngle4[itube]);
4748 rotation =
new TGeoRotation(
"rotation", 180., 90., 0.);
4750 mRadius4[itube] + mXPosition4[itube] - mHalfDiskGap, 0.,
4751 -(mSupportXDimensions[4][0] / 2. + mMoreLength - mLWater4[itube]),
4755 TGeoVolume* waterTube4 =
4756 gGeoManager->MakeTube(Form(
"waterTube4%d_D4_H%d", itube, half),
mWater,
4757 0., mRWater, mLWater4[itube] / 2.);
4758 translation =
new TGeoTranslation(
4759 mXPosition4[itube] - mHalfDiskGap, 0.,
4760 -(mSupportXDimensions[4][0] / 2. + mMoreLength - mLWater4[itube] / 2.));
4761 cooling->AddNode(waterTube4, ivolume++, translation);
4768 for (Int_t itube = 0; itube < 4; itube++) {
4769 TGeoVolume* pipeTube1 =
4770 gGeoManager->MakeTube(Form(
"pipeTube1%d_D4_H%d", itube, half),
mPipe,
4771 mRWater, mRWater + mDRPipe, mLWater4[itube] / 2.);
4772 translation =
new TGeoTranslation(mXPosition4[itube] - mHalfDiskGap, 0.,
4773 mSupportXDimensions[4][0] / 2. +
4774 mMoreLength - mLWater4[itube] / 2.);
4775 cooling->AddNode(pipeTube1, ivolume++, translation);
4777 TGeoVolume* pipeTorus1 = gGeoManager->MakeTorus(
4778 Form(
"pipeTorus1%d_D4_H%d", itube, half),
mPipe, mRadius4[itube],
4779 mRWater, mRWater + mDRPipe, 0., mAngle4[itube]);
4780 rotation =
new TGeoRotation(
"rotation", 180., -90., 0.);
4782 mRadius4[itube] + mXPosition4[itube] - mHalfDiskGap, 0.,
4783 mSupportXDimensions[4][0] / 2. + mMoreLength - mLWater4[itube],
4787 TGeoVolume* pipeTube2 = gGeoManager->MakeTube(
4788 Form(
"pipeTube2%d_D4_H%d", itube, half),
mPipe, mRWater,
4789 mRWater + mDRPipe, mLpartial4[itube] / 2.);
4790 rotation =
new TGeoRotation(
"rotation", 90., 180 - mAngle4[itube], 0.);
4793 mRadius4[itube] * TMath::Sin(mAngle4[itube] * TMath::DegToRad()) +
4794 mLpartial4[itube] / 2 * TMath::Cos(mAngle4[itube] * TMath::DegToRad());
4796 mXPosition4[itube] - mHalfDiskGap +
4797 mRadius4[itube] * (1 - TMath::Cos(mAngle4[itube] * TMath::DegToRad())) +
4798 mLpartial4[itube] / 2 * TMath::Sin(mAngle4[itube] * TMath::DegToRad());
4801 mSupportXDimensions[4][0] / 2. + mMoreLength - xPos4[itube], rotation);
4804 mRadiusCentralTore[itube] =
4805 (mSupportXDimensions[4][0] / 2. + mMoreLength - xPos4[itube] -
4806 mLpartial4[itube] / 2 *
4807 TMath::Cos(mAngle4[itube] * TMath::DegToRad())) /
4808 TMath::Sin(mAngle4[itube] * TMath::DegToRad());
4809 TGeoVolume* pipeTorusCentral = gGeoManager->MakeTorus(
4810 Form(
"pipeTorusCentral%d_D4_H%d", itube, half),
mPipe,
4811 mRadiusCentralTore[itube], mRWater, mRWater + mDRPipe, -mAngle4[itube],
4812 2. * mAngle4[itube]);
4813 rotation =
new TGeoRotation(
"rotation", 0., 90., 0.);
4816 mLpartial4[itube] / 2 *
4817 TMath::Sin(mAngle4[itube] * TMath::DegToRad()) -
4818 mRadiusCentralTore[itube] *
4819 TMath::Cos(mAngle4[itube] * TMath::DegToRad()),
4823 TGeoVolume* pipeTube3 = gGeoManager->MakeTube(
4824 Form(
"pipeTube3%d_D4_H%d", 2, half),
mPipe, mRWater, mRWater + mDRPipe,
4825 mLpartial4[itube] / 2.);
4826 rotation =
new TGeoRotation(
"rotation", -90., 0 - mAngle4[itube], 0.);
4829 -(mSupportXDimensions[4][0] / 2. + mMoreLength - xPos4[itube]),
4833 TGeoVolume* pipeTorus2 = gGeoManager->MakeTorus(
4834 Form(
"pipeTorus2%d_D4_H%d", itube, half),
mPipe, mRadius4[itube],
4835 mRWater, mRWater + mDRPipe, 0., mAngle4[itube]);
4836 rotation =
new TGeoRotation(
"rotation", 180., 90., 0.);
4838 mRadius4[itube] + mXPosition4[itube] - mHalfDiskGap, 0.,
4839 -(mSupportXDimensions[4][0] / 2. + mMoreLength - mLWater4[itube]),
4843 TGeoVolume* pipeTube4 =
4844 gGeoManager->MakeTube(Form(
"pipeTube4%d_D4_H%d", itube, half),
mPipe,
4845 mRWater, mRWater + mDRPipe, mLWater4[itube] / 2.);
4846 translation =
new TGeoTranslation(
4847 mXPosition4[itube] - mHalfDiskGap, 0.,
4848 -(mSupportXDimensions[4][0] / 2. + mMoreLength - mLWater4[itube] / 2.));
4849 cooling->AddNode(pipeTube4, ivolume++, translation);
4853 Double_t deltaz = mHeatExchangerThickness -
4857 rotation =
new TGeoRotation(
"rotation", -90., 90., 0.);
4860 mZPlan[disk] + deltaz / 2. - mCarbonThickness - mRWater - mDRPipe -
4866 mZPlan[disk] - deltaz / 2. + mCarbonThickness + mRWater + mDRPipe +
4873 auto* carbonPlate =
new TGeoVolumeAssembly(Form(
"carbonPlate_D4_H%d", half));
4876 Double_t mReducedX = 0.;
4877 if (mftBaseParam.buildAlignment) {
4881 auto* carbonBase4 =
new TGeoBBox(
4882 Form(
"carbonBase4_D4_H%d", half),
4883 (mSupportXDimensions[disk][0]) / 2. + mMoreLength - mReducedX,
4884 (mSupportYDimensions[disk][0]) / 2., mCarbonThickness);
4885 auto* t41 =
new TGeoTranslation(
4886 "t41", 0., (mSupportYDimensions[disk][0]) / 2. + mHalfDiskGap, 0.);
4887 t41->RegisterYourself();
4890 new TGeoTubeSeg(Form(
"holeCarbon4_D4_H%d", half), 0., mRMin[disk],
4891 mCarbonThickness + 0.000001, 0, 180.);
4892 auto* t42 =
new TGeoTranslation(
"t42", 0., -mHalfDiskGap, 0.);
4893 t42->RegisterYourself();
4895 auto* carbonhole4 =
new TGeoSubtraction(carbonBase4, holeCarbon4, t41, t42);
4896 auto* cs4 =
new TGeoCompositeShape(Form(
"Carbon4_D4_H%d", half), carbonhole4);
4897 auto* carbonBaseWithHole4 =
4898 new TGeoVolume(Form(
"carbonBaseWithHole_D4_H%d", half), cs4,
mCarbon);
4900 carbonBaseWithHole4->SetLineColor(kGray + 3);
4901 rotation =
new TGeoRotation(
"rotation", 0., 0., 0.);
4903 carbonPlate->AddNode(carbonBaseWithHole4, 0,
4904 new TGeoTranslation(0., 0., mZPlan[disk]));
4906 Double_t ty = mSupportYDimensions[disk][0];
4908 for (Int_t ipart = 1; ipart < mNPart[disk]; ipart++) {
4909 ty += mSupportYDimensions[disk][ipart] / 2.;
4910 TGeoVolume* partCarbon = gGeoManager->MakeBox(
4911 Form(
"partCarbon_D4_H%d_%d", half, ipart),
mCarbon,
4912 mSupportXDimensions[disk][ipart] / 2.,
4913 mSupportYDimensions[disk][ipart] / 2., mCarbonThickness);
4914 partCarbon->SetLineColor(kGray + 3);
4915 auto* t =
new TGeoTranslation(
"t", 0, ty + mHalfDiskGap, mZPlan[disk]);
4916 carbonPlate->AddNode(partCarbon, ipart, t);
4917 ty += mSupportYDimensions[disk][ipart] / 2.;
4920 rotation =
new TGeoRotation(
"rotation", 180., 0., 0.);
4921 transformation =
new TGeoCombiTrans(0., 0., deltaz / 2., rotation);
4923 transformation =
new TGeoCombiTrans(0., 0., -deltaz / 2., rotation);
4928 TGeoMedium* mGlueRohacellCarbon = gGeoManager->GetMedium(
"MFT_Epoxy$");
4929 auto* glueRohacellCarbon =
4930 new TGeoVolumeAssembly(Form(
"glueRohacellCarbon_D0_H%d", half));
4931 auto* glueRohacellCarbonBase0 =
4932 new TGeoBBox(Form(
"glueRohacellCarbonBase0_D0_H%d", half),
4933 (mSupportXDimensions[disk][0]) / 2. - mReducedX,
4934 (mSupportYDimensions[disk][0]) / 2.,
4937 auto* translation_gluRC01 =
new TGeoTranslation(
4938 "translation_gluRC01", 0.,
4939 (mSupportYDimensions[disk][0]) / 2. + mHalfDiskGap, 0.);
4940 translation_gluRC01->RegisterYourself();
4941 auto* translation_gluRC02 =
4942 new TGeoTranslation(
"translation_gluRC02", 0., -mHalfDiskGap, 0.);
4943 translation_gluRC02->RegisterYourself();
4945 auto* holeglueRohacellCarbon0 =
new TGeoTubeSeg(
4946 Form(
"holeglueRohacellCarbon0_D0_H%d", half), 0., mRMin[disk],
4949 auto* glueRohacellCarbonhole0 =
4950 new TGeoSubtraction(glueRohacellCarbonBase0, holeglueRohacellCarbon0,
4951 translation_gluRC01, translation_gluRC02);
4952 auto* gRC0 =
new TGeoCompositeShape(Form(
"glueRohacellCarbon0_D0_H%d", half),
4953 glueRohacellCarbonhole0);
4954 auto* glueRohacellCarbonBaseWithHole0 =
4955 new TGeoVolume(Form(
"glueRohacellCarbonWithHole_D0_H%d", half), gRC0,
4956 mGlueRohacellCarbon);
4958 glueRohacellCarbonBaseWithHole0->SetLineColor(kGreen);
4959 rotation =
new TGeoRotation(
"rotation", 0., 0., 0.);
4961 glueRohacellCarbon->AddNode(glueRohacellCarbonBaseWithHole0, 0,
4962 new TGeoTranslation(0., 0., mZPlan[disk]));
4964 Double_t tyGRC = mSupportYDimensions[disk][0];
4966 for (Int_t ipart = 1; ipart < mNPart[disk]; ipart++) {
4967 tyGRC += mSupportYDimensions[disk][ipart] / 2.;
4968 TGeoVolume* partGlueRohacellCarbon = gGeoManager->MakeBox(
4969 Form(
"partGlueRohacellCarbon_D0_H%d_%d", half, ipart),
4970 mGlueRohacellCarbon, mSupportXDimensions[disk][ipart] / 2.,
4971 mSupportYDimensions[disk][ipart] / 2.,
4973 partGlueRohacellCarbon->SetLineColor(kGreen);
4974 auto* t =
new TGeoTranslation(
"t", 0, tyGRC + mHalfDiskGap, mZPlan[disk]);
4975 glueRohacellCarbon->AddNode(partGlueRohacellCarbon, ipart, t);
4976 tyGRC += mSupportYDimensions[disk][ipart] / 2.;
4979 rotation =
new TGeoRotation(
"rotation", 180., 0., 0.);
4986 -(deltaz / 2. - mCarbonThickness -
4993 TGeoMedium* mKaptonOnCarbon = gGeoManager->GetMedium(
"MFT_Kapton$");
4994 auto* kaptonOnCarbon =
4995 new TGeoVolumeAssembly(Form(
"kaptonOnCarbon_D0_H%d", half));
4996 auto* kaptonOnCarbonBase0 =
new TGeoBBox(
4997 Form(
"kaptonOnCarbonBase0_D0_H%d", half),
4998 (mSupportXDimensions[disk][0]) / 2. + mMoreLength - mReducedX,
5001 auto* translation_KC01 =
new TGeoTranslation(
5002 "translation_KC01", 0.,
5003 (mSupportYDimensions[disk][0]) / 2. + mHalfDiskGap, 0.);
5004 translation_KC01->RegisterYourself();
5005 auto* translation_KC02 =
5006 new TGeoTranslation(
"translation_KC02", 0., -mHalfDiskGap, 0.);
5007 translation_KC02->RegisterYourself();
5009 auto* holekaptonOnCarbon0 =
5010 new TGeoTubeSeg(Form(
"holekaptonOnCarbon0_D0_H%d", half), 0., mRMin[disk],
5013 auto* kaptonOnCarbonhole0 =
5014 new TGeoSubtraction(kaptonOnCarbonBase0, holekaptonOnCarbon0,
5015 translation_KC01, translation_KC02);
5016 auto* KC0 =
new TGeoCompositeShape(Form(
"kaptonOnCarbon_D0_H%d", half),
5017 kaptonOnCarbonhole0);
5018 auto* kaptonOnCarbonBaseWithHole0 =
new TGeoVolume(
5019 Form(
"kaptonOnCarbonWithHole_D0_H%d", half), KC0, mKaptonOnCarbon);
5021 kaptonOnCarbonBaseWithHole0->SetLineColor(kMagenta);
5022 rotation =
new TGeoRotation(
"rotation", 0., 0., 0.);
5024 kaptonOnCarbon->AddNode(kaptonOnCarbonBaseWithHole0, 0,
5025 new TGeoTranslation(0., 0., mZPlan[disk]));
5027 Double_t tyKC = mSupportYDimensions[disk][0];
5029 for (Int_t ipart = 1; ipart < mNPart[disk]; ipart++) {
5030 tyKC += mSupportYDimensions[disk][ipart] / 2.;
5031 TGeoVolume* partkaptonOnCarbonBase = gGeoManager->MakeBox(
5032 Form(
"partkaptonOnCarbon_D0_H%d_%d", half, ipart), mKaptonOnCarbon,
5033 mSupportXDimensions[disk][ipart] / 2.,
5034 mSupportYDimensions[disk][ipart] / 2.,
5036 partkaptonOnCarbonBase->SetLineColor(kMagenta);
5037 auto* t =
new TGeoTranslation(
"t", 0, tyKC + mHalfDiskGap, mZPlan[disk]);
5038 kaptonOnCarbon->AddNode(partkaptonOnCarbonBase, ipart, t);
5039 tyKC += mSupportYDimensions[disk][ipart] / 2.;
5042 rotation =
new TGeoRotation(
"rotation", 180., 0., 0.);
5058 TGeoMedium* mGlueKaptonCarbon = gGeoManager->GetMedium(
"MFT_Epoxy$");
5059 auto* glueKaptonCarbon =
5060 new TGeoVolumeAssembly(Form(
"glueKaptonCarbon_D0_H%d", half));
5061 auto* glueKaptonCarbonBase0 =
new TGeoBBox(
5062 Form(
"glueKaptonCarbonBase0_D0_H%d", half),
5063 (mSupportXDimensions[disk][0]) / 2. - mReducedX,
5066 auto* translation_gluKC01 =
new TGeoTranslation(
5067 "translation_gluKC01", 0.,
5068 (mSupportYDimensions[disk][0]) / 2. + mHalfDiskGap, 0.);
5069 translation_gluKC01->RegisterYourself();
5070 auto* translation_gluKC02 =
5071 new TGeoTranslation(
"translation_gluKC02", 0., -mHalfDiskGap, 0.);
5072 translation_gluKC02->RegisterYourself();
5074 auto* holeglueKaptonCarbon0 =
new TGeoTubeSeg(
5075 Form(
"holeglueKaptonCarbon0_D0_H%d", half), 0., mRMin[disk],
5078 auto* glueKaptonCarbonhole0 =
5079 new TGeoSubtraction(glueKaptonCarbonBase0, holeglueKaptonCarbon0,
5080 translation_gluKC01, translation_gluKC02);
5081 auto* gKC0 =
new TGeoCompositeShape(Form(
"glueKaptonCarbon0_D0_H%d", half),
5082 glueKaptonCarbonhole0);
5083 auto* glueKaptonCarbonBaseWithHole0 =
new TGeoVolume(
5084 Form(
"glueKaptonCarbonWithHole_D0_H%d", half), gKC0, mGlueKaptonCarbon);
5086 glueKaptonCarbonBaseWithHole0->SetLineColor(kGreen);
5087 rotation =
new TGeoRotation(
"rotation", 0., 0., 0.);
5089 glueKaptonCarbon->AddNode(glueKaptonCarbonBaseWithHole0, 0,
5090 new TGeoTranslation(0., 0., mZPlan[disk]));
5092 Double_t tyGKC = mSupportYDimensions[disk][0];
5094 for (Int_t ipart = 1; ipart < mNPart[disk]; ipart++) {
5095 tyGKC += mSupportYDimensions[disk][ipart] / 2.;
5096 TGeoVolume* partGlueKaptonCarbon = gGeoManager->MakeBox(
5097 Form(
"partGlueKaptonCarbon_D0_H%d_%d", half, ipart), mGlueKaptonCarbon,
5098 mSupportXDimensions[disk][ipart] / 2.,
5100 partGlueKaptonCarbon->SetLineColor(kGreen);
5101 auto* t =
new TGeoTranslation(
"t", 0, tyGKC + mHalfDiskGap, mZPlan[disk]);
5102 glueKaptonCarbon->AddNode(partGlueKaptonCarbon, ipart, t);
5103 tyGKC += mSupportYDimensions[disk][ipart] / 2.;
5106 rotation =
new TGeoRotation(
"rotation", 180., 0., 0.);
5119 auto* rohacellPlate =
5120 new TGeoVolumeAssembly(Form(
"rohacellPlate_D4_H%d", half));
5121 auto* rohacellBase4 =
new TGeoBBox(
5122 Form(
"rohacellBase4_D4_H%d", half), (mSupportXDimensions[disk][0]) / 2.,
5123 (mSupportYDimensions[disk][0]) / 2., mRohacellThickness);
5124 auto* holeRohacell4 =
5125 new TGeoTubeSeg(Form(
"holeRohacell4_D4_H%d", half), 0., mRMin[disk],
5126 mRohacellThickness + 0.000001, 0, 180.);
5130 Double_t diameter = 0.21;
5131 Double_t epsilon = 0.06;
5133 Double_t mPosition[5];
5134 TGeoCombiTrans* transfo[7][4];
5135 TGeoTube* grooveTube[8][4];
5136 TGeoTorus* grooveTorus[8][4];
5137 TGeoSubtraction* rohacellBaseGroove[300];
5138 TGeoCompositeShape* rohacellGroove[300];
5139 TGeoRotation* rotationTorus5[8];
5141 for (Int_t igroove = 0; igroove < 4; igroove++) {
5142 grooveTube[0][igroove] =
5143 new TGeoTube(
"linear", 0., diameter, mLWater4[igroove] / 2.);
5144 grooveTorus[1][igroove] =
new TGeoTorus(
"SideTorus", mRadius4[igroove], 0.,
5145 diameter, 0., mAngle4[igroove]);
5146 grooveTube[2][igroove] =
5147 new TGeoTube(
"tiltedLinear", 0., diameter, mLpartial4[igroove] / 2.);
5148 grooveTorus[3][igroove] =
5149 new TGeoTorus(
"centralTorus", mRadiusCentralTore[igroove], 0., diameter,
5150 -mAngle4[igroove], 2. * mAngle4[igroove]);
5151 grooveTube[4][igroove] =
5152 new TGeoTube(
"tiltedLinear", 0., diameter, mLpartial4[igroove] / 2.);
5153 grooveTorus[5][igroove] =
new TGeoTorus(
"SideTorus", mRadius4[igroove], 0.,
5154 diameter, 0., mAngle4[igroove]);
5155 grooveTube[6][igroove] =
5156 new TGeoTube(
"linear", 0., diameter, mLWater4[igroove] / 2.);
5160 TGeoRotation* rotationLinear =
new TGeoRotation(
"rotation", 90., 90., 0.);
5161 TGeoRotation* rotationSideTorusL =
5162 new TGeoRotation(
"rotationSideTorusLeft", -90., 0., 0.);
5163 TGeoRotation* rotationSideTorusR =
5164 new TGeoRotation(
"rotationSideTorusRight", 90., 180., 180.);
5165 TGeoRotation* rotationCentralTorus =
5166 new TGeoRotation(
"rotationCentralTorus", 90., 0., 0.);
5167 TGeoRotation* rotationTiltedLinearR;
5168 TGeoRotation* rotationTiltedLinearL;
5172 for (Int_t iface = 1; iface > -2; iface -= 2) {
5173 for (Int_t igroove = 0; igroove < 4; igroove++) {
5174 mPosition[igroove] = mXPosition4[igroove] -
5175 mSupportYDimensions[disk][0] / 2. - mHalfDiskGap - diameter / 2.;
5176 for (Int_t ip = 0; ip < 7; ip++) {
5180 transfo[ip][igroove] =
new TGeoCombiTrans(
5181 mSupportXDimensions[4][0] / 2. + mMoreLength -
5182 mLWater4[igroove] / 2.,
5183 mPosition[igroove], iface * (mRohacellThickness + epsilon),
5185 if (igroove == 0 && iface == 1) {
5186 rohacellBaseGroove[0] =
5187 new TGeoSubtraction(rohacellBase4, grooveTube[ip][igroove],
5188 nullptr, transfo[ip][igroove]);
5190 new TGeoCompositeShape(Form(
"rohacell4Groove%d_G%d_F%d_H%d",
5191 ip, igroove, iface, half),
5192 rohacellBaseGroove[0]);
5196 transfo[ip][igroove] =
new TGeoCombiTrans(
5197 mSupportXDimensions[4][0] / 2. + mMoreLength -
5199 mRadius4[igroove] + mXPosition4[igroove] -
5200 mSupportYDimensions[disk][0] / 2. - mHalfDiskGap - diameter / 2.,
5201 iface * (mRohacellThickness + epsilon), rotationSideTorusR);
5204 rotationTiltedLinearR =
new TGeoRotation(
5205 "rotationTiltedLinearRight", 90. - mAngle4[igroove], 90., 0.);
5206 transfo[ip][igroove] =
new TGeoCombiTrans(
5207 mSupportXDimensions[4][0] / 2. + mMoreLength - xPos4[igroove],
5208 yPos4[igroove] - mSupportYDimensions[disk][0] / 2. -
5210 iface * (mRohacellThickness + epsilon), rotationTiltedLinearR);
5213 transfo[ip][igroove] =
new TGeoCombiTrans(
5216 mLpartial4[igroove] / 2 *
5217 TMath::Sin(mAngle4[igroove] * TMath::DegToRad()) -
5218 mRadiusCentralTore[igroove] *
5219 TMath::Cos(mAngle4[igroove] * TMath::DegToRad()) -
5220 mSupportYDimensions[disk][0] / 2. - mHalfDiskGap,
5221 iface * (mRohacellThickness + epsilon), rotationCentralTorus);
5224 rotationTiltedLinearL =
new TGeoRotation(
5225 "rotationTiltedLinearLeft", 90. + mAngle4[igroove], 90., 0.);
5226 transfo[ip][igroove] =
new TGeoCombiTrans(
5227 -(mSupportXDimensions[4][0] / 2. + mMoreLength -
5229 yPos4[igroove] - mSupportYDimensions[disk][0] / 2. -
5231 iface * (mRohacellThickness + epsilon), rotationTiltedLinearL);
5234 transfo[ip][igroove] =
new TGeoCombiTrans(
5235 -(mSupportXDimensions[4][0] / 2. + mMoreLength -
5237 mRadius4[igroove] + mPosition[igroove],
5238 iface * (mRohacellThickness + epsilon), rotationSideTorusL);
5241 transfo[ip][igroove] =
new TGeoCombiTrans(
5242 -(mSupportXDimensions[4][0] / 2. + mMoreLength -
5243 mLWater4[igroove] / 2.),
5244 mPosition[igroove], iface * (mRohacellThickness + epsilon),
5249 if (!(ip == 0 && igroove == 0 && iface == 1)) {
5251 rohacellBaseGroove[iCount] =
new TGeoSubtraction(
5252 rohacellGroove[iCount - 1], grooveTorus[ip][igroove],
nullptr,
5253 transfo[ip][igroove]);
5255 rohacellBaseGroove[iCount] =
new TGeoSubtraction(
5256 rohacellGroove[iCount - 1], grooveTube[ip][igroove],
nullptr,
5257 transfo[ip][igroove]);
5259 rohacellGroove[iCount] =
5260 new TGeoCompositeShape(Form(
"rohacell4Groove%d_G%d_F%d_H%d",
5261 iCount, igroove, iface, half),
5262 rohacellBaseGroove[iCount]);
5272 TGeoBoolNode* rohacellBase;
5274 rohacellBase =
new TGeoSubtraction(rohacellBase4, holeRohacell4, t41, t42);
5277 rohacellBase =
new TGeoSubtraction(rohacellGroove[iCount - 1],
5278 holeRohacell4, t41, t42);
5280 auto* rh4 =
new TGeoCompositeShape(Form(
"rohacellTore%d_D4_H%d", 0, half),
5282 auto* rohacellBaseWithHole =
5283 new TGeoVolume(Form(
"rohacellBaseWithHole_D4_H%d", half), rh4,
mRohacell);
5285 TGeoVolume* partRohacell;
5286 rohacellBaseWithHole->SetLineColor(kGray);
5287 rotation =
new TGeoRotation(
"rotation", 0., 0., 0.);
5289 rohacellPlate->AddNode(rohacellBaseWithHole, 0,
5290 new TGeoTranslation(0., 0., mZPlan[disk]));
5292 ty = mSupportYDimensions[disk][0];
5294 for (Int_t ipart = 1; ipart < mNPart[disk]; ipart++) {
5295 ty += mSupportYDimensions[disk][ipart] / 2.;
5296 auto* t =
new TGeoTranslation(
"t", 0, ty + mHalfDiskGap, mZPlan[disk]);
5300 auto* partRohacell0 =
5301 new TGeoBBox(Form(
"rohacellBase0_D4_H%d_%d", half, ipart),
5302 mSupportXDimensions[disk][ipart] / 2.,
5303 mSupportYDimensions[disk][ipart] / 2., mRohacellThickness);
5309 for (Int_t iface = 1; iface > -2; iface -= 2) {
5310 for (Int_t igroove = 0; igroove < 4; igroove++) {
5313 mXPosition4[igroove] - mSupportYDimensions[disk][ipart] / 2. -
5314 mHalfDiskGap - mSupportYDimensions[disk][ipart - 1];
5315 mShift = -mSupportYDimensions[disk][ipart - 1];
5319 mXPosition4[igroove] - mSupportYDimensions[disk][ipart] / 2. -
5320 mHalfDiskGap - mSupportYDimensions[disk][ipart - 1] -
5321 mSupportYDimensions[disk][ipart - 2];
5322 mShift = -mSupportYDimensions[disk][ipart - 1] -
5323 mSupportYDimensions[disk][ipart - 2];
5327 mXPosition4[igroove] - mSupportYDimensions[disk][ipart] / 2. -
5328 mHalfDiskGap - mSupportYDimensions[disk][ipart - 1] -
5329 mSupportYDimensions[disk][ipart - 2] -
5330 mSupportYDimensions[disk][ipart - 3];
5331 mShift = -mSupportYDimensions[disk][ipart - 1] -
5332 mSupportYDimensions[disk][ipart - 2] -
5333 mSupportYDimensions[disk][ipart - 3];
5336 for (Int_t ip = 0; ip < 7; ip++) {
5340 transfo[ip][igroove] =
new TGeoCombiTrans(
5341 mSupportXDimensions[4][0] / 2. + mMoreLength -
5342 mLWater4[igroove] / 2.,
5343 mPosition[ipart], iface * (mRohacellThickness + epsilon),
5345 if (igroove == 0 && iface == 1) {
5346 rohacellBaseGroove[iCount] =
5347 new TGeoSubtraction(partRohacell0, grooveTube[ip][igroove],
5348 nullptr, transfo[ip][igroove]);
5349 rohacellGroove[iCount] =
5350 new TGeoCompositeShape(Form(
"rohacell4Groove%d_G%d_F%d_H%d",
5351 ip, igroove, iface, half),
5352 rohacellBaseGroove[iCount]);
5356 transfo[ip][igroove] =
new TGeoCombiTrans(
5357 mSupportXDimensions[4][0] / 2. + mMoreLength -
5359 mPosition[ipart] + mRadius4[igroove] - diameter / 2.,
5360 iface * (mRohacellThickness + epsilon), rotationSideTorusR);
5363 rotationTiltedLinearR =
new TGeoRotation(
5364 "rotationTiltedLinearRight", 90. - mAngle4[igroove], 90., 0.);
5365 transfo[ip][igroove] =
new TGeoCombiTrans(
5366 mSupportXDimensions[4][0] / 2. + mMoreLength - xPos4[igroove],
5367 yPos4[igroove] + mShift - mHalfDiskGap -
5368 mSupportYDimensions[disk][ipart] / 2.,
5369 iface * (mRohacellThickness + epsilon),
5370 rotationTiltedLinearR);
5373 transfo[ip][igroove] =
new TGeoCombiTrans(
5375 mPosition[ipart] + yPos4[igroove] +
5376 mLpartial4[igroove] / 2 *
5377 TMath::Sin(mAngle4[igroove] * TMath::DegToRad()) -
5378 mRadiusCentralTore[igroove] *
5379 TMath::Cos(mAngle4[igroove] * TMath::DegToRad()) -
5380 mXPosition4[igroove],
5381 iface * (mRohacellThickness + epsilon), rotationCentralTorus);
5384 rotationTiltedLinearL =
new TGeoRotation(
5385 "rotationTiltedLinearLeft", 90. + mAngle4[igroove], 90., 0.);
5386 transfo[ip][igroove] =
new TGeoCombiTrans(
5387 -(mSupportXDimensions[4][0] / 2. + mMoreLength -
5389 yPos4[igroove] + mPosition[ipart] - mXPosition4[igroove],
5390 iface * (mRohacellThickness + epsilon),
5391 rotationTiltedLinearL);
5394 transfo[ip][igroove] =
new TGeoCombiTrans(
5395 -(mSupportXDimensions[4][0] / 2. + mMoreLength -
5397 mRadius4[igroove] + mPosition[ipart] - diameter / 2.,
5398 iface * (mRohacellThickness + epsilon), rotationSideTorusL);
5401 transfo[ip][igroove] =
new TGeoCombiTrans(
5402 -(mSupportXDimensions[4][0] / 2. + mMoreLength -
5403 mLWater4[igroove] / 2.),
5404 mPosition[ipart], iface * (mRohacellThickness + epsilon),
5408 if (!(ip == 0 && igroove == 0 && iface == 1)) {
5410 rohacellBaseGroove[iCount] =
new TGeoSubtraction(
5411 rohacellGroove[iCount - 1], grooveTorus[ip][igroove],
5412 nullptr, transfo[ip][igroove]);
5414 rohacellBaseGroove[iCount] =
new TGeoSubtraction(
5415 rohacellGroove[iCount - 1], grooveTube[ip][igroove],
5416 nullptr, transfo[ip][igroove]);
5419 rohacellGroove[iCount] =
5420 new TGeoCompositeShape(Form(
"rohacell4Groove%d_G%d_F%d_H%d",
5421 iCount, igroove, iface, half),
5422 rohacellBaseGroove[iCount]);
5431 TGeoVolume* partRohacellNotch;
5432 TGeoSubtraction* partRohacellini;
5433 TGeoBBox* notchRohacell0;
5434 TGeoTranslation* tnotch0;
5435 Double_t xnotch, ynotch;
5438 if (ipart == (mNPart[disk] - 1)) {
5439 notchRohacell0 =
new TGeoBBox(Form(
"notchRohacell0_D4_H%d", half), xnotch,
5440 ynotch, mRohacellThickness + 0.000001);
5441 tnotch0 =
new TGeoTranslation(
"tnotch0", 0.,
5442 mSupportYDimensions[disk][ipart] / 2., 0.);
5443 tnotch0->RegisterYourself();
5448 if (ipart == (mNPart[disk] - 1)) {
5449 partRohacellini =
new TGeoSubtraction(partRohacell0, notchRohacell0,
5451 auto* rhinit =
new TGeoCompositeShape(Form(
"rhinit%d_D4_H%d", 0, half),
5453 partRohacell =
new TGeoVolume(
5454 Form(
"partRohacelli_D4_H%d_%d", half, ipart), rhinit,
mRohacell);
5456 if (ipart < (mNPart[disk] - 1)) {
5458 new TGeoVolume(Form(
"partRohacelli_D4_H%d_%d", half, ipart),
5463 if (ipart == (mNPart[disk] - 1)) {
5464 partRohacellini =
new TGeoSubtraction(rohacellGroove[iCount - 1],
5465 notchRohacell0,
nullptr, tnotch0);
5466 auto* rhinit =
new TGeoCompositeShape(Form(
"rhinit%d_D4_H%d", 0, half),
5468 partRohacell =
new TGeoVolume(
5469 Form(
"partRohacelli_D4_H%d_%d", half, ipart), rhinit,
mRohacell);
5471 if (ipart < (mNPart[disk] - 1)) {
5473 new TGeoVolume(Form(
"partRohacelli_D4_H%d_%d", half, ipart),
5479 partRohacell->SetLineColor(kGray);
5480 rohacellPlate->AddNode(partRohacell, ipart, t);
5484 if (ipart == (mNPart[disk] - 1)) {
5485 TGeoTranslation* tinsert4;
5486 TGeoVolume* insert4 =
5487 gGeoManager->MakeBox(Form(
"insert4_H%d_%d", half, ipart),
mPeek,
5488 4.0 / 2., 0.44 / 2., mRohacellThickness);
5489 Double_t ylocation =
5490 mSupportYDimensions[disk][0] + mHalfDiskGap + 0.44 / 2. - ynotch;
5491 for (Int_t ip = 1; ip < mNPart[disk]; ip++) {
5492 ylocation = ylocation + mSupportYDimensions[disk][ip];
5494 tinsert4 =
new TGeoTranslation(
"tinsert4", 0., -ylocation, 0.);
5495 tinsert4->RegisterYourself();
5496 mHalfDisk->AddNode(insert4, 0., tinsert4);
5499 ty += mSupportYDimensions[disk][ipart] / 2.;
5502 rotation =
new TGeoRotation(
"rotation", 180., 0., 0.);
5513 mPipe = gGeoManager->GetMedium(
"MFT_Polyurethane$");
5514 mWater = gGeoManager->GetMedium(
"MFT_Water$");
5519 TGeoVolume* Tube1 =
nullptr;
5520 TGeoVolume* Torus1 =
nullptr;
5521 TGeoVolume* TubeW1 =
nullptr;
5522 TGeoVolume* TorusW1 =
nullptr;
5523 TGeoRotation* rTorus1 =
nullptr;
5524 TGeoCombiTrans* transfoTorus1 =
nullptr;
5527 if (disk == 0 || disk == 1 || disk == 2) {
5528 auto* mCoolingPipe1 =
5529 new TGeoVolumeAssembly(Form(
"cooling_pipe1_H%d", half));
5530 auto* mCoolingPipeRear1 =
5531 new TGeoVolumeAssembly(Form(
"cooling_pipeRear1_H%d", half));
5532 auto* mCoolingPipeRear2 =
5533 new TGeoVolumeAssembly(Form(
"cooling_pipeRear2_H%d", half));
5543 Tube1 = gGeoManager->MakeTube(Form(
"Tube1_H%d_D%d", half, disk),
mPipe, rin,
5545 TubeW1 = gGeoManager->MakeTube(Form(
"TubeW1_H%d_D%d", half, disk),
mWater,
5546 0., rin, length1 / 2);
5547 TGeoTranslation* tTube1 =
new TGeoTranslation(0.0, 0.0, 0.0);
5548 tTube1->RegisterYourself();
5551 Torus1 = gGeoManager->MakeTorus(Form(
"Torus1_H%d_D%d", half, disk),
mPipe,
5552 radius1, rin, rout, 0., 90.);
5553 TorusW1 = gGeoManager->MakeTorus(Form(
"TorusW1_H%d_D%d", half, disk),
5554 mWater, radius1, 0., rin, 0., 90.);
5555 rTorus1 =
new TGeoRotation(
"rotationTorus1", 0.0, 90.0, 0.0);
5556 rTorus1->RegisterYourself();
5557 transfoTorus1 =
new TGeoCombiTrans(-radius1, 0., length1 / 2, rTorus1);
5558 transfoTorus1->RegisterYourself();
5569 TGeoVolume* Tube2 = gGeoManager->MakeTube(Form(
"Tube2_H%d_D%d", half, disk),
5570 mPipe, rin, rout, length2 / 2);
5571 TGeoVolume* TubeW2 = gGeoManager->MakeTube(
5572 Form(
"TubeW2_H%d_D%d", half, disk),
mWater, 0., rin, length2 / 2);
5573 TGeoRotation* rTube2 =
new TGeoRotation(
"rotationTube2", 90.0, 90.0, 0.0);
5574 rTube2->RegisterYourself();
5575 TGeoCombiTrans* transfoTube2 =
new TGeoCombiTrans(
5576 -length2 / 2 - radius1, 0., length1 / 2 + radius1, rTube2);
5577 transfoTube2->RegisterYourself();
5583 TGeoVolume* Torus2 =
5584 gGeoManager->MakeTorus(Form(
"Torus2_H%d_D%d", half, disk),
mPipe,
5585 radius2, rin, rout, 0., -90.);
5586 TGeoVolume* TorusW2 =
5587 gGeoManager->MakeTorus(Form(
"TorusW2_H%d_D%d", half, disk),
mWater,
5588 radius2, 0., rin, 0., -90.);
5589 TGeoRotation* rTorus2 =
new TGeoRotation(
"rotationTorus2", 180.0, 0.0, 0.0);
5590 rTorus2->RegisterYourself();
5591 TGeoCombiTrans* transfoTorus2 =
new TGeoCombiTrans(
5592 -length2 - radius1, -radius2, length1 / 2 + radius1, rTorus2);
5593 transfoTorus2->RegisterYourself();
5605 TGeoVolume* Tube3 = gGeoManager->MakeTube(Form(
"Tube3_H%d_D%d", half, disk),
5606 mPipe, rin, rout, length3 / 2);
5607 TGeoVolume* TubeW3 = gGeoManager->MakeTube(
5608 Form(
"TubeW3_H%d_D%d", half, disk),
mWater, 0., rin, length3 / 2);
5609 TGeoRotation* rTube3 =
new TGeoRotation(
"rotationTube3", 0.0, -90.0, 0.0);
5610 rTube3->RegisterYourself();
5611 TGeoCombiTrans* transfoTube3 =
5612 new TGeoCombiTrans(-length2 - radius2 - radius1, -radius2 - length3 / 2,
5613 length1 / 2 + radius1, rTube3);
5614 transfoTube3->RegisterYourself();
5620 TGeoVolume* Tube4 = gGeoManager->MakeTube(Form(
"Tube4_H%d_D%d", half, disk),
5621 mPipe, rin4, rout4, length4 / 2);
5622 TGeoVolume* TubeW4 = gGeoManager->MakeTube(
5623 Form(
"TubeW4_H%d_D%d", half, disk),
mWater, 0., rin4, length4 / 2);
5626 TGeoRotation* rTube4 =
5627 new TGeoRotation(
"rotationTube4", 90.0 + theta4, 90.0 + phi4, 0.0);
5628 rTube4->RegisterYourself();
5631 Float_t xTube4 = length1 / 2. + radius1 +
5632 TMath::Cos(theta4 * TMath::DegToRad()) *
5633 TMath::Sin(phi4 * TMath::DegToRad()) * length4 / 2 *
5635 Float_t yTube4 = -radius2 - length3 -
5636 TMath::Sin(theta4 * TMath::DegToRad()) * length4 / 2 * 0.8;
5637 Float_t zTube4 = -radius1 - length2 - radius2 -
5638 TMath::Cos(theta4 * TMath::DegToRad()) *
5639 TMath::Cos(phi4 * TMath::DegToRad()) * length4 / 2 *
5642 TGeoCombiTrans* transfoTube4 =
5643 new TGeoCombiTrans(zTube4, yTube4 - 0.2, xTube4 - 0.1, rTube4);
5644 transfoTube4->RegisterYourself();
5647 Double_t theta = 180. * TMath::Pi() / 180.;
5648 Double_t phi = 0. * TMath::Pi() / 180.;
5650 nlow[0] = TMath::Sin(theta) * TMath::Cos(phi);
5651 nlow[1] = TMath::Sin(theta) * TMath::Sin(phi);
5652 nlow[2] = TMath::Cos(theta);
5653 theta = 15. * TMath::Pi() / 180.;
5654 phi = -90. * TMath::Pi() / 180.;
5656 nhi[0] = TMath::Sin(theta) * TMath::Cos(phi);
5657 nhi[1] = TMath::Sin(theta) * TMath::Sin(phi);
5658 nhi[2] = TMath::Cos(theta);
5661 TGeoVolume* Tube5 = gGeoManager->MakeCtub(
5662 Form(
"Tube5_H%d_D%d", half, disk),
mPipe, rin5, rout5, length5 / 2, 0.,
5663 360., nlow[0], nlow[1], nlow[2], nhi[0], nhi[1], nhi[2]);
5664 TGeoVolume* TubeW5 = gGeoManager->MakeCtub(
5665 Form(
"TubeW5_H%d_D%d", half, disk),
mWater, 0., rin5, length5 / 2, 0.,
5666 360., nlow[0], nlow[1], nlow[2], nhi[0], nhi[1], nhi[2]);
5669 TGeoRotation* rTube5 =
5670 new TGeoRotation(
"rotationTube5", 90.0 + theta5, 90.0 + phi5, 0.0);
5671 rTube5->RegisterYourself();
5673 TMath::Cos(theta4 * TMath::DegToRad()) *
5674 TMath::Sin(phi4 * TMath::DegToRad()) * length4 / 2 +
5675 TMath::Cos(theta5 * TMath::DegToRad()) *
5676 TMath::Sin(phi5 * TMath::DegToRad()) * length5 / 2 *
5679 yTube4 - TMath::Sin(theta4 * TMath::DegToRad()) * length4 / 2 -
5680 TMath::Sin(theta5 * TMath::DegToRad()) * length5 / 2 * 1.03 + 0.2;
5682 TMath::Cos(theta4 * TMath::DegToRad()) *
5683 TMath::Cos(phi4 * TMath::DegToRad()) * length4 / 2 -
5684 TMath::Cos(theta5 * TMath::DegToRad()) *
5685 TMath::Cos(phi5 * TMath::DegToRad()) * length5 / 2 *
5687 TGeoCombiTrans* transfoTube5 =
5688 new TGeoCombiTrans(zTube5, yTube5, xTube5, rTube5);
5689 transfoTube5->RegisterYourself();
5691 Tube1->SetLineColor(kGray);
5692 Torus1->SetLineColor(kGray);
5693 Tube2->SetLineColor(kGray);
5694 Torus2->SetLineColor(kGray);
5695 Tube3->SetLineColor(kGray);
5696 Tube4->SetLineColor(kGray);
5697 Tube5->SetLineColor(kGray);
5698 TubeW3->SetLineColor(kBlue);
5699 TubeW4->SetLineColor(kBlue);
5700 TubeW5->SetLineColor(kBlue);
5702 mCoolingPipe1->AddNode(Tube1, 1, tTube1);
5703 mCoolingPipe1->AddNode(Torus1, 1, transfoTorus1);
5704 mCoolingPipe1->AddNode(Tube2, 1, transfoTube2);
5705 mCoolingPipe1->AddNode(Torus2, 1, transfoTorus2);
5706 mCoolingPipe1->AddNode(Tube3, 1, transfoTube3);
5707 mCoolingPipe1->AddNode(TubeW1, 1, tTube1);
5708 mCoolingPipe1->AddNode(TorusW1, 1, transfoTorus1);
5709 mCoolingPipe1->AddNode(TubeW2, 1, transfoTube2);
5710 mCoolingPipe1->AddNode(TorusW2, 1, transfoTorus2);
5711 mCoolingPipe1->AddNode(TubeW3, 1, transfoTube3);
5714 mCoolingPipeRear1->AddNode(Tube4, 1, transfoTube4);
5715 mCoolingPipeRear1->AddNode(Tube5, 1, transfoTube5);
5716 mCoolingPipeRear1->AddNode(TubeW4, 1, transfoTube4);
5717 mCoolingPipeRear1->AddNode(TubeW5, 1, transfoTube5);
5721 auto* mCoolingPipe2 =
5722 new TGeoVolumeAssembly(Form(
"cooling_pipe2_H%d_D%d", half, disk));
5723 TGeoVolume* Tube1p = gGeoManager->MakeTube(
5724 Form(
"Tube1p_H%d_D%d", half, disk),
mPipe, rin, rout, length1 / 2);
5725 TGeoVolume* TubeW1p = gGeoManager->MakeTube(
5726 Form(
"TubeW1p_H%d_D%d", half, disk),
mWater, 0., rin, length1 / 2);
5728 TGeoVolume* Torus1p =
5729 gGeoManager->MakeTorus(Form(
"Torus1p_H%d_D%d", half, disk),
mPipe,
5730 radius1, rin, rout, 0., 90.);
5731 TGeoVolume* TorusW1p =
5732 gGeoManager->MakeTorus(Form(
"TorusW1p_H%d_D%d", half, disk),
mWater,
5733 radius1, 0., rin, 0., 90.);
5735 TGeoVolume* Tube2p = gGeoManager->MakeTube(
5736 Form(
"Tube2p_H%d_D%d", half, disk),
mPipe, rin, rout, length2 / 2);
5737 TGeoVolume* TubeW2p = gGeoManager->MakeTube(
5738 Form(
"TubeW2p_H%d_D%d", half, disk),
mWater, 0., rin, length2 / 2);
5740 TGeoVolume* Torus2p =
5741 gGeoManager->MakeTorus(Form(
"Torus2p_H%d_D%d", half, disk),
mPipe,
5742 radius2, rin, rout, 0., 90.);
5743 TGeoVolume* TorusW2p =
5744 gGeoManager->MakeTorus(Form(
"TorusW2p_H%d_D%d", half, disk),
mWater,
5745 radius2, 0., rin, 0., 90.);
5747 TGeoVolume* Tube3p = gGeoManager->MakeTube(
5748 Form(
"Tube3p_H%d_D%d", half, disk),
mPipe, rin, rout, length3 / 2);
5749 TGeoVolume* TubeW3p = gGeoManager->MakeTube(
5750 Form(
"TubeW3p_H%d_D%d", half, disk),
mWater, 0., rin, length3 / 2);
5752 TGeoRotation* rTorus2p =
5753 new TGeoRotation(
"rotationTorus2p", 180.0, 0.0, 0.0);
5754 rTorus2p->RegisterYourself();
5755 TGeoCombiTrans* transfoTorus2p =
new TGeoCombiTrans(
5756 -length2 - radius1, radius2, length1 / 2 + radius1, rTorus2p);
5757 transfoTorus2p->RegisterYourself();
5758 TGeoCombiTrans* transfoTube3p =
5759 new TGeoCombiTrans(-length2 - radius2 - radius1, radius2 + length3 / 2,
5760 length1 / 2 + radius1, rTube3);
5761 transfoTube3p->RegisterYourself();
5762 TGeoRotation* rTube4p =
5763 new TGeoRotation(Form(
"rotationTube4p_H%d_D%d", half, disk),
5764 90.0 - theta4, phi4 - 90.0, 0.0);
5765 rTube4p->RegisterYourself();
5767 TGeoCombiTrans* transfoTube4p =
5768 new TGeoCombiTrans(zTube4, -yTube4 + 0.2, xTube4 - 0.1, rTube4p);
5769 transfoTube4p->RegisterYourself();
5771 Tube1p->SetLineColor(kGray);
5772 Torus1p->SetLineColor(kGray);
5773 Tube2p->SetLineColor(kGray);
5774 Torus2p->SetLineColor(kGray);
5775 Tube3p->SetLineColor(kGray);
5776 TubeW3p->SetLineColor(kBlue);
5778 mCoolingPipe2->AddNode(Tube1p, 1, tTube1);
5779 mCoolingPipe2->AddNode(Torus1p, 1, transfoTorus1);
5780 mCoolingPipe2->AddNode(Tube2p, 1, transfoTube2);
5781 mCoolingPipe2->AddNode(Torus2p, 1, transfoTorus2p);
5782 mCoolingPipe2->AddNode(Tube3p, 1, transfoTube3p);
5783 mCoolingPipe2->AddNode(TubeW1p, 1, tTube1);
5784 mCoolingPipe2->AddNode(TorusW1p, 1, transfoTorus1);
5785 mCoolingPipe2->AddNode(TubeW2p, 1, transfoTube2);
5786 mCoolingPipe2->AddNode(TorusW2p, 1, transfoTorus2p);
5787 mCoolingPipe2->AddNode(TubeW3p, 1, transfoTube3p);
5791 TGeoVolume* Tube4p = gGeoManager->MakeTube(
5792 Form(
"Tube4p_H%d_D%d", half, disk),
mPipe, rin4, rout4, length4 / 2);
5793 TGeoVolume* TubeW4p = gGeoManager->MakeTube(
5794 Form(
"TubeW4p_H%d_D%d", half, disk),
mWater, 0., rin4, length4 / 2);
5795 Tube4p->SetLineColor(kGray);
5796 TubeW4p->SetLineColor(kBlue);
5798 mCoolingPipeRear2->AddNode(Tube4p, 1, transfoTube4p);
5799 mCoolingPipeRear2->AddNode(TubeW4p, 1, transfoTube4p);
5800 theta = 180. * TMath::Pi() / 180.;
5801 phi = 0. * TMath::Pi() / 180.;
5802 nlow[0] = TMath::Sin(theta) * TMath::Cos(phi);
5803 nlow[1] = TMath::Sin(theta) * TMath::Sin(phi);
5804 nlow[2] = TMath::Cos(theta);
5805 theta = -15. * TMath::Pi() / 180.;
5806 phi = 270. * TMath::Pi() / 180.;
5807 nhi[0] = TMath::Sin(theta) * TMath::Cos(phi);
5808 nhi[1] = TMath::Sin(theta) * TMath::Sin(phi);
5809 nhi[2] = TMath::Cos(theta);
5810 TGeoVolume* Tube5p = gGeoManager->MakeCtub(
5811 Form(
"Tube5p_H%d_D%d", half, disk),
mPipe, rin5, rout5, length5 / 2,
5812 0., 360., nlow[0], nlow[1], nlow[2], nhi[0], nhi[1], nhi[2]);
5813 TGeoVolume* TubeW5p = gGeoManager->MakeCtub(
5814 Form(
"TubeW5p_H%d_D%d", half, disk),
mWater, 0., rin5, length5 / 2,
5815 0., 360., nlow[0], nlow[1], nlow[2], nhi[0], nhi[1], nhi[2]);
5816 TGeoRotation* rTube5p =
new TGeoRotation(
"rotationTube5p", -90.0 - theta5,
5817 -(90.0 + phi5), 0.0);
5818 rTube5p->RegisterYourself();
5819 TGeoCombiTrans* transfoTube5p;
5820 transfoTube5p =
new TGeoCombiTrans(zTube5, -yTube5, xTube5, rTube5p);
5821 transfoTube5p->RegisterYourself();
5822 Tube5p->SetLineColor(kGray);
5823 TubeW5p->SetLineColor(kBlue);
5824 mCoolingPipeRear2->AddNode(Tube5p, 1, transfoTube5p);
5825 mCoolingPipeRear2->AddNode(TubeW5p, 1, transfoTube5p);
5827 TGeoCombiTrans* transfoCoolingPipe1 =
nullptr;
5828 TGeoCombiTrans* transfoCoolingPipe2 =
nullptr;
5829 TGeoCombiTrans* transfoCoolingPipeRear1 =
nullptr;
5830 TGeoCombiTrans* transfoCoolingPipeRear2 =
nullptr;
5832 TGeoRotation* rotation1 =
new TGeoRotation(
"rotation1", 90., 90., 90.);
5833 rotation1->RegisterYourself();
5835 transfoCoolingPipe1 =
5836 new TGeoCombiTrans(13.8 + length1 / 2, 0.75, 0.0, rotation1);
5837 transfoCoolingPipe1->RegisterYourself();
5838 transfoCoolingPipeRear1 =
5839 new TGeoCombiTrans(13.8 + length1 / 2, 0.75, 0.0, rotation1);
5840 transfoCoolingPipeRear1->RegisterYourself();
5841 TGeoRotation* rotation2 =
new TGeoRotation(
"rotation2", 90., 90., 90.);
5842 rotation2->RegisterYourself();
5843 transfoCoolingPipe2 =
5844 new TGeoCombiTrans(13.8 + length1 / 2, -0.75, 0.0, rotation2);
5845 transfoCoolingPipe2->RegisterYourself();
5846 transfoCoolingPipeRear2 =
5847 new TGeoCombiTrans(13.8 + length1 / 2, -0.75, 0.0, rotation2);
5848 transfoCoolingPipeRear2->RegisterYourself();
5849 mHalfDisk->AddNode(mCoolingPipe1, 1, transfoCoolingPipe1);
5850 mHalfDisk->AddNode(mCoolingPipeRear1, 1, transfoCoolingPipeRear1);
5851 mHalfDisk->AddNode(mCoolingPipe2, 1, transfoCoolingPipe2);
5852 mHalfDisk->AddNode(mCoolingPipeRear2, 1, transfoCoolingPipeRear2);
5859 auto* mCoolingPipe3 =
5860 new TGeoVolumeAssembly(Form(
"cooling_pipe3_H%d_D%d", half, disk));
5862 TGeoVolume* Tube1_3 = gGeoManager->MakeTube(
5863 Form(
"Tube1_3_H%d_D%d", half, disk),
mPipe, rin, rout, length1_3 / 2);
5864 TGeoVolume* TubeW1_3 = gGeoManager->MakeTube(
5865 Form(
"TubeW1_3_H%d_D%d", half, disk),
mWater, 0., rin, length1_3 / 2);
5866 TGeoTranslation* tTube1_3 =
new TGeoTranslation(0.0, 0.0, 0.0);
5867 tTube1_3->RegisterYourself();
5869 TGeoVolume* Torus1_3 =
5870 gGeoManager->MakeTorus(Form(
"Torus1_3_H%d_D%d", half, disk),
mPipe,
5871 radius1_3, rin, rout, 0., 90.);
5872 TGeoVolume* TorusW1_3 =
5873 gGeoManager->MakeTorus(Form(
"TorusW1_3_H%d_D%d", half, disk),
mWater,
5874 radius1_3, 0., rin, 0., 90.);
5875 TGeoRotation* rTorus1_3 =
5876 new TGeoRotation(
"rotationTorus1_3", 90.0, 90.0, 0.0);
5877 rTorus1_3->RegisterYourself();
5878 TGeoCombiTrans* transfoTorus1_3 =
5879 new TGeoCombiTrans(0.0, -radius1_3, length1_3 / 2, rTorus1_3);
5880 transfoTorus1_3->RegisterYourself();
5886 TGeoVolume* Tube2_3 = gGeoManager->MakeTube(
5887 Form(
"Tube2_3_H%d_D%d", half, disk),
mPipe, rin, rout, length2_3 / 2);
5888 TGeoVolume* TubeW2_3 = gGeoManager->MakeTube(
5889 Form(
"TubeW2_3_H%d_D%d", half, disk),
mWater, 0., rin, length2_3 / 2);
5890 TGeoRotation* rTube2_3 =
5891 new TGeoRotation(
"rotationTube2_3", 180.0, 90.0, 90.0);
5892 rTube2_3->RegisterYourself();
5893 TGeoCombiTrans* transfoTube2_3 =
new TGeoCombiTrans(
5894 0., -length2_3 / 2 - radius1_3, length1_3 / 2 + radius1_3, rTube2_3);
5895 transfoTube2_3->RegisterYourself();
5896 TGeoVolume* Torus2_3 =
5897 gGeoManager->MakeTorus(Form(
"Torus2_3_H%d_D%d", half, disk),
mPipe,
5898 radius1_3, rin, rout, 0., 90.);
5899 TGeoVolume* TorusW2_3 =
5900 gGeoManager->MakeTorus(Form(
"TorusW2_3_H%d_D%d", half, disk),
mWater,
5901 radius1_3, 0., rin, 0., 90.);
5902 TGeoRotation* rTorus2_3 =
5903 new TGeoRotation(
"rotationTorus2_3", 90.0, 90.0, 180.0);
5904 rTorus2_3->RegisterYourself();
5905 TGeoCombiTrans* transfoTorus2_3 =
5906 new TGeoCombiTrans(0.0, -length2_3 - radius1_3,
5907 length1_3 / 2 + radius1_3 + radius1_3, rTorus2_3);
5908 transfoTorus2_3->RegisterYourself();
5914 TGeoVolume* Tube3_3 = gGeoManager->MakeTube(
5915 Form(
"Tube3_3_H%d_D%d", half, disk),
mPipe, rin, rout, length3_3 / 2);
5916 TGeoVolume* TubeW3_3 = gGeoManager->MakeTube(
5917 Form(
"TubeW3_3_H%d_D%d", half, disk),
mWater, 0., rin, length3_3 / 2);
5918 TGeoRotation* rTube3_3 =
new TGeoRotation(
"rotationTube3_3", 0.0, 0.0, 0.0);
5919 rTube3_3->RegisterYourself();
5920 TGeoCombiTrans* transfoTube3_3 =
new TGeoCombiTrans(
5921 0., -length2_3 - radius1_3 - radius1_3,
5922 length1_3 / 2 + radius1_3 + radius1_3 + length3_3 / 2, rTube3_3);
5923 transfoTube3_3->RegisterYourself();
5925 Tube1_3->SetLineColor(kGray);
5926 Torus1_3->SetLineColor(kGray);
5927 Tube2_3->SetLineColor(kGray);
5928 Torus2_3->SetLineColor(kGray);
5929 Tube3_3->SetLineColor(kGray);
5930 TubeW3_3->SetLineColor(kBlue);
5932 mCoolingPipe3->AddNode(Tube1_3, 1, tTube1_3);
5933 mCoolingPipe3->AddNode(Torus1_3, 1, transfoTorus1_3);
5934 mCoolingPipe3->AddNode(Tube2_3, 1, transfoTube2_3);
5935 mCoolingPipe3->AddNode(Torus2_3, 1, transfoTorus2_3);
5936 mCoolingPipe3->AddNode(Tube3_3, 1, transfoTube3_3);
5937 mCoolingPipe3->AddNode(TubeW1_3, 1, tTube1_3);
5938 mCoolingPipe3->AddNode(TorusW1_3, 1, transfoTorus1_3);
5939 mCoolingPipe3->AddNode(TubeW2_3, 1, transfoTube2_3);
5940 mCoolingPipe3->AddNode(TorusW2_3, 1, transfoTorus2_3);
5941 mCoolingPipe3->AddNode(TubeW3_3, 1, transfoTube3_3);
5943 TGeoCombiTrans* transfoCoolingPipe3_3 =
nullptr;
5944 TGeoRotation* rotation3_3 =
new TGeoRotation(
"rotation3_3", 90., 90., 76.);
5945 rotation3_3->RegisterYourself();
5946 transfoCoolingPipe3_3 =
5947 new TGeoCombiTrans(17. + length1_3 / 2, 0.75, 0.0, rotation3_3);
5950 auto* mCoolingPipe4 =
5951 new TGeoVolumeAssembly(Form(
"cooling_pipe4_H%d_D%d", half, disk));
5953 TGeoVolume* Tube1p_3 = gGeoManager->MakeTube(
5954 Form(
"Tube1p_3_H%d_D%d", half, disk),
mPipe, rin, rout, length1_3 / 2);
5955 TGeoVolume* Torus1p_3 =
5956 gGeoManager->MakeTorus(Form(
"Torus1p_3_H%d_D%d", half, disk),
mPipe,
5957 radius1_3, rin, rout, 0., 90.);
5958 TGeoVolume* Tube2p_3 = gGeoManager->MakeTube(
5959 Form(
"Tube2p_3_H%d_D%d", half, disk),
mPipe, rin, rout, length2_3 / 2);
5960 TGeoVolume* Torus2p_3 =
5961 gGeoManager->MakeTorus(Form(
"Torus2p_3_H%d_D%d", half, disk),
mPipe,
5962 radius1_3, rin, rout, 0., 90.);
5963 TGeoVolume* Tube3p_3 = gGeoManager->MakeTube(
5964 Form(
"Tube3p_3_H%d_D%d", half, disk),
mPipe, rin, rout, length3_3 / 2);
5965 TGeoVolume* TubeW1p_3 = gGeoManager->MakeTube(
5966 Form(
"TubeW1p_3_H%d_D%d", half, disk),
mWater, 0, rin, length1_3 / 2);
5967 TGeoVolume* TorusW1p_3 =
5968 gGeoManager->MakeTorus(Form(
"TorusW1p_3_H%d_D%d", half, disk),
mWater,
5969 radius1_3, 0., rin, 0., 90.);
5970 TGeoVolume* TubeW2p_3 = gGeoManager->MakeTube(
5971 Form(
"TubeW2p_3_H%d_D%d", half, disk),
mWater, 0., rin, length2_3 / 2);
5972 TGeoVolume* TorusW2p_3 =
5973 gGeoManager->MakeTorus(Form(
"TorusW2p_3_H%d_D%d", half, disk),
mWater,
5974 radius1_3, 0., rin, 0., 90.);
5975 TGeoVolume* TubeW3p_3 = gGeoManager->MakeTube(
5976 Form(
"TubeW3p_3_H%d_D%d", half, disk),
mWater, 0., rin, length3_3 / 2);
5978 Tube1p_3->SetLineColor(kGray);
5979 Torus1p_3->SetLineColor(kGray);
5980 Tube2p_3->SetLineColor(kGray);
5981 Torus2p_3->SetLineColor(kGray);
5982 Tube3p_3->SetLineColor(kGray);
5983 TubeW3p_3->SetLineColor(kBlue);
5985 mCoolingPipe4->AddNode(Tube1p_3, 1, tTube1_3);
5986 mCoolingPipe4->AddNode(Torus1p_3, 1, transfoTorus1_3);
5987 mCoolingPipe4->AddNode(Tube2p_3, 1, transfoTube2_3);
5988 mCoolingPipe4->AddNode(Torus2p_3, 1, transfoTorus2_3);
5989 mCoolingPipe4->AddNode(Tube3p_3, 1, transfoTube3_3);
5990 mCoolingPipe4->AddNode(TubeW1p_3, 1, tTube1_3);
5991 mCoolingPipe4->AddNode(TorusW1p_3, 1, transfoTorus1_3);
5992 mCoolingPipe4->AddNode(TubeW2p_3, 1, transfoTube2_3);
5993 mCoolingPipe4->AddNode(TorusW2p_3, 1, transfoTorus2_3);
5994 mCoolingPipe4->AddNode(TubeW3p_3, 1, transfoTube3_3);
5996 TGeoCombiTrans* transfoCoolingPipe4_3 =
nullptr;
5997 TGeoRotation* rotation4_3 =
new TGeoRotation(
"rotation4_3", 90., 90., -76.);
5998 rotation4_3->RegisterYourself();
5999 transfoCoolingPipe4_3 =
6000 new TGeoCombiTrans(17. + length1_3 / 2, -0.75, 0.0, rotation4_3);
6001 transfoCoolingPipe4_3->RegisterYourself();
6003 mHalfDisk->AddNode(mCoolingPipe3, 1, transfoCoolingPipe3_3);
6004 mHalfDisk->AddNode(mCoolingPipe4, 1, transfoCoolingPipe4_3);
6010 auto* mCoolingPipe3 =
6011 new TGeoVolumeAssembly(Form(
"cooling_pipe3_H%d_D%d", half, disk));
6013 TGeoVolume* Tube1_4 = gGeoManager->MakeTube(
6014 Form(
"Tube1_4_H%d_D%d", half, disk),
mPipe, rin, rout, length1_4 / 2);
6015 TGeoVolume* TubeW1_4 = gGeoManager->MakeTube(
6016 Form(
"TubeW1_4_H%d_D%d", half, disk),
mWater, 0., rin, length1_4 / 2);
6017 TGeoTranslation* tTube1_4 =
new TGeoTranslation(0.0, 0.0, 0.0);
6018 tTube1_4->RegisterYourself();
6021 TGeoVolume* Torus1_4 =
6022 gGeoManager->MakeTorus(Form(
"Torus1_4_H%d_D%d", half, disk),
mPipe,
6023 radius1_4, rin, rout, 0., 90.);
6024 TGeoVolume* TorusW1_4 =
6025 gGeoManager->MakeTorus(Form(
"TorusW1_4_H%d_D%d", half, disk),
mWater,
6026 radius1_4, 0., rin, 0., 90.);
6027 TGeoRotation* rTorus1_4 =
6028 new TGeoRotation(
"rotationTorus1_4", 90.0, 90.0, 0.0);
6029 rTorus1_4->RegisterYourself();
6030 TGeoCombiTrans* transfoTorus1_4 =
6031 new TGeoCombiTrans(0.0, -radius1_4, length1_4 / 2, rTorus1_4);
6032 transfoTorus1_4->RegisterYourself();
6038 TGeoVolume* Tube2_4 =
6039 gGeoManager->MakeTube(
"Tube2_4",
mPipe, rin, rout, length2_4 / 2);
6040 TGeoVolume* TubeW2_4 =
6041 gGeoManager->MakeTube(
"TubeW2_4",
mWater, 0., rin, length2_4 / 2);
6042 TGeoRotation* rTube2_4 =
6043 new TGeoRotation(
"rotationTube2_4", 180.0, 90.0, 90.0);
6044 rTube2_4->RegisterYourself();
6045 TGeoCombiTrans* transfoTube2_4 =
new TGeoCombiTrans(
6046 0., -length2_4 / 2 - radius1_4, length1_4 / 2 + radius1_4, rTube2_4);
6047 transfoTube2_4->RegisterYourself();
6049 TGeoVolume* Torus2_4 =
6050 gGeoManager->MakeTorus(Form(
"Torus2_4_H%d_D%d", half, disk),
mPipe,
6051 radius1_4, rin, rout, 0., 90.);
6052 TGeoVolume* TorusW2_4 =
6053 gGeoManager->MakeTorus(Form(
"TorusW2_4_H%d_D%d", half, disk),
mWater,
6054 radius1_4, 0., rin, 0., 90.);
6055 TGeoRotation* rTorus2_4 =
6056 new TGeoRotation(
"rotationTorus2_4", 90.0, 90.0, 180.0);
6057 rTorus2_4->RegisterYourself();
6058 TGeoCombiTrans* transfoTorus2_4 =
6059 new TGeoCombiTrans(0.0, -length2_4 - radius1_4,
6060 length1_4 / 2 + radius1_4 + radius1_4, rTorus2_4);
6061 transfoTorus2_4->RegisterYourself();
6067 TGeoVolume* Tube3_4 = gGeoManager->MakeTube(
6068 Form(
"Tube3_4_H%d_D%d", half, disk),
mPipe, rin, rout, length3_4 / 2);
6069 TGeoVolume* TubeW3_4 = gGeoManager->MakeTube(
6070 Form(
"TubeW3_4_H%d_D%d", half, disk),
mWater, 0., rin, length3_4 / 2);
6071 TGeoRotation* rTube3_4 =
new TGeoRotation(
"rotationTube3_4", 0.0, 0.0, 0.0);
6072 rTube3_4->RegisterYourself();
6073 TGeoCombiTrans* transfoTube3_4 =
new TGeoCombiTrans(
6074 0., -length2_4 - radius1_4 - radius1_4,
6075 length1_4 / 2 + radius1_4 + radius1_4 + length3_4 / 2, rTube3_4);
6076 transfoTube3_4->RegisterYourself();
6078 Tube1_4->SetLineColor(kGray);
6079 Torus1_4->SetLineColor(kGray);
6080 Tube2_4->SetLineColor(kGray);
6081 Torus2_4->SetLineColor(kGray);
6082 Tube3_4->SetLineColor(kGray);
6083 TubeW3_4->SetLineColor(kBlue);
6085 mCoolingPipe3->AddNode(Tube1_4, 1, tTube1_4);
6086 mCoolingPipe3->AddNode(Torus1_4, 1, transfoTorus1_4);
6087 mCoolingPipe3->AddNode(Tube2_4, 1, transfoTube2_4);
6088 mCoolingPipe3->AddNode(Torus2_4, 1, transfoTorus2_4);
6089 mCoolingPipe3->AddNode(Tube3_4, 1, transfoTube3_4);
6090 mCoolingPipe3->AddNode(TubeW1_4, 1, tTube1_4);
6091 mCoolingPipe3->AddNode(TorusW1_4, 1, transfoTorus1_4);
6092 mCoolingPipe3->AddNode(TubeW2_4, 1, transfoTube2_4);
6093 mCoolingPipe3->AddNode(TorusW2_4, 1, transfoTorus2_4);
6094 mCoolingPipe3->AddNode(TubeW3_4, 1, transfoTube3_4);
6096 TGeoCombiTrans* transfoCoolingPipe3_4 =
nullptr;
6097 TGeoRotation* rotation3_4 =
new TGeoRotation(
"rotation3_4", 90., 90., 100.);
6098 rotation3_4->RegisterYourself();
6099 transfoCoolingPipe3_4 =
6100 new TGeoCombiTrans(17. + length1_4 / 2, 0.75, 0.0, rotation3_4);
6101 transfoCoolingPipe3_4->RegisterYourself();
6103 auto* mCoolingPipe4 =
6104 new TGeoVolumeAssembly(Form(
"cooling_pipe4_H%d_D%d", half, disk));
6105 TGeoVolume* Tube1p_4 = gGeoManager->MakeTube(
6106 Form(
"Tube1p_4_H%d_D%d", half, disk),
mPipe, rin, rout, length1_4 / 2);
6107 TGeoVolume* Torus1p_4 =
6108 gGeoManager->MakeTorus(Form(
"Torus1p_4_H%d_D%d", half, disk),
mPipe,
6109 radius1_4, rin, rout, 0., 90.);
6110 TGeoVolume* Tube2p_4 = gGeoManager->MakeTube(
6111 Form(
"Tube2p_4_H%d_D%d", half, disk),
mPipe, rin, rout, length2_4 / 2);
6112 TGeoVolume* Torus2p_4 =
6113 gGeoManager->MakeTorus(Form(
"Torus2p_4_H%d_D%d", half, disk),
mPipe,
6114 radius1_4, rin, rout, 0., 90.);
6115 TGeoVolume* Tube3p_4 = gGeoManager->MakeTube(
6116 Form(
"Tube3p_4_H%d_D%d", half, disk),
mPipe, rin, rout, length3_4 / 2);
6117 TGeoVolume* TubeW1p_4 = gGeoManager->MakeTube(
6118 Form(
"TubeW1p_4_H%d_D%d", half, disk),
mWater, 0., rin, length1_4 / 2);
6119 TGeoVolume* TorusW1p_4 =
6120 gGeoManager->MakeTorus(Form(
"TorusW1p_4_H%d_D%d", half, disk),
mWater,
6121 radius1_4, 0., rin, 0., 90.);
6122 TGeoVolume* TubeW2p_4 = gGeoManager->MakeTube(
6123 Form(
"TubeW2p_4_H%d_D%d", half, disk),
mWater, 0., rin, length2_4 / 2);
6124 TGeoVolume* TorusW2p_4 =
6125 gGeoManager->MakeTorus(Form(
"TorusW2p_4_H%d_D%d", half, disk),
mWater,
6126 radius1_4, 0., rin, 0., 90.);
6127 TGeoVolume* TubeW3p_4 = gGeoManager->MakeTube(
6128 Form(
"TubeW3p_4_H%d_D%d", half, disk),
mWater, 0., rin, length3_4 / 2);
6130 Tube1p_4->SetLineColor(kGray);
6131 Torus1p_4->SetLineColor(kGray);
6132 Tube2p_4->SetLineColor(kGray);
6133 Torus2p_4->SetLineColor(kGray);
6134 Tube3p_4->SetLineColor(kGray);
6135 TubeW3p_4->SetLineColor(kBlue);
6137 mCoolingPipe4->AddNode(Tube1p_4, 1, tTube1_4);
6138 mCoolingPipe4->AddNode(Torus1p_4, 1, transfoTorus1_4);
6139 mCoolingPipe4->AddNode(Tube2p_4, 1, transfoTube2_4);
6140 mCoolingPipe4->AddNode(Torus2p_4, 1, transfoTorus2_4);
6141 mCoolingPipe4->AddNode(Tube3p_4, 1, transfoTube3_4);
6142 mCoolingPipe4->AddNode(TubeW1p_4, 1, tTube1_4);
6143 mCoolingPipe4->AddNode(TorusW1p_4, 1, transfoTorus1_4);
6144 mCoolingPipe4->AddNode(TubeW2p_4, 1, transfoTube2_4);
6145 mCoolingPipe4->AddNode(TorusW2p_4, 1, transfoTorus2_4);
6146 mCoolingPipe4->AddNode(TubeW3p_4, 1, transfoTube3_4);
6148 TGeoCombiTrans* transfoCoolingPipe4_4 =
nullptr;
6149 TGeoRotation* rotation4_4 =
6150 new TGeoRotation(
"rotation4_4", 90., 90., -100.);
6151 rotation4_4->RegisterYourself();
6152 transfoCoolingPipe4_4 =
6153 new TGeoCombiTrans(17. + length1_4 / 2, -0.75, 0.0, rotation4_4);
6154 transfoCoolingPipe4_4->RegisterYourself();
6156 mHalfDisk->AddNode(mCoolingPipe3, 1, transfoCoolingPipe3_4);
6157 mHalfDisk->AddNode(mCoolingPipe4, 1, transfoCoolingPipe4_4);