21 {
22
23
25 GeoPhysVol* containerPhys{nullptr};
26
28 for (
int i = 0;
i < 3;
i++) {
29
30
31
34 module.Build();
35 }
36 }
37 else {
38
39
40 double safety = 0.005*Gaudi::Units::mm;
41
42
43 double layerUnitY =
m_gmt_mgr->DBMModuleCageY();
44 double layerUnitZ =
m_gmt_mgr->DBMModuleCageZ();
45
46
47 double Zspacing =
m_gmt_mgr->DBMSpacingZ();
48 double Rspacing =
m_gmt_mgr->DBMSpacingRadial();
49
50 double layer1Space =
m_gmt_mgr->DBMSpace();
51
52
53 double mainPlateX =
m_gmt_mgr->DBMMainPlateX();
54 double mainPlateY =
m_gmt_mgr->DBMMainPlateY();
55 double mainPlateZ =
m_gmt_mgr->DBMMainPlateZ();
56 double mPlateWindowX =
m_gmt_mgr->DBMMPlateWindowWidth();
57 double mPlateWindowY =
m_gmt_mgr->DBMMPlateWindowHeight();
58 double mPlateWindowPos =
m_gmt_mgr->DBMMPlateWindowPos();
59
60
61 double diamondZ =
m_gmt_mgr->DBMDiamondZ();
63 double ceramicY =
m_gmt_mgr->DBMCeramicY();
64 double ceramicZ =
m_gmt_mgr->DBMCeramicZ();
65 double moduleAirGap =
m_gmt_mgr->DBMAirGap();
67
68
69 double flexSupportX =
m_gmt_mgr->DBMFlexSupportX();
70 double flexSupportY =
m_gmt_mgr->DBMFlexSupportY();
71 double flexSupportZ =
m_gmt_mgr->DBMFlexSupportZ();
72 double flexSupportOffset =
m_gmt_mgr->DBMFlexSupportOffset();
73
74
75 double rodRadius =
m_gmt_mgr->DBMRodRadius();
76 double mPlateRod2RodY =
m_gmt_mgr->DBMMPlateRod2RodY();
77 double mPlateRod2RodX =
m_gmt_mgr->DBMMPlateRod2RodX();
78
79
80 const GeoMaterial* air =
m_mat_mgr->getMaterial(
"std::Air");
81 const GeoMaterial* aluminium =
m_mat_mgr->getMaterial(
"std::Aluminium");
82 const GeoMaterial* DBMRod_mat =
m_mat_mgr->getMaterial(
"pix::DBMRod");
83
84
85 const GeoBox* containerBox = new GeoBox(mainPlateX/2. + safety, layerUnitY/2. + safety, layerUnitZ/2.);
86 const GeoLogVol* containerLog = new GeoLogVol("dbmTelescopeLog", containerBox, air);
87 containerPhys = new GeoPhysVol(containerLog);
88
89
90
91 const GeoBox* mPSide = new GeoBox((mainPlateX - mPlateWindowX)/4., mainPlateY/2., mainPlateZ/2.);
92 const GeoMaterial* dbmAluminium1 =
m_mat_mgr->getMaterialForVolume(
"pix::DBMAluminium1", mPSide->volume());
93 const GeoLogVol* mPSideLog = new GeoLogVol("dbmWallLogPlt", mPSide, dbmAluminium1);
94 GeoPhysVol* mPSidePhys = new GeoPhysVol(mPSideLog);
95
96 const GeoBox* mPCenterBot = new GeoBox(mPlateWindowX/2., mPlateWindowPos/2., mainPlateZ/2.);
97 const GeoLogVol* mPCenterBotLog = new GeoLogVol("dbmWallLogPlt", mPCenterBot, aluminium);
98 GeoPhysVol* mPCenterBotPhys = new GeoPhysVol(mPCenterBotLog);
99
100 const GeoBox* mPCenterTop = new GeoBox(mPlateWindowX/2., (mainPlateY - mPlateWindowY - mPlateWindowPos)/2., mainPlateZ/2.);
101 const GeoLogVol* mPCenterTopLog = new GeoLogVol("dbmWallLogPlt", mPCenterTop, aluminium);
102 GeoPhysVol* mPCenterTopPhys = new GeoPhysVol(mPCenterTopLog);
103
104
105
106
107 const GeoTube* rodA = new GeoTube(0., rodRadius, layer1Space/2. - safety);
108 const GeoLogVol* rodALog = new GeoLogVol("dbmWallLogPlt", rodA, DBMRod_mat);
109 GeoPhysVol* rodAPhys = new GeoPhysVol(rodALog);
110
111
112 const GeoTube* topRod = new GeoTube(0., rodRadius, (Zspacing - mainPlateZ - flexSupportZ)/2. - safety);
113 const GeoLogVol* topRodLog = new GeoLogVol("dbmWallLogPlt", topRod, DBMRod_mat);
114 GeoPhysVol* topRodPhys = new GeoPhysVol(topRodLog);
115
116
117 const GeoTube* botRod = new GeoTube(0., rodRadius, (Zspacing - mainPlateZ)/2. - safety);
118 const GeoLogVol* botRodLog = new GeoLogVol("dbmWallLogPlt", botRod, DBMRod_mat);
119 GeoPhysVol* botRodPhys = new GeoPhysVol(botRodLog);
120
121
122
123
124 double mainPlatePosZ[3];
125 mainPlatePosZ[0] = -layerUnitZ/2. + layer1Space + mainPlateZ/2.;
126 mainPlatePosZ[1] = -layerUnitZ/2. + layer1Space + Zspacing + mainPlateZ/2.;
127 mainPlatePosZ[2] = -layerUnitZ/2. + layer1Space + 2.*Zspacing + mainPlateZ/2.;
128
129 double mainPlatePosY = -layerUnitY/2. + mainPlateY/2.;
130
131
132 std::string tag_mainPlate[3] = {"mainPlate1", "mainPlate2", "mainPlate3"};
133 std::string tag_flex[3] = {"flexSupport1", "flexSupport2", "flexSupport3"};
134 std::string tag_module[3] = {"module1", "module2", "module3"};
135 std::string tag_rod[3] = {"rod1", "rod2", "rod3"};
136
137 for (
int i = 0;
i < 3;
i++) {
138
139
140
141
142
143
145
147 GeoVPhysVol* modulePhys = module.Build();
148
149 Rspacing =
m_gmt_mgr->DBMSpacingRadial();
150 GeoTrf::Translate3D modulePos(0, -layerUnitY/2. + Rspacing + ceramicY/2., mainPlatePosZ[i]-mainPlateZ/2.-(ceramicZ+FEI4Z+moduleAirGap+diamondZ + kaptonZ)/2.-2*safety);
151 GeoTransform* xform = new GeoTransform(modulePos);
152 GeoNameTag*
tag =
new GeoNameTag(tag_module[i].c_str());
153 containerPhys->add(tag);
154 containerPhys->add(new GeoIdentifierTag(i));
155 containerPhys->add(xform);
156 containerPhys->add(modulePhys);
157
158
159
160 GeoTrf::Translate3D mPSideAPos((mainPlateX+mPlateWindowX)/4.+safety/2., mainPlatePosY, mainPlatePosZ[i]);
161 xform = new GeoTransform(mPSideAPos);
162 tag =
new GeoNameTag(tag_mainPlate[i].c_str());
163 containerPhys->add(tag);
164 containerPhys->add(xform);
165 containerPhys->add(mPSidePhys);
166
167 GeoTrf::Translate3D mPSideBPos(-(mainPlateX+mPlateWindowX)/4.-safety/2., mainPlatePosY, mainPlatePosZ[i]);
168 xform = new GeoTransform(mPSideBPos);
169 containerPhys->add(tag);
170 containerPhys->add(xform);
171 containerPhys->add(mPSidePhys);
172
173 GeoTrf::Translate3D mPBotPos(0.0, (-layerUnitY + mPlateWindowPos)/2.-safety/2., mainPlatePosZ[i]);
174 xform = new GeoTransform(mPBotPos);
175 containerPhys->add(tag);
176 containerPhys->add(xform);
177 containerPhys->add(mPCenterBotPhys);
178
179 GeoTrf::Translate3D mPTopPos(0.0, (-layerUnitY + mainPlateY + mPlateWindowY + mPlateWindowPos)/2.+safety/2., mainPlatePosZ[i]);
180 xform = new GeoTransform(mPTopPos);
181 containerPhys->add(tag);
182 containerPhys->add(xform);
183 containerPhys->add(mPCenterTopPhys);
184
185
186
187
188 const GeoBox* flexSupp = new GeoBox(flexSupportX/2., flexSupportY/2., flexSupportZ/2.);
189
190
191 std::string flexSupp_matName = "";
192 if (i == 0) {
193 flexSupp_matName = "pix::DBMPeek5";
194 } else if (i == 1) {
195 flexSupp_matName = "pix::DBMPeek6";
196 } else if (i == 2) {
197 flexSupp_matName = "pix::DBMPeek7";
198 }
199 const GeoMaterial* dbmFlexSupp_mat =
m_mat_mgr->getMaterialForVolume(flexSupp_matName, flexSupp->volume());
200
201 const GeoLogVol* flexSuppLog = new GeoLogVol("dbmWallLog", flexSupp, dbmFlexSupp_mat);
202 GeoPhysVol* flexSuppPhys = new GeoPhysVol(flexSuppLog);
203
204
205 double flexSuppPosY = mainPlatePosY + mPlateRod2RodY/2. - flexSupportY/2. + flexSupportOffset;
206
207 double flexSuppPosZ = mainPlatePosZ[
i] + mainPlateZ/2. + flexSupportZ/2. + safety;
208
209
210
211 GeoTrf::Translate3D flexSuppPos(0.0, flexSuppPosY, flexSuppPosZ);
212 xform = new GeoTransform(flexSuppPos);
213 tag =
new GeoNameTag(tag_flex[i].c_str());
214 containerPhys->add(tag);
215 containerPhys->add(xform);
216 containerPhys->add(flexSuppPhys);
217
218
219
220
221 double topRodPosY = mainPlatePosY + mPlateRod2RodY/2.;
222 double botRodPosY = mainPlatePosY - mPlateRod2RodY/2.;
223
225
226 double rodPosZ = mainPlatePosZ[
i] - mainPlateZ/2.0 - layer1Space/2.;
227
228 GeoTrf::Translate3D rodAPos(mPlateRod2RodX/2., topRodPosY, rodPosZ);
229 xform = new GeoTransform(rodAPos);
230 tag =
new GeoNameTag(tag_rod[i].c_str());
231 containerPhys->add(tag);
232 containerPhys->add(xform);
233 containerPhys->add(rodAPhys);
234
235 GeoTrf::Translate3D rodBPos(-mPlateRod2RodX/2., topRodPosY, rodPosZ);
236 xform = new GeoTransform(rodBPos);
237 containerPhys->add(tag);
238 containerPhys->add(xform);
239 containerPhys->add(rodAPhys);
240
241 GeoTrf::Translate3D rodCPos(mPlateRod2RodX/2., botRodPosY, rodPosZ);
242 xform = new GeoTransform(rodCPos);
243 containerPhys->add(tag);
244 containerPhys->add(xform);
245 containerPhys->add(rodAPhys);
246
247 GeoTrf::Translate3D rodDPos(-mPlateRod2RodX/2., botRodPosY, rodPosZ);
248 xform = new GeoTransform(rodDPos);
249 containerPhys->add(tag);
250 containerPhys->add(xform);
251 containerPhys->add(rodAPhys);
252
254
255
256 double topRodPosZ = mainPlatePosZ[
i] - mainPlateZ/2. - (Zspacing - mainPlateZ - flexSupportZ)/2.;
257 double botRodPosZ = mainPlatePosZ[
i] - mainPlateZ/2. - (Zspacing - mainPlateZ)/2.;
258
259 GeoTrf::Translate3D rodAPos(mPlateRod2RodX/2., topRodPosY, topRodPosZ);
260 xform = new GeoTransform(rodAPos);
261 tag =
new GeoNameTag(tag_rod[i].c_str());
262 containerPhys->add(tag);
263 containerPhys->add(xform);
264 containerPhys->add(topRodPhys);
265
266 GeoTrf::Translate3D rodBPos(-mPlateRod2RodX/2., topRodPosY, topRodPosZ);
267 xform = new GeoTransform(rodBPos);
268 containerPhys->add(tag);
269 containerPhys->add(xform);
270 containerPhys->add(topRodPhys);
271
272 GeoTrf::Translate3D rodCPos(mPlateRod2RodX/2., botRodPosY, botRodPosZ);
273 xform = new GeoTransform(rodCPos);
274 containerPhys->add(tag);
275 containerPhys->add(xform);
276 containerPhys->add(botRodPhys);
277
278 GeoTrf::Translate3D rodDPos(-mPlateRod2RodX/2., botRodPosY, botRodPosZ);
279 xform = new GeoTransform(rodDPos);
280 containerPhys->add(tag);
281 containerPhys->add(xform);
282 containerPhys->add(botRodPhys);
283
284 }
285 else {
287 }
288 }
289 }
290
292
293 return containerPhys;
294}
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