ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetDetDescr
SCT_GeoModel
src
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
5
#include "
SCT_FwdOptoHarness.h
"
6
7
#include "
SCT_MaterialManager.h
"
8
9
#include "
SCT_GeometryManager.h
"
10
#include "
SCT_ForwardParameters.h
"
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
20
SCT_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
{
27
getParameters
();
28
m_physVolume
=
SCT_FwdOptoHarness::build
();
29
}
30
31
32
void
33
SCT_FwdOptoHarness::getParameters
()
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
54
GeoVPhysVol *
55
SCT_FwdOptoHarness::build
()
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
}
SCT_ForwardParameters.h
SCT_FwdOptoHarness.h
SCT_GeometryManager.h
SCT_MaterialManager.h
InDetDD::SCT_DetectorManager
Dedicated detector manager extending the functionality of the SiDetectorManager with dedicated SCT in...
Definition
SCT_DetectorManager.h:50
SCT_ComponentFactory::getName
const std::string & getName() const
Definition
SCT_ComponentFactory.h:35
SCT_ComponentFactory::m_geometryManager
SCT_GeometryManager * m_geometryManager
Definition
SCT_ComponentFactory.h:39
SCT_ComponentFactory::m_materials
SCT_MaterialManager * m_materials
Definition
SCT_ComponentFactory.h:40
SCT_ForwardParameters
Definition
SCT_ForwardParameters.h:16
SCT_FwdOptoHarness::build
virtual GeoVPhysVol * build()
Definition
SCT_FwdOptoHarness.cxx:55
SCT_FwdOptoHarness::m_thickness
double m_thickness
Definition
SCT_FwdOptoHarness.h:38
SCT_FwdOptoHarness::m_index
int m_index
Definition
SCT_FwdOptoHarness.h:42
SCT_FwdOptoHarness::m_outerRadius
double m_outerRadius
Definition
SCT_FwdOptoHarness.h:37
SCT_FwdOptoHarness::SCT_FwdOptoHarness
SCT_FwdOptoHarness(const std::string &name, int iType, InDetDD::SCT_DetectorManager *detectorManager, SCT_GeometryManager *geometryManager, SCT_MaterialManager *materials)
Definition
SCT_FwdOptoHarness.cxx:20
SCT_FwdOptoHarness::getParameters
void getParameters()
Definition
SCT_FwdOptoHarness.cxx:33
SCT_FwdOptoHarness::m_innerRadius
double m_innerRadius
Definition
SCT_FwdOptoHarness.h:36
SCT_FwdOptoHarness::m_materialName
std::string m_materialName
Definition
SCT_FwdOptoHarness.h:40
SCT_FwdOptoHarness::m_type
int m_type
Definition
SCT_FwdOptoHarness.h:34
SCT_FwdOptoHarness::m_material
const GeoMaterial * m_material
Definition
SCT_FwdOptoHarness.h:39
SCT_GeometryManager
Definition
SCT_GeometryManager.h:25
SCT_MaterialManager
Definition
SCT_MaterialManager.h:21
SCT_SharedComponentFactory::m_physVolume
GeoVPhysVol * m_physVolume
Definition
SCT_ComponentFactory.h:66
SCT_SharedComponentFactory::SCT_SharedComponentFactory
SCT_SharedComponentFactory(const std::string &name, InDetDD::SCT_DetectorManager *detectorManager, SCT_GeometryManager *geometryManager, SCT_MaterialManager *materials=nullptr)
Definition
SCT_ComponentFactory.h:56
Generated on
for ATLAS Offline Software by
1.17.0