ATLAS Offline Software
SCT_Flange.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/GeoLogVol.h"
14 #include "GeoModelKernel/GeoPhysVol.h"
15 #include "GeoModelKernel/Units.h"
16 
17 
18 SCT_Flange::SCT_Flange(const std::string & name, int iLayer,
19  InDetDD::SCT_DetectorManager* detectorManager,
20  SCT_GeometryManager* geometryManager,
21  SCT_MaterialManager* materials)
22  : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials),
23  m_iLayer(iLayer)
24 {
25  getParameters();
27 }
28 
29 
30 void
32 {
34 
35  m_materialName = parameters->flangeMaterial(m_iLayer);
36  m_length = parameters->flangeDeltaZ(m_iLayer);
37  m_radialWidth = parameters->flangeDeltaR(m_iLayer);
38 
39  if(parameters->isOldGeometry()) {
40  // Same outer radius as support cylinder
41  m_outerRadius = parameters->supportCylOuterRadius(m_iLayer);
42  }
43  else {
44  // Outer radius is inner radius of support cylinder
45  m_outerRadius = parameters->supportCylInnerRadius(m_iLayer);
46  }
48 }
49 
50 GeoVPhysVol *
52 {
53  // Make the flange. A simple tube.
54  const GeoTube * flangeShape = new GeoTube(m_innerRadius, m_outerRadius, 0.5 * m_length);
55  m_material = m_materials->getMaterialForVolume(m_materialName, flangeShape->volume());
57  const GeoLogVol * flangeLog = new GeoLogVol(getName(), flangeShape, m_material);
58 
59  GeoPhysVol * flange = new GeoPhysVol(flangeLog);
60 
61  return flange;
62 }
SCT_Flange::m_iLayer
int m_iLayer
Definition: SCT_Flange.h:34
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
SCT_Flange.h
SCT_Flange::SCT_Flange
SCT_Flange(const std::string &name, int iLayer, InDetDD::SCT_DetectorManager *detectorManager, SCT_GeometryManager *geometryManager, SCT_MaterialManager *materials)
Definition: SCT_Flange.cxx:18
SCT_Flange::build
virtual GeoVPhysVol * build()
Definition: SCT_Flange.cxx:51
SCT_GeometryManager::barrelParameters
const SCT_BarrelParameters * barrelParameters() const
Definition: SCT_GeometryManager.cxx:78
SCT_Flange::m_material
const GeoMaterial * m_material
Definition: SCT_Flange.h:36
SCT_MaterialManager::getMaterialForVolume
const GeoMaterial * getMaterialForVolume(const std::string &materialName, double volume)
Definition: SCT_MaterialManager.cxx:61
SCT_Flange::m_length
double m_length
Definition: SCT_Flange.h:40
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_Flange::getParameters
void getParameters()
Definition: SCT_Flange.cxx:31
SCT_MaterialManager::getMaterial
const GeoMaterial * getMaterial(const std::string &materialName)
Definition: SCT_MaterialManager.cxx:40
SCT_BarrelParameters
Definition: SCT_BarrelParameters.h:12
SCT_Flange::m_outerRadius
double m_outerRadius
Definition: SCT_Flange.h:39
SCT_BarrelParameters.h
SCT_SharedComponentFactory
Definition: SCT_ComponentFactory.h:56
physics_parameters.parameters
parameters
Definition: physics_parameters.py:144
SCT_Flange::m_radialWidth
double m_radialWidth
Definition: SCT_Flange.h:41
SCT_Flange::m_materialName
std::string m_materialName
Definition: SCT_Flange.h:37
SCT_Flange::m_innerRadius
double m_innerRadius
Definition: SCT_Flange.h:38
SCT_ComponentFactory::getName
const std::string & getName() const
Definition: SCT_ComponentFactory.h:35
SCT_GeometryManager.h
SCT_GeometryManager
Definition: SCT_GeometryManager.h:25