ATLAS Offline Software
SCT_Bracket.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //
6 // 14th Aug 2005 S.Mima modified.
7 //
9 
11 
14 
15 #include "GeoModelKernel/GeoBox.h"
16 #include "GeoModelKernel/GeoLogVol.h"
17 #include "GeoModelKernel/GeoPhysVol.h"
18 #include "GeoModelKernel/GeoMaterial.h"
19 #include "GeoModelKernel/Units.h"
20 
21 SCT_Bracket::SCT_Bracket(const std::string & name,
22  InDetDD::SCT_DetectorManager* detectorManager,
23  SCT_GeometryManager* geometryManager,
24  SCT_MaterialManager* materials)
25  : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials)
26 {
27  getParameters();
29 }
30 
31 
32 void
34 {
36 
37  m_material = m_materials->getMaterial(parameters->bracketMaterial());
38  m_thickness = parameters->bracketThickness();
39  m_length = parameters->bracketLength();
40  m_width = parameters->bracketWidth();
41 }
42 
43 GeoVPhysVol *
45 {
46 
47  // Build the Bracket. Just a simple box.
48  // Width is in phi-direction.
49  // Length is in z-direction.
50 
51  const GeoBox * bracketShape = new GeoBox(0.5*m_thickness, 0.5*m_width, 0.5*m_length);
52  const GeoLogVol *bracketLog = new GeoLogVol(getName(), bracketShape, m_material);
53  GeoPhysVol * bracket = new GeoPhysVol(bracketLog);
54 
55  return bracket;
56 }
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_Bracket::build
virtual GeoVPhysVol * build()
Definition: SCT_Bracket.cxx:44
SCT_MaterialManager.h
SCT_Bracket::m_thickness
double m_thickness
Definition: SCT_Bracket.h:37
SCT_Bracket::m_length
double m_length
Definition: SCT_Bracket.h:39
SCT_GeometryManager::barrelParameters
const SCT_BarrelParameters * barrelParameters() const
Definition: SCT_GeometryManager.cxx:78
SCT_Bracket::m_material
const GeoMaterial * m_material
Definition: SCT_Bracket.h:36
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_SharedComponentFactory::m_physVolume
GeoVPhysVol * m_physVolume
Definition: SCT_ComponentFactory.h:70
SCT_Bracket::getParameters
void getParameters()
Definition: SCT_Bracket.cxx:33
SCT_MaterialManager::getMaterial
const GeoMaterial * getMaterial(const std::string &materialName)
Definition: SCT_MaterialManager.cxx:40
SCT_Bracket.h
SCT_BarrelParameters
Definition: SCT_BarrelParameters.h:12
SCT_Bracket::SCT_Bracket
SCT_Bracket(const std::string &name, InDetDD::SCT_DetectorManager *detectorManager, SCT_GeometryManager *geometryManager, SCT_MaterialManager *materials)
Definition: SCT_Bracket.cxx:21
SCT_BarrelParameters.h
SCT_SharedComponentFactory
Definition: SCT_ComponentFactory.h:56
physics_parameters.parameters
parameters
Definition: physics_parameters.py:144
SCT_Bracket::m_width
double m_width
Definition: SCT_Bracket.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