ATLAS Offline Software
SCT_InterLink.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
8 
11 
12 #include "GeoModelKernel/GeoTube.h"
13 #include "GeoModelKernel/GeoTubs.h"
14 #include "GeoModelKernel/GeoLogVol.h"
15 #include "GeoModelKernel/GeoPhysVol.h"
16 #include "GeoModelKernel/GeoTransform.h"
17 #include "GaudiKernel/SystemOfUnits.h"
18 
19 SCT_InterLink::SCT_InterLink(const std::string & name,
20  InDetDD::SCT_DetectorManager* detectorManager,
21  SCT_GeometryManager* geometryManager,
22  SCT_MaterialManager* materials)
23  : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials),
24  m_interLinkShape(nullptr),
25  m_interLinkLog(nullptr),
26  m_interLink(nullptr),
27  m_interLinkSegShape(nullptr),
28  m_interLinkSegLog(nullptr),
29  m_interLinkSeg(nullptr),
30  m_bearingShape(nullptr),
31  m_bearingLog(nullptr),
32  m_bearing(nullptr),
33  m_FSIFlangeShape(nullptr),
34  m_FSIFlangeLog(nullptr),
35  m_FSIFlange(nullptr)
36 {
37  getParameters();
39 }
40 
42 
43 void
45 {
47 
48  // Interlink parameters
49  m_materialName = parameters->interLinkMaterial();
50  m_length = parameters->interLinkDeltaZ();
51  m_innerRadius = parameters->interLinkInnerRadius();
52  m_outerRadius = parameters->interLinkOuterRadius();
53  m_dPhi = parameters->interLinkDeltaPhi();
54  m_phiPos = parameters->interLinkPhiPos();
55  m_nRepeat = parameters->interLinkNRepeat();
56 
57  // FSIFlange parameters: only for non-uniform interlink
58  if(m_nRepeat > 1) {
59  m_includeFSIFlange = parameters->includeFSI();
60  }
61  else {
62  m_includeFSIFlange = false;
63  }
64  if(m_includeFSIFlange) {
65  m_innerRadiusFSIFlange = parameters->fsiFlangeInnerRadius();
66  m_outerRadiusFSIFlange = parameters->fsiFlangeOuterRadius();
67  m_materialNameFSIFlange = parameters->fsiFlangeMaterial();
68  }
69 
70  // B6 bearing parameters: only for non-uniform interlink
71  if(m_nRepeat > 1) {
72  m_materialNameBearing = parameters->bearingMaterial();
75  m_outerRadiusBearing = parameters->thermalShieldBulkheadInnerRadius();
76  m_dPhiBearing = parameters->bearingDeltaPhi();
77  m_phiPosBearing = parameters->bearingPhiPos();
78  m_nRepeatBearing = parameters->bearingNRepeat();
79  }
80 
81 }
82 
83 GeoVPhysVol *
85 {
86  // Make the interlink.
87  if(m_nRepeat == 1) {
88  // For old geometry interlink is a simple tube of material
90  const GeoMaterial* material = m_materials->getMaterialForVolume(m_materialName, m_interLinkShape->volume());
91  if(!material) {material = m_materials->getMaterial(m_materialName);}
92  m_interLinkLog = new GeoLogVol(getName(), m_interLinkShape, material);
93  m_interLink = new GeoPhysVol(m_interLinkLog);
94  }
95 
96  else {
97  // In updated version we make air tube containing interlink segments and B6 bearings
98  // And also include FSI flange segments if defined
99  // Air tube:
102  m_interLink = new GeoPhysVol(m_interLinkLog);
103 
104  // Interlink segments:
107  m_interLinkSeg = new GeoPhysVol(m_interLinkSegLog);
108 
109  for(int i=0; i<m_nRepeat; i++) {
110  double interlinkAngle = m_phiPos + (i * 360./m_nRepeat)*Gaudi::Units::deg;
111  GeoTransform* geoTransform = new GeoTransform(GeoTrf::RotateZ3D(interlinkAngle));
112  m_geoTransforms.push_back(geoTransform);
113  m_interLink->add(geoTransform);
115  }
116 
117  // B6 bearings
120  m_bearing = new GeoPhysVol(m_bearingLog);
121 
122  for(int i=0; i<m_nRepeatBearing; i++) {
123  double bearingAngle = m_phiPosBearing + (i * 360./m_nRepeatBearing)*Gaudi::Units::deg;
124  GeoTransform* geoTransform = new GeoTransform(GeoTrf::RotateZ3D(bearingAngle));
125  m_geoTransforms.push_back(geoTransform);
126  m_interLink->add(geoTransform);
127  m_interLink->add(m_bearing);
128  }
129 
130  // FSI Flange segments:
131  // These exactly fill gaps between interlink segments, with smaller radial extent
132  if(m_includeFSIFlange) {
133  double dPhiFSI = (360./m_nRepeat)*Gaudi::Units::deg - m_dPhi;
136  m_FSIFlange = new GeoPhysVol(m_FSIFlangeLog);
137 
138  for(int i=0; i<m_nRepeat; i++) {
139  double phiPosFSI = m_phiPos + (180./m_nRepeat)*Gaudi::Units::deg;
140  double FSIFlangeAngle = phiPosFSI + (i * 360./m_nRepeat)*Gaudi::Units::deg;
141  GeoTransform* geoTransform = new GeoTransform(GeoTrf::RotateZ3D(FSIFlangeAngle));
142  m_geoTransforms.push_back(geoTransform);
143  m_interLink->add(geoTransform);
144  m_interLink->add(m_FSIFlange);
145  }
146  }
147  }
148 
149  return m_interLink;
150 }
151 
SCT_ComponentFactory::m_geometryManager
SCT_GeometryManager * m_geometryManager
Definition: SCT_ComponentFactory.h:42
SCT_MaterialManager
Definition: SCT_MaterialManager.h:21
InDetDD::SCT_DetectorManager
Definition: SCT_DetectorManager.h:49
SCT_MaterialManager.h
deg
#define deg
Definition: SbPolyhedron.cxx:17
python.SystemOfUnits.radian
int radian
Definition: SystemOfUnits.py:104
lumiFormat.i
int i
Definition: lumiFormat.py:85
SCT_MaterialManager::gasMaterial
const GeoMaterial * gasMaterial() const
Definition: SCT_MaterialManager.cxx:69
SCT_GeometryManager::barrelParameters
const SCT_BarrelParameters * barrelParameters() const
Definition: SCT_GeometryManager.cxx:78
SCT_MaterialManager::getMaterialForVolume
const GeoMaterial * getMaterialForVolume(const std::string &materialName, double volume)
Definition: SCT_MaterialManager.cxx:61
SCT_ComponentFactory::m_materials
SCT_MaterialManager * m_materials
Definition: SCT_ComponentFactory.h:43
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
SCT_SharedComponentFactory::m_physVolume
GeoVPhysVol * m_physVolume
Definition: SCT_ComponentFactory.h:70
SCT_MaterialManager::getMaterial
const GeoMaterial * getMaterial(const std::string &materialName)
Definition: SCT_MaterialManager.cxx:40
SCT_BarrelParameters
Definition: SCT_BarrelParameters.h:12
SCT_BarrelParameters.h
SCT_SharedComponentFactory
Definition: SCT_ComponentFactory.h:56
physics_parameters.parameters
parameters
Definition: physics_parameters.py:144
SCT_ComponentFactory::getName
const std::string & getName() const
Definition: SCT_ComponentFactory.h:35
SCT_GeometryManager.h
SCT_GeometryManager
Definition: SCT_GeometryManager.h:25