264 for (
int iRing = 0; iRing <
m_numRings; iRing++){
275 GeoFullPhysVol * wheel=
new GeoFullPhysVol(
m_logVolume);
285 double powerTapeZMinusMax = -0.5 *
m_discSupport->thickness();
287 double maxZOfRingsFront = 0;
289 for (
int iRing = 0; iRing <
m_numRings; iRing++){
296 maxZOfRingsFront =
std::max(maxZOfRingsFront, ringOuterZ);
299 wheel->add(
new GeoNameTag(ringNameTag));
301 wheel->add(
new GeoTransform(GeoTrf::Translate3D(0, 0, ringZpos)));
310 wheel->add(
new GeoTransform(GeoTrf::TranslateZ3D(coolingZpos)));
311 wheel->add(cooling.getVolume());
320 cooling.thickness());
325 double powerTapeZstart = powerTapeZpos - 0.5 * powerTape.thickness();
326 if (powerTapeZstart < powerTapeZPlusMax) {
327 powerTapeZpos = powerTapeZPlusMax + 0.5 * powerTape.thickness();
329 powerTapeZPlusMax = powerTapeZpos + 0.5 * powerTape.thickness();
331 double powerTapeZstart = powerTapeZpos + 0.5 * powerTape.thickness();
332 if (powerTapeZstart > powerTapeZMinusMax) {
333 powerTapeZpos = powerTapeZMinusMax - 0.5 * powerTape.thickness();
335 powerTapeZMinusMax = powerTapeZpos - 0.5 * powerTape.thickness();
337 if ((std::abs(powerTapeZpos)+0.5*powerTape.thickness()) > (std::abs(ringZpos) - 0.5*
ring->
thicknessInner())) {
338 std::cout <<
"ERROR: Power tapes clash with modules!!!" << std::endl;
340 wheel->add(
new GeoTransform(GeoTrf::TranslateZ3D(powerTapeZpos)));
341 wheel->add(powerTape.getVolume());
356 double powerTapeZMax = 0;
357 if (patchPanelSide > 0) {
358 powerTapeZMax = powerTapeZPlusMax;
360 powerTapeZMax = -powerTapeZMinusMax;
372 if (ppType >=
m_numPatchPanelTypes) std::cout <<
"ERROR: Patch Panel type number out of range!" << std::endl;
373 for (
int iRepeat = 0; iRepeat < numRepeat; iRepeat++) {
377 double patchPanelZpos = patchPanelSide * (powerTapeZMax + 0.5*
m_patchPanel[ppType]->thickness() +
m_safety);
382 std::cout <<
"ERROR: Patch Panel clashes with middle ring" << std::endl;
383 std::cout <<
" PatchPanel inner radius: " <<
m_patchPanel[ppType]->innerRadius() << std::endl;
384 std::cout <<
" Ring outer radius: " <<
m_rings[1]->outerRadius() << std::endl;
388 wheel->add(
new GeoTransform(GeoTrf::RotateZ3D(patchPanelAngle)*GeoTrf::TranslateX3D(patchPanelR)*GeoTrf::TranslateZ3D(patchPanelZpos)));
394 double ppConnectorZpos = patchPanelSide * (powerTapeZMax + 0.5*
m_pPConnector->thickness() +
m_safety);
398 std::cout <<
"ERROR: Patch Panel Connector clashes outside wheel" << std::endl;
399 std::cout <<
" PatchPanel Connector outer radius: " << ppConnectorR + 0.5*
m_pPConnector->deltaR() << std::endl;
400 std::cout <<
" Wheel outer radius: " <<
m_outerRadius << std::endl;
403 wheel->add(
new GeoTransform(GeoTrf::RotateZ3D(patchPanelAngle)*GeoTrf::TranslateX3D(ppConnectorR)*GeoTrf::TranslateZ3D(ppConnectorZpos)));
410 double ppCoolingZpos = patchPanelSide * (powerTapeZMax + 0.5*
m_pPCooling->thickness() +
m_safety);
414 std::cout <<
"ERROR: Patch Panel Cooling clashes outside wheel" << std::endl;
415 std::cout <<
" PatchPanel Cooling outer radius: " << ppCoolingR + 0.5*
m_pPCooling->deltaR() << std::endl;
416 std::cout <<
" Wheel outer radius: " <<
m_outerRadius << std::endl;
419 wheel->add(
new GeoTransform(GeoTrf::RotateZ3D(patchPanelAngle)*GeoTrf::TranslateX3D(ppCoolingR)*GeoTrf::TranslateZ3D(ppCoolingZpos)));
431 std::string optoharnessName =
"OptoHarnessO";
437 wheel->add(
new GeoTransform(GeoTrf::TranslateZ3D(optoHarnessZpos)));
438 wheel->add(optoharness.getVolume());
439 optoHarnessZMax = optoHarnessZpos + 0.5*optoharness.thickness();
443 for (
unsigned int iFSI = 0; iFSI <
m_fsiVector->size(); iFSI++) {
444 int type = (*m_fsiVector)[iFSI]->simType();
445 double fsiRadius = (*m_fsiVector)[iFSI]->location().radius();
446 double fsiPhi = (*m_fsiVector)[iFSI]->location().phi();
447 int fsiUsualSide = (*m_fsiVector)[iFSI]->location().side();
452 if (fsiUsualSide < 0) {
453 double zMin = std::abs(fsiZpos) - 0.5*
m_fsiType[
type]->thickness();
454 if (maxZOfRingsFront > zMin) {
455 std::cout <<
"WARNING: FSI probably clashes with ring" << std::endl;
456 std::cout <<
" maxZOfRingsFront = " << maxZOfRingsFront << std::endl;
457 std::cout <<
" fsiZMin = " << zMin << std::endl;
464 double servicesZMax = (fsiRadius > diskMidRadius) ? powerTapeZMax : optoHarnessZMax;
465 double zMin = std::abs(fsiZpos) - 0.5*
m_fsiType[
type]->thickness();
466 if (servicesZMax > zMin) {
467 std::cout <<
"WARNING: FSI probably clashes with disc services" << std::endl;
468 std::cout <<
" servicesZMax = " << servicesZMax << std::endl;
469 std::cout <<
" fsiZMin = " << zMin << std::endl;
470 std::cout <<
" fsiRadius = " << fsiRadius << std::endl;
474 wheel->add(
new GeoTransform(GeoTrf::RotateZ3D(fsiPhi)*GeoTrf::TranslateX3D(fsiRadius)*GeoTrf::TranslateZ3D(fsiZpos)));
484 for (
int iRepeat = 0; iRepeat < 4; iRepeat++) {
490 std::cout <<
"ERROR: Disc Fixation outside wheel" << std::endl;
491 std::cout <<
"Disc fixation outer radius: " << discFixationR + 0.5*
m_discFixation->thickness() << std::endl;
492 std::cout <<
" Wheel outer radius: " <<
m_outerRadius << std::endl;
495 wheel->add(
new GeoTransform(GeoTrf::RotateY3D(90.*
Gaudi::Units::degree)*GeoTrf::RotateX3D(discFixationAngle)*GeoTrf::TranslateZ3D(discFixationR)));
503 xMat.add(wheel,
"SCTDisc");
506 xMat.add(wheel,
"SCTDiscA");
509 xMat.add(wheel,
"SCTDiscC");