29 #include "TGeoManager.h"
30 #include "TGeoCompositeShape.h"
32 #include "TGeoBoolNode.h"
36 #include "TGeoVolume.h"
58 Double_t heatExchangerThickness,
59 Double_t carbonThickness) : TNamed() {
72 AliInfo(Form(
"Creating HeatExchanger_%d_%d", disk, half));
74 fHalfDisk =
new TGeoVolumeAssembly(Form(
"HeatExchanger_%d_%d", disk, half));
99 if (half ==
kTop)
printf(
"Creating MFT heat exchanger for disk0 top\n");
100 else if (half ==
kBottom)
printf(
"Creating MFT heat exchanger for disk0 bottom\n");
101 else printf(
"No valid option for MFT heat exchanger on disk0\n");
104 TGeoMedium *
carbon = gGeoManager->GetMedium(
"MFT_CarbonFiber$");
106 TGeoMedium *
water = gGeoManager->GetMedium(
"MFT_Water$");
107 TGeoMedium *
rohacell = gGeoManager->GetMedium(
"MFT_Rohacell");
108 TGeoMedium *
pipe = gGeoManager->GetMedium(
"MFT_Polyimide");
110 TGeoVolumeAssembly *cooling =
new TGeoVolumeAssembly(Form(
"cooling_D0_H%d",half));
114 TGeoTranslation *translation = 0;
115 TGeoRotation *rotation = 0;
116 TGeoCombiTrans *transformation = 0;
118 TGeoCombiTrans *transformation1 = 0;
119 TGeoCombiTrans *transformation2 = 0;
126 TGeoVolume *waterTube1 = gGeoManager->MakeTube(Form(
"waterTube1_D0_H%d",half), water, 0.,
fRWater,
fLWater/2.);
127 waterTube1->SetLineColor(kBlue);
129 for (Int_t itube=0; itube<3; itube++) {
131 cooling->AddNode (waterTube1, itube, translation);
133 cooling->AddNode (waterTube1, itube+3, translation);
136 Double_t angle0rad =
fangle0*(TMath::DegToRad());
138 TGeoVolume *waterTube2 = gGeoManager->MakeTube(Form(
"waterTube2_D0_H%d",half), water, 0.,
fRWater,
fLpartial0/2.);
139 waterTube2->SetLineColor(kBlue);
141 for (Int_t itube=0; itube<3; itube++) {
142 rotation =
new TGeoRotation (
"rotation", -90., -
fangle0, 0.);
143 transformation =
new TGeoCombiTrans(
fXPosition0[itube] +
fradius0*(1-(TMath::Cos(angle0rad))) +
144 (
fLpartial0/2.)*(TMath::Sin(angle0rad)), 0., - lMiddle/2. +
146 cooling->AddNode (waterTube2, itube, transformation);
147 rotation =
new TGeoRotation (
"rotation", -90.,
fangle0, 0.);
148 transformation =
new TGeoCombiTrans(
fXPosition0[itube] +
fradius0*(1-(TMath::Cos(angle0rad))) +
149 (
fLpartial0/2.)*(TMath::Sin(angle0rad)), 0., lMiddle/2. -
151 cooling->AddNode (waterTube2, itube+3, transformation);
158 TGeoVolume *waterTorus1 = gGeoManager->MakeTorus(Form(
"waterTorus1_D0_H%d",half), water,
fradius0, 0.,
fRWater, 0.,
fangle0);
159 waterTorus1->SetLineColor(kBlue);
160 Double_t radius0mid = (lMiddle - 2.*(
fradius0*(TMath::Sin(angle0rad)) +
fLpartial0*(TMath::Cos(angle0rad))))/(2*(TMath::Sin(angle0rad)));
162 for (Int_t itube=0; itube<3; itube++) {
163 rotation =
new TGeoRotation (
"rotation", 180., 90., 0.);
164 transformation =
new TGeoCombiTrans(
fradius0 +
fXPosition0[itube], 0., - lMiddle/2., rotation);
165 cooling->AddNode (waterTorus1, itube, transformation);
166 rotation =
new TGeoRotation (
"rotation", 180., -90., 0.);
167 transformation =
new TGeoCombiTrans(
fradius0 +
fXPosition0[itube], 0., lMiddle/2., rotation);
168 cooling->AddNode (waterTorus1, itube+3, transformation);
173 TGeoVolume *waterTorus2 = gGeoManager->MakeTorus(Form(
"waterTorus2_D0_H%d",half), water, radius0mid, 0.,
fRWater, -
fangle0 , 2.*
fangle0);
174 waterTorus2->SetLineColor(kBlue);
176 for(Int_t itube=0; itube<3; itube++) {
177 rotation =
new TGeoRotation (
"rotation", 0., 90., 0.);
178 transformation =
new TGeoCombiTrans(
fXPosition0[itube] +
fradius0*(1-(TMath::Cos(angle0rad))) +
fLpartial0*TMath::Sin(angle0rad) - radius0mid*TMath::Cos(angle0rad), 0., 0., rotation);
179 cooling->AddNode (waterTorus2, itube, transformation);
187 pipeTube1->SetLineColor(10);
189 for (Int_t itube=0; itube<3; itube++){
191 cooling->AddNode (pipeTube1, itube, translation);
193 cooling->AddNode (pipeTube1, itube+3, translation);
197 waterTube2->SetLineColor(10);
199 for(Int_t itube=0; itube<3; itube++) {
200 rotation =
new TGeoRotation (
"rotation", -90., -
fangle0, 0.);
201 transformation =
new TGeoCombiTrans(
fXPosition0[itube] +
fradius0*(1-(TMath::Cos(angle0rad))) +
202 (
fLpartial0/2.)*(TMath::Sin(angle0rad)), 0., - lMiddle/2. +
204 cooling->AddNode (pipeTube2, itube, transformation);
206 rotation =
new TGeoRotation (
"rotation", -90.,
fangle0, 0.);
207 transformation =
new TGeoCombiTrans(
fXPosition0[itube] +
fradius0*(1-(TMath::Cos(angle0rad))) +
208 (
fLpartial0/2.)*(TMath::Sin(angle0rad)), 0., lMiddle/2. -
210 cooling->AddNode (pipeTube2, itube+3, transformation);
217 pipeTorus1->SetLineColor(10);
219 for (Int_t itube=0; itube<3; itube++) {
220 rotation =
new TGeoRotation (
"rotation", 180., 90., 0.);
221 transformation =
new TGeoCombiTrans(
fradius0 +
fXPosition0[itube], 0., - lMiddle/2., rotation);
222 cooling->AddNode (pipeTorus1, itube, transformation);
223 rotation =
new TGeoRotation (
"rotation", 180., -90., 0.);
224 transformation =
new TGeoCombiTrans(
fradius0 +
fXPosition0[itube], 0., lMiddle/2., rotation);
225 cooling->AddNode (pipeTorus1, itube+3, transformation);
230 pipeTorus2->SetLineColor(10);
232 for(Int_t itube=0; itube<3; itube++) {
233 rotation =
new TGeoRotation (
"rotation", 0., 90., 0.);
234 transformation =
new TGeoCombiTrans(
fXPosition0[itube] +
fradius0*(1-(TMath::Cos(angle0rad))) +
fLpartial0*TMath::Sin(angle0rad) - radius0mid*TMath::Cos(angle0rad), 0., 0., rotation);
235 cooling->AddNode (pipeTorus2, itube, transformation);
248 rotation =
new TGeoRotation (
"rotation", -90., 90., 0.);
249 transformation =
new TGeoCombiTrans(0., 0.,
fZPlan[disk] + deltaz/2. - fCarbonThickness -
fRWater -
fDRPipe, rotation);
250 fHalfDisk->AddNode(cooling, 3, transformation);
251 transformation =
new TGeoCombiTrans(0., 0.,
fZPlan[disk] - deltaz/2. + fCarbonThickness +
fRWater +
fDRPipe, rotation);
252 fHalfDisk->AddNode(cooling, 4, transformation);
260 TGeoVolumeAssembly *carbonPlate =
new TGeoVolumeAssembly(Form(
"carbonPlate_D0_H%d",half));
264 t01-> RegisterYourself();
266 TGeoTubeSeg *holeCarbon0 =
new TGeoTubeSeg(Form(
"holeCarbon0_D0_H%d",half), 0.,
fRMin[disk], fCarbonThickness + 0.000001, 0, 180.);
267 TGeoTranslation *t02=
new TGeoTranslation (
"t02",0., -
fHalfDiskGap , 0.);
268 t02-> RegisterYourself();
271 TGeoSubtraction *carbonhole0 =
new TGeoSubtraction(carbonBase0, holeCarbon0, t01, t02);
272 TGeoCompositeShape *ch0 =
new TGeoCompositeShape(Form(
"Carbon0_D0_H%d",half), carbonhole0);
273 TGeoVolume *carbonBaseWithHole0 =
new TGeoVolume(Form(
"carbonBaseWithHole_D0_H%d", half), ch0, carbon);
276 carbonBaseWithHole0->SetLineColor(kGray+3);
277 rotation =
new TGeoRotation (
"rotation", 0., 0., 0.);
278 transformation =
new TGeoCombiTrans(0., 0., 0., rotation);
279 carbonPlate->AddNode(carbonBaseWithHole0, 0,
new TGeoTranslation(0., 0.,
fZPlan[disk]));
283 for (Int_t ipart=1; ipart<
fnPart[disk]; ipart ++) {
285 TGeoVolume *partCarbon = gGeoManager->MakeBox(Form(
"partCarbon_D0_H%d_%d", half,ipart), carbon,
fSupportXDimensions[disk][ipart]/2.,
fSupportYDimensions[disk][ipart]/2., fCarbonThickness);
286 partCarbon->SetLineColor(kGray+3);
288 carbonPlate -> AddNode(partCarbon, ipart, t);
300 rotation =
new TGeoRotation (
"rotation", 180., 0., 0.);
301 transformation =
new TGeoCombiTrans(0., 0., deltaz/2., rotation);
302 fHalfDisk->AddNode(carbonPlate, 3, transformation);
303 transformation =
new TGeoCombiTrans(0., 0., -deltaz/2., rotation);
304 fHalfDisk->AddNode(carbonPlate, 4, transformation);
311 TGeoVolumeAssembly *rohacellPlate =
new TGeoVolumeAssembly(Form(
"rohacellPlate_D0_H%d",half));
317 TGeoTubeSeg *holeRohacell0 =
new TGeoTubeSeg(Form(
"holeRohacell0_D0_H%d",half), 0.,
fRMin[disk],
fRohacellThickness + 0.000001, 0, 180.);
322 TGeoSubtraction *rohacellhole0 =
new TGeoSubtraction(rohacellBase0, holeRohacell0, t01, t02);
323 TGeoCompositeShape *rh0 =
new TGeoCompositeShape(Form(
"rohacellBase0_D0_H%d",half), rohacellhole0);
324 TGeoVolume *rohacellBaseWithHole =
new TGeoVolume(Form(
"rohacellBaseWithHole_D0_H%d",half), rh0, rohacell);
327 rohacellBaseWithHole->SetLineColor(kGray);
328 rotation =
new TGeoRotation (
"rotation", 0., 0., 0.);
329 transformation =
new TGeoCombiTrans(0., 0., 0., rotation);
330 rohacellPlate -> AddNode(rohacellBaseWithHole, 0,
new TGeoTranslation(0., 0.,
fZPlan[disk]));
334 for (Int_t ipart=1; ipart<fnPart[disk]; ipart ++) {
337 partRohacell->SetLineColor(kGray);
339 rohacellPlate -> AddNode(partRohacell, ipart, t);
349 rotation =
new TGeoRotation (
"rotation", 180., 0., 0.);
350 transformation =
new TGeoCombiTrans(0., 0., 0., rotation);
351 fHalfDisk->AddNode(rohacellPlate, 1, transformation);
398 if (half ==
kTop)
printf(
"Creating MFT heat exchanger for disk1 top\n");
399 else if (half ==
kBottom)
printf(
"Creating MFT heat exchanger for disk1 bottom\n");
400 else printf(
"No valid option for MFT heat exchanger on disk1\n");
403 TGeoMedium *
carbon = gGeoManager->GetMedium(
"MFT_CarbonFiber$");
406 TGeoMedium *
water = gGeoManager->GetMedium(
"MFT_Water$");
407 TGeoMedium *
rohacell = gGeoManager->GetMedium(
"MFT_Rohacell");
408 TGeoMedium *
pipe = gGeoManager->GetMedium(
"MFT_Polyimide");
411 TGeoVolumeAssembly *cooling =
new TGeoVolumeAssembly(Form(
"cooling_D1_H%d",half));
415 TGeoTranslation *translation = 0;
416 TGeoRotation *rotation = 0;
417 TGeoCombiTrans *transformation = 0;
424 TGeoVolume *waterTube1 = gGeoManager->MakeTube(Form(
"waterTube1_D1_H%d",half), water, 0.,
fRWater,
fLWater/2.);
425 waterTube1->SetLineColor(kBlue);
427 for (Int_t itube=0; itube<3; itube++) {
429 cooling->AddNode (waterTube1, itube, translation);
431 cooling->AddNode (waterTube1, itube+3, translation);
434 Double_t angle0rad =
fangle0*(TMath::DegToRad());
436 TGeoVolume *waterTube2 = gGeoManager->MakeTube(Form(
"waterTube2_D1_H%d",half), water, 0.,
fRWater,
fLpartial0/2.);
437 waterTube2->SetLineColor(kBlue);
439 for (Int_t itube=0; itube<3; itube++) {
440 rotation =
new TGeoRotation (
"rotation", -90., -
fangle0, 0.);
441 transformation =
new TGeoCombiTrans(
fXPosition0[itube] +
fradius0*(1-(TMath::Cos(angle0rad))) +
442 (
fLpartial0/2.)*(TMath::Sin(angle0rad)), 0., - lMiddle/2. +
444 cooling->AddNode (waterTube2, itube, transformation);
445 rotation =
new TGeoRotation (
"rotation", -90.,
fangle0, 0.);
446 transformation =
new TGeoCombiTrans(
fXPosition0[itube] +
fradius0*(1-(TMath::Cos(angle0rad))) +
447 (
fLpartial0/2.)*(TMath::Sin(angle0rad)), 0., lMiddle/2. -
449 cooling->AddNode (waterTube2, itube+3, transformation);
456 TGeoVolume *waterTorus1 = gGeoManager->MakeTorus(Form(
"waterTorus1_D1_H%d",half), water,
fradius0, 0.,
fRWater, 0.,
fangle0);
457 waterTorus1->SetLineColor(kBlue);
458 Double_t radius0mid = (lMiddle - 2.*(
fradius0*(TMath::Sin(angle0rad)) +
fLpartial0*(TMath::Cos(angle0rad))))/(2*(TMath::Sin(angle0rad)));
460 for (Int_t itube=0; itube<3; itube++) {
461 rotation =
new TGeoRotation (
"rotation", 180., 90., 0.);
462 transformation =
new TGeoCombiTrans(
fradius0 +
fXPosition0[itube], 0., - lMiddle/2., rotation);
463 cooling->AddNode (waterTorus1, itube, transformation);
464 rotation =
new TGeoRotation (
"rotation", 180., -90., 0.);
465 transformation =
new TGeoCombiTrans(
fradius0 +
fXPosition0[itube], 0., lMiddle/2., rotation);
466 cooling->AddNode (waterTorus1, itube+3, transformation);
471 TGeoVolume *waterTorus2 = gGeoManager->MakeTorus(Form(
"waterTorus2_D1_H%d",half), water, radius0mid, 0.,
fRWater, -
fangle0 , 2.*
fangle0);
472 waterTorus2->SetLineColor(kBlue);
474 for(Int_t itube=0; itube<3; itube++) {
475 rotation =
new TGeoRotation (
"rotation", 0., 90., 0.);
476 transformation =
new TGeoCombiTrans(
fXPosition0[itube] +
fradius0*(1-(TMath::Cos(angle0rad))) +
fLpartial0*TMath::Sin(angle0rad) - radius0mid*TMath::Cos(angle0rad), 0., 0., rotation);
477 cooling->AddNode (waterTorus2, itube, transformation);
485 pipeTube1->SetLineColor(10);
487 for (Int_t itube=0; itube<3; itube++){
489 cooling->AddNode (pipeTube1, itube, translation);
491 cooling->AddNode (pipeTube1, itube+3, translation);
495 waterTube2->SetLineColor(10);
497 for(Int_t itube=0; itube<3; itube++) {
498 rotation =
new TGeoRotation (
"rotation", -90., -
fangle0, 0.);
499 transformation =
new TGeoCombiTrans(
fXPosition0[itube] +
fradius0*(1-(TMath::Cos(angle0rad))) +
500 (
fLpartial0/2.)*(TMath::Sin(angle0rad)), 0., - lMiddle/2. +
502 cooling->AddNode (pipeTube2, itube, transformation);
504 rotation =
new TGeoRotation (
"rotation", -90.,
fangle0, 0.);
505 transformation =
new TGeoCombiTrans(
fXPosition0[itube] +
fradius0*(1-(TMath::Cos(angle0rad))) +
506 (
fLpartial0/2.)*(TMath::Sin(angle0rad)), 0., lMiddle/2. -
508 cooling->AddNode (pipeTube2, itube+3, transformation);
515 pipeTorus1->SetLineColor(10);
517 for (Int_t itube=0; itube<3; itube++) {
518 rotation =
new TGeoRotation (
"rotation", 180., 90., 0.);
519 transformation =
new TGeoCombiTrans(
fradius0 +
fXPosition0[itube], 0., - lMiddle/2., rotation);
520 cooling->AddNode (pipeTorus1, itube, transformation);
521 rotation =
new TGeoRotation (
"rotation", 180., -90., 0.);
522 transformation =
new TGeoCombiTrans(
fradius0 +
fXPosition0[itube], 0., lMiddle/2., rotation);
523 cooling->AddNode (pipeTorus1, itube+3, transformation);
528 pipeTorus2->SetLineColor(10);
530 for(Int_t itube=0; itube<3; itube++) {
531 rotation =
new TGeoRotation (
"rotation", 0., 90., 0.);
532 transformation =
new TGeoCombiTrans(
fXPosition0[itube] +
fradius0*(1-(TMath::Cos(angle0rad))) +
fLpartial0*TMath::Sin(angle0rad) - radius0mid*TMath::Cos(angle0rad), 0., 0., rotation);
533 cooling->AddNode (pipeTorus2, itube, transformation);
546 rotation =
new TGeoRotation (
"rotation", -90., 90., 0.);
547 transformation =
new TGeoCombiTrans(0., 0.,
fZPlan[disk] + deltaz/2. - fCarbonThickness -
fRWater -
fDRPipe, rotation);
548 fHalfDisk->AddNode(cooling, 0, transformation);
549 transformation =
new TGeoCombiTrans(0., 0.,
fZPlan[disk] - deltaz/2. + fCarbonThickness +
fRWater +
fDRPipe, rotation);
550 fHalfDisk->AddNode(cooling, 1, transformation);
558 TGeoVolumeAssembly *carbonPlate =
new TGeoVolumeAssembly(Form(
"carbonPlate_D1_H%d",half));
562 t11-> RegisterYourself();
564 TGeoTubeSeg *holeCarbon1 =
new TGeoTubeSeg(Form(
"holeCarbon1_D1_H%d",half), 0.,
fRMin[disk], fCarbonThickness + 0.000001, 0, 180.);
565 TGeoTranslation *t12=
new TGeoTranslation (
"t12",0., -
fHalfDiskGap , 0.);
566 t12-> RegisterYourself();
570 TGeoSubtraction *carbonhole1 =
new TGeoSubtraction(carbonBase1, holeCarbon1, t11, t12);
571 TGeoCompositeShape *ch1 =
new TGeoCompositeShape(Form(
"Carbon1_D1_H%d",half), carbonhole1);
572 TGeoVolume *carbonBaseWithHole1 =
new TGeoVolume(Form(
"carbonBaseWithHole_D1_H%d",half), ch1, carbon);
575 carbonBaseWithHole1->SetLineColor(kGray+3);
576 rotation =
new TGeoRotation (
"rotation", 0., 0., 0.);
577 transformation =
new TGeoCombiTrans(0., 0., 0., rotation);
578 carbonPlate->AddNode(carbonBaseWithHole1, 0,
new TGeoTranslation(0., 0.,
fZPlan[disk]));
582 for (Int_t ipart=1; ipart<
fnPart[disk]; ipart ++) {
584 TGeoVolume *partCarbon = gGeoManager->MakeBox(Form(
"partCarbon_D1_H%d_%d", half,ipart), carbon,
fSupportXDimensions[disk][ipart]/2.,
586 partCarbon->SetLineColor(kGray+3);
588 carbonPlate -> AddNode(partCarbon, ipart, t);
600 rotation =
new TGeoRotation (
"rotation", 180., 0., 0.);
601 transformation =
new TGeoCombiTrans(0., 0., deltaz/2., rotation);
602 fHalfDisk->AddNode(carbonPlate, 0, transformation);
603 transformation =
new TGeoCombiTrans(0., 0., -deltaz/2., rotation);
604 fHalfDisk->AddNode(carbonPlate, 1, transformation);
610 TGeoVolumeAssembly *rohacellPlate =
new TGeoVolumeAssembly(Form(
"rohacellPlate_D1_H%d",half));
616 TGeoTubeSeg *holeRohacell1 =
new TGeoTubeSeg(
"holeRohacell1", 0.,
fRMin[disk],
fRohacellThickness + 0.000001, 0, 180.);
621 TGeoSubtraction *rohacellhole1 =
new TGeoSubtraction(rohacellBase1, holeRohacell1, t11, t12);
622 TGeoCompositeShape *rh1 =
new TGeoCompositeShape(Form(
"rohacellBase1_D1_H%d",half), rohacellhole1);
623 TGeoVolume *rohacellBaseWithHole =
new TGeoVolume(Form(
"rohacellBaseWithHole_D1_H%d",half), rh1, rohacell);
626 rohacellBaseWithHole->SetLineColor(kGray);
627 rotation =
new TGeoRotation (
"rotation", 0., 0., 0.);
628 transformation =
new TGeoCombiTrans(0., 0., 0., rotation);
629 rohacellPlate -> AddNode(rohacellBaseWithHole, 0,
new TGeoTranslation(0., 0.,
fZPlan[disk]));
633 for (Int_t ipart=1; ipart<fnPart[disk]; ipart ++) {
635 TGeoVolume *partRohacell = gGeoManager->MakeBox(Form(
"partRohacelli_D1_H%d_%d",half, ipart), rohacell,
fSupportXDimensions[disk][ipart]/2.,
637 partRohacell->SetLineColor(kGray);
639 rohacellPlate -> AddNode(partRohacell, ipart, t);
649 rotation =
new TGeoRotation (
"rotation", 180., 0., 0.);
650 transformation =
new TGeoCombiTrans(0., 0., 0., rotation);
651 fHalfDisk->AddNode(rohacellPlate, 2, transformation);
664 if (half ==
kTop)
printf(
"Creating MFT heat exchanger for disk2 top\n");
665 else if (half ==
kBottom)
printf(
"Creating MFT heat exchanger for disk2 bottom\n");
666 else printf(
"No valid option for MFT heat exchanger on disk2\n");
670 TGeoMedium *
carbon = gGeoManager->GetMedium(
"MFT_CarbonFiber$");
674 TGeoMedium *
water = gGeoManager->GetMedium(
"MFT_Water$");
675 TGeoMedium *
rohacell = gGeoManager->GetMedium(
"MFT_Rohacell");
676 TGeoMedium *
pipe = gGeoManager->GetMedium(
"MFT_Polyimide");
679 TGeoVolumeAssembly *cooling =
new TGeoVolumeAssembly(Form(
"cooling_D2_H%d",half));
683 TGeoTranslation *translation = 0;
684 TGeoRotation *rotation = 0;
685 TGeoCombiTrans *transformation = 0;
691 TGeoVolume *waterTube1 = gGeoManager->MakeTube(Form(
"waterTube1_D2_H%d",half), water, 0.,
fRWater,
fLWater/2.);
692 waterTube1->SetLineColor(kBlue);
694 for (Int_t itube=0; itube<3; itube++) {
696 cooling->AddNode (waterTube1, itube, translation);
698 cooling->AddNode (waterTube1, itube+3, translation);
701 Double_t angle0rad =
fangle0*(TMath::DegToRad());
703 TGeoVolume *waterTube2 = gGeoManager->MakeTube(Form(
"waterTube2_D2_H%d",half), water, 0.,
fRWater,
fLpartial0/2.);
704 waterTube2->SetLineColor(kBlue);
706 for (Int_t itube=0; itube<3; itube++) {
707 rotation =
new TGeoRotation (
"rotation", -90., -
fangle0, 0.);
708 transformation =
new TGeoCombiTrans(
fXPosition0[itube] +
fradius0*(1-(TMath::Cos(angle0rad))) +
709 (
fLpartial0/2.)*(TMath::Sin(angle0rad)), 0., - lMiddle/2. +
711 cooling->AddNode (waterTube2, itube, transformation);
712 rotation =
new TGeoRotation (
"rotation", -90.,
fangle0, 0.);
713 transformation =
new TGeoCombiTrans(
fXPosition0[itube] +
fradius0*(1-(TMath::Cos(angle0rad))) +
714 (
fLpartial0/2.)*(TMath::Sin(angle0rad)), 0., lMiddle/2. -
716 cooling->AddNode (waterTube2, itube+3, transformation);
723 TGeoVolume *waterTorus1 = gGeoManager->MakeTorus(Form(
"waterTorus1_D2_H%d",half), water,
fradius0, 0.,
fRWater, 0.,
fangle0);
724 waterTorus1->SetLineColor(kBlue);
725 Double_t radius0mid = (lMiddle - 2.*(
fradius0*(TMath::Sin(angle0rad)) +
fLpartial0*(TMath::Cos(angle0rad))))/(2*(TMath::Sin(angle0rad)));
727 for (Int_t itube=0; itube<3; itube++) {
728 rotation =
new TGeoRotation (
"rotation", 180., 90., 0.);
729 transformation =
new TGeoCombiTrans(
fradius0 +
fXPosition0[itube], 0., - lMiddle/2., rotation);
730 cooling->AddNode (waterTorus1, itube, transformation);
731 rotation =
new TGeoRotation (
"rotation", 180., -90., 0.);
732 transformation =
new TGeoCombiTrans(
fradius0 +
fXPosition0[itube], 0., lMiddle/2., rotation);
733 cooling->AddNode (waterTorus1, itube+3, transformation);
738 TGeoVolume *waterTorus2 = gGeoManager->MakeTorus(Form(
"waterTorus2_D2_H%d",half), water, radius0mid, 0.,
fRWater, -
fangle0 , 2.*
fangle0);
739 waterTorus2->SetLineColor(kBlue);
741 for(Int_t itube=0; itube<3; itube++) {
742 rotation =
new TGeoRotation (
"rotation", 0., 90., 0.);
743 transformation =
new TGeoCombiTrans(
fXPosition0[itube] +
fradius0*(1-(TMath::Cos(angle0rad))) +
744 fLpartial0*TMath::Sin(angle0rad) - radius0mid*TMath::Cos(angle0rad), 0., 0., rotation);
745 cooling->AddNode (waterTorus2, itube, transformation);
753 pipeTube1->SetLineColor(10);
755 for (Int_t itube=0; itube<3; itube++){
757 cooling->AddNode (pipeTube1, itube, translation);
759 cooling->AddNode (pipeTube1, itube+3, translation);
763 waterTube2->SetLineColor(10);
765 for(Int_t itube=0; itube<3; itube++) {
766 rotation =
new TGeoRotation (
"rotation", -90., -
fangle0, 0.);
767 transformation =
new TGeoCombiTrans(
fXPosition0[itube] +
fradius0*(1-(TMath::Cos(angle0rad))) +
768 (
fLpartial0/2.)*(TMath::Sin(angle0rad)), 0., - lMiddle/2. +
770 cooling->AddNode (pipeTube2, itube, transformation);
772 rotation =
new TGeoRotation (
"rotation", -90.,
fangle0, 0.);
773 transformation =
new TGeoCombiTrans(
fXPosition0[itube] +
fradius0*(1-(TMath::Cos(angle0rad))) +
774 (
fLpartial0/2.)*(TMath::Sin(angle0rad)), 0., lMiddle/2. -
776 cooling->AddNode (pipeTube2, itube+3, transformation);
783 pipeTorus1->SetLineColor(10);
785 for (Int_t itube=0; itube<3; itube++) {
786 rotation =
new TGeoRotation (
"rotation", 180., 90., 0.);
787 transformation =
new TGeoCombiTrans(
fradius0 +
fXPosition0[itube], 0., - lMiddle/2., rotation);
788 cooling->AddNode (pipeTorus1, itube, transformation);
789 rotation =
new TGeoRotation (
"rotation", 180., -90., 0.);
790 transformation =
new TGeoCombiTrans(
fradius0 +
fXPosition0[itube], 0., lMiddle/2., rotation);
791 cooling->AddNode (pipeTorus1, itube+3, transformation);
796 pipeTorus2->SetLineColor(10);
798 for(Int_t itube=0; itube<3; itube++) {
799 rotation =
new TGeoRotation (
"rotation", 0., 90., 0.);
800 transformation =
new TGeoCombiTrans(
fXPosition0[itube] +
fradius0*(1-(TMath::Cos(angle0rad))) +
801 fLpartial0*TMath::Sin(angle0rad) - radius0mid*TMath::Cos(angle0rad), 0., 0., rotation);
802 cooling->AddNode (pipeTorus2, itube, transformation);
815 rotation =
new TGeoRotation (
"rotation", -90., 90., 0.);
816 transformation =
new TGeoCombiTrans(0., 0.,
fZPlan[disk] + deltaz/2. - fCarbonThickness -
fRWater -
fDRPipe, rotation);
817 fHalfDisk->AddNode(cooling, 3, transformation);
818 transformation =
new TGeoCombiTrans(0., 0.,
fZPlan[disk] - deltaz/2. + fCarbonThickness +
fRWater +
fDRPipe, rotation);
819 fHalfDisk->AddNode(cooling, 4, transformation);
824 TGeoVolumeAssembly *carbonPlate =
new TGeoVolumeAssembly(Form(
"carbonPlate_D2_H%d",half));
828 t21-> RegisterYourself();
830 TGeoTubeSeg *holeCarbon2 =
new TGeoTubeSeg(Form(
"holeCarbon2_D2_H%d",half), 0.,
fRMin[disk], fCarbonThickness + 0.000001, 0, 180.);
831 TGeoTranslation *t22=
new TGeoTranslation (
"t22",0., -
fHalfDiskGap , 0.);
832 t22-> RegisterYourself();
836 TGeoSubtraction *carbonhole2 =
new TGeoSubtraction(carbonBase2, holeCarbon2, t21, t22);
837 TGeoCompositeShape *cs2 =
new TGeoCompositeShape(Form(
"Carbon2_D2_H%d",half), carbonhole2);
838 TGeoVolume *carbonBaseWithHole2 =
new TGeoVolume(Form(
"carbonBaseWithHole_D2_H%d", half), cs2, carbon);
840 carbonBaseWithHole2->SetLineColor(kGray+3);
841 rotation =
new TGeoRotation (
"rotation", 0., 0., 0.);
842 transformation =
new TGeoCombiTrans(0., 0., 0., rotation);
843 carbonPlate->AddNode(carbonBaseWithHole2, 0,
new TGeoTranslation(0., 0.,
fZPlan[disk]));
847 for (Int_t ipart=1; ipart<
fnPart[disk]; ipart ++) {
849 TGeoVolume *partCarbon = gGeoManager->MakeBox(Form(
"partCarbon_D2_H%d_%d", half, ipart), carbon,
fSupportXDimensions[disk][ipart]/2.,
fSupportYDimensions[disk][ipart]/2., fCarbonThickness);
850 partCarbon->SetLineColor(kGray+3);
852 carbonPlate -> AddNode(partCarbon, ipart, t);
864 rotation =
new TGeoRotation (
"rotation", 180., 0., 0.);
865 transformation =
new TGeoCombiTrans(0., 0., deltaz/2., rotation);
866 fHalfDisk->AddNode(carbonPlate, 3, transformation);
867 transformation =
new TGeoCombiTrans(0., 0., -deltaz/2., rotation);
868 fHalfDisk->AddNode(carbonPlate, 4, transformation);
874 TGeoVolumeAssembly *rohacellPlate =
new TGeoVolumeAssembly(Form(
"rohacellPlate_D2_H%d",half));
880 TGeoTubeSeg *holeRohacell2 =
new TGeoTubeSeg(Form(
"holeRohacell2_D2_H%d",half), 0.,
fRMin[disk],
fRohacellThickness + 0.000001, 0, 180.);
886 TGeoSubtraction *rohacellhole2 =
new TGeoSubtraction(rohacellBase2, holeRohacell2, t21, t22);
887 TGeoCompositeShape *rh2 =
new TGeoCompositeShape(Form(
"rohacellBase2_D2_H%d",half), rohacellhole2);
888 TGeoVolume *rohacellBaseWithHole =
new TGeoVolume(Form(
"rohacellBaseWithHole_D2_H%d",half), rh2, rohacell);
892 rohacellBaseWithHole->SetLineColor(kGray);
893 rotation =
new TGeoRotation (
"rotation", 0., 0., 0.);
894 transformation =
new TGeoCombiTrans(0., 0., 0., rotation);
895 rohacellPlate -> AddNode(rohacellBaseWithHole, 0,
new TGeoTranslation(0., 0.,
fZPlan[disk]));
899 for (Int_t ipart=1; ipart<fnPart[disk]; ipart ++) {
902 partRohacell->SetLineColor(kGray);
904 rohacellPlate -> AddNode(partRohacell, ipart, t);
914 rotation =
new TGeoRotation (
"rotation", 180., 0., 0.);
915 transformation =
new TGeoCombiTrans(0., 0., 0., rotation);
916 fHalfDisk->AddNode(rohacellPlate, 2, transformation);
927 if (half ==
kTop)
printf(
"Creating MFT heat exchanger for disk3 top\n");
928 else if (half ==
kBottom)
printf(
"Creating MFT heat exchanger for disk3 bottom\n");
929 else printf(
"No valid option for MFT heat exchanger on disk3\n");
932 TGeoMedium *
carbon = gGeoManager->GetMedium(
"MFT_CarbonFiber$");
935 TGeoMedium *
water = gGeoManager->GetMedium(
"MFT_Water$");
936 TGeoMedium *
rohacell = gGeoManager->GetMedium(
"MFT_Rohacell");
937 TGeoMedium *
pipe = gGeoManager->GetMedium(
"MFT_Polyimide");
939 TGeoVolumeAssembly *cooling =
new TGeoVolumeAssembly(Form(
"cooling_D3_H%d",half));
944 TGeoTranslation *translation = 0;
945 TGeoRotation *rotation = 0;
946 TGeoCombiTrans *transformation = 0;
948 Double_t beta3rad[3] = {0., 0., 0.};
949 for (Int_t i=0; i<3; i++) {
950 beta3rad[i] =
fangle3[i]*(TMath::DegToRad());
954 Double_t radius3mid[2] = {((lMiddle3[0]) - 2.*(
fradius3[0]*(TMath::Sin(beta3rad[0])) +
955 fLpartial3[0]*(TMath::Cos(beta3rad[0]))))/ (2*(TMath::Sin(beta3rad[0]))), 0.};
957 fradius3[2]*(TMath::Sin(beta3rad[2] + fangleThirdPipe3rad) - TMath::Sin(fangleThirdPipe3rad)))/(TMath::Sin(fangleThirdPipe3rad + beta3rad[2]));
966 for (Int_t itube= 0; itube < 2; itube ++){
971 TGeoVolume *waterTube1 = gGeoManager->MakeTube(Form(
"waterTubeone%d_D3_H%d", itube,half), water, 0.,
fRWater,
fLWater3[itube]/2.);
972 waterTube1->SetLineColor(kBlue);
973 translation =
new TGeoTranslation (
fXPosition3[itube], 0.,
fLWater3[itube]/2. + lMiddle3[itube]/2.);
974 cooling->AddNode (waterTube1, 1, translation);
976 TGeoVolume *waterTube2 = gGeoManager->MakeTube(Form(
"waterTubetwo%d_D3_H%d", itube,half), water, 0.,
fRWater,
fLWater3[itube]/2.);
977 waterTube2->SetLineColor(kBlue);
978 translation =
new TGeoTranslation (
fXPosition3[itube], 0., -
fLWater3[itube]/2. - lMiddle3[itube]/2.);
979 cooling->AddNode (waterTube2, 2, translation);
981 TGeoVolume *waterTube3 = gGeoManager->MakeTube(Form(
"waterTubethree%d_D3_H%d", itube,half), water, 0.,
fRWater,
fLpartial3[itube]/2.);
982 waterTube3->SetLineColor(kBlue);
983 rotation =
new TGeoRotation (
"rotation", -90., 0 -
fangle3[itube], 0.);
985 transformation =
new TGeoCombiTrans(
fXPosition3[itube] +
fradius3[itube]*(1-(TMath::Cos(beta3rad[0]))) +
986 (
fLpartial3[itube]/2.)*(TMath::Sin(beta3rad[0])), 0., (
fradius3[itube])*(TMath::Sin(beta3rad[0])) +
987 (
fLpartial3[itube]/2.)*(TMath::Cos(beta3rad[0])) - lMiddle3[itube]/2., rotation);
988 cooling->AddNode (waterTube3, 3, transformation);
990 rotation =
new TGeoRotation (
"rotation", 90., 180 -
fangle3[itube], 0.);
991 transformation =
new TGeoCombiTrans(
fXPosition3[itube] +
fradius3[itube]*(1-(TMath::Cos(beta3rad[0]))) +
992 (
fLpartial3[itube]/2.)*(TMath::Sin(beta3rad[0])), 0., lMiddle3[itube]/2. - (
fradius3[itube])*(TMath::Sin(beta3rad[0])) -
993 (
fLpartial3[itube]/2.)*(TMath::Cos(beta3rad[0])), rotation);
994 cooling->AddNode (waterTube3, 4, transformation);
999 TGeoVolume *waterTorus1 = gGeoManager->MakeTorus(Form(
"waterTorusone%d_D3_H%d", itube,half), water,
fradius3[itube], 0.,
fRWater, 0.,
fangle3[itube]);
1000 waterTorus1->SetLineColor(kBlue);
1001 rotation =
new TGeoRotation (
"rotation", 180., 90., 0.);
1002 transformation =
new TGeoCombiTrans(
fradius3[itube] +
fXPosition3[itube], 0., - lMiddle3[itube]/2., rotation);
1003 cooling->AddNode (waterTorus1, 4, transformation);
1004 rotation =
new TGeoRotation (
"rotation", 180., -90., 0.);
1005 transformation =
new TGeoCombiTrans(
fradius3[itube] +
fXPosition3[itube], 0., lMiddle3[itube]/2., rotation);
1006 cooling->AddNode (waterTorus1, 5, transformation);
1009 TGeoVolume *waterTorus2 = gGeoManager->MakeTorus(Form(
"waterTorustwo%d_D3_H%d", itube,half), water, radius3mid[0], 0.,
fRWater, -
fangle3[itube], 2.*
fangle3[itube]);
1010 waterTorus2->SetLineColor(kBlue);
1011 rotation =
new TGeoRotation (
"rotation", 0., 90., 0.);
1013 radius3mid[0]*TMath::Cos(beta3rad[0]) , 0., 0., rotation);
1014 cooling->AddNode (waterTorus2, 6, transformation);
1021 TGeoVolume *waterTube1 = gGeoManager->MakeTube(Form(
"waterTubeone2_D3_H%d",half), water, 0.,
fRWater,
fLWater3[2]/2.);
1022 waterTube1->SetLineColor(kBlue);
1024 transformation =
new TGeoCombiTrans (
fXPosition3[2] +
fLWater3[2]*TMath::Sin(fangleThirdPipe3rad)/2., 0.,
1026 cooling->AddNode (waterTube1, 3, transformation);
1029 transformation =
new TGeoCombiTrans (
fXPosition3[2] +
fLWater3[2]*TMath::Sin(fangleThirdPipe3rad)/2., 0.,
1031 cooling->AddNode (waterTube1, 4, transformation);
1036 waterTorus1->SetLineColor(kBlue);
1037 rotation =
new TGeoRotation (
"rotation", 180., 90., 0.);
1038 transformation =
new TGeoCombiTrans(
fXPosition3[2] +
fLWater3[2]*TMath::Sin(fangleThirdPipe3rad) +
1039 fradius3[2]*(TMath::Cos(fangleThirdPipe3rad)), 0., -lMiddle3[2]/2. -
fradius3[2]*(TMath::Sin(fangleThirdPipe3rad)) , rotation);
1040 cooling->AddNode (waterTorus1, 4, transformation);
1042 rotation =
new TGeoRotation (
"rotation", 180., -90., 0.);
1043 transformation =
new TGeoCombiTrans(
fXPosition3[2] +
fLWater3[2]*TMath::Sin(fangleThirdPipe3rad) +
1044 fradius3[2]*(TMath::Cos(fangleThirdPipe3rad)), 0., lMiddle3[2]/2. +
fradius3[2]*(TMath::Sin(fangleThirdPipe3rad)), rotation);
1045 cooling->AddNode (waterTorus1, 5, transformation);
1047 TGeoVolume *waterTorus2 = gGeoManager->MakeTorus(Form(
"waterTorustwo2_D3_H%d",half), water, radius3mid[1], 0.,
fRWater, -(
fangle3[2] +
fangleThirdPipe3),
1049 waterTorus2->SetLineColor(kBlue);
1050 rotation =
new TGeoRotation (
"rotation", 0., 90., 0.);
1051 transformation =
new TGeoCombiTrans(
fXPosition3[2] +
fLWater3[2]*TMath::Sin(fangleThirdPipe3rad) +
fradius3[2]*(TMath::Cos(fangleThirdPipe3rad)) -
1052 (
fradius3[2] + radius3mid[1])*(TMath::Cos(beta3rad[2] + fangleThirdPipe3rad)), 0., 0., rotation);
1053 cooling->AddNode (waterTorus2, 6, transformation);
1057 Double_t radius3fourth[4] = {9.6, 2.9, 2.9, 0.};
1058 Double_t alpha3fourth[4] = { 40.8, 50, 60, 0};
1059 alpha3fourth[3] = 8 + alpha3fourth[0] - alpha3fourth[1] + alpha3fourth[2];
1060 Double_t alpha3fourthrad[4] = {};
1061 for(Int_t i=0; i<4; i++){
1062 alpha3fourthrad[i] = (TMath::Pi())*(alpha3fourth[i])/180.;
1064 Double_t beta3fourth[3] = {8, 8 + alpha3fourth[0], -(-8 - alpha3fourth[0] + alpha3fourth[1])};
1065 Double_t beta3fourthrad[3] = {0., 0., 0.};
1066 for(Int_t i=0; i<3; i++){
1067 beta3fourthrad[i] = (TMath::Pi())*(beta3fourth[i])/180.;
1070 radius3fourth[3] = ((-(-(
fLWater3[0] + lMiddle3[0]/2.) -
1071 radius3fourth[0]*(TMath::Sin(beta3fourthrad[0])) +
1072 radius3fourth[0]*(TMath::Sin(beta3fourthrad[0] + alpha3fourthrad[0])) +
1073 radius3fourth[1]*(TMath::Cos(TMath::Pi()/2 - beta3fourthrad[0] - alpha3fourthrad[0])) +
1074 radius3fourth[1]*(TMath::Cos(TMath::Pi()/2. - alpha3fourthrad[1] + alpha3fourthrad[0] + beta3fourthrad[0])) +
1075 radius3fourth[2]*(TMath::Sin(alpha3fourthrad[1] - alpha3fourthrad[0] - beta3fourthrad[0])))) -
1076 radius3fourth[2]*TMath::Cos(TMath::Pi()/2 - alpha3fourthrad[3]))/(TMath::Sin(alpha3fourthrad[3]));
1078 Double_t translation3x[4] = {
fXPosition3[3] + radius3fourth[0]*(TMath::Cos(beta3fourthrad[0])),
1079 fXPosition3[3] + radius3fourth[0]*((TMath::Cos(beta3fourthrad[0])) - TMath::Cos(beta3fourthrad[0] + alpha3fourthrad[0])) -
1080 radius3fourth[1]*(TMath::Cos(beta3fourthrad[0] + alpha3fourthrad[0])),
1081 fXPosition3[3] + radius3fourth[0]*((TMath::Cos(beta3fourthrad[0])) - TMath::Cos(beta3fourthrad[0] + alpha3fourthrad[0])) -
1082 radius3fourth[1]*(TMath::Cos(beta3fourthrad[0] + alpha3fourthrad[0])) +
1083 radius3fourth[1]*(TMath::Sin(TMath::Pi()/2. - alpha3fourthrad[1] + alpha3fourthrad[0] + beta3fourthrad[0])) +
1084 radius3fourth[2]*(TMath::Cos(alpha3fourthrad[1] - alpha3fourthrad[0] - beta3fourthrad[0])),
1085 fXPosition3[3] + radius3fourth[0]*((TMath::Cos(beta3fourthrad[0])) - TMath::Cos(beta3fourthrad[0] + alpha3fourthrad[0])) -
1086 radius3fourth[1]*(TMath::Cos(beta3fourthrad[0] + alpha3fourthrad[0])) +
1087 radius3fourth[1]*(TMath::Sin(TMath::Pi()/2. - alpha3fourthrad[1] + alpha3fourthrad[0] + beta3fourthrad[0])) +
1088 radius3fourth[2]*(TMath::Cos(alpha3fourthrad[1] - alpha3fourthrad[0] - beta3fourthrad[0])) -
1089 radius3fourth[2]*(TMath::Sin((TMath::Pi()/2.) - alpha3fourthrad[3])) - radius3fourth[3]*(TMath::Cos(alpha3fourthrad[3]))};
1091 Double_t translation3y[3] = {0., 0., 0.};
1093 Double_t translation3z[3] = {-(
fLWater3[0] + lMiddle3[0]/2.) - radius3fourth[0]*(TMath::Sin(beta3fourthrad[0])),
1094 -(
fLWater3[0] + lMiddle3[0]/2.) - radius3fourth[0]*(TMath::Sin(beta3fourthrad[0])) +
1095 radius3fourth[0]*(TMath::Sin(beta3fourthrad[0] + alpha3fourthrad[0])) + radius3fourth[1]*(TMath::Sin(beta3fourthrad[0] + alpha3fourthrad[0])),
1096 -(
fLWater3[0] + lMiddle3[0]/2.) - radius3fourth[0]*(TMath::Sin(beta3fourthrad[0])) +
1097 radius3fourth[0]*(TMath::Sin(beta3fourthrad[0] + alpha3fourthrad[0])) +
1098 radius3fourth[1]*(TMath::Cos(TMath::Pi()/2 - beta3fourthrad[0] - alpha3fourthrad[0])) +
1099 radius3fourth[1]*(TMath::Cos(TMath::Pi()/2. - alpha3fourthrad[1] + alpha3fourthrad[0] +
1100 beta3fourthrad[0])) + radius3fourth[2]*(TMath::Sin(alpha3fourthrad[1] - alpha3fourthrad[0] - beta3fourthrad[0]))};
1102 Double_t rotation3x[3] = {180., 180., 180.};
1103 Double_t rotation3y[3] = {90., 90., 90.};
1104 Double_t rotation3z[3] = {0., 180 - alpha3fourth[1] , 0.};
1106 for (Int_t i= 0; i<3; i++) {
1107 waterTorus1 = gGeoManager->MakeTorus(Form(
"waterTorusone%d_D3_H%d", i,half), water, radius3fourth[i], 0.,
fRWater, beta3fourth[i], alpha3fourth[i]);
1108 waterTorus1->SetLineColor(kBlue);
1109 rotation =
new TGeoRotation (
"rotation", rotation3x[i], rotation3y[i], rotation3z[i]);
1110 transformation =
new TGeoCombiTrans(translation3x[i], translation3y[i], translation3z[i], rotation);
1111 cooling->AddNode (waterTorus1, 7, transformation);
1112 rotation =
new TGeoRotation (
"rotation", rotation3x[i] , rotation3y[i] - 180, rotation3z[i]);
1113 transformation =
new TGeoCombiTrans(translation3x[i], translation3y[i], - translation3z[i], rotation);
1114 cooling->AddNode (waterTorus1, 8, transformation);
1117 waterTorus2 = gGeoManager->MakeTorus(Form(
"waterTorusone3_D3_H%d",half), water, radius3fourth[3], 0.,
fRWater, -alpha3fourth[3], 2*alpha3fourth[3]);
1118 waterTorus2->SetLineColor(kBlue);
1119 rotation =
new TGeoRotation (
"rotation", 180., 90., 180);
1120 transformation =
new TGeoCombiTrans(translation3x[3], 0., 0., rotation);
1121 cooling->AddNode(waterTorus2, 9, transformation);
1127 for (Int_t itube= 0; itube < 2; itube ++){
1131 TGeoVolume *pipeTube1 = gGeoManager->MakeTube(Form(
"pipeTubeone%d_D3_H%d", itube,half), pipe,
fRWater,
fRWater +
fDRPipe,
fLWater3[itube]/2.);
1132 pipeTube1->SetLineColor(10);
1133 translation =
new TGeoTranslation (
fXPosition3[itube], 0.,
fLWater3[itube]/2. + lMiddle3[itube]/2.);
1134 cooling->AddNode (pipeTube1, 1, translation);
1136 TGeoVolume *pipeTube2 = gGeoManager->MakeTube(Form(
"pipeTubetwo%d_D3_H%d", itube,half), pipe,
fRWater,
fRWater +
fDRPipe,
fLWater3[itube]/2.);
1137 pipeTube2->SetLineColor(10);
1138 translation =
new TGeoTranslation (
fXPosition3[itube], 0., -
fLWater3[itube]/2. - lMiddle3[itube]/2.);
1139 cooling->AddNode (pipeTube2, 2, translation);
1142 pipeTube3->SetLineColor(10);
1143 rotation =
new TGeoRotation (
"rotation", -90., 0 -
fangle3[itube], 0.);
1145 transformation =
new TGeoCombiTrans(
fXPosition3[itube] +
fradius3[itube]*(1-(TMath::Cos(beta3rad[0]))) +
1146 (
fLpartial3[itube]/2.)*(TMath::Sin(beta3rad[0])), 0., (
fradius3[itube])*(TMath::Sin(beta3rad[0])) +
1147 (
fLpartial3[itube]/2.)*(TMath::Cos(beta3rad[0])) - lMiddle3[itube]/2., rotation);
1148 cooling->AddNode (pipeTube3, 3, transformation);
1150 rotation =
new TGeoRotation (
"rotation", 90., 180 -
fangle3[itube], 0.);
1151 transformation =
new TGeoCombiTrans(
fXPosition3[itube] +
fradius3[itube]*(1-(TMath::Cos(beta3rad[0]))) +
1152 (
fLpartial3[itube]/2.)*(TMath::Sin(beta3rad[0])), 0., lMiddle3[itube]/2. -
1153 (
fradius3[itube])*(TMath::Sin(beta3rad[0])) - (
fLpartial3[itube]/2.)*(TMath::Cos(beta3rad[0])), rotation);
1154 cooling->AddNode (pipeTube3, 4, transformation);
1160 pipeTorus1->SetLineColor(10);
1161 rotation =
new TGeoRotation (
"rotation", 180., 90., 0.);
1162 transformation =
new TGeoCombiTrans(
fradius3[itube] +
fXPosition3[itube], 0., - lMiddle3[itube]/2., rotation);
1163 cooling->AddNode (pipeTorus1, 4, transformation);
1164 rotation =
new TGeoRotation (
"rotation", 180., -90., 0.);
1165 transformation =
new TGeoCombiTrans(
fradius3[itube] +
fXPosition3[itube], 0., lMiddle3[itube]/2., rotation);
1166 cooling->AddNode (pipeTorus1, 5, transformation);
1170 TGeoVolume *pipeTorus2 = gGeoManager->MakeTorus(Form(
"pipeTorustwo%d_D3_H%d", itube,half), pipe, radius3mid[0],
fRWater,
fRWater +
fDRPipe, -
fangle3[itube], 2.*
fangle3[itube]);
1171 pipeTorus2->SetLineColor(10);
1172 rotation =
new TGeoRotation (
"rotation", 0., 90., 0.);
1173 transformation =
new TGeoCombiTrans(
fXPosition3[itube] +
fradius3[0]*(1-(TMath::Cos(beta3rad[0])))+
fLpartial3[0]*TMath::Sin(beta3rad[0]) - radius3mid[0]*TMath::Cos(beta3rad[0]) , 0., 0., rotation);
1174 cooling->AddNode (pipeTorus2, 6, transformation);
1182 pipeTube1->SetLineColor(10);
1184 transformation =
new TGeoCombiTrans (
fXPosition3[2] +
fLWater3[2]*TMath::Sin(fangleThirdPipe3rad)/2., 0.,
1186 cooling->AddNode (pipeTube1, 3, transformation);
1189 transformation =
new TGeoCombiTrans (
fXPosition3[2] +
fLWater3[2]*TMath::Sin(fangleThirdPipe3rad)/2., 0.,
1191 cooling->AddNode (pipeTube1, 4, transformation);
1196 pipeTorus1->SetLineColor(10);
1197 rotation =
new TGeoRotation (
"rotation", 180., 90., 0.);
1198 transformation =
new TGeoCombiTrans(
fXPosition3[2] +
fLWater3[2]*TMath::Sin(fangleThirdPipe3rad) +
1199 fradius3[2]*(TMath::Cos(fangleThirdPipe3rad)), 0., -lMiddle3[2]/2. -
fradius3[2]*(TMath::Sin(fangleThirdPipe3rad)), rotation);
1200 cooling->AddNode (pipeTorus1, 4, transformation);
1201 rotation =
new TGeoRotation (
"rotation", 180., -90., 0.);
1202 transformation =
new TGeoCombiTrans(
fXPosition3[2] +
fLWater3[2]*TMath::Sin(fangleThirdPipe3rad) +
1203 fradius3[2]*(TMath::Cos(fangleThirdPipe3rad)), 0., lMiddle3[2]/2. +
fradius3[2]*(TMath::Sin(fangleThirdPipe3rad)), rotation);
1204 cooling->AddNode (pipeTorus1, 5, transformation);
1206 TGeoVolume *pipeTorus2 = gGeoManager->MakeTorus(Form(
"pipeTorustwo2_D3_H%d",half), pipe, radius3mid[1],
fRWater,
fRWater +
fDRPipe,
1208 pipeTorus2->SetLineColor(10);
1209 rotation =
new TGeoRotation (
"rotation", 0., 90., 0.);
1210 transformation =
new TGeoCombiTrans(
fXPosition3[2] +
fLWater3[2]*TMath::Sin(fangleThirdPipe3rad) +
1211 fradius3[2]*(TMath::Cos(fangleThirdPipe3rad)) -
1212 (
fradius3[2] + radius3mid[1])*(TMath::Cos(beta3rad[2] + fangleThirdPipe3rad)), 0., 0., rotation);
1213 cooling->AddNode (pipeTorus2, 6, transformation);
1217 for(Int_t i= 0; i<3; i++){
1218 pipeTorus1 = gGeoManager->MakeTorus(Form(
"pipeTorusone%d_D3_H%d", i,half), pipe, radius3fourth[i],
fRWater,
fRWater +
fDRPipe, beta3fourth[i], alpha3fourth[i]);
1219 pipeTorus1->SetLineColor(10);
1220 rotation =
new TGeoRotation (
"rotation", rotation3x[i], rotation3y[i], rotation3z[i]);
1221 transformation =
new TGeoCombiTrans(translation3x[i], translation3y[i], translation3z[i], rotation);
1222 cooling->AddNode (pipeTorus1, 7, transformation);
1223 rotation =
new TGeoRotation (
"rotation", rotation3x[i] , rotation3y[i] - 180, rotation3z[i]);
1224 transformation =
new TGeoCombiTrans(translation3x[i], translation3y[i], - translation3z[i], rotation);
1225 cooling->AddNode (pipeTorus1, 8, transformation);
1228 pipeTorus2 = gGeoManager->MakeTorus(Form(
"pipeTorusone3_D3_H%d",half), pipe, radius3fourth[3],
fRWater,
fRWater +
fDRPipe, -alpha3fourth[3], 2*alpha3fourth[3]);
1229 pipeTorus2->SetLineColor(10);
1230 rotation =
new TGeoRotation (
"rotation", 180., 90., 180);
1231 transformation =
new TGeoCombiTrans(translation3x[3], 0., 0., rotation);
1232 cooling->AddNode(pipeTorus2, 9, transformation);
1242 rotation =
new TGeoRotation (
"rotation", -90., 90., 0.);
1243 transformation =
new TGeoCombiTrans(0., 0.,
fZPlan[disk] + deltaz/2. - fCarbonThickness -
fRWater -
fDRPipe, rotation);
1244 fHalfDisk->AddNode(cooling, 3, transformation);
1245 transformation =
new TGeoCombiTrans(0., 0.,
fZPlan[disk] - deltaz/2. + fCarbonThickness +
fRWater +
fDRPipe, rotation);
1246 fHalfDisk->AddNode(cooling, 4, transformation);
1251 TGeoVolumeAssembly *carbonPlate =
new TGeoVolumeAssembly(Form(
"carbonPlate_D3_H%d",half));
1255 t31-> RegisterYourself();
1257 TGeoTubeSeg *holeCarbon3 =
new TGeoTubeSeg(Form(
"holeCarbon3_D3_H%d",half), 0.,
fRMin[disk], fCarbonThickness + 0.000001, 0, 180.);
1258 TGeoTranslation *t32=
new TGeoTranslation (
"t32",0., -
fHalfDiskGap , 0.);
1259 t32-> RegisterYourself();
1263 TGeoSubtraction *carbonhole3 =
new TGeoSubtraction(carbonBase3, holeCarbon3, t31, t32);
1264 TGeoCompositeShape *cs3 =
new TGeoCompositeShape(Form(
"Carbon3_D3_H%d",half), carbonhole3);
1265 TGeoVolume *carbonBaseWithHole3 =
new TGeoVolume(Form(
"carbonBaseWithHole_D3_H%d",half), cs3, carbon);
1268 carbonBaseWithHole3->SetLineColor(kGray+3);
1269 rotation =
new TGeoRotation (
"rotation", 0., 0., 0.);
1270 transformation =
new TGeoCombiTrans(0., 0., 0., rotation);
1271 carbonPlate->AddNode(carbonBaseWithHole3, 0,
new TGeoTranslation(0., 0.,
fZPlan[disk]));
1275 for (Int_t ipart=1; ipart<
fnPart[disk]; ipart ++) {
1277 TGeoVolume *partCarbon = gGeoManager->MakeBox(Form(
"partCarbon_D3_H%d_%d", half,ipart), carbon,
fSupportXDimensions[disk][ipart]/2.,
1279 partCarbon->SetLineColor(kGray+3);
1281 carbonPlate -> AddNode(partCarbon, ipart, t);
1293 rotation =
new TGeoRotation (
"rotation", 180., 0., 0.);
1294 transformation =
new TGeoCombiTrans(0., 0., deltaz/2., rotation);
1295 fHalfDisk->AddNode(carbonPlate, 3, transformation);
1296 transformation =
new TGeoCombiTrans(0., 0., -deltaz/2., rotation);
1297 fHalfDisk->AddNode(carbonPlate, 4, transformation);
1303 TGeoVolumeAssembly *rohacellPlate =
new TGeoVolumeAssembly(Form(
"rohacellPlate_D3_H%d",half));
1309 TGeoTubeSeg *holeRohacell3 =
new TGeoTubeSeg(Form(
"holeRohacell3_D3_H%d",half), 0.,
fRMin[disk],
fRohacellThickness + 0.000001, 0, 180.);
1314 TGeoSubtraction *rohacellhole3 =
new TGeoSubtraction(rohacellBase3, holeRohacell3, t31, t32);
1315 TGeoCompositeShape *rh3 =
new TGeoCompositeShape(Form(
"rohacellBase3_D3_H%d",half), rohacellhole3);
1316 TGeoVolume *rohacellBaseWithHole =
new TGeoVolume(Form(
"rohacellBaseWithHole_D3_H%d",half), rh3, rohacell);
1319 rohacellBaseWithHole->SetLineColor(kGray);
1320 rotation =
new TGeoRotation (
"rotation", 0., 0., 0.);
1321 transformation =
new TGeoCombiTrans(0., 0., 0., rotation);
1322 rohacellPlate -> AddNode(rohacellBaseWithHole, 0,
new TGeoTranslation(0., 0.,
fZPlan[disk]));
1326 for (Int_t ipart=1; ipart<fnPart[disk]; ipart ++) {
1328 TGeoVolume *partRohacell = gGeoManager->MakeBox(Form(
"partRohacelli_D3_H%d_%d", half, ipart), rohacell,
fSupportXDimensions[disk][ipart]/2.,
1330 partRohacell->SetLineColor(kGray);
1332 rohacellPlate -> AddNode(partRohacell, ipart, t);
1342 rotation =
new TGeoRotation (
"rotation", 180., 0., 0.);
1343 transformation =
new TGeoCombiTrans(0., 0., 0., rotation);
1344 fHalfDisk->AddNode(rohacellPlate, 2, transformation);
1356 if (half ==
kTop)
printf(
"Creating MFT heat exchanger for disk4 top\n");
1357 else if (half ==
kBottom)
printf(
"Creating MFT heat exchanger for disk4 bottom\n");
1358 else printf(
"No valid option for MFT heat exchanger on disk4\n");
1362 TGeoMedium *carbon = gGeoManager->GetMedium(
"MFT_CarbonFiber$");
1365 TGeoMedium *water = gGeoManager->GetMedium(
"MFT_Water$");
1366 TGeoMedium *rohacell = gGeoManager->GetMedium(
"MFT_Rohacell");
1367 TGeoMedium *pipe = gGeoManager->GetMedium(
"MFT_Polyimide");
1370 TGeoVolumeAssembly *cooling =
new TGeoVolumeAssembly(Form(
"cooling_D4_H%d",half));
1373 TGeoTranslation *translation = 0;
1374 TGeoRotation *rotation = 0;
1375 TGeoCombiTrans *transformation = 0;
1379 Double_t anglerad[6]= {0.};
1380 for(Int_t i=0; i<6; i++){
1381 anglerad[i] =
fangle4[i]*(TMath::DegToRad());
1383 Double_t fradius4mid[3] = { (lMiddle4[0]-2.*(
fradius4[0]*(TMath::Sin(anglerad[0])) +
fLpartial4[0]*(TMath::Cos(anglerad[0]))))/(2*(TMath::Sin(anglerad[0]))) ,
1384 (lMiddle4[1]-2.*(
fradius4[1]*(TMath::Sin(anglerad[1])) +
fLpartial4[1]*(TMath::Cos(anglerad[1]))))/(2*(TMath::Sin(anglerad[1]))), 0. };
1386 TMath::Sin(anglerad[5])))/(TMath::Sin(anglerad[5]));
1392 for (Int_t i=0; i<2; i++){
1396 TGeoVolume *waterTube1 = gGeoManager->MakeTube(Form(
"waterTubeone%d_D4_H%d", i,half), water, 0.,
fRWater,
fLwater4[i]/2.);
1397 waterTube1->SetLineColor(kBlue);
1399 cooling->AddNode (waterTube1, 1, translation);
1401 cooling->AddNode (waterTube1, 2, translation);
1403 TGeoVolume *waterTube2 = gGeoManager->MakeTube(Form(
"waterTubetwo%d_D4_H%d", i,half), water, 0.,
fRWater,
fLpartial4[i]/2.);
1404 waterTube2->SetLineColor(kBlue);
1405 rotation =
new TGeoRotation (
"rotation", -90., -
fangle4[i], 0.);
1408 fLpartial4[i]*(TMath::Cos(anglerad[i]))/2., rotation);
1409 cooling->AddNode (waterTube2, 3, transformation);
1410 rotation =
new TGeoRotation (
"rotation", -90.,
fangle4[i], 0.);
1413 fLpartial4[i]*(TMath::Cos(anglerad[i]))/2. , rotation);
1414 cooling->AddNode (waterTube2, 4, transformation);
1418 TGeoVolume *waterTorus1 = gGeoManager->MakeTorus(Form(
"waterTorusone%d_D4_H%d", i,half), water,
fradius4[i], 0.,
fRWater, 0.,
fangle4[i]);
1419 waterTorus1->SetLineColor(kBlue);
1420 rotation =
new TGeoRotation (
"rotation", 180., 90., 0.);
1422 cooling->AddNode (waterTorus1, 1, transformation);
1423 rotation =
new TGeoRotation (
"rotation", 180., -90., 0.);
1425 cooling->AddNode (waterTorus1, 2, transformation);
1427 TGeoVolume *waterTorus2 = gGeoManager->MakeTorus(Form(
"waterTorustwo%d_D4_H%d", i,half), water, fradius4mid[i], 0.,
fRWater, 180 -
fangle4[i] ,2*
fangle4[i]);
1428 waterTorus2->SetLineColor(kBlue);
1429 rotation =
new TGeoRotation (
"rotation", 180., 90., 0.);
1431 fradius4mid[i]*TMath::Cos(anglerad[i]), 0., 0., rotation);
1432 cooling->AddNode (waterTorus2, 3, transformation);
1440 TGeoVolume *waterTube1 = gGeoManager->MakeTube(Form(
"waterTubeone2_D4_H%d", half), water, 0.,
fRWater,
fLwater4[2]/2.);
1441 waterTube1->SetLineColor(kBlue);
1443 cooling->AddNode (waterTube1, 1, translation);
1445 cooling->AddNode (waterTube1, 2, translation);
1447 TGeoVolume *waterTube2 = gGeoManager->MakeTube(Form(
"waterTubetwo2_D4_H%d", half), water, 0.,
fRWater, lMiddle4[2]/2. - 2.*
fradius4[2]*TMath::Sin(anglerad[2]));
1448 waterTube2->SetLineColor(kBlue);
1449 translation =
new TGeoTranslation (
fXposition4[2] + 2.*
fradius4[2]*(1-TMath::Cos(anglerad[2])), 0., 0.);
1450 cooling->AddNode (waterTube2, 3, translation);
1454 TGeoVolume *waterTorus1 = gGeoManager->MakeTorus(Form(
"waterTorusone2_D4_H%d", half), water,
fradius4[2], 0.,
fRWater, 0.,
fangle4[2]);
1455 waterTorus1->SetLineColor(kBlue);
1456 rotation =
new TGeoRotation (
"rotation", 180., 90., 0.);
1458 cooling->AddNode (waterTorus1, 1, transformation);
1459 rotation =
new TGeoRotation (
"rotation", 180., -90., 180 -
fangle4[2]);
1462 cooling->AddNode (waterTorus1, 2, transformation);
1463 rotation =
new TGeoRotation (
"rotation", 180., -90., 0.);
1465 cooling->AddNode (waterTorus1, 3, transformation);
1466 rotation =
new TGeoRotation (
"rotation", 180., 90., 180 -
fangle4[2]);
1469 cooling->AddNode (waterTorus1, 4, transformation);
1473 waterTorus1 = gGeoManager->MakeTorus(Form(
"waterTorusone3_D4_H%d", half), water,
fradius4[3], 0.,
fRWater, 0.,
fangle4[3]);
1474 waterTorus1->SetLineColor(kBlue);
1475 rotation =
new TGeoRotation (
"rotation", 180., 90., 0.);
1477 cooling->AddNode (waterTorus1, 1, transformation);
1479 TGeoVolume *waterTorus2 = gGeoManager->MakeTorus(Form(
"waterTorustwo3_D4_H%d", half), water,
fradius4[4] , 0.,
fRWater, 0.,
fangle4[4]);
1480 waterTorus2->SetLineColor(kBlue);
1481 rotation =
new TGeoRotation (
"rotation", 180., -90., 180 -
fangle4[3]);
1484 fradius4[3]*TMath::Sin(anglerad[3]) +
fradius4[4]*TMath::Sin(anglerad[3]), rotation);
1485 cooling->AddNode (waterTorus2, 1, transformation);
1486 rotation =
new TGeoRotation (
"rotation", 180., -90., 0.);
1488 cooling->AddNode (waterTorus1, 2, transformation);
1489 rotation =
new TGeoRotation (
"rotation", 180., 90., 180 -
fangle4[3]);
1492 fradius4[3]*TMath::Sin(anglerad[3]) -
fradius4[4]*TMath::Sin(anglerad[3]), rotation);
1493 cooling->AddNode (waterTorus2, 2, transformation);
1495 TGeoVolume *waterTorus3 = gGeoManager->MakeTorus(Form(
"waterTorusthree3_D4_H%d", half), water, fradius4mid[2] , 0.,
fRWater, -
fangle4[5], 2.*
fangle4[5]);
1496 waterTorus3->SetLineColor(kBlue);
1497 rotation =
new TGeoRotation (
"rotation", 0., 90., 0.);
1499 fradius4[4]*TMath::Cos(anglerad[3]) - ((fradius4mid[2] -
fradius4[4])*TMath::Cos(anglerad[5])), 0., 0., rotation);
1500 cooling->AddNode (waterTorus3, 1, transformation);
1505 Double_t angle4fifthrad[4] = {0., 0., 0., 0.};
1506 for(Int_t i=0; i<4; i++){
1507 angle4fifthrad[i] = (TMath::Pi())*(fangle4fifth[i])/180.;
1509 Double_t beta4fourth[4] = {0, fangle4fifth[0], fangle4fifth[0] - fangle4fifth[1], 180};
1510 Double_t beta4fourthrad[4] = {};
1511 for(Int_t i=0; i<4; i++){
1512 beta4fourthrad[i] = (TMath::Pi())*(beta4fourth[i])/180.;
1515 fXposition4[4] +
fradius4fifth[0]*((TMath::Cos(beta4fourthrad[0])) - TMath::Cos(beta4fourthrad[0] + angle4fifthrad[0])) -
1516 fradius4fifth[1]*(TMath::Cos(beta4fourthrad[0] + angle4fifthrad[0])),
1518 fXposition4[4] +
fradius4fifth[0]*((TMath::Cos(beta4fourthrad[0])) - TMath::Cos(beta4fourthrad[0] + angle4fifthrad[0])) -
1519 fradius4fifth[1]*(TMath::Cos(beta4fourthrad[0] + angle4fifthrad[0])) +
1520 fradius4fifth[1]*(TMath::Sin(TMath::Pi()/2. - angle4fifthrad[1] + angle4fifthrad[0] + beta4fourthrad[0])) +
1521 fradius4fifth[2]*(TMath::Cos(angle4fifthrad[1] - angle4fifthrad[0] - beta4fourthrad[0])),
1523 fXposition4[4] +
fradius4fifth[0]*((TMath::Cos(beta4fourthrad[0])) - TMath::Cos(beta4fourthrad[0] + angle4fifthrad[0])) -
1524 fradius4fifth[1]*(TMath::Cos(beta4fourthrad[0] + angle4fifthrad[0])) +
1525 fradius4fifth[1]*(TMath::Sin(TMath::Pi()/2. - angle4fifthrad[1] + angle4fifthrad[0] + beta4fourthrad[0])) +
1526 fradius4fifth[2]*(TMath::Cos(angle4fifthrad[1] - angle4fifthrad[0] - beta4fourthrad[0])) -
1529 Double_t translation4y[4] = {0., 0., 0., 0.};
1531 Double_t translation4z[4] = {-(
fLwater4[0] + lMiddle4[0]/2.) -
fradius4fifth[0]*(TMath::Sin(beta4fourthrad[0])),
1534 fradius4fifth[0]*(TMath::Sin(beta4fourthrad[0] + angle4fifthrad[0])) +
1535 fradius4fifth[1]*(TMath::Sin(beta4fourthrad[0] + angle4fifthrad[0])),
1538 fradius4fifth[0]*(TMath::Sin(beta4fourthrad[0] + angle4fifthrad[0])) +
1539 fradius4fifth[1]*(TMath::Cos(TMath::Pi()/2 - beta4fourthrad[0] - angle4fifthrad[0])) +
1540 fradius4fifth[1]*(TMath::Cos(TMath::Pi()/2. - angle4fifthrad[1] + angle4fifthrad[0] + beta4fourthrad[0])) +
1541 fradius4fifth[2]*(TMath::Sin(angle4fifthrad[1] - angle4fifthrad[0] - beta4fourthrad[0])),
1544 fradius4fifth[0]*(TMath::Sin(beta4fourthrad[0] + angle4fifthrad[0])) +
1545 fradius4fifth[1]*(TMath::Cos(TMath::Pi()/2 - beta4fourthrad[0] - angle4fifthrad[0])) +
1546 fradius4fifth[1]*(TMath::Cos(TMath::Pi()/2. - angle4fifthrad[1] + angle4fifthrad[0] + beta4fourthrad[0])) +
1547 fradius4fifth[2]*(TMath::Sin(angle4fifthrad[1] - angle4fifthrad[0] - beta4fourthrad[0])) +
1551 Double_t rotation4x[4] = {180., 180., 180., 180};
1552 Double_t rotation4y[4] = {90., 90., 90., 90};
1553 Double_t rotation4z[4] = {0., 180 - fangle4fifth[1] , 0., 0.};
1555 for (Int_t i= 0; i<4; i++){
1556 waterTorus1 = gGeoManager->MakeTorus(Form(
"waterTorusone%d_D4_H%d", i,half), water,
fradius4fifth[i], 0.,
fRWater, beta4fourth[i], fangle4fifth[i]);
1557 waterTorus1->SetLineColor(kBlue);
1558 rotation =
new TGeoRotation (
"rotation", rotation4x[i], rotation4y[i], rotation4z[i]);
1559 transformation =
new TGeoCombiTrans(translation4x[i], translation4y[i], translation4z[i], rotation);
1560 cooling->AddNode (waterTorus1, 7, transformation);
1561 rotation =
new TGeoRotation (
"rotation", rotation4x[i] , rotation4y[i] - 180, rotation4z[i]);
1562 transformation =
new TGeoCombiTrans(translation4x[i], translation4y[i], - translation4z[i], rotation);
1563 cooling->AddNode (waterTorus1, 8, transformation);
1566 TGeoVolume *waterTubeFive = gGeoManager->MakeTube(Form(
"waterTubeFive1_D4_H%d",half), water, 0.,
fRWater, -translation4z[3]);
1567 waterTubeFive->SetLineColor(kBlue);
1568 rotation =
new TGeoRotation (
"rotation", 0., 0., 0.);
1569 transformation =
new TGeoCombiTrans(translation4x[3] +
fradius4fifth[3], 0., 0., rotation);
1570 cooling->AddNode(waterTubeFive, 1, transformation);
1577 for(Int_t i=0; i<2; i++){
1582 pipeTube1->SetLineColor(10);
1584 cooling->AddNode (pipeTube1, 1, translation);
1586 cooling->AddNode (pipeTube1, 2, translation);
1589 pipeTube2->SetLineColor(10);
1590 rotation =
new TGeoRotation (
"rotation", -90., -
fangle4[i], 0.);
1593 fLpartial4[i]*(TMath::Cos(anglerad[i]))/2., rotation);
1594 cooling->AddNode (pipeTube2, 3, transformation);
1595 rotation =
new TGeoRotation (
"rotation", -90.,
fangle4[i], 0.);
1598 fLpartial4[i]*(TMath::Cos(anglerad[i]))/2. , rotation);
1599 cooling->AddNode (pipeTube2, 4, transformation);
1604 pipeTorus1->SetLineColor(10);
1605 rotation =
new TGeoRotation (
"rotation", 180., 90., 0.);
1607 cooling->AddNode (pipeTorus1, 1, transformation);
1608 rotation =
new TGeoRotation (
"rotation", 180., -90., 0.);
1610 cooling->AddNode (pipeTorus1, 2, transformation);
1613 pipeTorus2->SetLineColor(10);
1614 rotation =
new TGeoRotation (
"rotation", 180., 90., 0.);
1616 fradius4mid[i]*TMath::Cos(anglerad[i]), 0., 0., rotation);
1617 cooling->AddNode (pipeTorus2, 3, transformation);
1626 pipeTube1->SetLineColor(10);
1628 cooling->AddNode (pipeTube1, 1, translation);
1630 cooling->AddNode (pipeTube1, 2, translation);
1632 TGeoVolume *pipeTube2 = gGeoManager->MakeTube(Form(
"pipeTubetwo2_D4_H%d",half), pipe,
fRWater,
fRWater +
fDRPipe, lMiddle4[2]/2. - 2.*
fradius4[2]*TMath::Sin(anglerad[2]));
1633 pipeTube2->SetLineColor(10);
1634 translation =
new TGeoTranslation (
fXposition4[2] + 2.*
fradius4[2]*(1-TMath::Cos(anglerad[2])), 0., 0.);
1635 cooling->AddNode (pipeTube2, 3, translation);
1640 pipeTorus1->SetLineColor(10);
1641 rotation =
new TGeoRotation (
"rotation", 180., 90., 0.);
1643 cooling->AddNode (pipeTorus1, 1, transformation);
1644 rotation =
new TGeoRotation (
"rotation", 180., -90., 180 -
fangle4[2]);
1647 cooling->AddNode (pipeTorus1, 2, transformation);
1648 rotation =
new TGeoRotation (
"rotation", 180., -90., 0.);
1650 cooling->AddNode (pipeTorus1, 3, transformation);
1651 rotation =
new TGeoRotation (
"rotation", 180., 90., 180 -
fangle4[2]);
1654 cooling->AddNode (pipeTorus1, 4, transformation);
1659 pipeTorus1->SetLineColor(10);
1660 rotation =
new TGeoRotation (
"rotation", 180., 90., 0.);
1662 cooling->AddNode (pipeTorus1, 1, transformation);
1665 pipeTorus2->SetLineColor(10);
1666 rotation =
new TGeoRotation (
"rotation", 180., -90., 180 -
fangle4[3]);
1669 fradius4[3]*TMath::Sin(anglerad[3]) +
fradius4[4]*TMath::Sin(anglerad[3]), rotation);
1670 cooling->AddNode (pipeTorus2, 1, transformation);
1671 rotation =
new TGeoRotation (
"rotation", 180., -90., 0.);
1673 cooling->AddNode (pipeTorus1, 2, transformation);
1674 rotation =
new TGeoRotation (
"rotation", 180., 90., 180 -
fangle4[3]);
1677 fradius4[3]*TMath::Sin(anglerad[3]) -
fradius4[4]*TMath::Sin(anglerad[3]), rotation);
1678 cooling->AddNode (pipeTorus2, 2, transformation);
1681 pipeTorus3->SetLineColor(10);
1682 rotation =
new TGeoRotation (
"rotation", 0., 90., 0.);
1684 fradius4[4]*TMath::Cos(anglerad[3]) - ((fradius4mid[2] -
fradius4[4])*TMath::Cos(anglerad[5])), 0., 0., rotation);
1685 cooling->AddNode (pipeTorus3, 1, transformation);
1689 for(Int_t i= 0; i<4; i++){
1691 pipeTorus1->SetLineColor(10);
1692 rotation =
new TGeoRotation (
"rotation", rotation4x[i], rotation4y[i], rotation4z[i]);
1693 transformation =
new TGeoCombiTrans(translation4x[i], translation4y[i], translation4z[i], rotation);
1694 cooling->AddNode (pipeTorus1, 7, transformation);
1695 rotation =
new TGeoRotation (
"rotation", rotation4x[i] , rotation4y[i] - 180, rotation4z[i]);
1696 transformation =
new TGeoCombiTrans(translation4x[i], translation4y[i], - translation4z[i], rotation);
1697 cooling->AddNode (pipeTorus1, 8, transformation);
1700 TGeoVolume *pipeTubeFive = gGeoManager->MakeTube(Form(
"pipeTubeFive1_D4_H%d", half), pipe,
fRWater,
fRWater +
fDRPipe, -translation4z[3]);
1701 pipeTubeFive->SetLineColor(10);
1702 rotation =
new TGeoRotation (
"rotation", 0., 0., 0.);
1703 transformation =
new TGeoCombiTrans(translation4x[3] +
fradius4fifth[3], 0., 0., rotation);
1704 cooling->AddNode(pipeTubeFive, 1, transformation);
1715 rotation =
new TGeoRotation (
"rotation", -90., 90., 0.);
1716 transformation =
new TGeoCombiTrans(0., 0.,
fZPlan[disk] + deltaz/2. - fCarbonThickness -
fRWater -
fDRPipe, rotation);
1717 fHalfDisk->AddNode(cooling, 3, transformation);
1718 transformation =
new TGeoCombiTrans(0., 0.,
fZPlan[disk] - deltaz/2. + fCarbonThickness +
fRWater +
fDRPipe, rotation);
1719 fHalfDisk->AddNode(cooling, 4, transformation);
1724 TGeoVolumeAssembly *carbonPlate =
new TGeoVolumeAssembly(Form(
"carbonPlate_D4_H%d",half));
1728 t41-> RegisterYourself();
1730 TGeoTubeSeg *holeCarbon4 =
new TGeoTubeSeg(Form(
"holeCarbon4_D4_H%d",half), 0.,
fRMin[disk], fCarbonThickness + 0.000001, 0, 180.);
1731 TGeoTranslation *t42=
new TGeoTranslation (
"t42",0., -
fHalfDiskGap , 0.);
1732 t42-> RegisterYourself();
1736 TGeoSubtraction *carbonhole4 =
new TGeoSubtraction(carbonBase4, holeCarbon4, t41, t42);
1737 TGeoCompositeShape *cs4 =
new TGeoCompositeShape(Form(
"Carbon4_D4_H%d",half), carbonhole4);
1738 TGeoVolume *carbonBaseWithHole4 =
new TGeoVolume(Form(
"carbonBaseWithHole_D4_H%d",half), cs4, carbon);
1740 carbonBaseWithHole4->SetLineColor(kGray+3);
1741 rotation =
new TGeoRotation (
"rotation", 0., 0., 0.);
1742 transformation =
new TGeoCombiTrans(0., 0., 0., rotation);
1743 carbonPlate->AddNode(carbonBaseWithHole4, 0,
new TGeoTranslation(0., 0.,
fZPlan[disk]));
1747 for (Int_t ipart=1; ipart<
fnPart[disk]; ipart ++) {
1749 TGeoVolume *partCarbon = gGeoManager->MakeBox(Form(
"partCarbon_D4_H%d_%d", half,ipart), carbon,
fSupportXDimensions[disk][ipart]/2.,
1751 partCarbon->SetLineColor(kGray+3);
1753 carbonPlate -> AddNode(partCarbon, ipart, t);
1765 rotation =
new TGeoRotation (
"rotation", 180., 0., 0.);
1766 transformation =
new TGeoCombiTrans(0., 0., deltaz/2., rotation);
1767 fHalfDisk->AddNode(carbonPlate, 3, transformation);
1768 transformation =
new TGeoCombiTrans(0., 0., -deltaz/2., rotation);
1769 fHalfDisk->AddNode(carbonPlate, 4, transformation);
1775 TGeoVolumeAssembly *rohacellPlate =
new TGeoVolumeAssembly(Form(
"rohacellPlate_D4_H%d",half));
1781 TGeoTubeSeg *holeRohacell4 =
new TGeoTubeSeg(Form(
"holeRohacell4_D4_H%d",half), 0.,
fRMin[disk],
fRohacellThickness + 0.000001, 0, 180.);
1786 TGeoSubtraction *rohacellhole4 =
new TGeoSubtraction(rohacellBase4, holeRohacell4, t41, t42);
1787 TGeoCompositeShape *rh4 =
new TGeoCompositeShape(Form(
"rohacellBase4_D4_H%d",half), rohacellhole4);
1788 TGeoVolume *rohacellBaseWithHole =
new TGeoVolume(Form(
"rohacellBaseWithHole_D4_H%d",half), rh4, rohacell);
1790 rohacellBaseWithHole->SetLineColor(kGray);
1791 rotation =
new TGeoRotation (
"rotation", 0., 0., 0.);
1792 transformation =
new TGeoCombiTrans(0., 0., 0., rotation);
1793 rohacellPlate -> AddNode(rohacellBaseWithHole, 0,
new TGeoTranslation(0., 0.,
fZPlan[disk]));
1797 for (Int_t ipart=1; ipart<fnPart[disk]; ipart ++) {
1799 TGeoVolume *partRohacell = gGeoManager->MakeBox(Form(
"partRohacelli_D4_H%d_%d", half, ipart), rohacell,
fSupportXDimensions[disk][ipart]/2.,
1801 partRohacell->SetLineColor(kGray);
1803 rohacellPlate -> AddNode(partRohacell, ipart, t);
1813 rotation =
new TGeoRotation (
"rotation", 180., 0., 0.);
1814 transformation =
new TGeoCombiTrans(0., 0., 0., rotation);
1815 fHalfDisk->AddNode(rohacellPlate, 2, transformation);
1827 for (Int_t idisk=0; idisk<
fNMaxDisks; idisk++) {
1828 for (Int_t ihalf=0; ihalf<
kNHalves; ihalf++) {
1829 fHalfDiskRotation[idisk][ihalf] =
new TGeoRotation(Form(
"rotation%d%d", idisk, ihalf), 0., 0., 0.);
1867 for(Int_t i=0; i<
fNDisks; i++) {
1957 fangle4fifth[0] = 64.;
1958 fangle4fifth[1] = 30.;
1959 fangle4fifth[2] = 27.;
1960 fangle4fifth[3] = fangle4fifth[0] - fangle4fifth[1] + fangle4fifth[2];
printf("Chi2/npoints = %f\n", TMath::Sqrt(chi2/npoints))
TGeoVolumeAssembly * Create(Int_t kHalf, Int_t disk)
Double_t fHeatExchangerThickness
TGeoCombiTrans * fHalfDiskTransformation[fNMaxDisks][kNHalves]
void CreateHalfDisk0(Int_t half)
TGeoVolumeAssembly * fHalfDisk
Double_t fradius3fourth[4]
Double_t fradius4fifth[4]
void CreateHalfDisk1(Int_t half)
Double_t fRohacellThickness
Double_t ** fSupportYDimensions
void CreateHalfDisk2(Int_t half)
Double_t ** fSupportXDimensions
MFT Heat Exchanger builder.
void CreateHalfDisk3(Int_t half)
TGeoRotation * fHalfDiskRotation[fNMaxDisks][kNHalves]
void CreateHalfDisk4(Int_t half)
Double_t fangle3fourth[4]
static const Int_t fNMaxDisks
Double_t fCarbonThickness
Double_t fangleThirdPipe3