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
20inline double sqr(double x) {return x*x;}
21
22SCT_FwdOptoHarness::SCT_FwdOptoHarness(const std::string & name, int itype,
23 InDetDD::SCT_DetectorManager* detectorManager,
24 SCT_GeometryManager* geometryManager,
25 SCT_MaterialManager* materials)
26 : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials),
27 m_type(itype)
28{
31}
32
33
34void
36{
37 const SCT_ForwardParameters * parameters = m_geometryManager->forwardParameters();
38
39 m_index = -1;
40 for(int i=0; i<3; ++i) {
41 if(parameters->fwdOptoHarnessDiscType(i) == m_type) {m_index = i;}
42 }
43
44 if(m_index < 0) {
45 std::cout << "SCT_FwdOptoHarness: ERROR. Disc type is missing" << m_type << std::endl;
46 std::cout << "Assuming type 1" << std::endl;
47 m_index = 0;
48 }
49
50 m_materialName= parameters->fwdOptoHarnessMaterial(m_index);
51 m_innerRadius = parameters->fwdOptoHarnessInnerRadius(m_index);
52 m_outerRadius = parameters->fwdOptoHarnessOuterRadius(m_index);
53 m_thickness = parameters->fwdOptoHarnessThickness(m_index);
54}
55
56GeoVPhysVol *
58{
59 const GeoTube * optoHarnessShape = new GeoTube(m_innerRadius, m_outerRadius, 0.5 * m_thickness);
60 m_material = m_materials->getMaterialForVolume(m_materialName, optoHarnessShape->volume());
61 const GeoLogVol * optoHarnessLog = new GeoLogVol(getName(), optoHarnessShape, m_material);
62
63 GeoPhysVol * optoHarness = new GeoPhysVol(optoHarnessLog);
64
65 return optoHarness;
66}
#define sqr(t)
#define x
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)