98 GeoFullPhysVol *
barrel=
nullptr;
106 log<< MSG::INFO <<
"SCT_Barrel Old barrel geometry versions are not supported"<<
endmsg;
125 for (
int iLayer = 0; iLayer <
m_numLayers; iLayer++) {
131 barrel->add(
new GeoNameTag(std::format(
"Layer#{}",iLayer)));
132 barrel->add(
new GeoIdentifierTag(iLayer));
133 id.setLayerDisk(iLayer);
134 GeoAlignableTransform * transform =
new GeoAlignableTransform(GeoTrf::Transform3D::Identity());
136 GeoVPhysVol * layerPV = layer.build(
id);
139 m_detectorManager->addAlignableTransform(2,
id.getWaferId(), transform, layerPV);
140 layerLength = std::max(layerLength,layer.length());
144 double interLinkZPos = 0.;
146 barrel->add(
new GeoTransform(GeoTrf::TranslateZ3D(+interLinkZPos)));
148 barrel->add(
new GeoTransform(GeoTrf::TranslateZ3D(-interLinkZPos)));
152 double spiderZPos = 0.;
154 spiderZPos = interLinkZPos + 0.5*interLink.
length() + 0.5*spider.
length();
155 barrel->add(
new GeoTransform(GeoTrf::TranslateZ3D(+spiderZPos)));
157 barrel->add(
new GeoTransform(GeoTrf::TranslateZ3D(-spiderZPos)));
168 barrel->add(
new GeoTransform(GeoTrf::TranslateZ3D(+pixelAttachment.
zPosition())));
170 barrel->add(
new GeoTransform(GeoTrf::TranslateZ3D(-pixelAttachment.
zPosition())));
182 for (
int iLayer = 0; iLayer <
m_numLayers; iLayer++) {
185 id.setLayerDisk(iLayer);
206 double cylinderOuterRadius = parameters->thermalShieldOuterRadius();
207 double cylinderInnerRadius = parameters->thermalShieldInnerRadius();
208 double cylinderLength = parameters->cylinderLength();
209 double bulkheadInnerRadius = parameters->thermalShieldBulkheadInnerRadius();
210 double bulkheadOuterRadius = parameters->thermalShieldBulkheadOuterRadius();
211 double bulkheadThickness = parameters->thermalShieldEndCapCylThickness();
212 double endPanelInnerRadius = parameters->thermalShieldEndPanelInnerRadius();
213 double endPanelOuterRadius = parameters->thermalShieldEndPanelOuterRadius();
214 double endPanelThickness = parameters->thermalShieldEndCapThickness();
215 double endPanelZMax = parameters->thermalShieldEndZMax();
217 std::string cylinderMaterialName = parameters->thermalShieldMaterialCyl();
218 std::string bulkheadMaterialName = parameters->thermalShieldMaterialOuterSect();
219 std::string endPanelMaterialName = parameters->thermalShieldMaterialInnerSect();
223 const GeoTube * cylinderShape =
new GeoTube(cylinderInnerRadius, cylinderOuterRadius, 0.5*cylinderLength);
224 const GeoMaterial* cylinderMaterial =
m_materials->getMaterialForVolume(cylinderMaterialName,cylinderShape->volume());
225 const GeoLogVol * cylinderLog =
new GeoLogVol(
"ThShieldOuterCyl", cylinderShape, cylinderMaterial);
226 GeoPhysVol * cylinder =
new GeoPhysVol(cylinderLog);
227 parent->add(cylinder);
230 const GeoTube * bulkheadShape =
new GeoTube(bulkheadInnerRadius, bulkheadOuterRadius, 0.5*bulkheadThickness);
231 const GeoMaterial* bulkheadMaterial =
m_materials->getMaterialForVolume(bulkheadMaterialName,bulkheadShape->volume());
232 const GeoLogVol * bulkheadLog =
new GeoLogVol(
"ThShieldBulkhead", bulkheadShape, bulkheadMaterial);
233 GeoPhysVol * bulkhead =
new GeoPhysVol(bulkheadLog);
234 GeoTransform * bulkheadPosPlus =
new GeoTransform(GeoTrf::TranslateZ3D(+(endPanelZMax-endPanelThickness-0.5*bulkheadThickness)));
235 GeoTransform * bulkheadPosMinus =
new GeoTransform(GeoTrf::TranslateZ3D(-(endPanelZMax-endPanelThickness-0.5*bulkheadThickness)));
236 parent->add(bulkheadPosPlus);
237 parent->add(bulkhead);
238 parent->add(bulkheadPosMinus);
239 parent->add(bulkhead);
242 const GeoTube * endPanelShape =
new GeoTube(endPanelInnerRadius, endPanelOuterRadius, 0.5*endPanelThickness);
243 const GeoMaterial* endPanelMaterial =
m_materials->getMaterialForVolume(endPanelMaterialName,endPanelShape->volume());
244 const GeoLogVol * endPanelLog =
new GeoLogVol(
"ThShieldEndPanel", endPanelShape, endPanelMaterial);
245 GeoPhysVol * endPanel =
new GeoPhysVol(endPanelLog);
246 GeoTransform * endPanelPosPlus =
new GeoTransform(GeoTrf::TranslateZ3D(+(endPanelZMax-0.5*endPanelThickness)));
247 GeoTransform * endPanelPosMinus =
new GeoTransform(GeoTrf::TranslateZ3D(-(endPanelZMax-0.5*endPanelThickness)));
248 parent->add(endPanelPosPlus);
249 parent->add(endPanel);
250 parent->add(endPanelPosMinus);
251 parent->add(endPanel);
261 double innerRadius = parameters->emiShieldInnerRadius();
262 double deltaR = parameters->emiShieldDeltaR();
264 double length = 2 * parameters->emiShieldZMax();
265 std::string materialName = parameters->emiShieldMaterial();
268 double jointDeltaR = 0;
269 double jointRPhi = 0;
270 std::string jointMaterialName;
272 jointDeltaR = parameters->emiJointDeltaR();
273 jointRPhi = parameters->emiJointRPhi();
274 jointMaterialName = parameters->emiJointMaterial();
278 double pixelAttachmentLength = parameters->pixelAttachmentDeltaZ();
279 double pixelAttachmentZpos = parameters->pixelAttachmentZMin() + 0.5 * pixelAttachmentLength;
282 const GeoShape * emiShieldShape =
nullptr;
283 const GeoMaterial * material;
286 emiShieldShape = emiShieldTube;
290 const GeoShape* emiTemp = (GeoShape*)&(emiShieldTube->subtract(*cutOut << GeoTrf::TranslateZ3D(pixelAttachmentZpos)));
291 emiShieldShape = (GeoShape*)&emiTemp->subtract(*cutOut << GeoTrf::TranslateZ3D(-pixelAttachmentZpos));
292 double emiVolume = emiShieldTube->volume() - 2. * cutOut->volume();
293 material =
m_materials->getMaterialForVolume(materialName, emiVolume);
295 const GeoLogVol * emiShieldLog =
new GeoLogVol(
"EMIShield", emiShieldShape, material);
296 GeoPhysVol * emiShield =
new GeoPhysVol(emiShieldLog);
297 parent->add(emiShield);
303 -0.5 * dphi * Gaudi::Units::radian, dphi * Gaudi::Units::radian);
305 -0.5 * dphi * Gaudi::Units::radian, dphi * Gaudi::Units::radian);
306 const GeoShape* jointTemp = (GeoShape*)&(emiJointTubs->subtract(*jointCutOut << GeoTrf::TranslateZ3D(pixelAttachmentZpos)));
307 const GeoShape* emiJointShape = (GeoShape*)&jointTemp->subtract(*jointCutOut << GeoTrf::TranslateZ3D(-pixelAttachmentZpos));
308 double jointVolume = emiJointTubs->volume() - 2. * jointCutOut->volume();
309 const GeoMaterial * jointMaterial =
m_materials->getMaterialForVolume(jointMaterialName, jointVolume);
310 const GeoLogVol * emiJointLog =
new GeoLogVol(
"EMIShieldJoint", emiJointShape, jointMaterial);
311 GeoPhysVol * emiJoint =
new GeoPhysVol(emiJointLog);
313 for (
int i=0; i<3; i++) {
314 double angle = (90. + i * 120.) * Gaudi::Units::degree;
315 parent->add(
new GeoTransform(GeoTrf::RotateZ3D(
angle)));
316 parent->add(emiJoint);
SCT_Barrel(const std::string &name, InDetDD::SCT_DetectorManager *detectorManager, SCT_GeometryManager *geometryManager, SCT_MaterialManager *materials, GeoModelIO::ReadGeoModel *sqliteReader, std::shared_ptr< std::map< std::string, GeoFullPhysVol * > > mapFPV, std::shared_ptr< std::map< std::string, GeoAlignableTransform * > > mapAX)
SCT_UniqueComponentFactory(const std::string &name, InDetDD::SCT_DetectorManager *detectorManager, SCT_GeometryManager *geometryManager, SCT_MaterialManager *materials=nullptr, GeoModelIO::ReadGeoModel *sqliteReader=nullptr, std::shared_ptr< std::map< std::string, GeoFullPhysVol * > > mapFPV=nullptr, std::shared_ptr< std::map< std::string, GeoAlignableTransform * > > mapAX=nullptr)