25 GeoPhysVol* containerPhys{
nullptr};
28 for (
int i = 0; i < 3; i++) {
40 double safety = 0.005*Gaudi::Units::mm;
43 double layerUnitY =
m_gmt_mgr->DBMModuleCageY();
44 double layerUnitZ =
m_gmt_mgr->DBMModuleCageZ();
47 double Zspacing =
m_gmt_mgr->DBMSpacingZ();
48 double Rspacing =
m_gmt_mgr->DBMSpacingRadial();
50 double layer1Space =
m_gmt_mgr->DBMSpace();
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();
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();
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();
75 double rodRadius =
m_gmt_mgr->DBMRodRadius();
76 double mPlateRod2RodY =
m_gmt_mgr->DBMMPlateRod2RodY();
77 double mPlateRod2RodX =
m_gmt_mgr->DBMMPlateRod2RodX();
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");
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);
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);
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);
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);
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);
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);
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);
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.;
129 double mainPlatePosY = -layerUnitY/2. + mainPlateY/2.;
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"};
137 for (
int i = 0; i < 3; i++) {
147 GeoVPhysVol* modulePhys =
module.Build();
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);
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);
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);
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);
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);
188 const GeoBox* flexSupp =
new GeoBox(flexSupportX/2., flexSupportY/2., flexSupportZ/2.);
191 std::string flexSupp_matName =
"";
193 flexSupp_matName =
"pix::DBMPeek5";
195 flexSupp_matName =
"pix::DBMPeek6";
197 flexSupp_matName =
"pix::DBMPeek7";
199 const GeoMaterial* dbmFlexSupp_mat =
m_mat_mgr->getMaterialForVolume(flexSupp_matName, flexSupp->volume());
201 const GeoLogVol* flexSuppLog =
new GeoLogVol(
"dbmWallLog", flexSupp, dbmFlexSupp_mat);
202 GeoPhysVol* flexSuppPhys =
new GeoPhysVol(flexSuppLog);
205 double flexSuppPosY = mainPlatePosY + mPlateRod2RodY/2. - flexSupportY/2. + flexSupportOffset;
207 double flexSuppPosZ = mainPlatePosZ[i] + mainPlateZ/2. + flexSupportZ/2. + safety;
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);
221 double topRodPosY = mainPlatePosY + mPlateRod2RodY/2.;
222 double botRodPosY = mainPlatePosY - mPlateRod2RodY/2.;
226 double rodPosZ = mainPlatePosZ[i] - mainPlateZ/2.0 - layer1Space/2.;
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);
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);
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);
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);
256 double topRodPosZ = mainPlatePosZ[i] - mainPlateZ/2. - (Zspacing - mainPlateZ - flexSupportZ)/2.;
257 double botRodPosZ = mainPlatePosZ[i] - mainPlateZ/2. - (Zspacing - mainPlateZ)/2.;
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);
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);
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);
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);
293 return containerPhys;