396 auto* itsH =
new TGeoElement(Form(
"%s_H", mDetName),
"Hydrogen", 1, 1.00794);
397 auto* itsHe =
new TGeoElement(Form(
"%s_He", mDetName),
"Helium", 2, 4.002602);
398 auto* itsC =
new TGeoElement(Form(
"%s_C", mDetName),
"Carbon", 6, 12.0107);
399 auto* itsN =
new TGeoElement(Form(
"%s_N", mDetName),
"Nitrogen", 7, 14.0067);
400 auto* itsO =
new TGeoElement(Form(
"%s_O", mDetName),
"Oxygen", 8, 15.994);
401 auto* itsF =
new TGeoElement(Form(
"%s_F", mDetName),
"Florine", 9, 18.9984032);
402 auto* itsNe =
new TGeoElement(Form(
"%s_Ne", mDetName),
"Neon", 10, 20.1797);
403 auto* itsMg =
new TGeoElement(Form(
"%s_Mg", mDetName),
"Magnesium", 12, 24.3050);
404 auto* itsAl =
new TGeoElement(Form(
"%s_Al", mDetName),
"Aluminum", 13, 26981538);
405 auto* itsSi =
new TGeoElement(Form(
"%s_Si", mDetName),
"Silicon", 14, 28.0855);
406 auto* itsP =
new TGeoElement(Form(
"%s_P", mDetName),
"Phosphorous", 15, 30.973761);
407 auto* itsS =
new TGeoElement(Form(
"%s_S", mDetName),
"Sulfur", 16, 32.065);
408 auto* itsAr =
new TGeoElement(Form(
"%s_Ar", mDetName),
"Argon", 18, 39.948);
409 auto* itsTi =
new TGeoElement(Form(
"%s_Ti", mDetName),
"Titanium", 22, 47.867);
410 auto* itsCr =
new TGeoElement(Form(
"%s_Cr", mDetName),
"Chromium", 24, 51.9961);
411 auto* itsMn =
new TGeoElement(Form(
"%s_Mn", mDetName),
"Manganese", 25, 54.938049);
412 auto* itsFe =
new TGeoElement(Form(
"%s_Fe", mDetName),
"Iron", 26, 55.845);
413 auto* itsCo =
new TGeoElement(Form(
"%s_Co", mDetName),
"Cobalt", 27, 58.933200);
414 auto* itsNi =
new TGeoElement(Form(
"%s_Ni", mDetName),
"Nickrl", 28, 56.6930);
415 auto* itsCu =
new TGeoElement(Form(
"%s_Cu", mDetName),
"Copper", 29, 63.546);
416 auto* itsZn =
new TGeoElement(Form(
"%s_Zn", mDetName),
"Zinc", 30, 65.39);
417 auto* itsKr =
new TGeoElement(Form(
"%s_Kr", mDetName),
"Krypton", 36, 83.80);
418 auto* itsMo =
new TGeoElement(Form(
"%s_Mo", mDetName),
"Molylibdium", 42, 95.94);
419 auto* itsXe =
new TGeoElement(Form(
"%s_Xe", mDetName),
"Zeon", 54, 131.293);
430 auto* itsAir =
new TGeoMixture(Form(
"%s_Air", mDetName), 9);
432 itsAir->AddElement(itsN,
w);
434 5.90E-4 * 2. * 15.994 / (12.0107 + 2. * 15.994);
435 itsAir->AddElement(itsO,
w);
437 itsAir->AddElement(itsAr,
w);
438 w = 5.90E-4 * 12.0107 / (12.0107 + 2. * 15.994) +
439 2.0E-5 * 12.0107 / (12.0107 + 4. * 1.00794);
440 itsAir->AddElement(itsC,
w);
442 itsAir->AddElement(itsNe,
w);
444 itsAir->AddElement(itsHe,
w);
446 itsAir->AddElement(itsKr,
w);
448 itsAir->AddElement(itsH,
w);
450 itsAir->AddElement(itsXe,
w);
451 itsAir->SetDensity(351.0 *
sKgm3);
452 itsAir->SetPressure(101325 *
sPascal);
453 itsAir->SetTemperature(15.0 *
sCelsius);
454 itsAir->SetState(TGeoMaterial::kMatStateGas);
457 auto* itsSiDet =
new TGeoMaterial(Form(
"%s_Si", mDetName), itsSi, 2.33 *
sGCm3);
458 itsSiDet->SetTemperature(15.0 *
sCelsius);
459 itsSiDet->SetState(TGeoMaterial::kMatStateSolid);
462 auto* itsEpoxy =
new TGeoMixture(Form(
"%s_Epoxy", mDetName), 3);
463 itsEpoxy->AddElement(itsC, 18);
464 itsEpoxy->AddElement(itsH, 19);
465 itsEpoxy->AddElement(itsO, 3);
466 itsEpoxy->SetDensity(1.8 *
sGCm3);
467 itsEpoxy->SetTemperature(15.0 *
sCelsius);
468 itsEpoxy->SetState(TGeoMaterial::kMatStateSolid);
478 auto* itsCarbonFiber =
new TGeoMixture(Form(
"%s_CarbonFiber-M55J", mDetName), 4);
482 w = 1.91 / (1.91 + (1. - .60) * itsEpoxy->GetDensity());
483 itsCarbonFiber->AddElement(itsC,
w);
484 w = (1. - .60) * itsEpoxy->GetDensity() / (1.91 + (1. - .06) * itsEpoxy->GetDensity());
486 for (
i = 0;
i < itsEpoxy->GetNelements();
i++) {
487 itsCarbonFiber->AddElement(itsEpoxy->GetElement(
i), itsEpoxy->GetWmixt()[
i] *
w);
490 itsCarbonFiber->SetDensity((1.91 + (1. - .60) * itsEpoxy->GetDensity()) *
sGCm3);
491 itsCarbonFiber->SetTemperature(22.0 *
sCelsius);
492 itsCarbonFiber->SetState(TGeoMaterial::kMatStateSolid);
505 auto* itsFoam =
new TGeoMixture(Form(
"%s_Foam", mDetName), 4);
506 itsFoam->AddElement(itsC, 9);
507 itsFoam->AddElement(itsH, 13);
508 itsFoam->AddElement(itsN, 1);
509 itsFoam->AddElement(itsO, 2);
510 itsFoam->SetTitle(
"Rohacell 51 A");
511 itsFoam->SetDensity(52. *
sKgm3);
512 itsFoam->SetTemperature(22.0 *
sCelsius);
513 itsFoam->SetState(TGeoMaterial::kMatStateSolid);
525 auto* itsKapton =
new TGeoMixture(Form(
"%s_Kapton", mDetName), 4);
526 itsKapton->AddElement(itsH, 0.026362);
527 itsKapton->AddElement(itsC, 0.691133);
528 itsKapton->AddElement(itsN, 0.073270);
529 itsKapton->AddElement(itsO, 0.200235);
530 itsKapton->SetTitle(
"Kapton ribon and cable base");
531 itsKapton->SetDensity(1.42 *
sGCm3);
532 itsKapton->SetTemperature(22.0 *
sCelsius);
533 itsKapton->SetState(TGeoMaterial::kMatStateSolid);
545 auto* itsUpilex =
new TGeoMixture(Form(
"%s_Upilex", mDetName), 4);
546 itsUpilex->AddElement(itsC, 16);
547 itsUpilex->AddElement(itsH, 6);
548 itsUpilex->AddElement(itsN, 2);
549 itsUpilex->AddElement(itsO, 4);
550 itsUpilex->SetTitle(
"Upilex ribon, cable, and pcb base");
551 itsUpilex->SetDensity(1.47 *
sGCm3);
552 itsUpilex->SetTemperature(22.0 *
sCelsius);
553 itsUpilex->SetState(TGeoMaterial::kMatStateSolid);
567 auto* itsAl6061 =
new TGeoMixture(Form(
"%s_Al6061", mDetName), 9);
568 itsAl6061->AddElement(itsCr, 0.000375);
569 itsAl6061->AddElement(itsCu, 0.00275);
570 itsAl6061->AddElement(itsFe, 0.0035);
571 itsAl6061->AddElement(itsMg, 0.01);
572 itsAl6061->AddElement(itsMn, 0.00075);
573 itsAl6061->AddElement(itsSi, 0.006);
574 itsAl6061->AddElement(itsTi, 0.00075);
575 itsAl6061->AddElement(itsZn, 0.00125);
576 itsAl6061->AddElement(itsAl, 0.974625);
577 itsAl6061->SetTitle(
"Aluminum Alloy 6061");
578 itsAl6061->SetDensity(2.7 *
sGCm3);
579 itsAl6061->SetTemperature(22.0 *
sCelsius);
580 itsAl6061->SetState(TGeoMaterial::kMatStateSolid);
594 auto* itsAl7075 =
new TGeoMixture(Form(
"%s_Al7075", mDetName), 9);
595 itsAl7075->AddElement(itsCr, 0.0023);
596 itsAl7075->AddElement(itsCu, 0.016);
597 itsAl7075->AddElement(itsFe, 0.0025);
598 itsAl7075->AddElement(itsMg, 0.025);
599 itsAl7075->AddElement(itsMn, 0.00125);
600 itsAl7075->AddElement(itsSi, 0.002);
601 itsAl7075->AddElement(itsTi, 0.001);
602 itsAl7075->AddElement(itsZn, 0.056);
603 itsAl7075->AddElement(itsAl, 0.89395);
604 itsAl7075->SetTitle(
"Aluminum Alloy 7075");
605 itsAl7075->SetDensity(2.81 *
sGCm3);
606 itsAl7075->SetTemperature(22.0 *
sCelsius);
607 itsAl7075->SetState(TGeoMaterial::kMatStateSolid);
618 auto* itsRuby =
new TGeoMixture(Form(
"%s_RubySphere", mDetName), 2);
619 itsRuby->AddElement(itsAl, 2);
620 itsRuby->AddElement(itsO, 3);
621 itsRuby->SetTitle(
"Ruby reference sphere");
622 itsRuby->SetDensity(2.81 *
sGCm3);
623 itsRuby->SetTemperature(22.0 *
sCelsius);
624 itsRuby->SetState(TGeoMaterial::kMatStateSolid);
637 auto* itsInox304L =
new TGeoMixture(Form(
"%s_Inox304L", mDetName), 9);
638 itsInox304L->AddElement(itsC, 0.00015);
639 itsInox304L->AddElement(itsMn, 0.010);
640 itsInox304L->AddElement(itsSi, 0.005);
641 itsInox304L->AddElement(itsP, 0.000225);
642 itsInox304L->AddElement(itsS, 0.00015);
643 itsInox304L->AddElement(itsNi, 0.0925);
644 itsInox304L->AddElement(itsCr, 0.1900);
645 itsInox304L->AddElement(itsMo, 0.0225);
646 itsInox304L->AddElement(itsFe, 0.679475);
647 itsInox304L->SetTitle(
"ITS Stainless Steal (Inox) type AISI 304L");
648 itsInox304L->SetDensity(7.93 *
sKgdm3);
649 itsInox304L->SetTemperature(22.0 *
sCelsius);
650 itsInox304L->SetState(TGeoMaterial::kMatStateSolid);
663 auto* itsInox316L =
new TGeoMixture(Form(
"%s_Inox316L", mDetName), 9);
664 itsInox316L->AddElement(itsC, 0.00015);
665 itsInox316L->AddElement(itsMn, 0.010);
666 itsInox316L->AddElement(itsSi, 0.005);
667 itsInox316L->AddElement(itsP, 0.000225);
668 itsInox316L->AddElement(itsS, 0.00015);
669 itsInox316L->AddElement(itsNi, 0.12);
670 itsInox316L->AddElement(itsCr, 0.17);
671 itsInox316L->AddElement(itsMo, 0.025);
672 itsInox316L->AddElement(itsFe, 0.66945);
673 itsInox316L->SetTitle(
"ITS Stainless Steal (Inox) type AISI 316L");
674 itsInox316L->SetDensity(7.97 *
sKgdm3);
675 itsInox316L->SetTemperature(22.0 *
sCelsius);
676 itsInox316L->SetState(TGeoMaterial::kMatStateSolid);
692 auto* itsPhynox =
new TGeoMixture(Form(
"%s_Phynox", mDetName), 7);
693 itsPhynox->AddElement(itsC, 0.0015);
694 itsPhynox->AddElement(itsMn, 0.020);
695 itsPhynox->AddElement(itsNi, 0.18);
696 itsPhynox->AddElement(itsCr, 0.215);
697 itsPhynox->AddElement(itsMo, 0.075);
698 itsPhynox->AddElement(itsCo, 0.42);
699 itsPhynox->AddElement(itsFe, 0.885);
700 itsPhynox->SetTitle(
"ITS Cooling tube alloy");
701 itsPhynox->SetDensity(8.3 *
sGCm3);
702 itsPhynox->SetTemperature(22.0 *
sCelsius);
703 itsPhynox->SetState(TGeoMaterial::kMatStateSolid);
708 auto* itsWater =
new TGeoMixture(Form(
"%s_Water", mDetName), 2);
709 itsWater->AddElement(itsH, 2);
710 itsWater->AddElement(itsO, 1);
711 itsWater->SetTitle(
"ITS Cooling Water");
712 itsWater->SetDensity(1.0 *
sGCm3);
713 itsWater->SetTemperature(22.0 *
sCelsius);
714 itsWater->SetState(TGeoMaterial::kMatStateLiquid);
725 auto* itsFreon =
new TGeoMixture(Form(
"%s_SPD_Freon", mDetName), 2);
726 itsFreon->AddElement(itsC, 4);
727 itsFreon->AddElement(itsF, 10);
728 itsFreon->SetTitle(
"ITS SPD 2 phase Cooling freon");
729 itsFreon->SetDensity(1.52 *
sGCm3);
730 itsFreon->SetTemperature(22.0 *
sCelsius);
731 itsFreon->SetState(TGeoMaterial::kMatStateLiquid);
946 Double_t xc, Double_t yc, Double_t rc, Double_t&
t0,
949 Double_t dx, dy, cx, cy, s2, t[4];
950 Double_t a0, b0, c0,
a1,
b1,
c1, sinthp, sinthm, costhp, costhm;
959 s2 = dx * dx + dy * dy;
968 b0 = 2.0 * rc * dx * (dx * cy - cx * dy);
969 c0 = dx * dx * cy * cy - 2.0 * dy * dx * cy * cx + cx * cx * dy * dy - rc * rc * dy * dy;
970 c0 = 0.25 * b0 * b0 / (a0 * a0) - c0 / a0;
974 sinthp = -0.5 * b0 / a0 + TMath::Sqrt(c0);
975 sinthm = -0.5 * b0 / a0 - TMath::Sqrt(c0);
981 b1 = 2.0 * rc * dy * (dy * cx - dx * cy);
982 c1 = dy * dy * cx * cx - 2.0 * dy * dx * cy * cx + dx * dx * cy * cy - rc * rc * dx * dx;
987 costhp = -0.5 *
b1 /
a1 + TMath::Sqrt(
c1);
988 costhm = -0.5 *
b1 /
a1 - TMath::Sqrt(
c1);
990 t[0] = t[1] = t[2] = t[3] = 400.;
991 a0 = TMath::ATan2(sinthp, costhp);
993 a0 += 2.0 * TMath::Pi();
995 a1 = TMath::ATan2(sinthp, costhm);
997 a1 += 2.0 * TMath::Pi();
999 b0 = TMath::ATan2(sinthm, costhp);
1001 b0 += 2.0 * TMath::Pi();
1003 b1 = TMath::ATan2(sinthm, costhm);
1005 b1 += 2.0 * TMath::Pi();
1007 x1 = xc + rc * TMath::Cos(a0);
1008 y1 = yc + rc * TMath::Sin(a0);
1009 s2 = dx * (
y1 -
y0) - dy * (
x1 -
x0);
1010 if (s2 * s2 < DBL_EPSILON) {
1011 t[0] = a0 * TMath::RadToDeg();
1013 x1 = xc + rc * TMath::Cos(
a1);
1014 y1 = yc + rc * TMath::Sin(
a1);
1015 s2 = dx * (
y1 -
y0) - dy * (
x1 -
x0);
1016 if (s2 * s2 < DBL_EPSILON) {
1017 t[1] =
a1 * TMath::RadToDeg();
1019 x1 = xc + rc * TMath::Cos(b0);
1020 y1 = yc + rc * TMath::Sin(b0);
1021 s2 = dx * (
y1 -
y0) - dy * (
x1 -
x0);
1022 if (s2 * s2 < DBL_EPSILON) {
1023 t[2] = b0 * TMath::RadToDeg();
1025 x1 = xc + rc * TMath::Cos(
b1);
1026 y1 = yc + rc * TMath::Sin(
b1);
1027 s2 = dx * (
y1 -
y0) - dy * (
x1 -
x0);
1028 if (s2 * s2 < DBL_EPSILON) {
1029 t[3] =
b1 * TMath::RadToDeg();
1031 for (
i = 0;
i < 4;
i++) {
1032 for (
j =
i + 1;
j < 4;
j++) {