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

#include <SCT_SkiAux.h>

Inheritance diagram for SCT_SkiAux:
Collaboration diagram for SCT_SkiAux:

Public Member Functions

 SCT_SkiAux (const std::string &name, SCT_Ski *ski, SCT_Bracket *bracket, SCT_Harness *harness, SCT_SkiPowerTape *skiPowerTape, double innerRadius, double bracketPhiOffset, double powerTapePhiOffset, double divisionAngle, InDetDD::SCT_DetectorManager *detectorManager, SCT_GeometryManager *geometryManager, SCT_MaterialManager *materials)
double innerRadius () const
double outerRadius () const
double length () const
double sectorStartAngle () const
double sectorAngle () const
double bracketPhiOffset () const
double powerTapePhiOffset () const
const SCT_Skiski () const
const SCT_Bracketbracket () const
const SCT_Harnessharness () const
const SCT_SkiPowerTapeskiPowerTape () const
GeoVPhysVol * getVolume ()
const std::string & getName () const
std::string intToString (int i) 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_innerRadius
double m_outerRadius = 0.0
double m_length = 0.0
double m_bracketPhiOffset
double m_powerTapePhiOffset
double m_sectorStartAngle = 0.0
double m_sectorAngle
SCT_Skim_ski
SCT_Bracketm_bracket
SCT_Harnessm_harness
SCT_SkiPowerTapem_skiPowerTape
std::string m_name

Static Private Attributes

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

Detailed Description

Definition at line 18 of file SCT_SkiAux.h.

Constructor & Destructor Documentation

◆ SCT_SkiAux()

SCT_SkiAux::SCT_SkiAux ( const std::string & name,
SCT_Ski * ski,
SCT_Bracket * bracket,
SCT_Harness * harness,
SCT_SkiPowerTape * skiPowerTape,
double innerRadius,
double bracketPhiOffset,
double powerTapePhiOffset,
double divisionAngle,
InDetDD::SCT_DetectorManager * detectorManager,
SCT_GeometryManager * geometryManager,
SCT_MaterialManager * materials )

Definition at line 39 of file SCT_SkiAux.cxx.

50 :
51 SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials),
55 m_sectorAngle(divisionAngle),
57{
60}
SCT_SharedComponentFactory(const std::string &name, InDetDD::SCT_DetectorManager *detectorManager, SCT_GeometryManager *geometryManager, SCT_MaterialManager *materials=nullptr)
double m_bracketPhiOffset
Definition SCT_SkiAux.h:65
SCT_Harness * m_harness
Definition SCT_SkiAux.h:73
SCT_SkiPowerTape * m_skiPowerTape
Definition SCT_SkiAux.h:74
const SCT_SkiPowerTape * skiPowerTape() const
Definition SCT_SkiAux.h:54
SCT_Bracket * m_bracket
Definition SCT_SkiAux.h:72
double powerTapePhiOffset() const
Definition SCT_SkiAux.h:47
SCT_Ski * m_ski
Definition SCT_SkiAux.h:71
double m_powerTapePhiOffset
Definition SCT_SkiAux.h:66
double m_innerRadius
Definition SCT_SkiAux.h:62
virtual GeoVPhysVol * build()
void getParameters()
const SCT_Ski * ski() const
Definition SCT_SkiAux.h:51
double m_sectorAngle
Definition SCT_SkiAux.h:68
const SCT_Harness * harness() const
Definition SCT_SkiAux.h:53
double innerRadius() const
Definition SCT_SkiAux.h:40
double bracketPhiOffset() const
Definition SCT_SkiAux.h:46
const SCT_Bracket * bracket() const
Definition SCT_SkiAux.h:52

Member Function Documentation

◆ bracket()

const SCT_Bracket * SCT_SkiAux::bracket ( ) const
inline

Definition at line 52 of file SCT_SkiAux.h.

52{return m_bracket;}

◆ bracketPhiOffset()

double SCT_SkiAux::bracketPhiOffset ( ) const
inline

Definition at line 46 of file SCT_SkiAux.h.

46{return m_bracketPhiOffset;}

◆ build()

GeoVPhysVol * SCT_SkiAux::build ( )
privatevirtual

Implements SCT_SharedComponentFactory.

Definition at line 68 of file SCT_SkiAux.cxx.

69{
70 // SkiAux is a composition with all the elements that go along with
71 // ski but are not tilted with the ski. Currently the brackets, harness
72 // and powertapes. Harness is not present in older geometries.
73 // The reference point is the beam axis.
74 // The envelope is a tube sector.
75
76 //
77 // Calculate Position of Brackets. Z position is calculated when it is positioned
78 //
79 // phi offset is calculated in SCT_Layer. For AGE compatible version it is positioned
80 // such that the lower edge of the bracket is lined up with the upper
81 // edge of the next module below it.
82
83 // Define small distance for avoiding overlaps.
84 double radiusBracket = m_innerRadius + 0.5*m_bracket->thickness() + epsilon();
85 double xBracketPos = radiusBracket * cos(m_bracketPhiOffset);
86 double yBracketPos = radiusBracket * sin(m_bracketPhiOffset);
87
88 // Calculate position of harness, if present. Phi offset is
89 // same as power tapes, and we leave a gap equal to one tape
90 // width
91 double xHarnessPos = 0;
92 double yHarnessPos = 0;
93 if(m_harness != nullptr) {
94 double radiusHarness = m_innerRadius +
95 0.5 * m_harness->thickness() +
96 m_skiPowerTape->powerTapeThickness();
97 xHarnessPos = radiusHarness * cos(m_powerTapePhiOffset);
98 yHarnessPos = radiusHarness * sin(m_powerTapePhiOffset);
99 }
100
101 //
102 // Calculate Position of PowerTapes
103 //
104 // Calculate x position of stack of tapes.
105 // If no harness is present, this is on the outer surface of the support
106 // cylinder with a gap equal to a tape width. In AGE there is a bug at the
107 // moment so this is not identical to AGE.
108 // If the harness is present, the power tapes are moved beyond the harness
109
110 double radiusTape = m_innerRadius +
111 0.5 * m_skiPowerTape->thickness() +
112 m_skiPowerTape->powerTapeThickness();
113 if(m_harness != nullptr) {radiusTape += m_harness->thickness();}
114 double xTapePos = radiusTape * cos(m_powerTapePhiOffset);
115 double yTapePos = radiusTape * sin(m_powerTapePhiOffset);
116
117 //
118 // Calculate envelope.
119 //
120 // Calculate the max radius that the components extend to.
121 // N.B. harness is inside power tape, so don't need to check it
122 double rMaxExtentOfPowerTape =
123 sqrt( sqr(radiusTape + 0.5 * m_skiPowerTape->thickness()) +
124 sqr(0.5 * m_skiPowerTape->width()) );
125
126 double rMaxExtentOfBracket =
127 sqrt( sqr(radiusBracket + 0.5 * m_bracket->thickness()) +
128 sqr(0.5 * m_bracket->width()) );
129
130 m_outerRadius = std::max(rMaxExtentOfBracket,rMaxExtentOfPowerTape) + epsilon();
131
132
133 // calculate min and max tan(alpha) = y/x in order to work out
134 // maximum and minimum angle for the sector.
135 // Assumes angles are between -pi/2 and pi/2 and don't straddle pi/2 boarder.
136 double minAngle=0.;
137 double maxAngle=0.;
138
139 double halfAngleBracket = atan(0.5 * m_bracket->width()/m_innerRadius);
140 double halfAnglePowerTape = atan(0.5 * m_skiPowerTape->width()/m_innerRadius);
141 // Harness and power tape are at same phi
142 if(m_harness != nullptr) {
143 double halfAngleHarness = atan(0.5 * m_harness->width()/m_innerRadius);
144 halfAnglePowerTape = std::max(halfAnglePowerTape, halfAngleHarness);
145 }
146
148 minAngle = m_bracketPhiOffset - halfAngleBracket;
149 maxAngle = m_powerTapePhiOffset + halfAnglePowerTape;
150 } else {
151 minAngle = m_powerTapePhiOffset - halfAnglePowerTape;
152 maxAngle = m_bracketPhiOffset + halfAngleBracket;
153 }
154
155
156 // Calculate extent so that min and max angle are equal distant to sector edge
157 double midAngle = 0.5 * (minAngle+maxAngle);
159
160 // Length is same as power tape length
161 m_length = m_skiPowerTape->length();
162
163 const GeoTubs * skiAuxShape = new GeoTubs(m_innerRadius, m_outerRadius, 0.5*m_length,
165 const GeoLogVol *skiAuxLog =
166 new GeoLogVol(getName(), skiAuxShape, m_materials->gasMaterial());
167 GeoPhysVol * skiAux = new GeoPhysVol(skiAuxLog);
168
169 //
170 // Position brackets
171 //
172
173 // Loop over modules in ski as we need their z positions.
174 for (int iModule = 0; iModule < m_ski->modulesPerSki(); iModule++) {
175
176 // Z Position is position of the center of the baseBoard:
177 double coolingCenterPosZ = m_ski->zPos(iModule) + m_ski->coolingBlockOffsetZ();
178 GeoTrf::Translation3D posBracket(xBracketPos, yBracketPos, coolingCenterPosZ);
179 GeoTrf::RotateZ3D rotBracket(m_bracketPhiOffset);
180 skiAux->add(new GeoTransform(GeoTrf::Transform3D(posBracket*rotBracket)));
181 skiAux->add(m_bracket->getVolume());
182 }
183
184 // Position the harness
185 if(m_harness != nullptr) {
186 GeoTrf::Translation3D posHarness(xHarnessPos, yHarnessPos, 0);
187 GeoTrf::RotateZ3D rotHarness(m_powerTapePhiOffset);
188 skiAux->add(new GeoTransform(GeoTrf::Transform3D(posHarness*rotHarness)));
189 skiAux->add(m_harness->getVolume());
190 }
191
192 //
193 // Position the power tapes
194 //
195 GeoTrf::Translation3D posTape(xTapePos, yTapePos, 0);
196 GeoTrf::RotateZ3D rotTape(m_powerTapePhiOffset);
197
198 skiAux->add(new GeoTransform(GeoTrf::Transform3D(posTape*rotTape)));
199 skiAux->add(m_skiPowerTape->getVolume());
200
201
202 // return the volume pointer of the top volume
203 return skiAux;
204
205}
#define sqr(t)
const std::string & getName() const
SCT_MaterialManager * m_materials
double m_length
Definition SCT_SkiAux.h:64
double m_sectorStartAngle
Definition SCT_SkiAux.h:67
double m_outerRadius
Definition SCT_SkiAux.h:63

◆ epsilon()

double SCT_ComponentFactory::epsilon ( ) const
protectedinherited

Definition at line 38 of file SCT_ComponentFactory.cxx.

39{
40 return s_epsilon;
41}
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_SkiAux::getParameters ( )
private

Definition at line 63 of file SCT_SkiAux.cxx.

64{
65}

◆ getVolume()

GeoVPhysVol * SCT_SharedComponentFactory::getVolume ( )
inlineinherited

Definition at line 67 of file SCT_ComponentFactory.h.

67{return m_physVolume;}

◆ harness()

const SCT_Harness * SCT_SkiAux::harness ( ) const
inline

Definition at line 53 of file SCT_SkiAux.h.

53{return m_harness;}

◆ innerRadius()

double SCT_SkiAux::innerRadius ( ) const
inline

Definition at line 40 of file SCT_SkiAux.h.

40{return m_innerRadius;}

◆ intToString()

std::string SCT_ComponentFactory::intToString ( int i) const
inherited

Definition at line 30 of file SCT_ComponentFactory.cxx.

31{
32 std::ostringstream str;
33 str << i;
34 return str.str();
35}

◆ length()

double SCT_SkiAux::length ( ) const
inline

Definition at line 42 of file SCT_SkiAux.h.

42{return m_length;}

◆ outerRadius()

double SCT_SkiAux::outerRadius ( ) const
inline

Definition at line 41 of file SCT_SkiAux.h.

41{return m_outerRadius;}

◆ powerTapePhiOffset()

double SCT_SkiAux::powerTapePhiOffset ( ) const
inline

Definition at line 47 of file SCT_SkiAux.h.

47{return m_powerTapePhiOffset;}

◆ sectorAngle()

double SCT_SkiAux::sectorAngle ( ) const
inline

Definition at line 44 of file SCT_SkiAux.h.

44{return m_sectorAngle;}

◆ sectorStartAngle()

double SCT_SkiAux::sectorStartAngle ( ) const
inline

Definition at line 43 of file SCT_SkiAux.h.

43{return m_sectorStartAngle;}

◆ ski()

const SCT_Ski * SCT_SkiAux::ski ( ) const
inline

Definition at line 51 of file SCT_SkiAux.h.

51{return m_ski;}

◆ skiPowerTape()

const SCT_SkiPowerTape * SCT_SkiAux::skiPowerTape ( ) const
inline

Definition at line 54 of file SCT_SkiAux.h.

54{return m_skiPowerTape;}

Member Data Documentation

◆ m_bracket

SCT_Bracket* SCT_SkiAux::m_bracket
private

Definition at line 72 of file SCT_SkiAux.h.

◆ m_bracketPhiOffset

double SCT_SkiAux::m_bracketPhiOffset
private

Definition at line 65 of file SCT_SkiAux.h.

◆ m_detectorManager

InDetDD::SCT_DetectorManager* SCT_ComponentFactory::m_detectorManager
protectedinherited

Definition at line 41 of file SCT_ComponentFactory.h.

◆ m_geometryManager

SCT_GeometryManager* SCT_ComponentFactory::m_geometryManager
protectedinherited

Definition at line 42 of file SCT_ComponentFactory.h.

◆ m_harness

SCT_Harness* SCT_SkiAux::m_harness
private

Definition at line 73 of file SCT_SkiAux.h.

◆ m_innerRadius

double SCT_SkiAux::m_innerRadius
private

Definition at line 62 of file SCT_SkiAux.h.

◆ m_length

double SCT_SkiAux::m_length = 0.0
private

Definition at line 64 of file SCT_SkiAux.h.

◆ m_materials

SCT_MaterialManager* SCT_ComponentFactory::m_materials
protectedinherited

Definition at line 43 of file SCT_ComponentFactory.h.

◆ m_name

std::string SCT_ComponentFactory::m_name
privateinherited

Definition at line 49 of file SCT_ComponentFactory.h.

◆ m_outerRadius

double SCT_SkiAux::m_outerRadius = 0.0
private

Definition at line 63 of file SCT_SkiAux.h.

◆ m_physVolume

GeoVPhysVol* SCT_SharedComponentFactory::m_physVolume
protectedinherited

Definition at line 70 of file SCT_ComponentFactory.h.

◆ m_powerTapePhiOffset

double SCT_SkiAux::m_powerTapePhiOffset
private

Definition at line 66 of file SCT_SkiAux.h.

◆ m_sectorAngle

double SCT_SkiAux::m_sectorAngle
private

Definition at line 68 of file SCT_SkiAux.h.

◆ m_sectorStartAngle

double SCT_SkiAux::m_sectorStartAngle = 0.0
private

Definition at line 67 of file SCT_SkiAux.h.

◆ m_ski

SCT_Ski* SCT_SkiAux::m_ski
private

Definition at line 71 of file SCT_SkiAux.h.

◆ m_skiPowerTape

SCT_SkiPowerTape* SCT_SkiAux::m_skiPowerTape
private

Definition at line 74 of file SCT_SkiAux.h.

◆ s_epsilon

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

Definition at line 50 of file SCT_ComponentFactory.h.


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