ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_FwdOptoHarness.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/GeoTube.h"
13#include "GeoModelKernel/GeoLogVol.h"
14#include "GeoModelKernel/GeoPhysVol.h"
15#include "GaudiKernel/SystemOfUnits.h"
16
17#include <cmath>
18#include <iostream>
19
20SCT_FwdOptoHarness::SCT_FwdOptoHarness(const std::string & name, int itype,
21 InDetDD::SCT_DetectorManager* detectorManager,
22 SCT_GeometryManager* geometryManager,
23 SCT_MaterialManager* materials)
24 : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials),
25 m_type(itype)
26{
29}
30
31
32void
34{
35 const SCT_ForwardParameters * parameters = m_geometryManager->forwardParameters();
36
37 m_index = -1;
38 for(int i=0; i<3; ++i) {
39 if(parameters->fwdOptoHarnessDiscType(i) == m_type) {m_index = i;}
40 }
41
42 if(m_index < 0) {
43 std::cout << "SCT_FwdOptoHarness: ERROR. Disc type is missing" << m_type << std::endl;
44 std::cout << "Assuming type 1" << std::endl;
45 m_index = 0;
46 }
47
48 m_materialName= parameters->fwdOptoHarnessMaterial(m_index);
49 m_innerRadius = parameters->fwdOptoHarnessInnerRadius(m_index);
50 m_outerRadius = parameters->fwdOptoHarnessOuterRadius(m_index);
51 m_thickness = parameters->fwdOptoHarnessThickness(m_index);
52}
53
54GeoVPhysVol *
56{
57 const GeoTube * optoHarnessShape = new GeoTube(m_innerRadius, m_outerRadius, 0.5 * m_thickness);
58 m_material = m_materials->getMaterialForVolume(m_materialName, optoHarnessShape->volume());
59 const GeoLogVol * optoHarnessLog = new GeoLogVol(getName(), optoHarnessShape, m_material);
60
61 GeoPhysVol * optoHarness = new GeoPhysVol(optoHarnessLog);
62
63 return optoHarness;
64}
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_FwdOptoHarness(const std::string &name, int iType, 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)