ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_FwdModuleConnector.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6
8
11
12#include "GeoModelKernel/GeoBox.h"
13#include "GeoModelKernel/GeoLogVol.h"
14#include "GeoModelKernel/GeoPhysVol.h"
15#include "GeoModelKernel/GeoShape.h"
16#include "GeoModelKernel/GeoShapeShift.h"
17#include "GaudiKernel/SystemOfUnits.h"
18
19#include <cmath>
20
21SCT_FwdModuleConnector::SCT_FwdModuleConnector(const std::string & name, int ringType,
22 InDetDD::SCT_DetectorManager* detectorManager,
23 SCT_GeometryManager* geometryManager,
24 SCT_MaterialManager* materials)
25 : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials),
26 m_ringType(ringType)
27{
30}
31
32
33void
35{
36 const SCT_ForwardModuleParameters * parameters = m_geometryManager->forwardModuleParameters();
37
38 m_materialName= parameters->fwdModuleConnectorMaterial();
39 m_deltaR = parameters->fwdModuleConnectorDeltaR();
40 m_rphi = parameters->fwdModuleConnectorRPhi();
41 m_thickness = parameters->fwdModuleConnectorThickness();
42}
43
44GeoVPhysVol *
46{
47 const SCT_ForwardModuleParameters * parameters = m_geometryManager->forwardModuleParameters();
48
49 // Construct box
50 const GeoBox * moduleConnShape = new GeoBox(0.5 * m_thickness, 0.5 * m_rphi, 0.5 * m_deltaR);
51 m_material = m_materials->getMaterialForVolume(m_materialName, moduleConnShape->volume());
52
53 // Shift to correct position within module
54 double xposition = 0.5 * (parameters->fwdHybridThickness() + m_thickness);
55 double zposition = parameters->fwdModuleMountPoint(m_ringType) - parameters->fwdHybridMountPointToInnerEdge() + parameters->fwdHybridLength() - 0.5*(m_deltaR);
56 if (m_ringType == 0) { zposition = -1 * zposition; }; // outer module, hybrid in inner side
57 const GeoShape & connectorPos = (*moduleConnShape << GeoTrf::Translate3D(xposition,0.,zposition));
58
59
60 const GeoLogVol * moduleConnLog = new GeoLogVol(getName(), &connectorPos, m_material);
61
62 GeoPhysVol * moduleConnector = new GeoPhysVol(moduleConnLog);
63
64 return moduleConnector;
65}
Dedicated detector manager extending the functionality of the SiDetectorManager with dedicated SCT in...
const std::string & getName() const
SCT_GeometryManager * m_geometryManager
SCT_MaterialManager * m_materials
virtual GeoVPhysVol * build()
SCT_FwdModuleConnector(const std::string &name, int ringType, InDetDD::SCT_DetectorManager *detectorManager, SCT_GeometryManager *geometryManager, SCT_MaterialManager *materials)
const GeoMaterial * m_material
SCT_SharedComponentFactory(const std::string &name, InDetDD::SCT_DetectorManager *detectorManager, SCT_GeometryManager *geometryManager, SCT_MaterialManager *materials=nullptr)