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

#include <SCT_Layer.h>

Inheritance diagram for SCT_Layer:

Public Member Functions

 SCT_Layer (const std::string &name, int iLayer, SCT_Module *module, 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 ~SCT_Layer ()
 SCT_Layer (const SCT_Layer &)=delete
SCT_Layeroperator= (const SCT_Layer &)=delete
virtual GeoVPhysVol * build (SCT_Identifier id)
int skisPerLayer () const
double tilt () const
int stereoSign () const
double radius () const
double innerRadius () const
double outerRadius () const
double length () const
double skiPhiStart () 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 activeEnvelopeExtent (double &rmin, double &rmax)
double calcSkiPhiOffset ()

Private Attributes

int m_iLayer
int m_skisPerLayer = 0
double m_tilt = 0.0
int m_stereoSign = 0
double m_radius = 0.0
double m_safety = 0.0
double m_innerRadius = 0.0
double m_outerRadius = 0.0
double m_cylinderLength = 0.0
double m_activeLength = 0.0
double m_innerRadiusActive = 0.0
double m_outerRadiusActive = 0.0
double m_outerRadiusOfSupport = 0.0
double m_skiPhiStart = 0.0
double m_skiAuxPhiStart = 0.0
double m_bracketPhiOffset = 0.0
double m_phiRefModule = 0.0
bool m_includeFSI = false
int m_nRepeatEndJewel = 0
double m_phiEndJewel = 0.0
double m_zEndJewel = 0.0
int m_nRepeatScorpion = 0
double m_phiScorpion = 0.0
double m_zScorpion = 0.0
SCT_Modulem_module
std::unique_ptr< SCT_Skim_ski
std::unique_ptr< SCT_Clampm_clamp
std::unique_ptr< SCT_CoolingEndm_coolingEnd
std::unique_ptr< SCT_Bracketm_bracket
std::unique_ptr< SCT_Harnessm_harness
std::unique_ptr< SCT_SkiPowerTapem_skiPowerTape
std::unique_ptr< SCT_SkiAuxm_skiAux
std::unique_ptr< SCT_Flangem_flange
std::unique_ptr< SCT_SupportCylm_supportCyl
std::unique_ptr< SCT_FSIEndJewelm_endJewel
std::unique_ptr< SCT_FSIScorpionm_scorpion
std::unique_ptr< SCT_FSIFibreMaskm_fibreMask
std::string m_name

Static Private Attributes

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

Detailed Description

Definition at line 36 of file SCT_Layer.h.

Constructor & Destructor Documentation

◆ SCT_Layer() [1/2]

SCT_Layer::SCT_Layer ( const std::string & name,
int iLayer,
SCT_Module * module,
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 52 of file SCT_Layer.cxx.

61: SCT_UniqueComponentFactory(name, detectorManager, geometryManager, materials, sqliteReader, std::move(mapFPV), std::move(mapAX)),
62 m_iLayer(iLayer),
63 m_module(module)
64{
67}
int m_iLayer
Definition SCT_Layer.h:78
void getParameters()
Definition SCT_Layer.cxx:74
SCT_Module * m_module
Definition SCT_Layer.h:110
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)

◆ ~SCT_Layer()

SCT_Layer::~SCT_Layer ( )
virtual

Definition at line 69 of file SCT_Layer.cxx.

70{
71}

◆ SCT_Layer() [2/2]

SCT_Layer::SCT_Layer ( const SCT_Layer & )
delete

Member Function Documentation

◆ activeEnvelopeExtent()

void SCT_Layer::activeEnvelopeExtent ( double & rmin,
double & rmax )
private

Definition at line 395 of file SCT_Layer.cxx.

396{
397
398 // These are the coordinates of the corners of the ski envelope.
399 // x is in the radial direction and x is in the phi direction.
400
401 GeoTrf::Vector3D c1(-(m_ski->env1RefPointVector()->x()) - 0.5*(m_ski->env1Thickness()),
402 -(m_ski->env1RefPointVector()->y()) + 0.5*(m_ski->env1Width()),
403 0.0);
404 GeoTrf::Vector3D c2(-(m_ski->env2RefPointVector()->x()) - 0.5*(m_ski->env2Thickness()),
405 -(m_ski->env2RefPointVector()->y()) + 0.5*(m_ski->env2Width()),
406 0.0);
407 GeoTrf::Vector3D c4(-(m_ski->env1RefPointVector()->x()) + 0.5*(m_ski->env1Thickness()),
408 -(m_ski->env1RefPointVector()->y()) - 0.5*(m_ski->env1Width()),
409 0.0);
410
411 c1 = GeoTrf::RotateZ3D(m_tilt)*c1;
412 c2 = GeoTrf::RotateZ3D(m_tilt)*c2;
413 c4 = GeoTrf::RotateZ3D(m_tilt)*c4;
414
415 GeoTrf::Vector3D vxmax = std::move(c4);
416 GeoTrf::Vector3D vxmin;
417 if (c1.x() < c2.x()) {
418 vxmin = std::move(c1);
419 }
420 else {
421 vxmin = std::move(c2);
422 }
423
424 double xmax = vxmax.x();
425 double xmin = vxmin.x();
426 double ymax = vxmax.y();
427 double ymin = vxmin.y();
428
429 rmax = sqrt(sqr(m_radius + xmax) + sqr(ymax));
430 rmin = sqrt(sqr(m_radius + xmin) + sqr(ymin));
431}
#define sqr(t)
std::unique_ptr< SCT_Ski > m_ski
Definition SCT_Layer.h:111
double m_tilt
Definition SCT_Layer.h:81
double m_radius
Definition SCT_Layer.h:83
double xmax
Definition listroot.cxx:61
double ymin
Definition listroot.cxx:63
double xmin
Definition listroot.cxx:60
double ymax
Definition listroot.cxx:64

◆ build()

GeoVPhysVol * SCT_Layer::build ( SCT_Identifier id)
virtual

Implements SCT_UniqueComponentFactory.

Definition at line 253 of file SCT_Layer.cxx.

254{
255
256 double divisionAngle = 360 * Gaudi::Units::degree / m_skisPerLayer;
257
258 if(m_sqliteReader) {
259 for (int iSki = 0; iSki < m_skisPerLayer; iSki++){
260 id.setPhiModule(iSki);
261 m_ski->build(id);
262
263 }
264 return nullptr;
265 }
266
267
268 // We make this a fullPhysVol for alignment code.
269 GeoFullPhysVol * layer = new GeoFullPhysVol(m_logVolume);
270
271
272 //
273 // Active Layer
274 //
275 // Make envelope for active layer
276 //
277 const GeoTube * activeLayerEnvelopeShape = new GeoTube(m_innerRadiusActive, m_outerRadiusActive, 0.5 * m_cylinderLength);
278 GeoLogVol * activeLayerLog = new GeoLogVol(getName()+"Active", activeLayerEnvelopeShape, m_materials->gasMaterial());
279 GeoPhysVol * activeLayer = new GeoPhysVol(activeLayerLog);
280
281 for (int iSki = 0; iSki < m_skisPerLayer; iSki++){
282 std::ostringstream name; name << "Ski#" << iSki;
283
284 double phi = m_skiPhiStart + iSki * divisionAngle;
285
286 GeoTrf::Vector3D pos(m_radius, 0, 0);
287 pos = GeoTrf::RotateZ3D(phi)*pos;
288 GeoTrf::Transform3D rot = GeoTrf::RotateZ3D(m_tilt)*GeoTrf::RotateZ3D(phi);
289
290 // Because the ski envelope center is not positioned at the rotation axis for the ski we must first
291 // apply the inverse of refPointTransform() of the ski.
292 GeoTrf::Transform3D trans(GeoTrf::Transform3D(GeoTrf::Translate3D(pos.x(),pos.y(),pos.z())*rot) * m_ski->getRefPointTransform()->getTransform().inverse());
293
294 activeLayer->add(new GeoAlignableTransform(trans));
295 activeLayer->add(new GeoNameTag(name.str()));
296 activeLayer->add(new GeoIdentifierTag(iSki));
297 id.setPhiModule(iSki);
298 activeLayer->add(m_ski->build(id));
299 }
300
301 // And add the service material
302 double clampZPos = 0.5 * m_cylinderLength - 0.5 * m_clamp->length();
303 activeLayer->add(new GeoTransform(GeoTrf::TranslateZ3D(clampZPos)));
304 activeLayer->add(m_clamp->getVolume());
305 activeLayer->add(new GeoTransform(GeoTrf::TranslateZ3D(-clampZPos)));
306 activeLayer->add(m_clamp->getVolume());
307
308 double coolingZPos = 0.5 * m_cylinderLength - 0.5 * m_coolingEnd->length();
309 activeLayer->add(new GeoTransform(GeoTrf::TranslateZ3D(coolingZPos)));
310 activeLayer->add(m_coolingEnd->getVolume());
311 activeLayer->add(new GeoTransform(GeoTrf::TranslateZ3D(-coolingZPos)));
312 activeLayer->add(m_coolingEnd->getVolume());
313
314 //
315 // Aux Layer
316 // Envelope for brackets and powertapes.
317 //
318 const GeoTube * auxLayerEnvelopeShape = new GeoTube(m_skiAux->innerRadius(), m_skiAux->outerRadius(),
319 0.5*m_skiAux->length());
320 GeoLogVol * auxLayerLog = new GeoLogVol(getName()+"Aux", auxLayerEnvelopeShape, m_materials->gasMaterial());
321 GeoPhysVol * auxLayer = new GeoPhysVol(auxLayerLog);
322
323 for (int iSki = 0; iSki < m_skisPerLayer; iSki++){
324 //for (int iSki = 0; iSki < 2; iSki++){
325 double phi = m_skiAuxPhiStart + iSki * divisionAngle;
326 auxLayer->add(new GeoTransform(GeoTrf::RotateZ3D(phi)));
327 auxLayer->add(m_skiAux->getVolume());
328 }
329
330
331 //
332 // Support Layer
333 //
334
335 // Envelope for support cylinder, flanges and FSI.
336 // Layer0 no longer needs cut-out
337 //
338 const GeoTube * supportLayerTube = new GeoTube(m_innerRadius, m_outerRadiusOfSupport, 0.5 * m_cylinderLength);
339 GeoLogVol * supportLayerLog = new GeoLogVol(getName()+"Support", supportLayerTube,
340 m_materials->gasMaterial());
341 GeoPhysVol * supportLayer = new GeoPhysVol(supportLayerLog);
342
343 // Position flanges. One at each end.
344 double flangeZPos = 0.5 * m_cylinderLength - 0.5 * m_flange->length();
345 supportLayer->add(new GeoTransform(GeoTrf::TranslateZ3D(flangeZPos)));
346 supportLayer->add(m_flange->getVolume());
347 supportLayer->add(new GeoTransform(GeoTrf::TranslateZ3D(-flangeZPos)));
348 supportLayer->add(m_flange->getVolume());
349
350 // Position supportCyl
351 supportLayer->add(m_supportCyl->getVolume());
352
353 if(m_includeFSI) {
354 // Position FSI fibre masks
355 double fibreMaskZPos = 0.5 * m_cylinderLength - m_flange->length() - 0.5 * m_fibreMask->length();
356 supportLayer->add(new GeoTransform(GeoTrf::TranslateZ3D(fibreMaskZPos)));
357 supportLayer->add(m_fibreMask->getVolume());
358 supportLayer->add(new GeoTransform(GeoTrf::TranslateZ3D(-fibreMaskZPos)));
359 supportLayer->add(m_fibreMask->getVolume());
360
361 // Position FSI End jewels
362 double jewelRadius = std::sqrt(m_fibreMask->innerRadius()*m_fibreMask->innerRadius() - 0.25 * m_endJewel->rPhiWidth()*m_endJewel->rPhiWidth()) - 0.5 * m_endJewel->radialWidth();
363 for ( int i=0; i<m_nRepeatEndJewel; i++) {
364 double jewelAngle = m_phiEndJewel + i * 360.*Gaudi::Units::degree/m_nRepeatEndJewel;
365 supportLayer->add(new GeoTransform(GeoTrf::RotateZ3D(jewelAngle)*GeoTrf::TranslateX3D(jewelRadius)*GeoTrf::TranslateZ3D(m_zEndJewel)));
366 supportLayer->add(m_endJewel->getVolume());
367 supportLayer->add(new GeoTransform(GeoTrf::RotateZ3D(jewelAngle)*GeoTrf::TranslateX3D(jewelRadius)*GeoTrf::TranslateZ3D(-m_zEndJewel)));
368 supportLayer->add(m_endJewel->getVolume());
369 }
370
371 // Position FSI Scorpions
372 double scorpionRadius = std::sqrt(m_supportCyl->innerRadius()*m_supportCyl->innerRadius() - 0.25 * m_scorpion->rPhiWidth()*m_scorpion->rPhiWidth()) - 0.5 * m_scorpion->radialWidth();
373 for ( int i=0; i<m_nRepeatScorpion; i++) {
374 double scorpionAngle = m_phiScorpion + i * 360.*Gaudi::Units::degree/m_nRepeatScorpion;
375 supportLayer->add(new GeoTransform(GeoTrf::RotateZ3D(scorpionAngle)*GeoTrf::TranslateX3D(scorpionRadius)*GeoTrf::TranslateZ3D(m_zScorpion)));
376 supportLayer->add(m_scorpion->getVolume());
377 supportLayer->add(new GeoTransform(GeoTrf::RotateZ3D(scorpionAngle)*GeoTrf::TranslateX3D(scorpionRadius)*GeoTrf::TranslateZ3D(-m_zScorpion)));
378 supportLayer->add(m_scorpion->getVolume());
379 }
380 }
381
382 // Extra Material
383 InDetDD::ExtraMaterial xMat(m_geometryManager->distortedMatManager());
384 xMat.add(supportLayer, std::format("SCTLayer{}",m_iLayer));
385
386 // Now place all the sub layers into the overall layer.
387 layer->add(activeLayer);
388 layer->add(auxLayer);
389 layer->add(supportLayer);
390
391 return layer;
392}
Scalar phi() const
phi method
const std::string & getName() const
SCT_GeometryManager * m_geometryManager
SCT_MaterialManager * m_materials
double m_skiPhiStart
Definition SCT_Layer.h:96
std::unique_ptr< SCT_FSIFibreMask > m_fibreMask
Definition SCT_Layer.h:122
double m_outerRadiusActive
Definition SCT_Layer.h:92
int m_skisPerLayer
Definition SCT_Layer.h:80
std::unique_ptr< SCT_Flange > m_flange
Definition SCT_Layer.h:118
double m_innerRadiusActive
Definition SCT_Layer.h:91
std::unique_ptr< SCT_SkiAux > m_skiAux
Definition SCT_Layer.h:117
double m_cylinderLength
Definition SCT_Layer.h:88
std::unique_ptr< SCT_Clamp > m_clamp
Definition SCT_Layer.h:112
double m_outerRadiusOfSupport
Definition SCT_Layer.h:94
double m_phiEndJewel
Definition SCT_Layer.h:104
bool m_includeFSI
Definition SCT_Layer.h:102
std::unique_ptr< SCT_CoolingEnd > m_coolingEnd
Definition SCT_Layer.h:113
double m_phiScorpion
Definition SCT_Layer.h:107
int m_nRepeatScorpion
Definition SCT_Layer.h:106
int m_nRepeatEndJewel
Definition SCT_Layer.h:103
std::unique_ptr< SCT_SupportCyl > m_supportCyl
Definition SCT_Layer.h:119
double m_zEndJewel
Definition SCT_Layer.h:105
double m_zScorpion
Definition SCT_Layer.h:108
std::unique_ptr< SCT_FSIEndJewel > m_endJewel
Definition SCT_Layer.h:120
double m_skiAuxPhiStart
Definition SCT_Layer.h:97
std::unique_ptr< SCT_FSIScorpion > m_scorpion
Definition SCT_Layer.h:121
double m_innerRadius
Definition SCT_Layer.h:86
GeoModelIO::ReadGeoModel * m_sqliteReader
@ layer
Definition HitInfo.h:79

◆ calcSkiPhiOffset()

double SCT_Layer::calcSkiPhiOffset ( )
private

Definition at line 435 of file SCT_Layer.cxx.

436{
437 // Calculate skiPhiOffset such that active silicon touches edge of division
438 // This is what is done in AGE.
439
440 // First calculated for abs(m_tilt).
441
442 double divisionAngle = 360 * Gaudi::Units::degree / m_skisPerLayer;
443
444 // double activeHalfWidth = 0.5 * m_skiAux->ski()->module()->activeWidth();
445 // double moduleHalfThickness = 0.5 * m_skiAux->ski()->module()->thickness();
446 double activeHalfWidth = 0.5 * m_module->activeWidth();
447 double moduleHalfThickness = 0.5 * m_module->thickness();
448
449 // rotate top points by tilt xin,yin (-X,+Y) and xout,yout (+X,+Y)
450 double ctilt = std::abs(cos(m_tilt));
451 double stilt = std::abs(sin(m_tilt));
452 double xin = m_radius
453 - ctilt * moduleHalfThickness - stilt * activeHalfWidth;
454 double yin = - stilt * moduleHalfThickness + ctilt * activeHalfWidth;
455 double xout = m_radius
456 + ctilt * moduleHalfThickness - stilt * activeHalfWidth;
457 double yout = stilt * moduleHalfThickness + ctilt * activeHalfWidth;
458 double alpha_in = atan(yin/xin);
459 double alpha_out = atan(yout/xout);
460 double alpha = std::max(alpha_in, alpha_out);
461
462 int tiltSign = (m_tilt < 0) ? -1 : 1;
463 // As ski is larger than (ie alpha > divisionAngle/2)
464 // skiPhiOffset < 0 for +ve tilt and > 0 for -ve tilt.
465 double skiPhiOffset = tiltSign * (0.5 * divisionAngle - alpha);
466
467 return skiPhiOffset;
468}

◆ 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_Layer::getParameters ( )
private

Definition at line 74 of file SCT_Layer.cxx.

75{
76 const SCT_BarrelParameters * parameters = m_geometryManager->barrelParameters();
77 const SCT_GeneralParameters * generalParameters = m_geometryManager->generalParameters();
78
79 m_safety = generalParameters->safety();
80 m_radius = parameters->radius(m_iLayer);
81 m_skisPerLayer = parameters->skisPerLayer(m_iLayer);
82 m_tilt = parameters->tilt(m_iLayer);
83 m_stereoSign = parameters->layerStereoSign(m_iLayer);
84 m_bracketPhiOffset = parameters->layerBracketPhiOffset(m_iLayer);
85 m_phiRefModule = parameters->layerPhiOfRefModule(m_iLayer);
86
87 m_outerRadiusOfSupport = parameters->supportCylOuterRadius(m_iLayer);
88 m_activeLength = parameters->activeLength();
89 m_cylinderLength = parameters->cylinderLength();
90
91 m_includeFSI = parameters->includeFSI();
92 if (m_includeFSI) {
93 m_nRepeatEndJewel = parameters->fsiEndJewelNRepeat(m_iLayer);
94 m_phiEndJewel = parameters->fsiEndJewelPhi(m_iLayer);
95 m_zEndJewel = parameters->fsiEndJewelZ(m_iLayer);
96 m_nRepeatScorpion = parameters->fsiScorpionNRepeat(m_iLayer);
97 m_phiScorpion = parameters->fsiScorpionPhi(m_iLayer);
98 m_zScorpion = parameters->fsiScorpionZ(m_iLayer);
99 }
100
101 // Set numerology
102 m_detectorManager->numerology().setNumPhiModulesForLayer(m_iLayer,m_skisPerLayer);
103 m_detectorManager->numerology().setNumEtaModulesForLayer(m_iLayer,parameters->modulesPerSki());
104
105}
InDetDD::SCT_DetectorManager * m_detectorManager
double m_bracketPhiOffset
Definition SCT_Layer.h:99
double m_safety
Definition SCT_Layer.h:84
int m_stereoSign
Definition SCT_Layer.h:82
double m_phiRefModule
Definition SCT_Layer.h:100
double m_activeLength
Definition SCT_Layer.h:89

◆ innerRadius()

double SCT_Layer::innerRadius ( ) const
inline

Definition at line 63 of file SCT_Layer.h.

63{return m_innerRadius;}

◆ length()

double SCT_Layer::length ( ) const
inline

Definition at line 65 of file SCT_Layer.h.

65{return m_cylinderLength;}

◆ operator=()

SCT_Layer & SCT_Layer::operator= ( const SCT_Layer & )
delete

◆ outerRadius()

double SCT_Layer::outerRadius ( ) const
inline

Definition at line 64 of file SCT_Layer.h.

64{return m_outerRadius;}
double m_outerRadius
Definition SCT_Layer.h:87

◆ preBuild()

const GeoLogVol * SCT_Layer::preBuild ( )
privatevirtual

Implements SCT_UniqueComponentFactory.

Definition at line 110 of file SCT_Layer.cxx.

111{
112 // Build the components required for the layer.
113 // Make the ski
114 // The ski length is now reduced to m_activeLength to make room for the cooling inlet/outlet volumes
115 m_ski = std::make_unique<SCT_Ski>(std::format("Ski{}",m_iLayer), m_module, m_stereoSign, m_tilt, m_activeLength,
117
118
119 //
120 // Calculations for making active layer components - called ski.
121 // This is the modules + doglegs + cooling blocks + coolingpipe
122 //
123 double divisionAngle = 360. * Gaudi::Units::degree / m_skisPerLayer;
124
125 // We define here the first module(id = 0) as the nearest module to phi = 0 with positive phi.
126 // We allow slightly negative in case of rounding errors.
127
128 double moduleCount = m_phiRefModule / divisionAngle;
129 m_skiPhiStart = divisionAngle * (moduleCount - floor(moduleCount +0.5 -0.0001));
130
131 if(m_sqliteReader) return nullptr;
132
133 // Build the Flanges
134 m_flange = std::make_unique<SCT_Flange>(std::format("Flange{}",m_iLayer), m_iLayer, m_detectorManager, m_geometryManager, m_materials);
135
136 // Build the SupportCyl
137 m_supportCyl = std::make_unique<SCT_SupportCyl>(std::format("SupportCyl",m_iLayer), m_iLayer, m_cylinderLength,
139
140 // Build the FSI end jewel, scorpion and fibre mask
141 // Mask runs between scorpions and flange in z - must be built after these
142 if (m_includeFSI) {
143 m_endJewel = std::make_unique<SCT_FSIEndJewel>(std::format("FSIEndJewel",m_iLayer), m_detectorManager, m_geometryManager, m_materials);
144 m_scorpion = std::make_unique<SCT_FSIScorpion>(std::format("FSIScorpion",m_iLayer), m_detectorManager, m_geometryManager, m_materials);
145 double length_mask = 0.5*m_cylinderLength - m_flange->length() - m_zScorpion - 0.5*m_scorpion->length();
146 m_fibreMask = std::make_unique<SCT_FSIFibreMask>(std::format("FSIFibreMask",m_iLayer), m_iLayer, length_mask,
148 }
149
151
152 //
153 // Make SkiAux - This is the brackets, harness and power tape.
154 //
155 // Bracket is placed at edge of division.
156 // -tiltSign * (r*divisionAngle/2 - bracket_width/2)
157 // Works for both +ve and -ve tilt.
158 m_bracket = std::make_unique<SCT_Bracket>(std::format("Bracket",m_iLayer), m_detectorManager, m_geometryManager, m_materials);
159
160 m_harness = std::make_unique<SCT_Harness>(std::format("Harness",m_iLayer), m_cylinderLength,
162 m_skiPowerTape = std::make_unique<SCT_SkiPowerTape>(std::format("SkiPowerTape",m_iLayer), m_ski.get(), m_cylinderLength,
164
165 int tiltSign = (m_tilt < 0) ? -1 : +1;
166
167 double bracketOffset = m_skiPhiStart - tiltSign * m_bracketPhiOffset;
168 double powerTapeOffset = bracketOffset - tiltSign * 0.5*divisionAngle;
169 // tiltSign not really necessary in powerTapeOffset calculate
170 // - but keeps the bracket and powertape pair associated with the same ski
171
172
173 // Make the SkiAux. This is layer dependent.
174 m_skiAux = std::make_unique<SCT_SkiAux>(std::format("SkiAux",m_iLayer),
175 m_ski.get(),
176 m_bracket.get(),
177 m_harness.get(),
178 m_skiPowerTape.get(),
180 bracketOffset,
181 powerTapeOffset,
182 divisionAngle,
186
187 // Build the clamp: we cannot do this until we have the dimensions of SkiAux
188 m_clamp = std::make_unique<SCT_Clamp>(std::format("Clamp",m_iLayer), m_iLayer, m_skiAux->outerRadius(),
190
191 // Build the volume representing the cooling inlets, outlet and U-bends.
192 // We cannot do this until we have the dimensions of the clamp
193 double coolingInnerRadius = m_clamp->outerRadius();
194 double clearance = 1*Gaudi::Units::mm;
195 double coolingLength = 0.5*m_cylinderLength - 0.5*m_activeLength - clearance;
196 m_coolingEnd = std::make_unique<SCT_CoolingEnd>(std::format("CoolingEnd",m_iLayer), m_iLayer, coolingInnerRadius, coolingLength,
198
199 //
200 // Calculate the envelopes.
201 //
202
203
204 //
205 // Active Layer Envelope extent
206 // Envelope for the active part (ie containing all the skis for the layer)
207 //
208 double rMinActive, rMaxActive;
209
210 // Returns the min and max radius for the active envelope
211 activeEnvelopeExtent(rMinActive, rMaxActive);
212
213 // Add some safety
214 rMinActive -= m_safety;
215 rMaxActive += m_safety;
216
217 // But active layer now includes clamp....
218 rMinActive = m_skiAux->outerRadius();
219
220 m_innerRadiusActive = rMinActive;
221 m_outerRadiusActive = rMaxActive;
222
223 //
224 // Extent Envelope for support cyl, flanges and close-outs.
225 //
226 double rMinSupport = std::min(m_supportCyl->innerRadius(),m_flange->innerRadius());
227 //
228 // Overall Layer Envelope extent
229 //
230 // Inner radius is inner radius of support.
231 m_innerRadius = rMinSupport;
233
234 //
235 // Make envelope for layer; length is now same as support cylinder
236 //
237 double length = m_cylinderLength;
238 // double length = m_layerLength;
239 // if (m_iLayer == 0) {length = m_cylinderLength + m_safety;}
240 const GeoTube * layerEnvelopeTube = new GeoTube(m_innerRadius, m_outerRadius, 0.5 * length);
241
242 GeoLogVol * layerLog = new GeoLogVol(getName(), layerEnvelopeTube, m_materials->gasMaterial());
243
244 // Check for overlap.
245 if (m_skiAux->outerRadius() > rMinActive) {
246 std::cout << "----> WARNING: SCT_Layer: Overlap between active layer and aux layer." << std::endl;
247 }
248
249 return layerLog;
250}
double length() const
Definition SCT_Layer.h:65
void activeEnvelopeExtent(double &rmin, double &rmax)
std::unique_ptr< SCT_Harness > m_harness
Definition SCT_Layer.h:115
std::unique_ptr< SCT_Bracket > m_bracket
Definition SCT_Layer.h:114
std::unique_ptr< SCT_SkiPowerTape > m_skiPowerTape
Definition SCT_Layer.h:116
std::shared_ptr< std::map< std::string, GeoFullPhysVol * > > m_mapFPV
std::shared_ptr< std::map< std::string, GeoAlignableTransform * > > m_mapAX

◆ radius()

double SCT_Layer::radius ( ) const
inline

Definition at line 61 of file SCT_Layer.h.

61{return m_radius;}

◆ skiPhiStart()

double SCT_Layer::skiPhiStart ( ) const
inline

Definition at line 67 of file SCT_Layer.h.

67{return m_skiPhiStart;}

◆ skisPerLayer()

int SCT_Layer::skisPerLayer ( ) const
inline

Definition at line 58 of file SCT_Layer.h.

58{return m_skisPerLayer;}

◆ stereoSign()

int SCT_Layer::stereoSign ( ) const
inline

Definition at line 60 of file SCT_Layer.h.

60{return m_stereoSign;}

◆ tilt()

double SCT_Layer::tilt ( ) const
inline

Definition at line 59 of file SCT_Layer.h.

59{return m_tilt;}

Member Data Documentation

◆ m_activeLength

double SCT_Layer::m_activeLength = 0.0
private

Definition at line 89 of file SCT_Layer.h.

◆ m_bracket

std::unique_ptr<SCT_Bracket> SCT_Layer::m_bracket
private

Definition at line 114 of file SCT_Layer.h.

◆ m_bracketPhiOffset

double SCT_Layer::m_bracketPhiOffset = 0.0
private

Definition at line 99 of file SCT_Layer.h.

◆ m_clamp

std::unique_ptr<SCT_Clamp> SCT_Layer::m_clamp
private

Definition at line 112 of file SCT_Layer.h.

◆ m_coolingEnd

std::unique_ptr<SCT_CoolingEnd> SCT_Layer::m_coolingEnd
private

Definition at line 113 of file SCT_Layer.h.

◆ m_cylinderLength

double SCT_Layer::m_cylinderLength = 0.0
private

Definition at line 88 of file SCT_Layer.h.

◆ m_detectorManager

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

Definition at line 38 of file SCT_ComponentFactory.h.

38{};

◆ m_endJewel

std::unique_ptr<SCT_FSIEndJewel> SCT_Layer::m_endJewel
private

Definition at line 120 of file SCT_Layer.h.

◆ m_fibreMask

std::unique_ptr<SCT_FSIFibreMask> SCT_Layer::m_fibreMask
private

Definition at line 122 of file SCT_Layer.h.

◆ m_flange

std::unique_ptr<SCT_Flange> SCT_Layer::m_flange
private

Definition at line 118 of file SCT_Layer.h.

◆ m_geometryManager

SCT_GeometryManager* SCT_ComponentFactory::m_geometryManager {}
protectedinherited

Definition at line 39 of file SCT_ComponentFactory.h.

39{};

◆ m_harness

std::unique_ptr<SCT_Harness> SCT_Layer::m_harness
private

Definition at line 115 of file SCT_Layer.h.

◆ m_iLayer

int SCT_Layer::m_iLayer
private

Definition at line 78 of file SCT_Layer.h.

◆ m_includeFSI

bool SCT_Layer::m_includeFSI = false
private

Definition at line 102 of file SCT_Layer.h.

◆ m_innerRadius

double SCT_Layer::m_innerRadius = 0.0
private

Definition at line 86 of file SCT_Layer.h.

◆ m_innerRadiusActive

double SCT_Layer::m_innerRadiusActive = 0.0
private

Definition at line 91 of file SCT_Layer.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_module

SCT_Module* SCT_Layer::m_module
private

Definition at line 110 of file SCT_Layer.h.

◆ m_name

std::string SCT_ComponentFactory::m_name
privateinherited

Definition at line 46 of file SCT_ComponentFactory.h.

◆ m_nRepeatEndJewel

int SCT_Layer::m_nRepeatEndJewel = 0
private

Definition at line 103 of file SCT_Layer.h.

◆ m_nRepeatScorpion

int SCT_Layer::m_nRepeatScorpion = 0
private

Definition at line 106 of file SCT_Layer.h.

◆ m_outerRadius

double SCT_Layer::m_outerRadius = 0.0
private

Definition at line 87 of file SCT_Layer.h.

◆ m_outerRadiusActive

double SCT_Layer::m_outerRadiusActive = 0.0
private

Definition at line 92 of file SCT_Layer.h.

◆ m_outerRadiusOfSupport

double SCT_Layer::m_outerRadiusOfSupport = 0.0
private

Definition at line 94 of file SCT_Layer.h.

◆ m_phiEndJewel

double SCT_Layer::m_phiEndJewel = 0.0
private

Definition at line 104 of file SCT_Layer.h.

◆ m_phiRefModule

double SCT_Layer::m_phiRefModule = 0.0
private

Definition at line 100 of file SCT_Layer.h.

◆ m_phiScorpion

double SCT_Layer::m_phiScorpion = 0.0
private

Definition at line 107 of file SCT_Layer.h.

◆ m_radius

double SCT_Layer::m_radius = 0.0
private

Definition at line 83 of file SCT_Layer.h.

◆ m_safety

double SCT_Layer::m_safety = 0.0
private

Definition at line 84 of file SCT_Layer.h.

◆ m_scorpion

std::unique_ptr<SCT_FSIScorpion> SCT_Layer::m_scorpion
private

Definition at line 121 of file SCT_Layer.h.

◆ m_ski

std::unique_ptr<SCT_Ski> SCT_Layer::m_ski
private

Definition at line 111 of file SCT_Layer.h.

◆ m_skiAux

std::unique_ptr<SCT_SkiAux> SCT_Layer::m_skiAux
private

Definition at line 117 of file SCT_Layer.h.

◆ m_skiAuxPhiStart

double SCT_Layer::m_skiAuxPhiStart = 0.0
private

Definition at line 97 of file SCT_Layer.h.

◆ m_skiPhiStart

double SCT_Layer::m_skiPhiStart = 0.0
private

Definition at line 96 of file SCT_Layer.h.

◆ m_skiPowerTape

std::unique_ptr<SCT_SkiPowerTape> SCT_Layer::m_skiPowerTape
private

Definition at line 116 of file SCT_Layer.h.

◆ m_skisPerLayer

int SCT_Layer::m_skisPerLayer = 0
private

Definition at line 80 of file SCT_Layer.h.

◆ m_sqliteReader

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

Definition at line 87 of file SCT_ComponentFactory.h.

87{};

◆ m_stereoSign

int SCT_Layer::m_stereoSign = 0
private

Definition at line 82 of file SCT_Layer.h.

◆ m_supportCyl

std::unique_ptr<SCT_SupportCyl> SCT_Layer::m_supportCyl
private

Definition at line 119 of file SCT_Layer.h.

◆ m_tilt

double SCT_Layer::m_tilt = 0.0
private

Definition at line 81 of file SCT_Layer.h.

◆ m_zEndJewel

double SCT_Layer::m_zEndJewel = 0.0
private

Definition at line 105 of file SCT_Layer.h.

◆ m_zScorpion

double SCT_Layer::m_zScorpion = 0.0
private

Definition at line 108 of file SCT_Layer.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: