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"
46 GeoModelIO::ReadGeoModel* sqliteReader,
47 std::shared_ptr<std::map<std::string, GeoFullPhysVol*>> mapFPV,
48 std::shared_ptr<std::map<std::string, GeoAlignableTransform*>> mapAX)
96 GeoFullPhysVol *
barrel=
nullptr;
104 log<< MSG::INFO <<
"SCT_Barrel Old barrel geometry versions are not supported"<<
endmsg;
123 for (
int iLayer = 0; iLayer <
m_numLayers; iLayer++) {
130 barrel->add(
new GeoIdentifierTag(iLayer));
131 id.setLayerDisk(iLayer);
132 GeoAlignableTransform *
transform =
new GeoAlignableTransform(GeoTrf::Transform3D::Identity());
134 GeoVPhysVol * layerPV =
layer.build(
id);
142 double interLinkZPos = 0.;
144 barrel->add(
new GeoTransform(GeoTrf::TranslateZ3D(+interLinkZPos)));
146 barrel->add(
new GeoTransform(GeoTrf::TranslateZ3D(-interLinkZPos)));
150 double spiderZPos = 0.;
152 spiderZPos = interLinkZPos + 0.5*interLink.
length() + 0.5*spider.
length();
153 barrel->add(
new GeoTransform(GeoTrf::TranslateZ3D(+spiderZPos)));
155 barrel->add(
new GeoTransform(GeoTrf::TranslateZ3D(-spiderZPos)));
166 barrel->add(
new GeoTransform(GeoTrf::TranslateZ3D(+pixelAttachment.
zPosition())));
168 barrel->add(
new GeoTransform(GeoTrf::TranslateZ3D(-pixelAttachment.
zPosition())));
181 for (
int iLayer = 0; iLayer <
m_numLayers; iLayer++) {
184 id.setLayerDisk(iLayer);
207 double cylinderOuterRadius =
parameters->thermalShieldOuterRadius();
208 double cylinderInnerRadius =
parameters->thermalShieldInnerRadius();
209 double cylinderLength =
parameters->cylinderLength();
210 double bulkheadInnerRadius =
parameters->thermalShieldBulkheadInnerRadius();
211 double bulkheadOuterRadius =
parameters->thermalShieldBulkheadOuterRadius();
212 double bulkheadThickness =
parameters->thermalShieldEndCapCylThickness();
213 double endPanelInnerRadius =
parameters->thermalShieldEndPanelInnerRadius();
214 double endPanelOuterRadius =
parameters->thermalShieldEndPanelOuterRadius();
215 double endPanelThickness =
parameters->thermalShieldEndCapThickness();
216 double endPanelZMax =
parameters->thermalShieldEndZMax();
218 std::string cylinderMaterialName =
parameters->thermalShieldMaterialCyl();
219 std::string bulkheadMaterialName =
parameters->thermalShieldMaterialOuterSect();
220 std::string endPanelMaterialName =
parameters->thermalShieldMaterialInnerSect();
224 const GeoTube * cylinderShape =
new GeoTube(cylinderInnerRadius, cylinderOuterRadius, 0.5*cylinderLength);
226 const GeoLogVol * cylinderLog =
new GeoLogVol(
"ThShieldOuterCyl", cylinderShape, cylinderMaterial);
227 GeoPhysVol * cylinder =
new GeoPhysVol(cylinderLog);
231 const GeoTube * bulkheadShape =
new GeoTube(bulkheadInnerRadius, bulkheadOuterRadius, 0.5*bulkheadThickness);
233 const GeoLogVol * bulkheadLog =
new GeoLogVol(
"ThShieldBulkhead", bulkheadShape, bulkheadMaterial);
234 GeoPhysVol * bulkhead =
new GeoPhysVol(bulkheadLog);
235 GeoTransform * bulkheadPosPlus =
new GeoTransform(GeoTrf::TranslateZ3D(+(endPanelZMax-endPanelThickness-0.5*bulkheadThickness)));
236 GeoTransform * bulkheadPosMinus =
new GeoTransform(GeoTrf::TranslateZ3D(-(endPanelZMax-endPanelThickness-0.5*bulkheadThickness)));
237 parent->add(bulkheadPosPlus);
239 parent->add(bulkheadPosMinus);
243 const GeoTube * endPanelShape =
new GeoTube(endPanelInnerRadius, endPanelOuterRadius, 0.5*endPanelThickness);
245 const GeoLogVol * endPanelLog =
new GeoLogVol(
"ThShieldEndPanel", endPanelShape, endPanelMaterial);
246 GeoPhysVol * endPanel =
new GeoPhysVol(endPanelLog);
247 GeoTransform * endPanelPosPlus =
new GeoTransform(GeoTrf::TranslateZ3D(+(endPanelZMax-0.5*endPanelThickness)));
248 GeoTransform * endPanelPosMinus =
new GeoTransform(GeoTrf::TranslateZ3D(-(endPanelZMax-0.5*endPanelThickness)));
249 parent->add(endPanelPosPlus);
251 parent->add(endPanelPosMinus);
266 std::string materialName =
parameters->emiShieldMaterial();
269 double jointDeltaR = 0;
270 double jointRPhi = 0;
271 std::string jointMaterialName;
275 jointMaterialName =
parameters->emiJointMaterial();
279 double pixelAttachmentLength =
parameters->pixelAttachmentDeltaZ();
280 double pixelAttachmentZpos =
parameters->pixelAttachmentZMin() + 0.5 * pixelAttachmentLength;
283 const GeoShape * emiShieldShape =
nullptr;
284 const GeoMaterial * material;
287 emiShieldShape = emiShieldTube;
291 const GeoShape* emiTemp = (GeoShape*)&(emiShieldTube->subtract(*cutOut << GeoTrf::TranslateZ3D(pixelAttachmentZpos)));
292 emiShieldShape = (GeoShape*)&emiTemp->subtract(*cutOut << GeoTrf::TranslateZ3D(-pixelAttachmentZpos));
293 double emiVolume = emiShieldTube->volume() - 2. * cutOut->volume();
296 const GeoLogVol * emiShieldLog =
new GeoLogVol(
"EMIShield", emiShieldShape, material);
297 GeoPhysVol * emiShield =
new GeoPhysVol(emiShieldLog);
307 const GeoShape* jointTemp = (GeoShape*)&(emiJointTubs->subtract(*jointCutOut << GeoTrf::TranslateZ3D(pixelAttachmentZpos)));
308 const GeoShape* emiJointShape = (GeoShape*)&jointTemp->subtract(*jointCutOut << GeoTrf::TranslateZ3D(-pixelAttachmentZpos));
309 double jointVolume = emiJointTubs->volume() - 2. * jointCutOut->volume();
311 const GeoLogVol * emiJointLog =
new GeoLogVol(
"EMIShieldJoint", emiJointShape, jointMaterial);
312 GeoPhysVol * emiJoint =
new GeoPhysVol(emiJointLog);
314 for (
int i=0;
i<3;
i++) {
316 parent->add(
new GeoTransform(GeoTrf::RotateZ3D(
angle)));