ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_FwdHybrid.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_FwdHybrid.h"
15#include "SCT_MaterialManager.h"
16
17#include "SCT_GeometryManager.h"
19
20#include "GeoModelKernel/GeoTrd.h"
21#include "GeoModelKernel/GeoBox.h"
22#include "GeoModelKernel/GeoLogVol.h"
23#include "GeoModelKernel/GeoShape.h"
24#include "GeoModelKernel/GeoShapeShift.h"
25#include "GeoModelKernel/GeoShapeUnion.h"
26#include "GeoModelKernel/GeoPhysVol.h"
27#include "GeoModelKernel/GeoNameTag.h"
28#include "GeoModelKernel/GeoTransform.h"
29#include "GeoModelKernel/GeoAlignableTransform.h"
30#include "GeoModelKernel/GeoMaterial.h"
31#include "GaudiKernel/SystemOfUnits.h"
32
33#include "GeoModelKernel/GeoDefinitions.h"
34
35#include <cmath>
36
37
38SCT_FwdHybrid::SCT_FwdHybrid(const std::string & name, int ringType,
39 InDetDD::SCT_DetectorManager* detectorManager,
40 SCT_GeometryManager* geometryManager,
41 SCT_MaterialManager* materials)
42 : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials),
43 m_ringType(ringType)
44{
47}
48
49
50
51void
53{
54
55 const SCT_ForwardModuleParameters * parameters = m_geometryManager->forwardModuleParameters();
56
57 m_materialName = parameters->fwdHybridMaterial();
58
59 //double Gaudi::Units::radlength;
60 //Gaudi::Units::radlength = 18.8 * Gaudi::Units::cm;
61 // [Gaudi::Units::cm] for carbon (Partickle Physics Booklet)
62
63 m_thickness = parameters->fwdHybridThickness();
65
66 m_length = parameters->fwdHybridLength();
67
68 // TRD part
69 m_innerWidth = parameters->fwdHybridInnerWidth();
70 m_outerWidth = parameters->fwdHybridOuterWidth(); // Width at outer edge
71 m_length1 = parameters->fwdHybridLengthToCorner();
72
73 // rectangular part.
74 m_length2 = m_length - parameters->fwdHybridLengthToCorner();
76
78
79 m_mountPointToInnerEdge = parameters->fwdHybridMountPointToInnerEdge();
81
82}
83
84GeoVPhysVol * SCT_FwdHybrid::build()
85{
86
87 const SCT_ForwardModuleParameters * parameters = m_geometryManager->forwardModuleParameters();
88
89 // Make a hybrid. This is a TRD + BOX
90 const GeoTrd * hybridShape1 = new GeoTrd(0.5 * m_thickness, 0.5 * m_thickness,
91 0.5 * m_innerWidth, 0.5 * m_outerWidth,
92 0.5 * m_length1);
93
94 const GeoBox * hybridShape2 = new GeoBox(0.5 * m_thickness2, 0.5 * m_width2, 0.5 * m_length2);
95
96 double position = parameters->fwdModuleMountPoint(m_ringType) - (m_mountPointToInnerEdge)
97 + 0.5*(m_length2);
98 // double position = zsmi[m_ringType].mountd - zhyb->hybysh + (zhyb->hyby - zhyb->hybycor) / 2.;
99 if (m_ringType == 0) { position = -1 * position; }; // outer module, hybrid in inner side
100
101 const GeoShape & hybridPos1 = (*hybridShape2 << GeoTrf::TranslateZ3D(position));
102
103 position = parameters->fwdModuleMountPoint(m_ringType) - (m_mountPointToInnerEdge)
104 + m_length - 0.5 * parameters->fwdHybridLengthToCorner();
105 // position = zsmi[m_ringType].mountd - zhyb->hybysh + zhyb->hyby - zhyb->hybycor / 2.;
106 if (m_ringType == 0) { // outer module, hybrid in inner side
107 position = -1 * position; };
108
109 double rotation = 0.;
110 if (m_ringType == 0) rotation = 180. * Gaudi::Units::deg;
111
112 const GeoShape & hybridPos2 = (*hybridShape1 << GeoTrf::RotateX3D(rotation)
113 << GeoTrf::TranslateZ3D(position) );
114
115 const GeoShapeUnion & hybridShape = hybridPos1.add(hybridPos2);
116 // error getting volume directly.
117 m_material = m_materials->getMaterialForVolume(m_materialName, hybridShape1->volume()+hybridShape2->volume());
118 const GeoLogVol * hybridLog = new GeoLogVol(getName(), &hybridShape, m_material);
119 GeoPhysVol * hybrid = new GeoPhysVol(hybridLog);
120
121 return hybrid;
122
123}
124
125
126
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()
std::string m_materialName
double m_outerWidth
double m_mountPointToInnerEdge
const GeoMaterial * m_material
SCT_FwdHybrid(const std::string &name, int ringType, InDetDD::SCT_DetectorManager *detectorManager, SCT_GeometryManager *geometryManager, SCT_MaterialManager *materials)
double m_innerWidth
double m_thickness2
double m_mountPointToOuterEdge
SCT_SharedComponentFactory(const std::string &name, InDetDD::SCT_DetectorManager *detectorManager, SCT_GeometryManager *geometryManager, SCT_MaterialManager *materials=nullptr)