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

#include <SCT_Forward.h>

Inheritance diagram for SCT_Forward:
Collaboration diagram for SCT_Forward:

Public Member Functions

 SCT_Forward (const std::string &name, int ec, 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)
 ~SCT_Forward ()
int numModuleTypes () const
int numWheels () const
double innerRadius () const
double outerRadius () const
double zMax () const
double zMin () const
double trtGapPos () const
double length () const
double zCenter () const
virtual GeoVPhysVol * build (SCT_Identifier id)
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 ()

Private Attributes

int m_endcap
int m_numModuleTypes = 0
int m_numWheels = 0
double m_innerRadius = 0.0
double m_outerRadius = 0.0
double m_zMin = 0.0
double m_zMax = 0.0
double m_trtGapPos = 0.0
double m_coolingPipeRadius = 0.0
int m_numThermalShieldElements = 0
bool m_cylinderServicesPresent = false
double m_length = 0.0
double m_outerRadiusCylinderServices = 0.0
std::vector< std::unique_ptr< SCT_FwdWheel > > m_wheels
std::vector< std::unique_ptr< SCT_FwdModule > > m_modules
std::string m_name

Static Private Attributes

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

Detailed Description

Definition at line 17 of file SCT_Forward.h.

Constructor & Destructor Documentation

◆ SCT_Forward()

SCT_Forward::SCT_Forward ( const std::string & name,
int ec,
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 40 of file SCT_Forward.cxx.

49 detectorManager,
50 geometryManager,
51 materials,
52 sqliteReader,
53 std::move(mapFPV),
54 std::move(mapAX)),
55 m_endcap(ec)
56{
59}
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)

◆ ~SCT_Forward()

SCT_Forward::~SCT_Forward ( )
default

Member Function Documentation

◆ build()

GeoVPhysVol * SCT_Forward::build ( SCT_Identifier id)
virtual

Implements SCT_UniqueComponentFactory.

Definition at line 135 of file SCT_Forward.cxx.

136{
137 GeoFullPhysVol * forward=nullptr;
138 if(!m_sqliteReader)
139 {
140 forward = new GeoFullPhysVol(m_logVolume);
141
142 for (int iWheel = 0; iWheel < m_numWheels; iWheel++){
143
144 SCT_FwdWheel * wheel = m_wheels[iWheel].get();
145 double zpos = wheel->zPosition() - zCenter();
146 forward->add(new GeoNameTag(std::format("Wheel#{}",iWheel)));
147 forward->add(new GeoIdentifierTag(iWheel));
148 GeoAlignableTransform * transform = new GeoAlignableTransform(GeoTrf::TranslateZ3D(zpos));
149 forward->add(transform);
150 id.setLayerDisk(iWheel);
151 GeoVPhysVol * wheelPV = wheel->build(id);
152 forward->add(wheelPV);
153
154 // Store the alignable transform
155 m_detectorManager->addAlignableTransform(2, id.getWaferId(), transform, wheelPV);
156 }
157
158 //
159 // Place SupportFrame
160 //
161 SCT_FwdSupportFrame supportFrame("SupportFrame", m_detectorManager, m_geometryManager, m_materials);
162 double supportFrameZPos = supportFrame.zPosition() - zCenter();
163 forward->add(new GeoTransform(GeoTrf::TranslateZ3D(supportFrameZPos)));
164 forward->add(supportFrame.getVolume());
165
166 // Make and Place Cylinder Services
167
169
170 // New phi-dependent services
171 SCT_FwdCylinderServices cylinderServices("CylinderServices",
172 supportFrame.outerRadius(),
174 supportFrame.length(),
176 forward->add(new GeoTransform(GeoTrf::TranslateZ3D(supportFrameZPos)));
177 forward->add(cylinderServices.getVolume());
178
179 } else {
180
181 // Old cylindrical services
182 //
183 // Make cooling pipes. These extend from the wheel to the TRT Gap.
184 //
185 {
186 // End position of the pipes.
187 double endPos = m_trtGapPos;
188
189 // Calculate radius to start placing cooling pipes. This is equal to the
190 // outer radius of the support frame + the pipe radius (The pipe radius is to just
191 // give a small gap - it is not really necessary)
192 double innerRadiusCooling = supportFrame.outerRadius() + m_coolingPipeRadius;
193
194 // Inner radius of cylinder representing pipes. Gets incremented for each wheel.
195 double rStart = innerRadiusCooling;
196
197 for (int iWheel = 0; iWheel < m_numWheels; iWheel++){
198 // Start position of the pipes.
199 double startPos = m_wheels[iWheel]->zPosition();
200
201 // Assume one cooling circuit per quadrant of each ring. ie 8 pipes per ring.
202 int numPipes = 8 * m_wheels[iWheel]->numRings();
203
204 // Label Cooling pipe with W# at end of string
205 SCT_FwdCoolingPipe coolingPipe(std::format("OffDiskCoolingPipeW{}",iWheel),
206 numPipes, rStart, startPos, endPos,
208
209 // Place the cooling pipes
210 double coolingPipeZPos = coolingPipe.zPosition() - zCenter();
211 forward->add(new GeoTransform(GeoTrf::TranslateZ3D(coolingPipeZPos)));
212 forward->add(coolingPipe.getVolume());
213
214 // Set rStart for next cooling pipe equal to outer radius of this cooling pipe.
215 rStart = coolingPipe.outerRadius();
216
217 }
218 }
219
220 //
221 // Make Power Tapes. These extend from the wheel to the TRT Gap.
222 //
223 {
224
225 // End position of the power tapes.
226 double endPos = m_trtGapPos;
227
228 // Calculate radius to start placing power tapes. This is half way bewteen outer radius
229 // of support fram and outer radius of forward envelope.
230 // The -1 mm is to avoid a clash with the thermal shield.
231 double innerRadiusPowerTapes = 0.5*(supportFrame.outerRadius() + m_outerRadius) - 1*Gaudi::Units::mm;
232
233 // Inner radius of cylinder representing power tapes. Gets incremented for each wheel.
234 double rStart = innerRadiusPowerTapes;
235
236 for (int iWheel = 0; iWheel < m_numWheels; iWheel++){
237
238 // Start position of the power tapes.
239 double startPos = m_wheels[iWheel]->zPosition();
240
241 // Get total number of modules in wheel
242 int numModules = m_wheels[iWheel]->totalModules();
243
244 // Label power tape with W# at end of string
245 SCT_FwdPowerTape powerTape(std::format("OffDiskPowerTapeW{}",iWheel),
246 numModules, rStart, startPos, endPos,
248
249 // Place Power Tapes
250 double powerTapeZPos = powerTape.zPosition() - zCenter();
251 forward->add(new GeoTransform(GeoTrf::TranslateZ3D(powerTapeZPos)));
252 forward->add(powerTape.getVolume());
253
254 // Set rStart for next power tape equal to outer radius of this power tape.
255 rStart = powerTape.outerRadius();
256 } // end loop over wheels
257 }
258 }
259
260 //
261 // Place Thermal Shield Elements
262 //
263 for (int iElement = 0; iElement < m_numThermalShieldElements; iElement++){
264 SCT_FwdThermalShieldElement thermalShieldElement(std::format("FwdThermalShieldElement{}",iElement),
266 double elementZPos = thermalShieldElement.zPosition() - zCenter();
267 forward->add(new GeoTransform(GeoTrf::TranslateZ3D(elementZPos)));
268 forward->add(thermalShieldElement.getVolume());
269 }
270
271 // Extra Material
272 InDetDD::ExtraMaterial xMat(m_geometryManager->distortedMatManager());
273 xMat.add(forward, "SCTEndcap", zCenter());
274 if (m_endcap > 0) {
275 xMat.add(forward, "SCTEndcapA", zCenter());
276 } else {
277 xMat.add(forward, "SCTEndcapC", zCenter());
278 }
279
280 }
281 else {
282 for (int iWheel = 0; iWheel < m_numWheels; iWheel++){
283 SCT_FwdWheel * wheel = m_wheels[iWheel].get();
284 id.setLayerDisk(iWheel);
285 wheel->build(id);
286
287 // Store the alignable transform
288 std::string key = std::format("Wheel#{}_{}",iWheel,id.getBarrelEC());
289 m_detectorManager->addAlignableTransform(2, id.getWaferId(), (*m_mapAX)[key], (*m_mapFPV)[key]);
290 }
291 if (m_endcap > 0) {
292 forward= (*m_mapFPV)["SCTEndcapA"];
293 } else {
294 forward= (*m_mapFPV)["SCTEndcapC"];
295 }
296
297 }
298 return forward;
299}
InDetDD::SCT_DetectorManager * m_detectorManager
SCT_GeometryManager * m_geometryManager
SCT_MaterialManager * m_materials
std::vector< std::unique_ptr< SCT_FwdWheel > > m_wheels
Definition SCT_Forward.h:77
double m_trtGapPos
Definition SCT_Forward.h:67
double m_outerRadius
Definition SCT_Forward.h:64
bool m_cylinderServicesPresent
Definition SCT_Forward.h:70
double zCenter() const
Definition SCT_Forward.h:49
int m_numThermalShieldElements
Definition SCT_Forward.h:69
double m_outerRadiusCylinderServices
Definition SCT_Forward.h:74
double m_coolingPipeRadius
Definition SCT_Forward.h:68
virtual GeoVPhysVol * build(SCT_Identifier id)
double zPosition() const
std::shared_ptr< std::map< std::string, GeoFullPhysVol * > > m_mapFPV
std::shared_ptr< std::map< std::string, GeoAlignableTransform * > > m_mapAX
GeoModelIO::ReadGeoModel * m_sqliteReader
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.

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

Definition at line 64 of file SCT_Forward.cxx.

65{
66 const SCT_ForwardParameters * parameters = m_geometryManager->forwardParameters();
67 const SCT_ForwardModuleParameters * moduleParameters = m_geometryManager->forwardModuleParameters();
68
69 //m_numRingTypes = parameters->fwdNumRingTypes();
70 m_numModuleTypes = moduleParameters->fwdModuleNumTypes();
71 m_numWheels = parameters->fwdNumWheels();
72 m_innerRadius = parameters->fwdInnerRadius();
73 m_outerRadius = parameters->fwdOuterRadius();
74 m_zMin = parameters->fwdZMin();
75 m_zMax = parameters->fwdZMax();
76 m_trtGapPos = parameters->fwdTrtGapPos();
77 m_coolingPipeRadius = parameters->fwdCoolingPipeRadius();
78 m_numThermalShieldElements = parameters->fwdNumThermalShieldElements();
79 m_cylinderServicesPresent = parameters->fwdCylinderServicePresent();
80
81 // Outer radius of cylinder services is given by inner radius of OTE
83 for (int iElement = 0; iElement < m_numThermalShieldElements; iElement++){
84 if(parameters->fwdThermalShieldMaterial(iElement) == "sct::FwdOTE") {
85 m_outerRadiusCylinderServices = parameters->fwdThermalShieldInnerRadius(iElement);
86 }
87 }
88 }
89
90 // Length of forward envelope
92
93
94 // Set numerology
95 m_detectorManager->numerology().setNumDisks(m_numWheels);
96
97
98}
double m_zMax
Definition SCT_Forward.h:66
double m_length
Definition SCT_Forward.h:73
int m_numModuleTypes
Definition SCT_Forward.h:61
double m_zMin
Definition SCT_Forward.h:65
double m_innerRadius
Definition SCT_Forward.h:63

◆ innerRadius()

double SCT_Forward::innerRadius ( ) const
inline

Definition at line 39 of file SCT_Forward.h.

39{return m_innerRadius;}

◆ length()

double SCT_Forward::length ( ) const
inline

Definition at line 48 of file SCT_Forward.h.

48{return m_length;}

◆ numModuleTypes()

int SCT_Forward::numModuleTypes ( ) const
inline

Definition at line 37 of file SCT_Forward.h.

37{return m_numModuleTypes;}

◆ numWheels()

int SCT_Forward::numWheels ( ) const
inline

Definition at line 38 of file SCT_Forward.h.

38{return m_numWheels;}

◆ outerRadius()

double SCT_Forward::outerRadius ( ) const
inline

Definition at line 40 of file SCT_Forward.h.

40{return m_outerRadius;}

◆ preBuild()

const GeoLogVol * SCT_Forward::preBuild ( )
privatevirtual

Implements SCT_UniqueComponentFactory.

Definition at line 103 of file SCT_Forward.cxx.

104{
105 // Create the elements we need for the forward
106 // We make all the module types here. There is a outer, middle, truncated middle and inner type module.
107 std::vector<SCT_FwdModule*> modules;
108 for (int iModuleType = 0; iModuleType < m_numModuleTypes; iModuleType++){
109
110 std::unique_ptr<SCT_FwdModule> module = std::make_unique<SCT_FwdModule>(std::format("FwdModule{}",iModuleType), iModuleType,
112 modules.push_back(module.get());
113 m_modules.push_back(std::move(module));
114 }
115
116 for (int iWheel = 0; iWheel < m_numWheels; iWheel++){
117 // Build Wheels
118 std::string name = std::format("Wheel{}{}",iWheel,((m_endcap > 0) ? "A" : "C"));
119 m_wheels.push_back(std::make_unique<SCT_FwdWheel>(name, iWheel, modules, m_endcap,
121 }
122
123 if(m_sqliteReader) return nullptr;
124
125 // Make one end of the Forward tracker
126 // Tube envelope containing the forward
127 const GeoTube * forwardEnvelopeShape = new GeoTube(m_innerRadius, m_outerRadius, 0.5 * m_length);
128 const GeoLogVol * forwardLog =
129 new GeoLogVol(getName(), forwardEnvelopeShape, m_materials->gasMaterial());
130
131 return forwardLog;
132}
const std::string & getName() const
std::vector< std::unique_ptr< SCT_FwdModule > > m_modules
Definition SCT_Forward.h:79

◆ trtGapPos()

double SCT_Forward::trtGapPos ( ) const
inline

Definition at line 43 of file SCT_Forward.h.

43{return m_trtGapPos;}

◆ zCenter()

double SCT_Forward::zCenter ( ) const
inline

Definition at line 49 of file SCT_Forward.h.

49{return 0.5*(m_zMin+m_zMax);}

◆ zMax()

double SCT_Forward::zMax ( ) const
inline

Definition at line 41 of file SCT_Forward.h.

41{return m_zMax;}

◆ zMin()

double SCT_Forward::zMin ( ) const
inline

Definition at line 42 of file SCT_Forward.h.

42{return m_zMin;}

Member Data Documentation

◆ m_coolingPipeRadius

double SCT_Forward::m_coolingPipeRadius = 0.0
private

Definition at line 68 of file SCT_Forward.h.

◆ m_cylinderServicesPresent

bool SCT_Forward::m_cylinderServicesPresent = false
private

Definition at line 70 of file SCT_Forward.h.

◆ m_detectorManager

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

Definition at line 38 of file SCT_ComponentFactory.h.

38{};

◆ m_endcap

int SCT_Forward::m_endcap
private

Definition at line 60 of file SCT_Forward.h.

◆ m_geometryManager

SCT_GeometryManager* SCT_ComponentFactory::m_geometryManager {}
protectedinherited

Definition at line 39 of file SCT_ComponentFactory.h.

39{};

◆ m_innerRadius

double SCT_Forward::m_innerRadius = 0.0
private

Definition at line 63 of file SCT_Forward.h.

◆ m_length

double SCT_Forward::m_length = 0.0
private

Definition at line 73 of file SCT_Forward.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_modules

std::vector<std::unique_ptr<SCT_FwdModule> > SCT_Forward::m_modules
private

Definition at line 79 of file SCT_Forward.h.

◆ m_name

std::string SCT_ComponentFactory::m_name
privateinherited

Definition at line 46 of file SCT_ComponentFactory.h.

◆ m_numModuleTypes

int SCT_Forward::m_numModuleTypes = 0
private

Definition at line 61 of file SCT_Forward.h.

◆ m_numThermalShieldElements

int SCT_Forward::m_numThermalShieldElements = 0
private

Definition at line 69 of file SCT_Forward.h.

◆ m_numWheels

int SCT_Forward::m_numWheels = 0
private

Definition at line 62 of file SCT_Forward.h.

◆ m_outerRadius

double SCT_Forward::m_outerRadius = 0.0
private

Definition at line 64 of file SCT_Forward.h.

◆ m_outerRadiusCylinderServices

double SCT_Forward::m_outerRadiusCylinderServices = 0.0
private

Definition at line 74 of file SCT_Forward.h.

◆ m_sqliteReader

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

Definition at line 87 of file SCT_ComponentFactory.h.

87{};

◆ m_trtGapPos

double SCT_Forward::m_trtGapPos = 0.0
private

Definition at line 67 of file SCT_Forward.h.

◆ m_wheels

std::vector<std::unique_ptr<SCT_FwdWheel> > SCT_Forward::m_wheels
private

Definition at line 77 of file SCT_Forward.h.

◆ m_zMax

double SCT_Forward::m_zMax = 0.0
private

Definition at line 66 of file SCT_Forward.h.

◆ m_zMin

double SCT_Forward::m_zMin = 0.0
private

Definition at line 65 of file SCT_Forward.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: