25 {
26
28
30 moduleCage.Build();
31 return nullptr;
32 }
33
34 double safety = 0.005*Gaudi::Units::mm;
35
36
38
39
40 double telescopeX =
m_gmt_mgr->DBMTelescopeX();
41 double telescopeY =
m_gmt_mgr->DBMTelescopeY();
42 double telescopeZ =
m_gmt_mgr->DBMTelescopeZ();
43
44
45
46 double layerUnitY =
m_gmt_mgr->DBMModuleCageY();
47 double layerUnitZ =
m_gmt_mgr->DBMModuleCageZ();
48
49
50 double bracketX =
m_gmt_mgr->DBMBracketX();
51 double bracketY =
m_gmt_mgr->DBMBracketY();
52 double bracketZ =
m_gmt_mgr->DBMBracketZ();
53
54 double trapBack_theta =
m_gmt_mgr->DBMTrapezBackTheta();
55 double trapBackX =
m_gmt_mgr->DBMTrapezBackX();
56 double trapBackY =
m_gmt_mgr->DBMTrapezBackY();
57 double trapBackShortZ =
m_gmt_mgr->DBMTrapezBackShortZ();
58
59 double brcktWindowX =
m_gmt_mgr->DBMBrcktWindowX();
60 double brcktWindowY =
m_gmt_mgr->DBMBrcktWindowY();
61 double brcktWindow_offset =
m_gmt_mgr->DBMBrcktWindowOffset();
62 double brcktWindow_centerZ =
m_gmt_mgr->DBMBrcktWindowCenterZ();
63
64 double brcktTopBlockZ =
m_gmt_mgr->DBMBrcktTopBlockZ();
65 double brcktSideBlockX =
m_gmt_mgr->DBMBrcktSideBlockX();
66 double brcktSideBlockY =
m_gmt_mgr->DBMBrcktSideBlockY();
68 double brcktLockZ =
m_gmt_mgr->DBMBrcktLockZ();
69 double brcktLockY =
m_gmt_mgr->DBMBrcktLockY();
70
71
72 double coolingSidePlateX =
m_gmt_mgr->DBMCoolingSidePlateX();
73 double coolingSidePlateY =
m_gmt_mgr->DBMCoolingSidePlateY();
74 double coolingSidePlateZ =
m_gmt_mgr->DBMCoolingSidePlateZ();
75
76
77 double coolingSidePlatePos =
m_gmt_mgr->DBMCoolingSidePlatePos();
78
79 double coolingFinLongZ =
m_gmt_mgr->DBMBrcktFinLongZ();
80 double coolingFinHeight =
m_gmt_mgr->DBMBrcktFinHeight();
81 double coolingFinThick =
m_gmt_mgr->DBMBrcktFinThick();
82 double coolingFinPos =
m_gmt_mgr->DBMBrcktFinPos();
83
84 double mainPlateX =
m_gmt_mgr->DBMMainPlateX();
85
86
87 const GeoMaterial* air =
m_mat_mgr->getMaterial(
"std::Air");
88
89
90 const GeoBox* telescopeBox = new GeoBox(telescopeX/2. + 3*safety, telescopeY/2.+ safety, telescopeZ/2.);
91 const GeoLogVol* telescopeLog = new GeoLogVol("dbmTelescopeLog", telescopeBox, air);
92 GeoPhysVol* telescopePhys = new GeoPhysVol(telescopeLog);
93
94 GeoTrf::RotateX3D rmX10(-10.*Gaudi::Units::deg);
95
96 GeoVPhysVol* moduleCagePhys = moduleCage.Build();
97
98
99 double lyRadius = sqrt(layerUnitY*layerUnitY/4 + layerUnitZ*layerUnitZ/4);
100 double lyAngle =
atan(layerUnitY/layerUnitZ);
101
102 double layerUnitPos_Y = (trapBackY/
cos(
angle) - coolingSidePlateY)*
cos(
angle);
103 double layerUnitPos_Z = coolingSidePlateY*
sin(
angle) + trapBackShortZ + bracketZ - brcktLockZ;
104
105 GeoTrf::Translation3D layerUnitPos( 0.0, -telescopeY/2. + layerUnitPos_Y + lyRadius *
sin(lyAngle+
angle), -telescopeZ/2. + layerUnitPos_Z + lyRadius *
cos(lyAngle+
angle) + 3*safety);
106 GeoTransform* xform = new GeoTransform(GeoTrf::Transform3D(layerUnitPos*rmX10));
107 GeoNameTag*
tag =
new GeoNameTag(
"dbm3layers");
108 telescopePhys->add(tag);
109 telescopePhys->add(xform);
110 telescopePhys->add(moduleCagePhys);
111
112
113
114
115
116
117 const GeoTrap* trapBack =
new GeoTrap(trapBackY/2., trapBack_theta, 90.0*Gaudi::Units::deg, trapBackShortZ/2., trapBackX/2., trapBackX/2, 0.0, (trapBackShortZ+trapBackY*
tan(
angle))/2., trapBackX/2., trapBackX/2., 0.0);
118
119 double brWindowPosY = brcktWindow_offset + brcktWindow_centerZ *
tan(
angle) + brcktWindowY/(2 *
cos(
angle));
120 const GeoBox* brWindow = new GeoBox(brcktWindowX/2., trapBackShortZ, brcktWindowY/2.);
121 GeoTrf::Translation3D brWindowPos(0., 0., trapBackY/2. - brWindowPosY);
122 GeoTrf::Transform3D brWindowShift(brWindowPos*rmX10);
123
124 const GeoShapeSubtraction& trapBack1 = trapBack->subtract(((*brWindow) << brWindowShift));
125
126
127
128
129
130
131
132 const static double vol = trapBack1.GeoShape::volume();
133 const GeoMaterial* dbmPeek4 =
m_mat_mgr->getMaterialForVolume(
"pix::DBMPeek4",vol);
134 const GeoLogVol* trapBackLog = new GeoLogVol("bracketLog", &trapBack1, dbmPeek4);
135 GeoPhysVol* trapBackPhys = new GeoPhysVol(trapBackLog);
136
137 GeoTrf::RotateX3D rmX90(90.*Gaudi::Units::deg);
138 double trapBackPos_Z = -telescopeZ/2. + bracketZ - brcktLockZ + ( (trapBackShortZ+trapBackY*
tan(
angle))/2. + trapBackY/2.*
sin(trapBack_theta) - trapBackY*
tan(trapBack_theta) );
139 GeoTrf::Translation3D trapBackPos(0.0, -telescopeY/2. + trapBackY/2. + safety, trapBackPos_Z + 3*safety);
140 xform = new GeoTransform(GeoTrf::Transform3D(trapBackPos*rmX90));
141 tag =
new GeoNameTag(
"trapBack");
142 telescopePhys->add(tag);
143 telescopePhys->add(xform);
144 telescopePhys->add(trapBackPhys);
145
146
147 const GeoBox* brcktTopBlock = new GeoBox(bracketX/2., (bracketY - brcktSideBlockY)/2., brcktTopBlockZ/2.);
148 const GeoMaterial* dbmPeekAluminium =
m_mat_mgr->getMaterialForVolume(
"pix::DBMPeekAl",brcktTopBlock->volume());
149 const GeoLogVol* brcktTopBlockLog = new GeoLogVol("bracketLog", brcktTopBlock, dbmPeekAluminium);
150 GeoPhysVol* brcktTopBlockPhys = new GeoPhysVol(brcktTopBlockLog);
151
152 GeoTrf::Translate3D brcktTopBlockPos( 0., -telescopeY/2. + brcktSideBlockY + (bracketY - brcktSideBlockY)/2.+2*safety, -telescopeZ/2. + brcktTopBlockZ/2.);
153 xform = new GeoTransform(brcktTopBlockPos);
154 tag =
new GeoNameTag(
"brcktTopBlock");
155 telescopePhys->add(tag);
156 telescopePhys->add(xform);
157 telescopePhys->add(brcktTopBlockPhys);
158
159
160 const GeoBox* brcktSideBlock = new GeoBox(brcktSideBlockX/2., brcktSideBlockY/2., brcktTopBlockZ/2.);
161 const GeoMaterial* dbmPeek2 =
m_mat_mgr->getMaterialForVolume(
"pix::DBMPeek2",brcktSideBlock->volume());
162 const GeoLogVol* brcktSideLog = new GeoLogVol("brcktSideLog", brcktSideBlock, dbmPeek2);
163 GeoPhysVol* brcktSidePhys = new GeoPhysVol(brcktSideLog);
164
165 GeoTrf::Translate3D brcktSidePos1( bracketX/2. - brcktSideBlockX/2., -telescopeY/2. + brcktSideBlockY/2.+safety, -telescopeZ/2. + brcktTopBlockZ/2.);
166 xform = new GeoTransform(brcktSidePos1);
167 tag =
new GeoNameTag(
"brcktSideBlock");
168 telescopePhys->add(tag);
169 telescopePhys->add(xform);
170 telescopePhys->add(brcktSidePhys);
171
172 GeoTrf::Translate3D brcktSidePos2( -bracketX/2. + brcktSideBlockX/2., -telescopeY/2. + brcktSideBlockY/2. + safety, -telescopeZ/2. + brcktTopBlockZ/2.);
173 xform = new GeoTransform(brcktSidePos2);
174 tag =
new GeoNameTag(
"brcktSideBlock");
175 telescopePhys->add(tag);
176 telescopePhys->add(xform);
177 telescopePhys->add(brcktSidePhys);
178
179
180 const GeoBox* brcktLock = new GeoBox(bracketX/2., brcktLockY/2.-safety, brcktLockZ/2.-safety);
181 const GeoMaterial* dbmPeek3 =
m_mat_mgr->getMaterialForVolume(
"pix::DBMPeek3",brcktLock->volume());
182 const GeoLogVol* brcktLockLog = new GeoLogVol("bracketLog", brcktLock, dbmPeek3);
183 GeoPhysVol* brcktLockPhys = new GeoPhysVol(brcktLockLog);
184
185 GeoTrf::Translate3D brcktLockPos( 0., -telescopeY/2. + trapBackY + brcktLockY/2. + 2*safety, -telescopeZ/2. + bracketZ - brcktLockZ/2. + safety);
186 xform = new GeoTransform(brcktLockPos);
187 tag =
new GeoNameTag(
"brcktLock");
188 telescopePhys->add(tag);
189 telescopePhys->add(xform);
190 telescopePhys->add(brcktLockPhys);
191
192
193
194 const GeoBox* sidePlate = new GeoBox(coolingSidePlateX/2., coolingSidePlateY/2., coolingSidePlateZ/2.);
195 const GeoMaterial* dbmAluminium2 =
m_mat_mgr->getMaterialForVolume(
"pix::DBMAluminium2", sidePlate->volume());
196 const GeoLogVol* sidePlateLog = new GeoLogVol("sidePlateLog", sidePlate, dbmAluminium2);
197 GeoPhysVol* sidePlatePhys = new GeoPhysVol(sidePlateLog);
198
199 double spAngle =
angle + 17.57126*Gaudi::Units::deg;
200 double spRadius = 1/2. * sqrt(coolingSidePlateZ*coolingSidePlateZ + coolingSidePlateY*coolingSidePlateY);
201
202 GeoTrf::Translation3D sidePlatePos1( mainPlateX/2. + coolingSidePlateX/2. + 2*safety, - telescopeY/2. + spRadius *
sin(spAngle), -telescopeZ/2. + layerUnitPos_Z - coolingSidePlatePos*
cos(
angle) + spRadius *
cos(spAngle));
203 xform = new GeoTransform(GeoTrf::Transform3D(sidePlatePos1*rmX10));
204 tag =
new GeoNameTag(
"sidePlate");
205 telescopePhys->add(tag);
206 telescopePhys->add(xform);
207 telescopePhys->add(sidePlatePhys);
208
209 GeoTrf::Translation3D sidePlatePos2( -mainPlateX/2. - coolingSidePlateX/2. - 2*safety, - telescopeY/2. + spRadius *
sin(spAngle), -telescopeZ/2. + layerUnitPos_Z - coolingSidePlatePos*
cos(
angle) + spRadius *
cos(spAngle));
210 xform = new GeoTransform(GeoTrf::Transform3D(sidePlatePos2*rmX10));
211 tag =
new GeoNameTag(
"sidePlate");
212 telescopePhys->add(tag);
213 telescopePhys->add(xform);
214 telescopePhys->add(sidePlatePhys);
215
216
217 const GeoTrap* coolingFin =
new GeoTrap(coolingFinHeight/2., trapBack_theta, 90.0*Gaudi::Units::deg, (coolingFinLongZ - coolingFinHeight*
tan(
angle))/2., coolingFinThick/2., coolingFinThick/2, 0.0, coolingFinLongZ/2., coolingFinThick/2., coolingFinThick/2., 0.0);
218 const GeoMaterial* dbmAluminium3 =
m_mat_mgr->getMaterialForVolume(
"pix::DBMAluminium3", coolingFin->volume());
219 const GeoLogVol* finLog = new GeoLogVol("finLog", coolingFin, dbmAluminium3);
220 GeoPhysVol* coolingFinPhys = new GeoPhysVol(finLog);
221
222 GeoTrf::Translation3D finPos1( mainPlateX/2. - coolingFinThick/2. + safety, -telescopeY/2. + coolingFinHeight/2. + 4*safety, -telescopeZ/2. + coolingFinPos + 0.05*Gaudi::Units::mm);
223 xform = new GeoTransform(GeoTrf::Transform3D(finPos1*rmX90));
224 tag =
new GeoNameTag(
"finPlate");
225 telescopePhys->add(tag);
226 telescopePhys->add(xform);
227 telescopePhys->add(coolingFinPhys);
228
229 GeoTrf::Translation3D finPos2( -mainPlateX/2. + coolingFinThick/2. - safety, -telescopeY/2. + coolingFinHeight/2. + 4*safety, -telescopeZ/2. + coolingFinPos + 0.05*Gaudi::Units::mm);
230 xform = new GeoTransform(GeoTrf::Transform3D(finPos2*rmX90));
231 tag =
new GeoNameTag(
"finPlate");
232 telescopePhys->add(tag);
233 telescopePhys->add(xform);
234 telescopePhys->add(coolingFinPhys);
235
236
237 return telescopePhys;
238
239}
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
std::shared_ptr< std::map< std::string, GeoFullPhysVol * > > m_mapFPV
std::shared_ptr< std::map< std::string, GeoAlignableTransform * > > m_mapAX
GeoModelIO::ReadGeoModel * m_sqliteReader
PixelGeometryManager * m_gmt_mgr
InDetDD::PixelDetectorManager * m_DDmgr
InDetMaterialManager * m_mat_mgr