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

#include <SCT_SkiPowerTape.h>

Inheritance diagram for SCT_SkiPowerTape:
Collaboration diagram for SCT_SkiPowerTape:

Public Member Functions

 SCT_SkiPowerTape (const std::string &name, const SCT_Ski *ski, double length, InDetDD::SCT_DetectorManager *detectorManager, SCT_GeometryManager *geometryManager, SCT_MaterialManager *materials)
double thickness () const
double width () const
double length () const
double powerTapeThickness () const
GeoVPhysVol * getVolume ()
const std::string & getName () const

Protected Member Functions

double epsilon () const

Protected Attributes

GeoVPhysVol * m_physVolume {}
InDetDD::SCT_DetectorManagerm_detectorManager {}
SCT_GeometryManagerm_geometryManager {}
SCT_MaterialManagerm_materials {}

Private Member Functions

void getParameters ()
virtual GeoVPhysVol * build ()

Private Attributes

double m_length
double m_width = 0.0
double m_thickness = 0.0
double m_powerTapeThickness = 0.0
const SCT_Skim_ski
double m_powerTapeStartPointOffset = 0.0
std::string m_name

Static Private Attributes

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

Detailed Description

Definition at line 14 of file SCT_SkiPowerTape.h.

Constructor & Destructor Documentation

◆ SCT_SkiPowerTape()

SCT_SkiPowerTape::SCT_SkiPowerTape ( const std::string & name,
const SCT_Ski * ski,
double length,
InDetDD::SCT_DetectorManager * detectorManager,
SCT_GeometryManager * geometryManager,
SCT_MaterialManager * materials )

Definition at line 32 of file SCT_SkiPowerTape.cxx.

37 :
38 SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials),
39 m_length(length), m_ski(ski)
40{
43}
SCT_SharedComponentFactory(const std::string &name, InDetDD::SCT_DetectorManager *detectorManager, SCT_GeometryManager *geometryManager, SCT_MaterialManager *materials=nullptr)
virtual GeoVPhysVol * build()
const SCT_Ski * m_ski
double length() const

Member Function Documentation

◆ build()

GeoVPhysVol * SCT_SkiPowerTape::build ( )
privatevirtual

Implements SCT_SharedComponentFactory.

Definition at line 58 of file SCT_SkiPowerTape.cxx.

59{
60 // The power tapes are stacked going from the nearest interlink to the
61 // nearset edge of the dogleg.
62 //
63 // --- ---
64 // ------ ------
65 // --------- ---------
66
67
68 int nHalfModules = m_ski->modulesPerSki()/2;
69
70 // Thickness of the stack.
71 m_thickness = nHalfModules * m_powerTapeThickness;
72
73
74 // This is a volume containing all the power tapes.
75 const GeoBox * skiPowerTapeShape = new GeoBox(0.5*m_thickness, 0.5*m_width, 0.5*m_length);
76 const GeoLogVol *skiPowerTapeLog =
77 new GeoLogVol(getName(), skiPowerTapeShape, m_materials->gasMaterial());
78 GeoPhysVol * skiPowerTape = new GeoPhysVol(skiPowerTapeLog);
79
80 // Loop over modules in ski as we need their z positions.
81 for (int iModule = 0; iModule < m_ski->modulesPerSki(); iModule++) {
82
83 // Position PowerTapes
84 // These run from the nearest interlink to the edge of the dogleg
85 double tapeLength, tapeMid, tapeStart, tapeEnd;
86
87 // nPos is used to stack the power tapes. Modules closest to interlink are
88 // furthest from support. The positive and negative z positions are
89 // syGaudi::Units::mmetric. nPos = 5,4,3,2,1,0,0,1,2,3,4,5 for the 12 modules.
90 int nPos;
91
92 // test sign of zpos to determine whether the tape runs to the
93 // high z end or low z end.
94
95 if (m_ski->zPos(iModule) > 0) {
96
97 // Tape runs from high z end to edge of dogleg. NB width of dogleg is in z-direction
98 tapeStart = m_ski->zPos(iModule) + m_ski->coolingBlockOffsetZ() + m_powerTapeStartPointOffset;
99 tapeEnd = 0.5 * m_length;
100
101 // For 12 module: iModule = 6, 7, 8, ..., 11 --> nPos = 0, 1, 2, ..., 5
102 nPos = iModule - nHalfModules;
103
104 } else {
105
106 // Tape runs from low z end to edge of dogleg. NB width of dogleg is in z-direction
107 tapeStart = m_ski->zPos(iModule) + m_ski->coolingBlockOffsetZ() - m_powerTapeStartPointOffset;
108 tapeEnd = -0.5 * m_length;
109
110 // For 12 module: iModule = 0, 1, 2, ..., 5 --> nPos = 5, 4, 3, ..., 0
111 nPos = nHalfModules - iModule - 1;
112
113 }
114
115 tapeLength = std::abs(tapeEnd - tapeStart);
116 tapeMid = 0.5 * (tapeEnd + tapeStart);
117
118
119 // Make sure that first half are negative and secand half are positive.
120 // Checking that nPos is >= 0 is equivalent to this.
121 if (nPos < 0) {
122 std::cout << "SCT_SkiPowerTape: Module position inconsistent with assumption that\n"
123 << " first half has z < 0 and second half has z > 0"
124 << std::endl;
125 }
126
127 // Create the tape
128
129 // Label tape with M# at end of string
130 SCT_PowerTape powerTape(std::format("{}PowerTapeM{}",getName(),iModule + 1), tapeLength,
132
133 // Calculate x position of tape. This will depend on the module number.
134 // The reference point is the middle of the stack.
135 double xTapePos = - 0.5 * m_thickness +
136 (nPos + 0.5) * powerTape.thickness();
137 double yTapePos = 0;
138
139
140 // Position the tape
141 skiPowerTape->add(new GeoTransform(GeoTrf::Translate3D(xTapePos, yTapePos, tapeMid)));
142 skiPowerTape->add(powerTape.getVolume());
143
144 }
145
146 return skiPowerTape;
147}
const std::string & getName() const
InDetDD::SCT_DetectorManager * m_detectorManager
SCT_GeometryManager * m_geometryManager
SCT_MaterialManager * m_materials
double m_powerTapeStartPointOffset

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

Definition at line 46 of file SCT_SkiPowerTape.cxx.

47{
48 const SCT_BarrelParameters * parameters = m_geometryManager->barrelParameters();
49
50 // Width is the same as the width of a single powertape.
51 m_powerTapeThickness = parameters->powerTapeThickness();
52 m_width = parameters->powerTapeWidth();
53 m_powerTapeStartPointOffset = parameters->powerTapeStartPointOffset();
54}

◆ getVolume()

GeoVPhysVol * SCT_SharedComponentFactory::getVolume ( )
inlineinherited

Definition at line 63 of file SCT_ComponentFactory.h.

63{return m_physVolume;}

◆ length()

double SCT_SkiPowerTape::length ( ) const
inline

Definition at line 31 of file SCT_SkiPowerTape.h.

31{return m_length;}

◆ powerTapeThickness()

double SCT_SkiPowerTape::powerTapeThickness ( ) const
inline

Definition at line 32 of file SCT_SkiPowerTape.h.

◆ thickness()

double SCT_SkiPowerTape::thickness ( ) const
inline

Definition at line 29 of file SCT_SkiPowerTape.h.

29{return m_thickness;}

◆ width()

double SCT_SkiPowerTape::width ( ) const
inline

Definition at line 30 of file SCT_SkiPowerTape.h.

30{return m_width;}

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_length

double SCT_SkiPowerTape::m_length
private

Definition at line 39 of file SCT_SkiPowerTape.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_physVolume

GeoVPhysVol* SCT_SharedComponentFactory::m_physVolume {}
protectedinherited

Definition at line 66 of file SCT_ComponentFactory.h.

66{};

◆ m_powerTapeStartPointOffset

double SCT_SkiPowerTape::m_powerTapeStartPointOffset = 0.0
private

Definition at line 49 of file SCT_SkiPowerTape.h.

◆ m_powerTapeThickness

double SCT_SkiPowerTape::m_powerTapeThickness = 0.0
private

Definition at line 42 of file SCT_SkiPowerTape.h.

◆ m_ski

const SCT_Ski* SCT_SkiPowerTape::m_ski
private

Definition at line 45 of file SCT_SkiPowerTape.h.

◆ m_thickness

double SCT_SkiPowerTape::m_thickness = 0.0
private

Definition at line 41 of file SCT_SkiPowerTape.h.

◆ m_width

double SCT_SkiPowerTape::m_width = 0.0
private

Definition at line 40 of file SCT_SkiPowerTape.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: