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++) {
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())));
183 for (
int iLayer = 0; iLayer <
m_numLayers; iLayer++) {
186 id.setLayerDisk(iLayer);
209 double cylinderOuterRadius = parameters->thermalShieldOuterRadius();
210 double cylinderInnerRadius = parameters->thermalShieldInnerRadius();
211 double cylinderLength = parameters->cylinderLength();
212 double bulkheadInnerRadius = parameters->thermalShieldBulkheadInnerRadius();
213 double bulkheadOuterRadius = parameters->thermalShieldBulkheadOuterRadius();
214 double bulkheadThickness = parameters->thermalShieldEndCapCylThickness();
215 double endPanelInnerRadius = parameters->thermalShieldEndPanelInnerRadius();
216 double endPanelOuterRadius = parameters->thermalShieldEndPanelOuterRadius();
217 double endPanelThickness = parameters->thermalShieldEndCapThickness();
218 double endPanelZMax = parameters->thermalShieldEndZMax();
220 std::string cylinderMaterialName = parameters->thermalShieldMaterialCyl();
221 std::string bulkheadMaterialName = parameters->thermalShieldMaterialOuterSect();
222 std::string endPanelMaterialName = parameters->thermalShieldMaterialInnerSect();
226 const GeoTube * cylinderShape =
new GeoTube(cylinderInnerRadius, cylinderOuterRadius, 0.5*cylinderLength);
227 const GeoMaterial* cylinderMaterial =
m_materials->getMaterialForVolume(cylinderMaterialName,cylinderShape->volume());
228 const GeoLogVol * cylinderLog =
new GeoLogVol(
"ThShieldOuterCyl", cylinderShape, cylinderMaterial);
229 GeoPhysVol * cylinder =
new GeoPhysVol(cylinderLog);
230 parent->add(cylinder);
233 const GeoTube * bulkheadShape =
new GeoTube(bulkheadInnerRadius, bulkheadOuterRadius, 0.5*bulkheadThickness);
234 const GeoMaterial* bulkheadMaterial =
m_materials->getMaterialForVolume(bulkheadMaterialName,bulkheadShape->volume());
235 const GeoLogVol * bulkheadLog =
new GeoLogVol(
"ThShieldBulkhead", bulkheadShape, bulkheadMaterial);
236 GeoPhysVol * bulkhead =
new GeoPhysVol(bulkheadLog);
237 GeoTransform * bulkheadPosPlus =
new GeoTransform(GeoTrf::TranslateZ3D(+(endPanelZMax-endPanelThickness-0.5*bulkheadThickness)));
238 GeoTransform * bulkheadPosMinus =
new GeoTransform(GeoTrf::TranslateZ3D(-(endPanelZMax-endPanelThickness-0.5*bulkheadThickness)));
239 parent->add(bulkheadPosPlus);
240 parent->add(bulkhead);
241 parent->add(bulkheadPosMinus);
242 parent->add(bulkhead);
245 const GeoTube * endPanelShape =
new GeoTube(endPanelInnerRadius, endPanelOuterRadius, 0.5*endPanelThickness);
246 const GeoMaterial* endPanelMaterial =
m_materials->getMaterialForVolume(endPanelMaterialName,endPanelShape->volume());
247 const GeoLogVol * endPanelLog =
new GeoLogVol(
"ThShieldEndPanel", endPanelShape, endPanelMaterial);
248 GeoPhysVol * endPanel =
new GeoPhysVol(endPanelLog);
249 GeoTransform * endPanelPosPlus =
new GeoTransform(GeoTrf::TranslateZ3D(+(endPanelZMax-0.5*endPanelThickness)));
250 GeoTransform * endPanelPosMinus =
new GeoTransform(GeoTrf::TranslateZ3D(-(endPanelZMax-0.5*endPanelThickness)));
251 parent->add(endPanelPosPlus);
252 parent->add(endPanel);
253 parent->add(endPanelPosMinus);
254 parent->add(endPanel);
264 double innerRadius = parameters->emiShieldInnerRadius();
265 double deltaR = parameters->emiShieldDeltaR();
267 double length = 2 * parameters->emiShieldZMax();
268 std::string materialName = parameters->emiShieldMaterial();
271 double jointDeltaR = 0;
272 double jointRPhi = 0;
273 std::string jointMaterialName;
275 jointDeltaR = parameters->emiJointDeltaR();
276 jointRPhi = parameters->emiJointRPhi();
277 jointMaterialName = parameters->emiJointMaterial();
281 double pixelAttachmentLength = parameters->pixelAttachmentDeltaZ();
282 double pixelAttachmentZpos = parameters->pixelAttachmentZMin() + 0.5 * pixelAttachmentLength;
285 const GeoShape * emiShieldShape =
nullptr;
286 const GeoMaterial * material;
289 emiShieldShape = emiShieldTube;
293 const GeoShape* emiTemp = (GeoShape*)&(emiShieldTube->subtract(*cutOut << GeoTrf::TranslateZ3D(pixelAttachmentZpos)));
294 emiShieldShape = (GeoShape*)&emiTemp->subtract(*cutOut << GeoTrf::TranslateZ3D(-pixelAttachmentZpos));
295 double emiVolume = emiShieldTube->volume() - 2. * cutOut->volume();
296 material =
m_materials->getMaterialForVolume(materialName, emiVolume);
298 const GeoLogVol * emiShieldLog =
new GeoLogVol(
"EMIShield", emiShieldShape, material);
299 GeoPhysVol * emiShield =
new GeoPhysVol(emiShieldLog);
300 parent->add(emiShield);
306 -0.5 * dphi * Gaudi::Units::radian, dphi * Gaudi::Units::radian);
308 -0.5 * dphi * Gaudi::Units::radian, dphi * Gaudi::Units::radian);
309 const GeoShape* jointTemp = (GeoShape*)&(emiJointTubs->subtract(*jointCutOut << GeoTrf::TranslateZ3D(pixelAttachmentZpos)));
310 const GeoShape* emiJointShape = (GeoShape*)&jointTemp->subtract(*jointCutOut << GeoTrf::TranslateZ3D(-pixelAttachmentZpos));
311 double jointVolume = emiJointTubs->volume() - 2. * jointCutOut->volume();
312 const GeoMaterial * jointMaterial =
m_materials->getMaterialForVolume(jointMaterialName, jointVolume);
313 const GeoLogVol * emiJointLog =
new GeoLogVol(
"EMIShieldJoint", emiJointShape, jointMaterial);
314 GeoPhysVol * emiJoint =
new GeoPhysVol(emiJointLog);
316 for (
int i=0; i<3; i++) {
317 double angle = (90. + i * 120.) * Gaudi::Units::degree;
318 parent->add(
new GeoTransform(GeoTrf::RotateZ3D(
angle)));
319 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)