24 #include "GeoModelRead/ReadGeoModel.h"
25 #include "GeoModelKernel/GeoTube.h"
26 #include "GeoModelKernel/GeoTubs.h"
27 #include "GeoModelKernel/GeoLogVol.h"
28 #include "GeoModelKernel/GeoFullPhysVol.h"
29 #include "GeoModelKernel/GeoPhysVol.h"
30 #include "GeoModelKernel/GeoNameTag.h"
31 #include "GeoModelKernel/GeoIdentifierTag.h"
32 #include "GeoModelKernel/GeoTransform.h"
33 #include "GeoModelKernel/GeoAlignableTransform.h"
34 #include "GeoModelKernel/GeoMaterial.h"
35 #include "GeoModelKernel/GeoShape.h"
36 #include "GeoModelKernel/GeoShapeShift.h"
37 #include "GaudiKernel/SystemOfUnits.h"
38 #include "GaudiKernel/MsgStream.h"
47 GeoModelIO::ReadGeoModel* sqliteReader,
48 std::shared_ptr<std::map<std::string, GeoFullPhysVol*>> mapFPV,
49 std::shared_ptr<std::map<std::string, GeoAlignableTransform*>> mapAX)
97 GeoFullPhysVol *
barrel=
nullptr;
105 log<< MSG::INFO <<
"SCT_Barrel Old barrel geometry versions are not supported"<<
endmsg;
124 for (
int iLayer = 0; iLayer <
m_numLayers; iLayer++) {
131 barrel->add(
new GeoIdentifierTag(iLayer));
132 id.setLayerDisk(iLayer);
133 GeoAlignableTransform *
transform =
new GeoAlignableTransform(GeoTrf::Transform3D::Identity());
135 GeoVPhysVol * layerPV =
layer.build(
id);
143 double interLinkZPos = 0.;
145 barrel->add(
new GeoTransform(GeoTrf::TranslateZ3D(+interLinkZPos)));
147 barrel->add(
new GeoTransform(GeoTrf::TranslateZ3D(-interLinkZPos)));
151 double spiderZPos = 0.;
153 spiderZPos = interLinkZPos + 0.5*interLink.
length() + 0.5*spider.
length();
154 barrel->add(
new GeoTransform(GeoTrf::TranslateZ3D(+spiderZPos)));
156 barrel->add(
new GeoTransform(GeoTrf::TranslateZ3D(-spiderZPos)));
167 barrel->add(
new GeoTransform(GeoTrf::TranslateZ3D(+pixelAttachment.
zPosition())));
169 barrel->add(
new GeoTransform(GeoTrf::TranslateZ3D(-pixelAttachment.
zPosition())));
182 for (
int iLayer = 0; iLayer <
m_numLayers; iLayer++) {
185 id.setLayerDisk(iLayer);
208 double cylinderOuterRadius =
parameters->thermalShieldOuterRadius();
209 double cylinderInnerRadius =
parameters->thermalShieldInnerRadius();
210 double cylinderLength =
parameters->cylinderLength();
211 double bulkheadInnerRadius =
parameters->thermalShieldBulkheadInnerRadius();
212 double bulkheadOuterRadius =
parameters->thermalShieldBulkheadOuterRadius();
213 double bulkheadThickness =
parameters->thermalShieldEndCapCylThickness();
214 double endPanelInnerRadius =
parameters->thermalShieldEndPanelInnerRadius();
215 double endPanelOuterRadius =
parameters->thermalShieldEndPanelOuterRadius();
216 double endPanelThickness =
parameters->thermalShieldEndCapThickness();
217 double endPanelZMax =
parameters->thermalShieldEndZMax();
219 std::string cylinderMaterialName =
parameters->thermalShieldMaterialCyl();
220 std::string bulkheadMaterialName =
parameters->thermalShieldMaterialOuterSect();
221 std::string endPanelMaterialName =
parameters->thermalShieldMaterialInnerSect();
225 const GeoTube * cylinderShape =
new GeoTube(cylinderInnerRadius, cylinderOuterRadius, 0.5*cylinderLength);
227 const GeoLogVol * cylinderLog =
new GeoLogVol(
"ThShieldOuterCyl", cylinderShape, cylinderMaterial);
228 GeoPhysVol * cylinder =
new GeoPhysVol(cylinderLog);
232 const GeoTube * bulkheadShape =
new GeoTube(bulkheadInnerRadius, bulkheadOuterRadius, 0.5*bulkheadThickness);
234 const GeoLogVol * bulkheadLog =
new GeoLogVol(
"ThShieldBulkhead", bulkheadShape, bulkheadMaterial);
235 GeoPhysVol * bulkhead =
new GeoPhysVol(bulkheadLog);
236 GeoTransform * bulkheadPosPlus =
new GeoTransform(GeoTrf::TranslateZ3D(+(endPanelZMax-endPanelThickness-0.5*bulkheadThickness)));
237 GeoTransform * bulkheadPosMinus =
new GeoTransform(GeoTrf::TranslateZ3D(-(endPanelZMax-endPanelThickness-0.5*bulkheadThickness)));
238 parent->add(bulkheadPosPlus);
240 parent->add(bulkheadPosMinus);
244 const GeoTube * endPanelShape =
new GeoTube(endPanelInnerRadius, endPanelOuterRadius, 0.5*endPanelThickness);
246 const GeoLogVol * endPanelLog =
new GeoLogVol(
"ThShieldEndPanel", endPanelShape, endPanelMaterial);
247 GeoPhysVol * endPanel =
new GeoPhysVol(endPanelLog);
248 GeoTransform * endPanelPosPlus =
new GeoTransform(GeoTrf::TranslateZ3D(+(endPanelZMax-0.5*endPanelThickness)));
249 GeoTransform * endPanelPosMinus =
new GeoTransform(GeoTrf::TranslateZ3D(-(endPanelZMax-0.5*endPanelThickness)));
250 parent->add(endPanelPosPlus);
252 parent->add(endPanelPosMinus);
267 std::string materialName =
parameters->emiShieldMaterial();
270 double jointDeltaR = 0;
271 double jointRPhi = 0;
272 std::string jointMaterialName;
276 jointMaterialName =
parameters->emiJointMaterial();
280 double pixelAttachmentLength =
parameters->pixelAttachmentDeltaZ();
281 double pixelAttachmentZpos =
parameters->pixelAttachmentZMin() + 0.5 * pixelAttachmentLength;
284 const GeoShape * emiShieldShape =
nullptr;
285 const GeoMaterial * material;
288 emiShieldShape = emiShieldTube;
292 const GeoShape* emiTemp = (GeoShape*)&(emiShieldTube->subtract(*cutOut << GeoTrf::TranslateZ3D(pixelAttachmentZpos)));
293 emiShieldShape = (GeoShape*)&emiTemp->subtract(*cutOut << GeoTrf::TranslateZ3D(-pixelAttachmentZpos));
294 double emiVolume = emiShieldTube->volume() - 2. * cutOut->volume();
297 const GeoLogVol * emiShieldLog =
new GeoLogVol(
"EMIShield", emiShieldShape, material);
298 GeoPhysVol * emiShield =
new GeoPhysVol(emiShieldLog);
308 const GeoShape* jointTemp = (GeoShape*)&(emiJointTubs->subtract(*jointCutOut << GeoTrf::TranslateZ3D(pixelAttachmentZpos)));
309 const GeoShape* emiJointShape = (GeoShape*)&jointTemp->subtract(*jointCutOut << GeoTrf::TranslateZ3D(-pixelAttachmentZpos));
310 double jointVolume = emiJointTubs->volume() - 2. * jointCutOut->volume();
312 const GeoLogVol * emiJointLog =
new GeoLogVol(
"EMIShieldJoint", emiJointShape, jointMaterial);
313 GeoPhysVol * emiJoint =
new GeoPhysVol(emiJointLog);
315 for (
int i=0;
i<3;
i++) {
317 parent->add(
new GeoTransform(GeoTrf::RotateZ3D(
angle)));