ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_FwdHybrid Class Reference

#include <SCT_FwdHybrid.h>

Inheritance diagram for SCT_FwdHybrid:
Collaboration diagram for SCT_FwdHybrid:

Public Member Functions

 SCT_FwdHybrid (const std::string &name, int ringType, InDetDD::SCT_DetectorManager *detectorManager, SCT_GeometryManager *geometryManager, SCT_MaterialManager *materials)
const GeoMaterial * material () const
double outerWidth () const
double innerWidth () const
double length () const
double thickness () const
double mountPointToOuterEdge () const
double mountPointToInnerEdge () const
virtual GeoVPhysVol * build ()
GeoVPhysVol * getVolume ()
const std::string & getName () const
std::string intToString (int i) const

Protected Member Functions

double epsilon () const

Protected Attributes

GeoVPhysVol * m_physVolume
InDetDD::SCT_DetectorManagerm_detectorManager
SCT_GeometryManagerm_geometryManager
SCT_MaterialManagerm_materials

Private Member Functions

void getParameters ()

Private Attributes

int m_ringType
double m_outerWidth = 0.0
double m_innerWidth = 0.0
double m_length1 = 0.0
double m_length = 0.0
double m_thickness = 0.0
double m_width2 = 0.0
double m_length2 = 0.0
double m_thickness2 = 0.0
double m_mountPointToInnerEdge = 0.0
double m_mountPointToOuterEdge = 0.0
const GeoMaterial * m_material = nullptr
std::string m_materialName
std::string m_name

Static Private Attributes

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

Detailed Description

Definition at line 15 of file SCT_FwdHybrid.h.

Constructor & Destructor Documentation

◆ SCT_FwdHybrid()

SCT_FwdHybrid::SCT_FwdHybrid ( const std::string & name,
int ringType,
InDetDD::SCT_DetectorManager * detectorManager,
SCT_GeometryManager * geometryManager,
SCT_MaterialManager * materials )

Definition at line 38 of file SCT_FwdHybrid.cxx.

42 : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials),
43 m_ringType(ringType)
44{
47}
virtual GeoVPhysVol * build()
SCT_SharedComponentFactory(const std::string &name, InDetDD::SCT_DetectorManager *detectorManager, SCT_GeometryManager *geometryManager, SCT_MaterialManager *materials=nullptr)

Member Function Documentation

◆ build()

GeoVPhysVol * SCT_FwdHybrid::build ( )
virtual

Implements SCT_SharedComponentFactory.

Definition at line 84 of file SCT_FwdHybrid.cxx.

85{
86
87 const SCT_ForwardModuleParameters * parameters = m_geometryManager->forwardModuleParameters();
88
89 // Make a hybrid. This is a TRD + BOX
90 const GeoTrd * hybridShape1 = new GeoTrd(0.5 * m_thickness, 0.5 * m_thickness,
91 0.5 * m_innerWidth, 0.5 * m_outerWidth,
92 0.5 * m_length1);
93
94 const GeoBox * hybridShape2 = new GeoBox(0.5 * m_thickness2, 0.5 * m_width2, 0.5 * m_length2);
95
96 double position = parameters->fwdModuleMountPoint(m_ringType) - (m_mountPointToInnerEdge)
97 + 0.5*(m_length2);
98 // double position = zsmi[m_ringType].mountd - zhyb->hybysh + (zhyb->hyby - zhyb->hybycor) / 2.;
99 if (m_ringType == 0) { position = -1 * position; }; // outer module, hybrid in inner side
100
101 const GeoShape & hybridPos1 = (*hybridShape2 << GeoTrf::TranslateZ3D(position));
102
103 position = parameters->fwdModuleMountPoint(m_ringType) - (m_mountPointToInnerEdge)
104 + m_length - 0.5 * parameters->fwdHybridLengthToCorner();
105 // position = zsmi[m_ringType].mountd - zhyb->hybysh + zhyb->hyby - zhyb->hybycor / 2.;
106 if (m_ringType == 0) { // outer module, hybrid in inner side
107 position = -1 * position; };
108
109 double rotation = 0.;
110 if (m_ringType == 0) rotation = 180. * Gaudi::Units::deg;
111
112 const GeoShape & hybridPos2 = (*hybridShape1 << GeoTrf::RotateX3D(rotation)
113 << GeoTrf::TranslateZ3D(position) );
114
115 const GeoShapeUnion & hybridShape = hybridPos1.add(hybridPos2);
116 // error getting volume directly.
117 m_material = m_materials->getMaterialForVolume(m_materialName, hybridShape1->volume()+hybridShape2->volume());
118 const GeoLogVol * hybridLog = new GeoLogVol(getName(), &hybridShape, m_material);
119 GeoPhysVol * hybrid = new GeoPhysVol(hybridLog);
120
121 return hybrid;
122
123}
const std::string & getName() const
SCT_GeometryManager * m_geometryManager
SCT_MaterialManager * m_materials
std::string m_materialName
double m_outerWidth
double m_mountPointToInnerEdge
const GeoMaterial * m_material
double m_innerWidth
double m_thickness2

◆ epsilon()

double SCT_ComponentFactory::epsilon ( ) const
protectedinherited

Definition at line 38 of file SCT_ComponentFactory.cxx.

39{
40 return s_epsilon;
41}
static const double s_epsilon

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

Definition at line 52 of file SCT_FwdHybrid.cxx.

53{
54
55 const SCT_ForwardModuleParameters * parameters = m_geometryManager->forwardModuleParameters();
56
57 m_materialName = parameters->fwdHybridMaterial();
58
59 //double Gaudi::Units::radlength;
60 //Gaudi::Units::radlength = 18.8 * Gaudi::Units::cm;
61 // [Gaudi::Units::cm] for carbon (Partickle Physics Booklet)
62
63 m_thickness = parameters->fwdHybridThickness();
65
66 m_length = parameters->fwdHybridLength();
67
68 // TRD part
69 m_innerWidth = parameters->fwdHybridInnerWidth();
70 m_outerWidth = parameters->fwdHybridOuterWidth(); // Width at outer edge
71 m_length1 = parameters->fwdHybridLengthToCorner();
72
73 // rectangular part.
74 m_length2 = m_length - parameters->fwdHybridLengthToCorner();
76
78
79 m_mountPointToInnerEdge = parameters->fwdHybridMountPointToInnerEdge();
81
82}
double m_mountPointToOuterEdge

◆ getVolume()

GeoVPhysVol * SCT_SharedComponentFactory::getVolume ( )
inlineinherited

Definition at line 67 of file SCT_ComponentFactory.h.

67{return m_physVolume;}

◆ innerWidth()

double SCT_FwdHybrid::innerWidth ( ) const
inline

Definition at line 29 of file SCT_FwdHybrid.h.

29{ return m_innerWidth; }

◆ 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}

◆ length()

double SCT_FwdHybrid::length ( ) const
inline

Definition at line 30 of file SCT_FwdHybrid.h.

30{ return m_length; }

◆ material()

const GeoMaterial * SCT_FwdHybrid::material ( ) const
inline

Definition at line 27 of file SCT_FwdHybrid.h.

27{return m_material;}

◆ mountPointToInnerEdge()

double SCT_FwdHybrid::mountPointToInnerEdge ( ) const
inline

Definition at line 34 of file SCT_FwdHybrid.h.

◆ mountPointToOuterEdge()

double SCT_FwdHybrid::mountPointToOuterEdge ( ) const
inline

Definition at line 33 of file SCT_FwdHybrid.h.

◆ outerWidth()

double SCT_FwdHybrid::outerWidth ( ) const
inline

Definition at line 28 of file SCT_FwdHybrid.h.

28{ return m_outerWidth; }

◆ thickness()

double SCT_FwdHybrid::thickness ( ) const
inline

Definition at line 31 of file SCT_FwdHybrid.h.

31{ return m_thickness; }

Member Data Documentation

◆ m_detectorManager

InDetDD::SCT_DetectorManager* SCT_ComponentFactory::m_detectorManager
protectedinherited

Definition at line 41 of file SCT_ComponentFactory.h.

◆ m_geometryManager

SCT_GeometryManager* SCT_ComponentFactory::m_geometryManager
protectedinherited

Definition at line 42 of file SCT_ComponentFactory.h.

◆ m_innerWidth

double SCT_FwdHybrid::m_innerWidth = 0.0
private

Definition at line 45 of file SCT_FwdHybrid.h.

◆ m_length

double SCT_FwdHybrid::m_length = 0.0
private

Definition at line 48 of file SCT_FwdHybrid.h.

◆ m_length1

double SCT_FwdHybrid::m_length1 = 0.0
private

Definition at line 46 of file SCT_FwdHybrid.h.

◆ m_length2

double SCT_FwdHybrid::m_length2 = 0.0
private

Definition at line 52 of file SCT_FwdHybrid.h.

◆ m_material

const GeoMaterial* SCT_FwdHybrid::m_material = nullptr
private

Definition at line 58 of file SCT_FwdHybrid.h.

◆ m_materialName

std::string SCT_FwdHybrid::m_materialName
private

Definition at line 59 of file SCT_FwdHybrid.h.

◆ m_materials

SCT_MaterialManager* SCT_ComponentFactory::m_materials
protectedinherited

Definition at line 43 of file SCT_ComponentFactory.h.

◆ m_mountPointToInnerEdge

double SCT_FwdHybrid::m_mountPointToInnerEdge = 0.0
private

Definition at line 55 of file SCT_FwdHybrid.h.

◆ m_mountPointToOuterEdge

double SCT_FwdHybrid::m_mountPointToOuterEdge = 0.0
private

Definition at line 56 of file SCT_FwdHybrid.h.

◆ m_name

std::string SCT_ComponentFactory::m_name
privateinherited

Definition at line 49 of file SCT_ComponentFactory.h.

◆ m_outerWidth

double SCT_FwdHybrid::m_outerWidth = 0.0
private

Definition at line 43 of file SCT_FwdHybrid.h.

◆ m_physVolume

GeoVPhysVol* SCT_SharedComponentFactory::m_physVolume
protectedinherited

Definition at line 70 of file SCT_ComponentFactory.h.

◆ m_ringType

int SCT_FwdHybrid::m_ringType
private

Definition at line 41 of file SCT_FwdHybrid.h.

◆ m_thickness

double SCT_FwdHybrid::m_thickness = 0.0
private

Definition at line 49 of file SCT_FwdHybrid.h.

◆ m_thickness2

double SCT_FwdHybrid::m_thickness2 = 0.0
private

Definition at line 53 of file SCT_FwdHybrid.h.

◆ m_width2

double SCT_FwdHybrid::m_width2 = 0.0
private

Definition at line 51 of file SCT_FwdHybrid.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: