Skip to content

Commit ee38904

Browse files
sawenzelclaude
andcommitted
Share one volume for the MCM cooling pipe stubs in the TRD
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent e3b3d79 commit ee38904

1 file changed

Lines changed: 17 additions & 7 deletions

File tree

Detectors/TRD/base/src/Geometry.cxx

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2030,6 +2030,19 @@ void Geometry::createServices(std::vector<int> const& idtmed)
20302030
parMCM[2] = kMCMcoTh / 2.0;
20312031
createVolume("UMC4", "BOX", idtmed[24], parMCM, kNparMCM);
20322032

2033+
// The two short cooling pipe stubs that sit on top of every MCM. Their dimensions do not
2034+
// depend on layer or stack, so one volume is built here and placed ~7300 times per
2035+
// supermodule. Gsposp would instead create a new TGeoVolume on every single call.
2036+
parTube[0] = 0.0;
2037+
parTube[1] = 0.3 / 2.0; // Thickness of the cooling pipes
2038+
parTube[2] = kMCMx / 2.0;
2039+
createVolume("UTCQ", "TUBE", idtmed[24], parTube, kNparTube);
2040+
parTube[0] = 0.0;
2041+
parTube[1] = 0.2 / 2.0; // The cooling water inside them
2042+
parTube[2] = kMCMx / 2.0;
2043+
createVolume("UTCR", "TUBE", idtmed[14], parTube, kNparTube);
2044+
TVirtualMC::GetMC()->Gspos("UTCR", 1, "UTCQ", 0.0, 0.0, 0.0, 0, "ONLY");
2045+
20332046
// Put the MCM material inside the MCM mother volume
20342047
xpos = 0.0;
20352048
ypos = 0.0;
@@ -2064,13 +2077,10 @@ void Geometry::createServices(std::vector<int> const& idtmed)
20642077
xpos = (0.5 + iMCM[iMCMcol]) * xSize + 1.0 - CWIDTH[ilayer] / 2.0;
20652078
ypos = (0.5 + iMCMrow) * ySize - CLENGTH[ilayer][istack] / 2.0 + HSPACE / 2.0;
20662079
zpos = 0.0 + 0.742 / 2.0;
2067-
parTube[0] = 0.0;
2068-
parTube[1] = 0.3 / 2.0; // Thickness of the cooling pipes
2069-
parTube[2] = kMCMx / 2.0;
2070-
TVirtualMC::GetMC()->Gsposp("UTCP", iCopy + iMCMrow * 10 + iMCMcol + 50, cTagV, xpos, ypos + 1.0, zpos,
2071-
matrix[2], "ONLY", parTube, kNparTube);
2072-
TVirtualMC::GetMC()->Gsposp("UTCP", iCopy + iMCMrow * 10 + iMCMcol + 500, cTagV, xpos, ypos + 2.0, zpos,
2073-
matrix[2], "ONLY", parTube, kNparTube);
2080+
TVirtualMC::GetMC()->Gspos("UTCQ", iCopy + iMCMrow * 10 + iMCMcol + 50, cTagV, xpos, ypos + 1.0, zpos,
2081+
matrix[2], "ONLY");
2082+
TVirtualMC::GetMC()->Gspos("UTCQ", iCopy + iMCMrow * 10 + iMCMcol + 500, cTagV, xpos, ypos + 2.0, zpos,
2083+
matrix[2], "ONLY");
20742084
}
20752085
}
20762086
}

0 commit comments

Comments
 (0)