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 52 of file SCT_FwdWheel.cxx.

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

◆ ~SCT_FwdWheel()

SCT_FwdWheel::~SCT_FwdWheel ( )

Definition at line 72 of file SCT_FwdWheel.cxx.

73 {
74 }

◆ 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 260 of file SCT_FwdWheel.cxx.

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

◆ epsilon()

double SCT_ComponentFactory::epsilon ( ) const
protectedinherited

Definition at line 38 of file SCT_ComponentFactory.cxx.

39 {
40  return s_epsilon;
41 }

◆ 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 77 of file SCT_FwdWheel.cxx.

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

◆ 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 30 of file SCT_ComponentFactory.cxx.

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

◆ 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 135 of file SCT_FwdWheel.cxx.

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

◆ 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:44
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:77
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:85
SCT_MaterialManager::gasMaterial
const GeoMaterial * gasMaterial() const
Definition: SCT_MaterialManager.cxx:69
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:30
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:221
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:135
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:173
sqr
double sqr(double x)
Definition: SCT_FwdWheel.cxx:50
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