ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_Barrel Class Reference

#include <SCT_Barrel.h>

Inheritance diagram for SCT_Barrel:
Collaboration diagram for SCT_Barrel:

Public Member Functions

 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)
virtual GeoVPhysVol * build (SCT_Identifier id)
int numLayers () const
double innerRadius () const
double outerRadius () const
double length () const
const std::string & getName () const

Protected Member Functions

double epsilon () const

Protected Attributes

const GeoLogVol * m_logVolume {}
GeoModelIO::ReadGeoModel * m_sqliteReader {}
std::shared_ptr< std::map< std::string, GeoFullPhysVol * > > m_mapFPV
std::shared_ptr< std::map< std::string, GeoAlignableTransform * > > m_mapAX
InDetDD::SCT_DetectorManagerm_detectorManager {}
SCT_GeometryManagerm_geometryManager {}
SCT_MaterialManagerm_materials {}

Private Member Functions

void getParameters ()
virtual const GeoLogVol * preBuild ()
void buildThermalShield (GeoFullPhysVol *parent)
void buildEMIShield (GeoFullPhysVol *parent)

Private Attributes

int m_numLayers = 0
double m_innerRadius = 0.0
double m_outerRadius = 0.0
double m_length = 0.0
double m_thermalShieldEndWallThickness = 0.0
double m_zClearance = 0.0
bool m_isOldGeometry = false
std::string m_name

Static Private Attributes

static const double s_epsilon = 1.0e-6 * Gaudi::Units::mm

Detailed Description

Definition at line 16 of file SCT_Barrel.h.

Constructor & Destructor Documentation

◆ SCT_Barrel()

SCT_Barrel::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 )

Definition at line 44 of file SCT_Barrel.cxx.

51 : SCT_UniqueComponentFactory(name, detectorManager, geometryManager, materials, sqliteReader, std::move(mapFPV), std::move(mapAX))
52{
54 if(!m_sqliteReader) {
56 }
57}
void getParameters()
virtual const GeoLogVol * preBuild()
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)
GeoModelIO::ReadGeoModel * m_sqliteReader

Member Function Documentation

◆ build()

GeoVPhysVol * SCT_Barrel::build ( SCT_Identifier id)
virtual

Implements SCT_UniqueComponentFactory.

Definition at line 96 of file SCT_Barrel.cxx.

97{
98 GeoFullPhysVol * barrel=nullptr;
100 {
101 barrel = new GeoFullPhysVol(m_logVolume);
102
103 // Old geometries are no longer supported - give up now if one is requested
104 if(m_isOldGeometry) {
105 MsgStream log(Athena::getMessageSvc(), "SCT_Barrel");
106 log<< MSG::INFO <<"SCT_Barrel Old barrel geometry versions are not supported"<<endmsg;
107 return barrel;
108 }
109
110 // There is only one type of module. So we create it just the once and pass it to the layers.
112
113 // Create the interlinks
114 SCT_InterLink interLink("InterLink", m_detectorManager, m_geometryManager, m_materials);
115
116 // Calculte the length of the layer cylinder. This is the barrel length less the thermal
117 // shield and interlink width.
118 // This is only used for 'OldGeometry". In new geometry, layer length is set internally,
119 // and is equal to support cylinder length
120 double layerLength = m_length - 2*m_thermalShieldEndWallThickness - 2*interLink.length();
121
122 // We reduce to allow some alignment clearance
123 layerLength -= 2*m_zClearance;
124
125 for (int iLayer = 0; iLayer < m_numLayers; iLayer++) {
126
127 // Create the layers
128
129 layerLength = 0.;
130 SCT_Layer layer(std::format("Layer{}",iLayer), iLayer, &module, m_detectorManager, m_geometryManager, m_materials, m_sqliteReader, m_mapFPV, m_mapAX);
131 barrel->add(new GeoNameTag(std::format("Layer#{}",iLayer)));
132 barrel->add(new GeoIdentifierTag(iLayer)); // Identifier layer= iLayer
133 id.setLayerDisk(iLayer);
134 GeoAlignableTransform * transform = new GeoAlignableTransform(GeoTrf::Transform3D::Identity());
135 barrel->add(transform);
136 GeoVPhysVol * layerPV = layer.build(id);
137 barrel->add(layerPV);
138 // Store alignable transform
139 m_detectorManager->addAlignableTransform(2, id.getWaferId(), transform, layerPV);
140 layerLength = std::max(layerLength,layer.length());
141 }
142
143 // Build and place the interlinks
144 double interLinkZPos = 0.;
145 interLinkZPos = 0.5 * layerLength + m_zClearance + 0.5 * interLink.length();
146 barrel->add(new GeoTransform(GeoTrf::TranslateZ3D(+interLinkZPos)));
147 barrel->add(interLink.getVolume());
148 barrel->add(new GeoTransform(GeoTrf::TranslateZ3D(-interLinkZPos)));
149 barrel->add(interLink.getVolume());
150
151 // Build and place the cooling spiders
152 double spiderZPos = 0.;
153 SCT_Spider spider("Spider", m_detectorManager, m_geometryManager, m_materials);
154 spiderZPos = interLinkZPos + 0.5*interLink.length() + 0.5*spider.length();
155 barrel->add(new GeoTransform(GeoTrf::TranslateZ3D(+spiderZPos)));
156 barrel->add(spider.getVolume());
157 barrel->add(new GeoTransform(GeoTrf::TranslateZ3D(-spiderZPos)));
158 barrel->add(spider.getVolume());
159
160 // Build and place the thermal shield.
162
163 // Build and place the EMI shield (inner thermal shield).
165
166 // Build and place SCT to Pixel attachment
167 SCT_PixelAttachment pixelAttachment("AttachmentPixelToSCT", m_detectorManager, m_geometryManager, m_materials);
168 barrel->add(new GeoTransform(GeoTrf::TranslateZ3D(+pixelAttachment.zPosition()))); // +ve z
169 barrel->add(pixelAttachment.getVolume());
170 barrel->add(new GeoTransform(GeoTrf::TranslateZ3D(-pixelAttachment.zPosition()))); // -ve z
171 barrel->add(pixelAttachment.getVolume());
172
173 // Extra Material
174 InDetDD::ExtraMaterial xMat(m_geometryManager->distortedMatManager());
175 xMat.add(barrel, "SCTBarrel");
176
177 }
178 else {
179 // There is only one type of module. So we create it just the once and pass it to the layers.
180 SCT_Module module("Module", m_detectorManager, m_geometryManager, nullptr, m_sqliteReader, m_mapFPV, m_mapAX);
181
182 for (int iLayer = 0; iLayer < m_numLayers; iLayer++) {
183 // Create the layers
184 SCT_Layer layer(std::format("Layer{}",iLayer), iLayer, &module, m_detectorManager, m_geometryManager, m_materials, m_sqliteReader, m_mapFPV, m_mapAX);
185 id.setLayerDisk(iLayer);
186 layer.build(id); //MB to verify
187 // Store alignable transform
188 m_detectorManager->addAlignableTransform(2, id.getWaferId(), (*m_mapAX)[std::format("Layer#{}",iLayer)], (*m_mapFPV)[std::format("Layer#{}",iLayer)]);
189 }
190 }
191
192 return barrel;
193}
#define endmsg
double m_length
Definition SCT_Barrel.h:47
int m_numLayers
Definition SCT_Barrel.h:43
double m_thermalShieldEndWallThickness
Definition SCT_Barrel.h:49
void buildThermalShield(GeoFullPhysVol *parent)
bool m_isOldGeometry
Definition SCT_Barrel.h:53
double m_zClearance
Definition SCT_Barrel.h:51
void buildEMIShield(GeoFullPhysVol *parent)
InDetDD::SCT_DetectorManager * m_detectorManager
SCT_GeometryManager * m_geometryManager
SCT_MaterialManager * m_materials
std::shared_ptr< std::map< std::string, GeoFullPhysVol * > > m_mapFPV
std::shared_ptr< std::map< std::string, GeoAlignableTransform * > > m_mapAX
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
IMessageSvc * getMessageSvc(bool quiet=false)
@ layer
Definition HitInfo.h:79

◆ buildEMIShield()

void SCT_Barrel::buildEMIShield ( GeoFullPhysVol * parent)
private

Definition at line 255 of file SCT_Barrel.cxx.

256{
257
258 const SCT_BarrelParameters * parameters = m_geometryManager->barrelParameters();
259
260 // Parameters of cylinder
261 double innerRadius = parameters->emiShieldInnerRadius();
262 double deltaR = parameters->emiShieldDeltaR();
263 double outerRadius = innerRadius + deltaR;
264 double length = 2 * parameters->emiShieldZMax();
265 std::string materialName = parameters->emiShieldMaterial();
266
267 // Parameters of Electrical Shield Joint
268 double jointDeltaR = 0;
269 double jointRPhi = 0;
270 std::string jointMaterialName;
271 if(!m_isOldGeometry) {
272 jointDeltaR = parameters->emiJointDeltaR();
273 jointRPhi = parameters->emiJointRPhi();
274 jointMaterialName = parameters->emiJointMaterial();
275 }
276
277 // Parameters of Pixel Attachment - needed for cut-out
278 double pixelAttachmentLength = parameters->pixelAttachmentDeltaZ();
279 double pixelAttachmentZpos = parameters->pixelAttachmentZMin() + 0.5 * pixelAttachmentLength;
280
281 // Build cylinder (with cut-outs)
282 const GeoShape * emiShieldShape = nullptr;
283 const GeoMaterial * material;
284 const GeoTube * emiShieldTube = new GeoTube(innerRadius, outerRadius, 0.5*length);
285 if (m_isOldGeometry) {
286 emiShieldShape = emiShieldTube;
287 material = m_materials->getMaterial(materialName);
288 } else {
289 const GeoTube* cutOut = new GeoTube(innerRadius, outerRadius, 0.5*pixelAttachmentLength);
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);
294 }
295 const GeoLogVol * emiShieldLog = new GeoLogVol("EMIShield", emiShieldShape, material);
296 GeoPhysVol * emiShield = new GeoPhysVol(emiShieldLog);
297 parent->add(emiShield);
298
299 // Build electrical shield joints (with cut-outs)
300 if (!m_isOldGeometry) {
301 double dphi = jointRPhi / outerRadius;
302 const GeoTubs* emiJointTubs = new GeoTubs(outerRadius, outerRadius+jointDeltaR, 0.5*length,
303 -0.5 * dphi * Gaudi::Units::radian, dphi * Gaudi::Units::radian);
304 const GeoTubs* jointCutOut = new GeoTubs(outerRadius, outerRadius+jointDeltaR, 0.5*pixelAttachmentLength,
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);
312 // Place 3 copies
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);
317 }
318 }
319}
Scalar deltaR(const MatrixBase< Derived > &vec) const
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
double outerRadius() const
Definition SCT_Barrel.h:32
double innerRadius() const
Definition SCT_Barrel.h:31
double length() const
Definition SCT_Barrel.h:33

◆ buildThermalShield()

void SCT_Barrel::buildThermalShield ( GeoFullPhysVol * parent)
private

Definition at line 195 of file SCT_Barrel.cxx.

196{
197
198 // The thermal shield is now in 3 parts:
199 // (a) outer cylinder
200 // (b) bulkheads
201 // (c) end panels
202 // The inner cylinder is called 'EMI shield' for backwards compatibility
203
204 const SCT_BarrelParameters * parameters = m_geometryManager->barrelParameters();
205
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();
216
217 std::string cylinderMaterialName = parameters->thermalShieldMaterialCyl();
218 std::string bulkheadMaterialName = parameters->thermalShieldMaterialOuterSect();
219 std::string endPanelMaterialName = parameters->thermalShieldMaterialInnerSect();
220
221
222 // The outer cylinder part of thermal shield.
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);
228
229 // The bulkheads
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);
240
241 // The end panels
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);
252
253}

◆ epsilon()

double SCT_ComponentFactory::epsilon ( ) const
protectedinherited

Definition at line 28 of file SCT_ComponentFactory.cxx.

29{
30 return s_epsilon;
31}
static const double s_epsilon

◆ getName()

const std::string & SCT_ComponentFactory::getName ( ) const
inlineinherited

Definition at line 35 of file SCT_ComponentFactory.h.

35{return m_name;}

◆ getParameters()

void SCT_Barrel::getParameters ( )
private

Definition at line 61 of file SCT_Barrel.cxx.

62{
63 const SCT_BarrelParameters * parameters = m_geometryManager->barrelParameters();
64
65 if(!m_sqliteReader){
66 m_innerRadius = parameters->barrelInnerRadius();
67 m_outerRadius = parameters->barrelOuterRadius();
68 m_length = parameters->barrelLength();
69
70 // Used in old geometry
71 m_thermalShieldEndWallThickness = parameters->thermalShieldEndCapThickness();
72
73 // Clearannce in z between layer and interlink.
74 m_zClearance = 1.*Gaudi::Units::mm;
75
76 // Layer internal structure and services depend on geometry version
77 m_isOldGeometry = parameters->isOldGeometry();
78 }
79 m_numLayers = parameters->numLayers();
80 // Set numerology
81 m_detectorManager->numerology().setNumLayers(m_numLayers);
82
83}
double m_innerRadius
Definition SCT_Barrel.h:45
double m_outerRadius
Definition SCT_Barrel.h:46

◆ innerRadius()

double SCT_Barrel::innerRadius ( ) const
inline

Definition at line 31 of file SCT_Barrel.h.

31{return m_innerRadius;}

◆ length()

double SCT_Barrel::length ( ) const
inline

Definition at line 33 of file SCT_Barrel.h.

33{return m_length;}

◆ numLayers()

int SCT_Barrel::numLayers ( ) const
inline

Definition at line 30 of file SCT_Barrel.h.

30{return m_numLayers;}

◆ outerRadius()

double SCT_Barrel::outerRadius ( ) const
inline

Definition at line 32 of file SCT_Barrel.h.

32{return m_outerRadius;}

◆ preBuild()

const GeoLogVol * SCT_Barrel::preBuild ( )
privatevirtual

Implements SCT_UniqueComponentFactory.

Definition at line 86 of file SCT_Barrel.cxx.

87{
88 // Create the barrel volume
89 // Tube envelope containing the barrel.
90 const GeoTube * barrelEnvelopeShape = new GeoTube(m_innerRadius, m_outerRadius, 0.5 * m_length);
91 GeoLogVol * barrelLog = new GeoLogVol(getName(), barrelEnvelopeShape, m_materials->gasMaterial());
92 return barrelLog;
93}
const std::string & getName() const

Member Data Documentation

◆ m_detectorManager

InDetDD::SCT_DetectorManager* SCT_ComponentFactory::m_detectorManager {}
protectedinherited

Definition at line 38 of file SCT_ComponentFactory.h.

38{};

◆ m_geometryManager

SCT_GeometryManager* SCT_ComponentFactory::m_geometryManager {}
protectedinherited

Definition at line 39 of file SCT_ComponentFactory.h.

39{};

◆ m_innerRadius

double SCT_Barrel::m_innerRadius = 0.0
private

Definition at line 45 of file SCT_Barrel.h.

◆ m_isOldGeometry

bool SCT_Barrel::m_isOldGeometry = false
private

Definition at line 53 of file SCT_Barrel.h.

◆ m_length

double SCT_Barrel::m_length = 0.0
private

Definition at line 47 of file SCT_Barrel.h.

◆ m_logVolume

const GeoLogVol* SCT_UniqueComponentFactory::m_logVolume {}
protectedinherited

Definition at line 86 of file SCT_ComponentFactory.h.

86{};

◆ m_mapAX

std::shared_ptr<std::map<std::string, GeoAlignableTransform*> > SCT_UniqueComponentFactory::m_mapAX
protectedinherited

Definition at line 92 of file SCT_ComponentFactory.h.

◆ m_mapFPV

std::shared_ptr<std::map<std::string, GeoFullPhysVol*> > SCT_UniqueComponentFactory::m_mapFPV
protectedinherited

Definition at line 91 of file SCT_ComponentFactory.h.

◆ m_materials

SCT_MaterialManager* SCT_ComponentFactory::m_materials {}
protectedinherited

Definition at line 40 of file SCT_ComponentFactory.h.

40{};

◆ m_name

std::string SCT_ComponentFactory::m_name
privateinherited

Definition at line 46 of file SCT_ComponentFactory.h.

◆ m_numLayers

int SCT_Barrel::m_numLayers = 0
private

Definition at line 43 of file SCT_Barrel.h.

◆ m_outerRadius

double SCT_Barrel::m_outerRadius = 0.0
private

Definition at line 46 of file SCT_Barrel.h.

◆ m_sqliteReader

GeoModelIO::ReadGeoModel* SCT_UniqueComponentFactory::m_sqliteReader {}
protectedinherited

Definition at line 87 of file SCT_ComponentFactory.h.

87{};

◆ m_thermalShieldEndWallThickness

double SCT_Barrel::m_thermalShieldEndWallThickness = 0.0
private

Definition at line 49 of file SCT_Barrel.h.

◆ m_zClearance

double SCT_Barrel::m_zClearance = 0.0
private

Definition at line 51 of file SCT_Barrel.h.

◆ s_epsilon

const double SCT_ComponentFactory::s_epsilon = 1.0e-6 * Gaudi::Units::mm
staticprivateinherited

Definition at line 47 of file SCT_ComponentFactory.h.


The documentation for this class was generated from the following files: