ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetDetDescr
SCT_GeoModel
src
SCT_FwdSubSpine.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
// Simulation for the COMBINED TESTBEAM 2004 //
7
// //
8
// Zdenka.Broklova@matfyz.cz //
9
// Carlos.Escobar@ific.uv.es //
10
// Peter.Kodys@ific.uv.es //
11
// January 23, 2004 //
13
14
#include "
SCT_FwdSubSpine.h
"
15
16
#include "
SCT_MaterialManager.h
"
17
18
#include "
SCT_GeometryManager.h
"
19
#include "
SCT_ForwardModuleParameters.h
"
20
21
#include "GeoModelKernel/GeoBox.h"
22
#include "GeoModelKernel/GeoLogVol.h"
23
#include "GeoModelKernel/GeoPhysVol.h"
24
#include "GeoModelKernel/GeoShape.h"
25
#include "GeoModelKernel/GeoShapeShift.h"
26
#include "GeoModelKernel/GeoShapeUnion.h"
27
28
#include "GeoModelKernel/Units.h"
29
30
#include "GeoModelKernel/GeoDefinitions.h"
31
32
33
34
#include <cmath>
35
36
37
SCT_FwdSubSpine::SCT_FwdSubSpine
(
const
std::string & name,
38
int
ringType,
int
spineSide,
39
InDetDD::SCT_DetectorManager
* detectorManager,
40
SCT_GeometryManager
* geometryManager,
41
SCT_MaterialManager
* materials)
42
:
SCT_SharedComponentFactory
(name, detectorManager, geometryManager, materials),
43
m_ringType
(ringType),
m_spineSide
(spineSide)
44
{
45
getParameters
();
46
m_physVolume
=
SCT_FwdSubSpine::build
();
47
}
48
49
50
51
void
52
SCT_FwdSubSpine::getParameters
()
53
{
54
const
SCT_ForwardModuleParameters
* parameters =
m_geometryManager
->forwardModuleParameters();
55
56
m_material
=
m_materials
->getMaterial(parameters->fwdSubSpineMaterial(
m_ringType
));
57
58
// Width is in direction of module width (ie long axis of arm)
59
// Length is in direction of module length (ie short axis of arm)
60
61
//Inner subspine
62
m_thickness1
= parameters->fwdSpineThickness(
m_ringType
);
63
m_width1
= parameters->fwdSubSpineInnerWidth(
m_ringType
);
64
m_length1
= parameters->fwdSubSpineInnerLength(
m_ringType
);
65
//Middle subspine
66
m_thickness2
= parameters->fwdSpineThickness(
m_ringType
);
67
m_width2
= parameters->fwdSubSpineMiddleWidth(
m_ringType
);
68
m_length2
= parameters->fwdSubSpineMiddleLength(
m_ringType
);
69
//Outer subspine
70
m_thickness3
= parameters->fwdSpineThickness(
m_ringType
);
71
m_width3
= parameters->fwdSubSpineOuterWidth(
m_ringType
);
72
m_length3
= parameters->fwdSubSpineOuterLength(
m_ringType
);
73
}
74
75
GeoVPhysVol *
SCT_FwdSubSpine::build
()
76
{
77
// x,y,z are in the geomodel module coordinates
78
79
const
SCT_ForwardModuleParameters
* parameters =
m_geometryManager
->forwardModuleParameters();
80
81
const
GeoBox * spineShape1 =
new
GeoBox(
m_thickness1
/2.,
m_width1
/2.,
m_length1
/2.);
82
const
GeoBox * spineShape2 =
nullptr
;
83
if
(
m_ringType
!= 3) spineShape2 =
new
GeoBox(
m_thickness2
/2.,
m_width2
/2.,
m_length2
/2.);
84
const
GeoBox * spineShape3 =
new
GeoBox(
m_thickness3
/2.,
m_width3
/2.,
m_length3
/2.);
85
86
87
double
position, position2;
88
89
int
HybPos;
90
91
if
(
m_ringType
== 0) { HybPos = -1; }
// outer module, hybrid in inner side
92
else
{ HybPos = 1; }
//hybrid in outer side
93
94
95
double
widthMain = parameters->fwdSpineWidth(
m_ringType
);
// width of main spine
96
97
98
const
GeoShape * subSpineMiddle =
nullptr
;
99
100
// Inner sub spine
101
double
mountPosition = parameters->fwdModuleMountPoint(
m_ringType
);
// mount point to physics center
102
position = mountPosition - parameters->fwdSubSpineInnerRefDist(
m_ringType
) - 0.5*
m_length1
;
103
position = position * HybPos;
104
position2 = (widthMain +
m_width1
) / 2.;
105
const
GeoShape & spinePos1 = (*spineShape1 << GeoTrf::TranslateY3D(
m_spineSide
* position2) << GeoTrf::TranslateZ3D(position) );
106
107
108
// Middle sub spine
109
// Not defined for inner module.
110
if
(
m_ringType
!= 3) {
111
position = mountPosition - parameters->fwdSubSpineMiddleRefDist(
m_ringType
) - 0.5*
m_length2
;
112
position = position * HybPos;
113
position2 = (widthMain +
m_width2
) / 2.;
114
const
GeoShape & spinePos2 = (*spineShape2 << GeoTrf::TranslateY3D(
m_spineSide
* position2) << GeoTrf::TranslateZ3D(position) );
115
subSpineMiddle = &spinePos2;
116
}
117
118
// Outer sub spine
119
position = mountPosition - parameters->fwdSubSpineOuterRefDist(
m_ringType
) - 0.5*
m_length3
;
120
position = position * HybPos;
121
position2 = (widthMain +
m_width3
) / 2.;
122
const
GeoShape & spinePos3 = (*spineShape3 << GeoTrf::TranslateY3D(
m_spineSide
* position2) << GeoTrf::TranslateZ3D(position) );
123
124
const
GeoShapeUnion & spineTmp = (spinePos1).
add
(spinePos3);
125
GeoLogVol * spineLog =
nullptr
;
126
if
(
m_ringType
!= 3) {
127
const
GeoShapeUnion & spineTmp2 = spineTmp.add(*subSpineMiddle);
128
spineLog =
new
GeoLogVol(
getName
(), &spineTmp2,
m_material
);
129
}
else
{
130
spineLog =
new
GeoLogVol(
getName
(), &spineTmp,
m_material
);
131
}
132
133
GeoPhysVol * spine =
new
GeoPhysVol(spineLog);
134
135
return
spine;
136
}
SCT_ForwardModuleParameters.h
SCT_FwdSubSpine.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_ForwardModuleParameters
Definition
SCT_ForwardModuleParameters.h:12
SCT_FwdSubSpine::m_length2
double m_length2
Definition
SCT_FwdSubSpine.h:59
SCT_FwdSubSpine::m_width3
double m_width3
Definition
SCT_FwdSubSpine.h:62
SCT_FwdSubSpine::m_width2
double m_width2
Definition
SCT_FwdSubSpine.h:58
SCT_FwdSubSpine::getParameters
void getParameters()
Definition
SCT_FwdSubSpine.cxx:52
SCT_FwdSubSpine::m_thickness1
double m_thickness1
Definition
SCT_FwdSubSpine.h:53
SCT_FwdSubSpine::m_ringType
int m_ringType
Definition
SCT_FwdSubSpine.h:49
SCT_FwdSubSpine::m_spineSide
int m_spineSide
Definition
SCT_FwdSubSpine.h:50
SCT_FwdSubSpine::m_thickness3
double m_thickness3
Definition
SCT_FwdSubSpine.h:61
SCT_FwdSubSpine::m_width1
double m_width1
Definition
SCT_FwdSubSpine.h:54
SCT_FwdSubSpine::SCT_FwdSubSpine
SCT_FwdSubSpine(const std::string &name, int ringType, int spineSide, InDetDD::SCT_DetectorManager *detectorManager, SCT_GeometryManager *geometryManager, SCT_MaterialManager *materials)
Definition
SCT_FwdSubSpine.cxx:37
SCT_FwdSubSpine::m_length3
double m_length3
Definition
SCT_FwdSubSpine.h:63
SCT_FwdSubSpine::m_material
const GeoMaterial * m_material
Definition
SCT_FwdSubSpine.h:51
SCT_FwdSubSpine::m_length1
double m_length1
Definition
SCT_FwdSubSpine.h:55
SCT_FwdSubSpine::m_thickness2
double m_thickness2
Definition
SCT_FwdSubSpine.h:57
SCT_FwdSubSpine::build
virtual GeoVPhysVol * build()
Definition
SCT_FwdSubSpine.cxx:75
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
add
bool add(const std::string &hname, TKey *tobj)
Definition
fastadd.cxx:55
Generated on
for ATLAS Offline Software by
1.17.0