25 #include "GeoModelRead/ReadGeoModel.h"
26 #include "GeoModelKernel/GeoTube.h"
27 #include "GeoModelKernel/GeoTubs.h"
28 #include "GeoModelKernel/GeoLogVol.h"
29 #include "GeoModelKernel/GeoFullPhysVol.h"
30 #include "GeoModelKernel/GeoPhysVol.h"
31 #include "GeoModelKernel/GeoNameTag.h"
32 #include "GeoModelKernel/GeoIdentifierTag.h"
33 #include "GeoModelKernel/GeoTransform.h"
34 #include "GeoModelKernel/GeoAlignableTransform.h"
35 #include "GeoModelKernel/GeoMaterial.h"
36 #include "GeoModelKernel/GeoShape.h"
37 #include "GeoModelKernel/GeoShapeShift.h"
38 #include "GaudiKernel/SystemOfUnits.h"
39 #include "GaudiKernel/MsgStream.h"
48 GeoModelIO::ReadGeoModel* sqliteReader,
49 std::shared_ptr<std::map<std::string, GeoFullPhysVol*>> mapFPV,
50 std::shared_ptr<std::map<std::string, GeoAlignableTransform*>> mapAX)
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);
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);
228 const GeoLogVol * cylinderLog =
new GeoLogVol(
"ThShieldOuterCyl", cylinderShape, cylinderMaterial);
229 GeoPhysVol * cylinder =
new GeoPhysVol(cylinderLog);
233 const GeoTube * bulkheadShape =
new GeoTube(bulkheadInnerRadius, bulkheadOuterRadius, 0.5*bulkheadThickness);
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);
241 parent->add(bulkheadPosMinus);
245 const GeoTube * endPanelShape =
new GeoTube(endPanelInnerRadius, endPanelOuterRadius, 0.5*endPanelThickness);
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);
253 parent->add(endPanelPosMinus);
268 std::string materialName =
parameters->emiShieldMaterial();
271 double jointDeltaR = 0;
272 double jointRPhi = 0;
273 std::string jointMaterialName;
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();
298 const GeoLogVol * emiShieldLog =
new GeoLogVol(
"EMIShield", emiShieldShape, material);
299 GeoPhysVol * emiShield =
new GeoPhysVol(emiShieldLog);
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();
313 const GeoLogVol * emiJointLog =
new GeoLogVol(
"EMIShieldJoint", emiJointShape, jointMaterial);
314 GeoPhysVol * emiJoint =
new GeoPhysVol(emiJointLog);
316 for (
int i=0;
i<3;
i++) {
318 parent->add(
new GeoTransform(GeoTrf::RotateZ3D(
angle)));