ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
SCT_FwdWheel Class Reference

#include <SCT_FwdWheel.h>

Inheritance diagram for SCT_FwdWheel:
Collaboration diagram for SCT_FwdWheel:

Public Member Functions

 SCT_FwdWheel (const std::string &name, int iWheel, const std::vector< SCT_FwdModule * > &modules, 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_FwdWheel ()
 
 SCT_FwdWheel (const SCT_FwdWheel &)=delete
 
SCT_FwdWheeloperator= (const SCT_FwdWheel &)=delete
 
int wheelNum () const
 
double zPosition () const
 
int numRings () const
 
int ringType (int i) const
 
const SCT_FwdRingring (int i)
 
double thickness () const
 
double innerRadius () const
 
double outerRadius () const
 
int totalModules () const
 
virtual GeoVPhysVol * build (SCT_Identifier id)
 
const std::string & getName () const
 
std::string intToString (int i) 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_iWheel
 
int m_endcap
 
int m_numRings = 0
 
double m_zPosition = 0.0
 
std::vector< int > m_ringType
 
std::vector< int > m_patchPanelType
 
std::vector< double > m_patchPanelLocAngle
 
std::vector< bool > m_patchPanelRepeatQuadrant
 
int m_numPatchPanelLocs = 0
 
int m_numPatchPanelTypes = 0
 
int m_numFSITypes = 0
 
int m_numWheels = 0
 
bool m_optoHarnessPresent = false
 
bool m_pPConnectorPresent = false
 
bool m_pPCoolingPresent = false
 
bool m_discFixationPresent = false
 
std::vector< double > m_discFixationLocAngle
 
double m_innerRadius = 0.0
 
double m_outerRadius = 0.0
 
double m_thickness = 0.0
 
double m_thicknessFront = 0.0
 
double m_thicknessBack = 0.0
 
int m_totalModules = 0
 
int m_rotateWheel = 0
 
double m_ringMaxRadius = 0.0
 
double m_safety = 0.0
 
std::vector< std::unique_ptr< SCT_FwdRing > > m_rings
 
std::unique_ptr< SCT_FwdDiscSupportm_discSupport
 
std::vector< std::unique_ptr< SCT_FwdPatchPanel > > m_patchPanel
 
std::unique_ptr< SCT_FwdPPConnectorm_pPConnector
 
std::unique_ptr< SCT_FwdPPCoolingm_pPCooling
 
std::vector< std::unique_ptr< SCT_FwdFSI > > m_fsiType
 
std::unique_ptr< SCT_FwdDiscFixationm_discFixation
 
const std::vector< SCT_FwdModule * > & m_modules
 
const std::vector< const FSIDetails * > * m_fsiVector = nullptr
 
std::string m_name
 

Static Private Attributes

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

Detailed Description

Definition at line 25 of file SCT_FwdWheel.h.

Constructor & Destructor Documentation

◆ SCT_FwdWheel() [1/2]

SCT_FwdWheel::SCT_FwdWheel ( const std::string &  name,
int  iWheel,
const std::vector< SCT_FwdModule * > &  modules,
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 51 of file SCT_FwdWheel.cxx.

61  : SCT_UniqueComponentFactory(name, detectorManager, geometryManager, materials, sqliteReader, mapFPV, mapAX),
62  m_iWheel(iWheel),
63  m_endcap(ec),
64  m_modules(modules)
65 {
66  getParameters();
68 
69 }

◆ ~SCT_FwdWheel()

SCT_FwdWheel::~SCT_FwdWheel ( )

Definition at line 71 of file SCT_FwdWheel.cxx.

72 {
73 }

◆ SCT_FwdWheel() [2/2]

SCT_FwdWheel::SCT_FwdWheel ( const SCT_FwdWheel )
delete

Member Function Documentation

◆ build()

GeoVPhysVol * SCT_FwdWheel::build ( SCT_Identifier  id)
virtual

Implements SCT_UniqueComponentFactory.

Definition at line 259 of file SCT_FwdWheel.cxx.

260 {
261 
262  if(m_sqliteReader) {
263 
264  for (int iRing = 0; iRing < m_numRings; iRing++){
265 
266  SCT_FwdRing * ring = m_rings[iRing].get();
267  id.setEtaModule(ring->identifier());
268  ring->build(id);
269 
270  }
271  return nullptr;
272 
273  }
274 
275  GeoFullPhysVol * wheel= new GeoFullPhysVol(m_logVolume);
276 
277 
278  // Add discsupport. Its centered so no need for a transform
279  wheel->add(m_discSupport->getVolume());
280 
281  //
282  // Loop over rings and put in rings, cooling and power tapes.
283  //
284  double powerTapeZPlusMax = 0.5 * m_discSupport->thickness();
285  double powerTapeZMinusMax = -0.5 * m_discSupport->thickness();
286 
287  double maxZOfRingsFront = 0;
288 
289  for (int iRing = 0; iRing < m_numRings; iRing++){
290 
291  SCT_FwdRing * ring = m_rings[iRing].get();
292 
293  // Position ring
294  double ringZpos = ring->ringSide() * ring->ringOffset();
295  double ringOuterZ = ring->ringOffset() + ring->thicknessOuter();
296  maxZOfRingsFront = std::max(maxZOfRingsFront, ringOuterZ);
297 
298  std::string ringNameTag = "Ring#" + intToString(ring->identifier());
299  wheel->add(new GeoNameTag(ringNameTag));
300  wheel->add(new GeoIdentifierTag(ring->identifier()));
301  wheel->add(new GeoTransform(GeoTrf::Translate3D(0, 0, ringZpos)));
302  id.setEtaModule(ring->identifier());
303  wheel->add(ring->build(id));
304 
305  // Position cooling
306  // Get a pointer to the cooling ring.
307  SCT_FwdRingCooling cooling("RingCoolingW"+intToString(m_iWheel)+"R"+intToString(iRing),
309  double coolingZpos = ring->ringSide() * (0.5*(m_discSupport->thickness() + cooling.thickness()));
310  wheel->add(new GeoTransform(GeoTrf::TranslateZ3D(coolingZpos)));
311  wheel->add(cooling.getVolume());
312 
313  // Power Tapes
314  // Get a pointer to the power tape
315  SCT_FwdDiscPowerTape powerTape("PowerTapeW"+intToString(m_iWheel)+
316  "R"+intToString(iRing), iRing,
318 
319  double powerTapeZpos = ring->ringSide() * (0.5*(m_discSupport->thickness() + powerTape.thickness()) +
320  cooling.thickness());
321  // Make sure we don't overlap with powertape from outer rings
322  // We store max extent of power tape for each side (Plus, Minus)
323  // This is really only ever an issue for ring2 but we keep it general.
324  if (ring->ringSide() > 0) {
325  double powerTapeZstart = powerTapeZpos - 0.5 * powerTape.thickness();
326  if (powerTapeZstart < powerTapeZPlusMax) {
327  powerTapeZpos = powerTapeZPlusMax + 0.5 * powerTape.thickness();
328  }
329  powerTapeZPlusMax = powerTapeZpos + 0.5 * powerTape.thickness();
330  } else {
331  double powerTapeZstart = powerTapeZpos + 0.5 * powerTape.thickness();
332  if (powerTapeZstart > powerTapeZMinusMax) {
333  powerTapeZpos = powerTapeZMinusMax - 0.5 * powerTape.thickness();
334  }
335  powerTapeZMinusMax = powerTapeZpos - 0.5 * powerTape.thickness();
336  }
337  if ((std::abs(powerTapeZpos)+0.5*powerTape.thickness()) > (std::abs(ringZpos) - 0.5*ring->thicknessInner())) {
338  std::cout << "ERROR: Power tapes clash with modules!!!" << std::endl;
339  }
340  wheel->add(new GeoTransform(GeoTrf::TranslateZ3D(powerTapeZpos)));
341  wheel->add(powerTape.getVolume());
342 
343 
344  } // End Ring loop
345 
346 
347  //
348  // Put in the patch Panel
349  //
350  // Put it on opposide side of outer ring (ring 0).
351  int patchPanelSide = m_rotateWheel;
352 
353 
354  // Get outer position of power tape on that side.
355  // In case there are no rings on that side (and hence no powertapes) this will be 1/2 disc support thickness
356  double powerTapeZMax = 0;
357  if (patchPanelSide > 0) {
358  powerTapeZMax = powerTapeZPlusMax;
359  } else {
360  powerTapeZMax = -powerTapeZMinusMax;
361  }
362 
363 
364 
365  // Loop over patch panel locations
366  for (int iPPLoc = 0; iPPLoc < m_numPatchPanelLocs ; iPPLoc++) {
367 
368  // The patchpanels generally repeat in the four quadrants.
369  int numRepeat = 1;
370  if (m_patchPanelRepeatQuadrant[iPPLoc]) numRepeat = 4;
371  int ppType = m_patchPanelType[iPPLoc];
372  if (ppType >= m_numPatchPanelTypes) std::cout << "ERROR: Patch Panel type number out of range!" << std::endl;
373  for (int iRepeat = 0; iRepeat < numRepeat; iRepeat++) {
374 
375  // Calculate the location.
376  double patchPanelAngle = m_patchPanelLocAngle[iPPLoc] + iRepeat * 90*Gaudi::Units::degree;
377  double patchPanelZpos = patchPanelSide * (powerTapeZMax + 0.5*m_patchPanel[ppType]->thickness() + m_safety);
378  double patchPanelR = m_patchPanel[ppType]->midRadius();
379 
380  // Check for overlap with middle ring.
381  if (m_numRings >= 2 && (m_patchPanel[ppType]->innerRadius() <= m_rings[1]->outerRadius())) {
382  std::cout << "ERROR: Patch Panel clashes with middle ring" << std::endl;
383  std::cout << " PatchPanel inner radius: " << m_patchPanel[ppType]->innerRadius() << std::endl;
384  std::cout << " Ring outer radius: " << m_rings[1]->outerRadius() << std::endl;
385  }
386 
387  // Add it to the wheel
388  wheel->add(new GeoTransform(GeoTrf::RotateZ3D(patchPanelAngle)*GeoTrf::TranslateX3D(patchPanelR)*GeoTrf::TranslateZ3D(patchPanelZpos)));
389  wheel->add(m_patchPanel[ppType]->getVolume());
390 
391  // Make and add the connector for PPF0e (type 0)
392  // Positioned immediately outside PatchPanel at same angle
393  if(ppType == 0 && m_pPConnectorPresent) {
394  double ppConnectorZpos = patchPanelSide * (powerTapeZMax + 0.5*m_pPConnector->thickness() + m_safety);
395  double ppConnectorR = m_patchPanel[ppType]->outerRadius() + 0.5*m_pPConnector->deltaR() + m_safety;
396  // Check is within wheel
397  if (ppConnectorR + 0.5*m_pPConnector->deltaR() >= m_outerRadius) {
398  std::cout << "ERROR: Patch Panel Connector clashes outside wheel" << std::endl;
399  std::cout << " PatchPanel Connector outer radius: " << ppConnectorR + 0.5*m_pPConnector->deltaR() << std::endl;
400  std::cout << " Wheel outer radius: " << m_outerRadius << std::endl;
401  }
402  // Add it to the wheel
403  wheel->add(new GeoTransform(GeoTrf::RotateZ3D(patchPanelAngle)*GeoTrf::TranslateX3D(ppConnectorR)*GeoTrf::TranslateZ3D(ppConnectorZpos)));
404  wheel->add(m_pPConnector->getVolume());
405  }
406 
407  // Make and add the cooling for PPF0c (type 2)
408  // Positioned immediately outside PatchPanel at same angle
409  if(ppType == 2 && m_pPCoolingPresent) {
410  double ppCoolingZpos = patchPanelSide * (powerTapeZMax + 0.5*m_pPCooling->thickness() + m_safety);
411  double ppCoolingR = m_patchPanel[ppType]->outerRadius() + 0.5*m_pPCooling->deltaR() + m_safety;
412  // Check is within wheel
413  if (ppCoolingR + 0.5*m_pPCooling->deltaR() >= m_outerRadius) {
414  std::cout << "ERROR: Patch Panel Cooling clashes outside wheel" << std::endl;
415  std::cout << " PatchPanel Cooling outer radius: " << ppCoolingR + 0.5*m_pPCooling->deltaR() << std::endl;
416  std::cout << " Wheel outer radius: " << m_outerRadius << std::endl;
417  }
418  // Add it to the wheel
419  wheel->add(new GeoTransform(GeoTrf::RotateZ3D(patchPanelAngle)*GeoTrf::TranslateX3D(ppCoolingR)*GeoTrf::TranslateZ3D(ppCoolingZpos)));
420  wheel->add(m_pPCooling->getVolume());
421  }
422  }
423 
424  } // end loop over patch panel locations
425 
426 
427  // Add the optoharness - type depends on number of rings
428  // The optoharness is always on the back side (except if the wheel is rotates)
429  double optoHarnessZMax = 0.5 * m_discSupport->thickness();
430  if (m_optoHarnessPresent) {
431  std::string optoharnessName = "OptoHarnessO";
432  if(m_numRings > 1) {optoharnessName+="M";}
433  if(m_numRings > 2) {optoharnessName+="I";}
434  SCT_FwdOptoHarness optoharness(optoharnessName+"W"+intToString(m_iWheel), m_numRings,
436  double optoHarnessZpos = 0.5*m_rotateWheel*(m_discSupport->thickness() + optoharness.thickness());
437  wheel->add(new GeoTransform(GeoTrf::TranslateZ3D(optoHarnessZpos)));
438  wheel->add(optoharness.getVolume());
439  optoHarnessZMax = optoHarnessZpos + 0.5*optoharness.thickness();
440  }
441 
442  // Loop over FSI locations.
443  for (unsigned int iFSI = 0; iFSI < m_fsiVector->size(); iFSI++) {
444  int type = (*m_fsiVector)[iFSI]->simType();
445  double fsiRadius = (*m_fsiVector)[iFSI]->location().radius();
446  double fsiPhi = (*m_fsiVector)[iFSI]->location().phi();
447  int fsiUsualSide = (*m_fsiVector)[iFSI]->location().side();
448  int fsiSide = fsiUsualSide * m_rotateWheel;
449  double fsiZpos = fsiSide * m_fsiType[type]->zOffset();
450 
451  // Check for clashes on front side
452  if (fsiUsualSide < 0) {
453  double zMin = std::abs(fsiZpos) - 0.5*m_fsiType[type]->thickness();
454  if (maxZOfRingsFront > zMin) {
455  std::cout << "WARNING: FSI probably clashes with ring" << std::endl;
456  std::cout << " maxZOfRingsFront = " << maxZOfRingsFront << std::endl;
457  std::cout << " fsiZMin = " << zMin << std::endl;
458  }
459  } else { // ... and backside
460  // Check radius of fsi.
461  // If outer radii check for overlap with powertape
462  // If inner radii check for overlap with optoharness (disksupport if no optoharness)
463  double diskMidRadius = 0.5*(m_outerRadius + m_innerRadius);
464  double servicesZMax = (fsiRadius > diskMidRadius) ? powerTapeZMax : optoHarnessZMax;
465  double zMin = std::abs(fsiZpos) - 0.5*m_fsiType[type]->thickness();
466  if (servicesZMax > zMin) {
467  std::cout << "WARNING: FSI probably clashes with disc services" << std::endl;
468  std::cout << " servicesZMax = " << servicesZMax << std::endl;
469  std::cout << " fsiZMin = " << zMin << std::endl;
470  std::cout << " fsiRadius = " << fsiRadius << std::endl;
471  }
472  }
473 
474  wheel->add(new GeoTransform(GeoTrf::RotateZ3D(fsiPhi)*GeoTrf::TranslateX3D(fsiRadius)*GeoTrf::TranslateZ3D(fsiZpos)));
475  wheel->add(m_fsiType[type]->getVolume());
476 
477 
478  } // end loop over FSI.
479 
480  // Loop over disc fixation locations
482  for (unsigned int iLoc = 0; iLoc < m_discFixationLocAngle.size() ; iLoc++) {
483  // The disc fixations repeat in the four quadrants.
484  for (int iRepeat = 0; iRepeat < 4; iRepeat++) {
485  // Calculate the location.
486  double discFixationAngle = m_discFixationLocAngle[iLoc] + iRepeat * 90*Gaudi::Units::degree;
487  double discFixationR = m_ringMaxRadius + 0.5*m_discFixation->thickness() + m_safety;
488  // Check is within wheel
489  if (discFixationR + 0.5*m_discFixation->thickness() >= m_outerRadius) {
490  std::cout << "ERROR: Disc Fixation outside wheel" << std::endl;
491  std::cout << "Disc fixation outer radius: " << discFixationR + 0.5*m_discFixation->thickness() << std::endl;
492  std::cout << " Wheel outer radius: " << m_outerRadius << std::endl;
493  }
494  // Add it to the wheel
495  wheel->add(new GeoTransform(GeoTrf::RotateY3D(90.*Gaudi::Units::degree)*GeoTrf::RotateX3D(discFixationAngle)*GeoTrf::TranslateZ3D(discFixationR)));
496  wheel->add(m_discFixation->getVolume());
497  }
498  }
499  }
500 
501  // Extra Material
503  xMat.add(wheel, "SCTDisc");
504  xMat.add(wheel, "SCTDisc"+intToString(m_iWheel));
505  if (m_endcap > 0) {
506  xMat.add(wheel, "SCTDiscA");
507  xMat.add(wheel, "SCTDiscA"+intToString(m_iWheel));
508  } else {
509  xMat.add(wheel, "SCTDiscC");
510  xMat.add(wheel, "SCTDiscC"+intToString(m_iWheel));
511  }
512 
513 
514 
515  return wheel;
516 
517 }

◆ epsilon()

double SCT_ComponentFactory::epsilon ( ) const
protectedinherited

Definition at line 37 of file SCT_ComponentFactory.cxx.

38 {
39  return s_epsilon;
40 }

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

Definition at line 76 of file SCT_FwdWheel.cxx.

77 {
79 
80  m_zPosition = parameters->fwdWheelZPosition(m_iWheel);
81  m_numRings = parameters->fwdWheelNumRings(m_iWheel);
82  for (int iRing = 0; iRing < m_numRings; iRing++) {
83  m_ringType.push_back(parameters->fwdWheelModuleType(m_iWheel,iRing, m_endcap));
84  }
85 
86  if(!m_sqliteReader){
87 
88  m_numPatchPanelLocs = parameters->fwdNumPatchPanelLocs();
89  m_numPatchPanelTypes = parameters->fwdNumPatchPanelTypes();
90 
91  for (int iPPLoc = 0; iPPLoc < m_numPatchPanelLocs; iPPLoc++) {
92  m_patchPanelType.push_back(parameters->fwdPatchPanelType(iPPLoc));
93  m_patchPanelLocAngle.push_back(parameters->fwdPatchPanelLocAngle(iPPLoc));
94  m_patchPanelRepeatQuadrant.push_back(parameters->fwdPatchPanelRepeatQuadrant(iPPLoc));
95  }
96 
97  // FIXME: Check and put these in DB or calculate them
98  // We have a maximum width of 80.2. Make it 75 for some clearance.
99  //m_innerRadius = 267 * Gaudi::Units::mm;
100  //m_outerRadius = 590 * Gaudi::Units::mm;
101  //m_thickness = 100 * Gaudi::Units::mm;
102  // These get swapped later if the wheel is rotated.
105 
106  m_numFSITypes = parameters->fwdFSINumGeomTypes();
107  m_fsiVector = &(parameters->fsiVector(m_iWheel));
108 
109  m_numWheels = parameters->fwdNumWheels();
110 
111  m_optoHarnessPresent = parameters->fwdOptoHarnessPresent();
112  m_pPConnectorPresent = parameters->fwdPPConnectorPresent();
113  m_pPCoolingPresent = parameters->fwdPPCoolingPresent();
114 
115  m_discFixationPresent = parameters->fwdDiscFixationPresent();
117  for (int iLoc = 0; iLoc < parameters->fwdNumCylinderServiceLocs(); iLoc++) {
118  // Disc fixations are at same locations at as N2 pipes
119  if(parameters->fwdCylinderServiceLocName(iLoc) == "NPipe") {
120  m_discFixationLocAngle.push_back(parameters->fwdCylinderServiceLocAngle(iLoc));
121  }
122  }
123  }
124 
126  }
127 
128  // Set numerology
130 
131 }

◆ innerRadius()

double SCT_FwdWheel::innerRadius ( ) const
inline

Definition at line 57 of file SCT_FwdWheel.h.

57 {return m_innerRadius;}

◆ intToString()

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

Definition at line 29 of file SCT_ComponentFactory.cxx.

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

◆ numRings()

int SCT_FwdWheel::numRings ( ) const
inline

Definition at line 49 of file SCT_FwdWheel.h.

49 {return m_numRings;}

◆ operator=()

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

◆ outerRadius()

double SCT_FwdWheel::outerRadius ( ) const
inline

Definition at line 58 of file SCT_FwdWheel.h.

58 {return m_outerRadius;}

◆ preBuild()

const GeoLogVol * SCT_FwdWheel::preBuild ( )
privatevirtual

Implements SCT_UniqueComponentFactory.

Definition at line 134 of file SCT_FwdWheel.cxx.

135 {
136  // The rings
137  for (int iRing = 0; iRing < m_numRings; iRing++){
138  std::string ringName = "Ring"+intToString(iRing)+"For"+getName();
139  int ringType = m_ringType[iRing];
140  m_rings.push_back(std::make_unique<SCT_FwdRing>(ringName, m_modules[ringType], m_iWheel, iRing, m_endcap,m_detectorManager, m_geometryManager, m_materials, m_sqliteReader, m_mapFPV,m_mapAX));
141  }
142 
143  if(m_sqliteReader) return nullptr;
144 
145  // Calculate total number of modules
146  m_totalModules = 0;
147  for (int iRing = 0; iRing < m_numRings; iRing++){
148  m_totalModules += m_rings[iRing]->numModules();
149  }
150 
151  // Create disc support.
152  m_discSupport = std::make_unique<SCT_FwdDiscSupport>("DiscSupport"+intToString(m_iWheel), m_iWheel,
154 
155 
156  // Create Patch Panel
157  for (int iPPType = 0; iPPType < m_numPatchPanelTypes; iPPType++) {
158  m_patchPanel.push_back(std::make_unique<SCT_FwdPatchPanel>("PatchPanel"+intToString(iPPType), iPPType,
160  }
161 
162  // Create Patch Pannel Connector and Cooling, and disc Fixations
163  if (m_pPConnectorPresent) {
164  m_pPConnector = std::make_unique<SCT_FwdPPConnector>("PPConnector",
166  }
167  if (m_pPCoolingPresent) {
168  m_pPCooling = std::make_unique<SCT_FwdPPCooling>("PPCooling",
170  }
171  if (m_discFixationPresent) {
172  m_discFixation = std::make_unique<SCT_FwdDiscFixation>("DiscFixation",
174  }
175 
176  // Create the FSI types
177  m_fsiType.resize(m_numFSITypes);
178  for (unsigned int iFSI = 0; iFSI < m_fsiVector->size(); iFSI++) {
179  int type = (*m_fsiVector)[iFSI]->simType();
180  if (!m_fsiType[type]) {
181  m_fsiType[type] = std::make_unique<SCT_FwdFSI>("FSI"+intToString(type), type,
183  }
184  }
185 
186  // Calculate the extent of the envelope
187  // Use support disc as starting values.
188  double maxOuterRadius = m_discSupport->outerRadius();
189  double minInnerRadius = m_discSupport->innerRadius();
190  double maxModuleThickness = 0.5 * m_discSupport->thickness();
191 
192 
193  // Extend min max accounting for rings
194  for (int iRing = 0; iRing < m_numRings; iRing++){
195  maxOuterRadius = std::max(m_rings[iRing]->outerRadius(), maxOuterRadius);
196  minInnerRadius = std::min(m_rings[iRing]->innerRadius(), minInnerRadius);
197  maxModuleThickness = std::max(maxModuleThickness, m_rings[iRing]->thicknessOuter() + m_rings[iRing]->ringOffset());
198  }
199  m_ringMaxRadius = maxOuterRadius;
200 
201  // If first or last wheel there is nothing protruding beyond the rings so we reduce the
202  // envelope size. Comes to about 20 mm. Note the front becomes the back later for the last wheel.
203  if ((m_iWheel == 0) || (m_iWheel == m_numWheels - 1)) {
204  m_thicknessFront = maxModuleThickness + 1*Gaudi::Units::mm; // We give plenty of safety as we have the room.
205  // But now modified by disc fixations
208  }
209  }
210 
211  // The outer radius is now defined by the patch panel cooling if present
212  if(m_pPCoolingPresent) {
213  double ppCoolingOuterRadius = sqrt(sqr(m_patchPanel[2]->outerRadius() + m_pPCooling->deltaR()) + sqr(m_pPCooling->rphi())) + m_safety;
214  maxOuterRadius = std::max(ppCoolingOuterRadius, maxOuterRadius);
215  }
216 
217  // Or maybe by the disc fixations...
219  double discFixationOuterRadius = sqrt(sqr(m_ringMaxRadius + m_discFixation->thickness() + m_safety) + sqr(m_discFixation->radius())) + m_safety;
220  maxOuterRadius = std::max(discFixationOuterRadius, maxOuterRadius);
221  }
222 
223  m_rotateWheel = +1; // +1 normal, -1 rotate (ie last wheel)
224  if (m_numRings > 0) { // Should always be true
225  m_rotateWheel = (m_rings[0]->discRotated()) ? -1 : +1 ;
226  }
227 
228  // swap thickness front/back (this only happens for the last wheel).
229  if (m_rotateWheel < 0) {
230  double tmp = m_thicknessFront;
233  }
234 
236 
237  m_innerRadius = minInnerRadius - m_safety;
238  m_outerRadius = maxOuterRadius + m_safety;
239 
240 
241  // TODO. Have to account for FSI and patch panels
242  //m_thickness = 2. * maxRingOffset + maxThickness;
243  // m_thickness = 100 * Gaudi::Units::mm;
244 
245  // Make envelope for the wheel
246  double envelopeShift = 0.5*(m_thicknessBack - m_thicknessFront);
247  const GeoTube * tmpShape = new GeoTube(m_innerRadius, m_outerRadius, 0.5 * m_thickness);
248  const GeoShape & fwdWheelEnvelopeShape = *tmpShape << GeoTrf::Translate3D(0, 0, envelopeShift);
249 
250  const GeoLogVol * fwdWheelLog =
251  new GeoLogVol(getName(), &fwdWheelEnvelopeShape, m_materials->gasMaterial());
252 
253 
254  return fwdWheelLog;
255 
256 }

◆ ring()

const SCT_FwdRing* SCT_FwdWheel::ring ( int  i)
inline

Definition at line 51 of file SCT_FwdWheel.h.

51 {return m_rings[i].get();}

◆ ringType()

int SCT_FwdWheel::ringType ( int  i) const
inline

Definition at line 50 of file SCT_FwdWheel.h.

50 {return m_ringType[i];}

◆ thickness()

double SCT_FwdWheel::thickness ( ) const
inline

Definition at line 56 of file SCT_FwdWheel.h.

56 {return m_thickness;}

◆ totalModules()

int SCT_FwdWheel::totalModules ( ) const
inline

Definition at line 59 of file SCT_FwdWheel.h.

59 {return m_totalModules;}

◆ wheelNum()

int SCT_FwdWheel::wheelNum ( ) const
inline

Definition at line 44 of file SCT_FwdWheel.h.

44 {return m_iWheel;}

◆ zPosition()

double SCT_FwdWheel::zPosition ( ) const
inline

Definition at line 48 of file SCT_FwdWheel.h.

48 {return m_zPosition;}

Member Data Documentation

◆ m_detectorManager

InDetDD::SCT_DetectorManager* SCT_ComponentFactory::m_detectorManager
protectedinherited

Definition at line 41 of file SCT_ComponentFactory.h.

◆ m_discFixation

std::unique_ptr<SCT_FwdDiscFixation> SCT_FwdWheel::m_discFixation
private

Definition at line 107 of file SCT_FwdWheel.h.

◆ m_discFixationLocAngle

std::vector<double> SCT_FwdWheel::m_discFixationLocAngle
private

Definition at line 86 of file SCT_FwdWheel.h.

◆ m_discFixationPresent

bool SCT_FwdWheel::m_discFixationPresent = false
private

Definition at line 85 of file SCT_FwdWheel.h.

◆ m_discSupport

std::unique_ptr<SCT_FwdDiscSupport> SCT_FwdWheel::m_discSupport
private

Definition at line 102 of file SCT_FwdWheel.h.

◆ m_endcap

int SCT_FwdWheel::m_endcap
private

Definition at line 69 of file SCT_FwdWheel.h.

◆ m_fsiType

std::vector<std::unique_ptr<SCT_FwdFSI> > SCT_FwdWheel::m_fsiType
private

Definition at line 106 of file SCT_FwdWheel.h.

◆ m_fsiVector

const std::vector<const FSIDetails *>* SCT_FwdWheel::m_fsiVector = nullptr
private

Definition at line 112 of file SCT_FwdWheel.h.

◆ m_geometryManager

SCT_GeometryManager* SCT_ComponentFactory::m_geometryManager
protectedinherited

Definition at line 42 of file SCT_ComponentFactory.h.

◆ m_innerRadius

double SCT_FwdWheel::m_innerRadius = 0.0
private

Definition at line 89 of file SCT_FwdWheel.h.

◆ m_iWheel

int SCT_FwdWheel::m_iWheel
private

Definition at line 68 of file SCT_FwdWheel.h.

◆ m_logVolume

const GeoLogVol* SCT_UniqueComponentFactory::m_logVolume
protectedinherited

Definition at line 90 of file SCT_ComponentFactory.h.

◆ m_mapAX

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

Definition at line 96 of file SCT_ComponentFactory.h.

◆ m_mapFPV

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

Definition at line 95 of file SCT_ComponentFactory.h.

◆ m_materials

SCT_MaterialManager* SCT_ComponentFactory::m_materials
protectedinherited

Definition at line 43 of file SCT_ComponentFactory.h.

◆ m_modules

const std::vector<SCT_FwdModule*>& SCT_FwdWheel::m_modules
private

Definition at line 109 of file SCT_FwdWheel.h.

◆ m_name

std::string SCT_ComponentFactory::m_name
privateinherited

Definition at line 49 of file SCT_ComponentFactory.h.

◆ m_numFSITypes

int SCT_FwdWheel::m_numFSITypes = 0
private

Definition at line 80 of file SCT_FwdWheel.h.

◆ m_numPatchPanelLocs

int SCT_FwdWheel::m_numPatchPanelLocs = 0
private

Definition at line 78 of file SCT_FwdWheel.h.

◆ m_numPatchPanelTypes

int SCT_FwdWheel::m_numPatchPanelTypes = 0
private

Definition at line 79 of file SCT_FwdWheel.h.

◆ m_numRings

int SCT_FwdWheel::m_numRings = 0
private

Definition at line 72 of file SCT_FwdWheel.h.

◆ m_numWheels

int SCT_FwdWheel::m_numWheels = 0
private

Definition at line 81 of file SCT_FwdWheel.h.

◆ m_optoHarnessPresent

bool SCT_FwdWheel::m_optoHarnessPresent = false
private

Definition at line 82 of file SCT_FwdWheel.h.

◆ m_outerRadius

double SCT_FwdWheel::m_outerRadius = 0.0
private

Definition at line 90 of file SCT_FwdWheel.h.

◆ m_patchPanel

std::vector<std::unique_ptr<SCT_FwdPatchPanel> > SCT_FwdWheel::m_patchPanel
private

Definition at line 103 of file SCT_FwdWheel.h.

◆ m_patchPanelLocAngle

std::vector<double> SCT_FwdWheel::m_patchPanelLocAngle
private

Definition at line 76 of file SCT_FwdWheel.h.

◆ m_patchPanelRepeatQuadrant

std::vector<bool> SCT_FwdWheel::m_patchPanelRepeatQuadrant
private

Definition at line 77 of file SCT_FwdWheel.h.

◆ m_patchPanelType

std::vector<int> SCT_FwdWheel::m_patchPanelType
private

Definition at line 75 of file SCT_FwdWheel.h.

◆ m_pPConnector

std::unique_ptr<SCT_FwdPPConnector> SCT_FwdWheel::m_pPConnector
private

Definition at line 104 of file SCT_FwdWheel.h.

◆ m_pPConnectorPresent

bool SCT_FwdWheel::m_pPConnectorPresent = false
private

Definition at line 83 of file SCT_FwdWheel.h.

◆ m_pPCooling

std::unique_ptr<SCT_FwdPPCooling> SCT_FwdWheel::m_pPCooling
private

Definition at line 105 of file SCT_FwdWheel.h.

◆ m_pPCoolingPresent

bool SCT_FwdWheel::m_pPCoolingPresent = false
private

Definition at line 84 of file SCT_FwdWheel.h.

◆ m_ringMaxRadius

double SCT_FwdWheel::m_ringMaxRadius = 0.0
private

Definition at line 96 of file SCT_FwdWheel.h.

◆ m_rings

std::vector<std::unique_ptr<SCT_FwdRing> > SCT_FwdWheel::m_rings
private

Definition at line 101 of file SCT_FwdWheel.h.

◆ m_ringType

std::vector<int> SCT_FwdWheel::m_ringType
private

Definition at line 74 of file SCT_FwdWheel.h.

◆ m_rotateWheel

int SCT_FwdWheel::m_rotateWheel = 0
private

Definition at line 95 of file SCT_FwdWheel.h.

◆ m_safety

double SCT_FwdWheel::m_safety = 0.0
private

Definition at line 98 of file SCT_FwdWheel.h.

◆ m_sqliteReader

GeoModelIO::ReadGeoModel* SCT_UniqueComponentFactory::m_sqliteReader
protectedinherited

Definition at line 91 of file SCT_ComponentFactory.h.

◆ m_thickness

double SCT_FwdWheel::m_thickness = 0.0
private

Definition at line 91 of file SCT_FwdWheel.h.

◆ m_thicknessBack

double SCT_FwdWheel::m_thicknessBack = 0.0
private

Definition at line 93 of file SCT_FwdWheel.h.

◆ m_thicknessFront

double SCT_FwdWheel::m_thicknessFront = 0.0
private

Definition at line 92 of file SCT_FwdWheel.h.

◆ m_totalModules

int SCT_FwdWheel::m_totalModules = 0
private

Definition at line 94 of file SCT_FwdWheel.h.

◆ m_zPosition

double SCT_FwdWheel::m_zPosition = 0.0
private

Definition at line 73 of file SCT_FwdWheel.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:
InDetDD::SiNumerology::setNumRingsForDisk
void setNumRingsForDisk(int disk, int nRings)
Definition: SiNumerology.cxx:48
SCT_ComponentFactory::m_geometryManager
SCT_GeometryManager * m_geometryManager
Definition: SCT_ComponentFactory.h:42
SCT_FwdWheel::m_outerRadius
double m_outerRadius
Definition: SCT_FwdWheel.h:90
SCT_FwdWheel::m_numRings
int m_numRings
Definition: SCT_FwdWheel.h:72
SCT_ComponentFactory::m_name
std::string m_name
Definition: SCT_ComponentFactory.h:49
SCT_FwdDiscPowerTape
Definition: SCT_FwdDiscPowerTape.h:13
SCT_FwdWheel::m_discFixationLocAngle
std::vector< double > m_discFixationLocAngle
Definition: SCT_FwdWheel.h:86
InDetDD::SiDetectorManager::numerology
const SiNumerology & numerology() const
Access Numerology.
Definition: SiDetectorManager.h:126
SCT_UniqueComponentFactory::m_mapFPV
std::shared_ptr< std::map< std::string, GeoFullPhysVol * > > m_mapFPV
Definition: SCT_ComponentFactory.h:95
max
#define max(a, b)
Definition: cfImp.cxx:41
SCT_GeneralParameters::safety
double safety() const
Definition: SCT_GeneralParameters.cxx:48
SCT_FwdRing
Definition: SCT_FwdRing.h:22
SCT_FwdWheel::m_thickness
double m_thickness
Definition: SCT_FwdWheel.h:91
SCT_FwdWheel::m_pPCooling
std::unique_ptr< SCT_FwdPPCooling > m_pPCooling
Definition: SCT_FwdWheel.h:105
SCT_FwdWheel::m_zPosition
double m_zPosition
Definition: SCT_FwdWheel.h:73
SCT_FwdWheel::m_fsiVector
const std::vector< const FSIDetails * > * m_fsiVector
Definition: SCT_FwdWheel.h:112
SCT_UniqueComponentFactory::m_mapAX
std::shared_ptr< std::map< std::string, GeoAlignableTransform * > > m_mapAX
Definition: SCT_ComponentFactory.h:96
SCT_FwdRing::thicknessInner
double thicknessInner() const
Definition: SCT_FwdRing.h:53
SCT_FwdWheel::m_fsiType
std::vector< std::unique_ptr< SCT_FwdFSI > > m_fsiType
Definition: SCT_FwdWheel.h:106
SCT_UniqueComponentFactory::SCT_UniqueComponentFactory
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)
Definition: SCT_ComponentFactory.cxx:43
SCT_GeometryManager::forwardParameters
const SCT_ForwardParameters * forwardParameters() const
Definition: SCT_GeometryManager.cxx:98
SCT_FwdOptoHarness
Definition: SCT_FwdOptoHarness.h:13
SCT_FwdWheel::m_safety
double m_safety
Definition: SCT_FwdWheel.h:98
SCT_FwdWheel::m_numWheels
int m_numWheels
Definition: SCT_FwdWheel.h:81
SCT_FwdWheel::m_rotateWheel
int m_rotateWheel
Definition: SCT_FwdWheel.h:95
SCT_FwdWheel::m_modules
const std::vector< SCT_FwdModule * > & m_modules
Definition: SCT_FwdWheel.h:109
SCT_FwdWheel::m_discSupport
std::unique_ptr< SCT_FwdDiscSupport > m_discSupport
Definition: SCT_FwdWheel.h:102
SCT_ComponentFactory::m_detectorManager
InDetDD::SCT_DetectorManager * m_detectorManager
Definition: SCT_ComponentFactory.h:41
SCT_GeometryManager::generalParameters
const SCT_GeneralParameters * generalParameters() const
Definition: SCT_GeometryManager.cxx:105
SCT_FwdWheel::m_numFSITypes
int m_numFSITypes
Definition: SCT_FwdWheel.h:80
SCT_FwdWheel::m_numPatchPanelTypes
int m_numPatchPanelTypes
Definition: SCT_FwdWheel.h:79
SCT_FwdWheel::ring
const SCT_FwdRing * ring(int i)
Definition: SCT_FwdWheel.h:51
SCT_FwdWheel::m_ringType
std::vector< int > m_ringType
Definition: SCT_FwdWheel.h:74
SCT_FwdWheel::m_patchPanelType
std::vector< int > m_patchPanelType
Definition: SCT_FwdWheel.h:75
SCT_FwdWheel::innerRadius
double innerRadius() const
Definition: SCT_FwdWheel.h:57
SCT_FwdWheel::getParameters
void getParameters()
Definition: SCT_FwdWheel.cxx:76
SCT_FwdWheel::m_patchPanelLocAngle
std::vector< double > m_patchPanelLocAngle
Definition: SCT_FwdWheel.h:76
SCT_FwdRing::ringOffset
double ringOffset() const
Definition: SCT_FwdRing.h:50
SCT_FwdRing::identifier
int identifier() const
Definition: SCT_FwdRing.h:48
SCT_FwdWheel::ringType
int ringType(int i) const
Definition: SCT_FwdWheel.h:50
lumiFormat.i
int i
Definition: lumiFormat.py:92
SCT_MaterialManager::gasMaterial
const GeoMaterial * gasMaterial() const
Definition: SCT_MaterialManager.cxx:80
SCT_FwdWheel::m_endcap
int m_endcap
Definition: SCT_FwdWheel.h:69
SCT_FwdWheel::m_iWheel
int m_iWheel
Definition: SCT_FwdWheel.h:68
SCT_FwdWheel::m_pPConnectorPresent
bool m_pPConnectorPresent
Definition: SCT_FwdWheel.h:83
SCT_FwdRingCooling
Definition: SCT_FwdRingCooling.h:13
SCT_GeometryManager::distortedMatManager
InDetDD::DistortedMaterialManager * distortedMatManager() const
Definition: SCT_GeometryManager.cxx:111
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
SCT_ComponentFactory::intToString
std::string intToString(int i) const
Definition: SCT_ComponentFactory.cxx:29
SCT_FwdWheel::m_innerRadius
double m_innerRadius
Definition: SCT_FwdWheel.h:89
SCT_ComponentFactory::s_epsilon
static const double s_epsilon
Definition: SCT_ComponentFactory.h:50
min
#define min(a, b)
Definition: cfImp.cxx:40
SCT_FwdWheel::m_pPConnector
std::unique_ptr< SCT_FwdPPConnector > m_pPConnector
Definition: SCT_FwdWheel.h:104
SCT_FwdWheel::m_discFixationPresent
bool m_discFixationPresent
Definition: SCT_FwdWheel.h:85
SCT_FwdWheel::m_optoHarnessPresent
bool m_optoHarnessPresent
Definition: SCT_FwdWheel.h:82
SCT_ComponentFactory::m_materials
SCT_MaterialManager * m_materials
Definition: SCT_ComponentFactory.h:43
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
SCT_FwdWheel::m_thicknessFront
double m_thicknessFront
Definition: SCT_FwdWheel.h:92
SCT_FwdWheel::m_numPatchPanelLocs
int m_numPatchPanelLocs
Definition: SCT_FwdWheel.h:78
SCT_FwdWheel::m_patchPanelRepeatQuadrant
std::vector< bool > m_patchPanelRepeatQuadrant
Definition: SCT_FwdWheel.h:77
SCT_UniqueComponentFactory::m_logVolume
const GeoLogVol * m_logVolume
Definition: SCT_ComponentFactory.h:90
SCT_FwdWheel::m_totalModules
int m_totalModules
Definition: SCT_FwdWheel.h:94
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
SCT_FwdWheel::outerRadius
double outerRadius() const
Definition: SCT_FwdWheel.h:58
python.CaloScaleNoiseConfig.str
str
Definition: CaloScaleNoiseConfig.py:78
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SCT_FwdWheel::m_rings
std::vector< std::unique_ptr< SCT_FwdRing > > m_rings
Definition: SCT_FwdWheel.h:101
SCT_FwdRing::thicknessOuter
double thicknessOuter() const
Definition: SCT_FwdRing.h:54
physics_parameters.parameters
parameters
Definition: physics_parameters.py:144
str
Definition: BTagTrackIpAccessor.cxx:11
SCT_FwdWheel::m_pPCoolingPresent
bool m_pPCoolingPresent
Definition: SCT_FwdWheel.h:84
SCT_FwdWheel::preBuild
virtual const GeoLogVol * preBuild()
Definition: SCT_FwdWheel.cxx:134
SCT_UniqueComponentFactory::m_sqliteReader
GeoModelIO::ReadGeoModel * m_sqliteReader
Definition: SCT_ComponentFactory.h:91
SCT_FwdWheel::m_discFixation
std::unique_ptr< SCT_FwdDiscFixation > m_discFixation
Definition: SCT_FwdWheel.h:107
SCT_FwdRing::ringSide
int ringSide() const
Definition: SCT_FwdRing.h:49
InDetDD::ExtraMaterial
Definition: ExtraMaterial.h:23
SCT_ComponentFactory::getName
const std::string & getName() const
Definition: SCT_ComponentFactory.h:35
SCT_FwdRing::build
virtual GeoVPhysVol * build(SCT_Identifier id)
Definition: SCT_FwdRing.cxx:172
sqr
double sqr(double x)
Definition: SCT_FwdWheel.cxx:49
python.SystemOfUnits.degree
tuple degree
Definition: SystemOfUnits.py:106
SCT_FwdWheel::m_thicknessBack
double m_thicknessBack
Definition: SCT_FwdWheel.h:93
SCT_FwdWheel::m_ringMaxRadius
double m_ringMaxRadius
Definition: SCT_FwdWheel.h:96
SCT_ForwardParameters
Definition: SCT_ForwardParameters.h:16
SCT_FwdWheel::m_patchPanel
std::vector< std::unique_ptr< SCT_FwdPatchPanel > > m_patchPanel
Definition: SCT_FwdWheel.h:103