46 {
47
49
50 const GeoMaterial *OpAir = materialManager->
getMaterial(
"ZDC::opticalAir" );
51 const GeoMaterial *OpSilica = materialManager->
getMaterial(
"ZDC::opticalSilica");
52 const GeoMaterial *Silica = materialManager->
getMaterial(
"std::Quartz" );
53 const GeoMaterial *Tungsten = materialManager->
getMaterial(
"ZDC::Tungsten" );
54 const GeoMaterial *Steel = materialManager->
getMaterial(
"ZDC::Steel" );
55
56
57
58
59
60
61
62 const float pixelPitch = 10.3;
63 const float pixelGap = 1.2;
64 const float pixelRodDia = 1.0;
65 const float pixelHoleDia = 1.35;
66 const int nPixelHolesX = 8;
67 const int nPixelHolesY = 16;
68 const float firstPixelX = -pixelPitch * (nPixelHolesX - 1) * 0.5;
69 const float firstPixelY = -pixelPitch * (nPixelHolesY - 1) * 0.5;
70
71
72
73 const float radiator_gap_depth = 2.0;
74 const int nRadGaps = 12;
75 const float strip_diameter = 1.5;
76 const float absorber_width = 89.57;
77 const float absorber_depth = 10.0;
78 const float absorber_height = 180.0;
79 const float wallThicknessFront = 10.0;
80 const float wallThicknessSide = 1.21;
81 const float floorThickness = 1.21;
82 const float zPitch = radiator_gap_depth + absorber_depth;
83 const float strip_gap_center = pixelPitch - pixelGap;
84 const float strip_gap_edge = (absorber_width - pixelPitch * (nPixelHolesX - 1) - pixelGap) * 0.5;
85 const int nRods_center_gap = 6;
86 const int nRods_edge_gap = 5;
87 const float housing_width = absorber_width + 2 * wallThicknessSide;
88 const float housing_height = absorber_height + floorThickness;
89
90
91
92 float zBackCavity = 0.0;
93 float wallThicknessBack = 10.0;
94 float rearCoverThickness = 0.0;
95 int pixelStart = 0, pixelStop = 0;
96
97
99 case 1:
100 break;
101 case 2:
102 pixelStop = 9;
103 wallThicknessBack = 8.0;
104 rearCoverThickness = 1.21;
105 zBackCavity = 28;
106 break;
107 case 3:
108 pixelStart = 1;
109 pixelStop = 8;
110 wallThicknessBack = 8.0;
111 rearCoverThickness = 1.21;
112 zBackCavity = 102;
113 break;
114 default:
115 LogStream << MSG::ERROR <<
"Invalid module type: " <<
m_modType <<
endmsg;
116 return;
117 }
118
119
120
121 const float housing_depth = (nRadGaps - 1) * zPitch + radiator_gap_depth + wallThicknessFront + wallThicknessBack + zBackCavity + rearCoverThickness;
122
123
124
125
126
127 GeoTube *Strip_Tube = new GeoTube (0.0 * Gaudi::Units::mm , strip_diameter * Gaudi::Units::mm * 0.5, absorber_height * Gaudi::Units::mm * 0.5);
128 GeoBox *Steel_Box = new GeoBox (housing_width * Gaudi::Units::mm * 0.5, housing_height * Gaudi::Units::mm * 0.5, housing_depth * Gaudi::Units::mm * 0.5);
129 GeoBox *RadGap_Box = new GeoBox (absorber_width * Gaudi::Units::mm * 0.5, absorber_height * Gaudi::Units::mm * 0.5, radiator_gap_depth * Gaudi::Units::mm * 0.5);
130 GeoBox *Abs_Box = new GeoBox (absorber_width * Gaudi::Units::mm * 0.5, absorber_height * Gaudi::Units::mm * 0.5, absorber_depth * Gaudi::Units::mm * 0.5);
131
132 GeoLogVol *Strip_Logical = new GeoLogVol("Strip_Logical" , Strip_Tube , OpSilica );
133 GeoLogVol *Steel_Logical = new GeoLogVol("Steel_Logical" , Steel_Box , Steel );
134 GeoLogVol *RadGap_Logical = new GeoLogVol("RadGap_Logical" , RadGap_Box , OpAir );
135 GeoLogVol *Abs_Plate_Logical = new GeoLogVol("Abs_Plate_Logical" , Abs_Box , Tungsten );
136
137 GeoFullPhysVol *Housing_Physical = new GeoFullPhysVol(Steel_Logical );
138 GeoFullPhysVol *Abs_Plate = new GeoFullPhysVol(Abs_Plate_Logical);
139 GeoFullPhysVol *RadiatorGap = new GeoFullPhysVol(RadGap_Logical );
140
141
143 char volName[256];
144
145
146
147
148
150
151
152 const float inner_wall_z = -0.5 * housing_depth + wallThicknessFront + (nRadGaps - 1) * zPitch + radiator_gap_depth + 0.5 * wallThicknessBack ;
153
154 GeoTube *Pixel_Rod_Abs = new GeoTube ( 0.0 * Gaudi::Units::mm , pixelRodDia * Gaudi::Units::mm * 0.5 , absorber_depth * Gaudi::Units::mm * 0.5 );
155 GeoTube *Pixel_Rod_Rad = new GeoTube ( 0.0 * Gaudi::Units::mm , pixelRodDia * Gaudi::Units::mm * 0.5 , radiator_gap_depth * Gaudi::Units::mm * 0.5 );
156 GeoTube *Pixel_Rod_Housing = new GeoTube ( 0.0 * Gaudi::Units::mm , pixelRodDia * Gaudi::Units::mm * 0.5 , wallThicknessBack * Gaudi::Units::mm * 0.5 );
157 GeoTube *Pixel_Hole_Abs = new GeoTube ( 0.0 * Gaudi::Units::mm , pixelHoleDia * Gaudi::Units::mm * 0.5 , absorber_depth * Gaudi::Units::mm * 0.5 );
158 GeoTube *Pixel_Hole_Housing = new GeoTube ( 0.0 * Gaudi::Units::mm , pixelHoleDia * Gaudi::Units::mm * 0.5 , wallThicknessBack * Gaudi::Units::mm * 0.5 );
159 GeoBox *Pixel_Routing_Box = new GeoBox (absorber_width * Gaudi::Units::mm* 0.5, absorber_height * Gaudi::Units::mm * 0.5 , zBackCavity * Gaudi::Units::mm * 0.5 );
160
161 GeoLogVol *Pixel_Abs_Logical = new GeoLogVol("Pixel_Abs_Logical" , Pixel_Rod_Abs , Silica );
162 GeoLogVol *Pixel_Rad_Logical = new GeoLogVol("Pixel_Rad_Logical" , Pixel_Rod_Rad , Silica );
163 GeoLogVol *Pixel_House_Logical = new GeoLogVol("Pixel_House_Logical" , Pixel_Rod_Housing , Silica );
164 GeoLogVol *Pixel_Hole_Abs_Logical = new GeoLogVol("Pixel_Hole_Logical" , Pixel_Hole_Abs , OpAir );
165 GeoLogVol *Pixel_Hole_House_Logical = new GeoLogVol("Pixel_Hole_House_Logical" , Pixel_Hole_Housing , OpAir );
166 GeoLogVol *Pixel_Routing_Logical = new GeoLogVol("Pixel_Routing_Logical" , Pixel_Routing_Box , OpAir );
167
168
169
170
171
173 sprintf(volName, "ZDC::Pixel_Routing %s", id.getString().c_str());
174 Housing_Physical->add(new GeoNameTag(volName));
175 Housing_Physical->add(new GeoIdentifierTag(id.get_identifier32().get_compact()));
176 Housing_Physical->add(new GeoAlignableTransform(GeoTrf::Translate3D(0.0, 0.5 * floorThickness * Gaudi::Units::mm, (housing_depth * 0.5 - rearCoverThickness - zBackCavity * 0.5) * Gaudi::Units::mm)));
177 Housing_Physical->add(new GeoFullPhysVol(Pixel_Routing_Logical));
178
179
180
181
182
183 GeoFullPhysVol *Pixel_Hole_Abs_Empty = new GeoFullPhysVol(Pixel_Hole_Abs_Logical);
184
185 GeoFullPhysVol *Pixel_Hole_Abs_Filled = new GeoFullPhysVol(Pixel_Hole_Abs_Logical);
187 sprintf(volName, "ZDC::Pixel %s", id.getString().c_str());
188 Pixel_Hole_Abs_Filled->add(new GeoNameTag(volName));
189 Pixel_Hole_Abs_Filled->add(new GeoIdentifierTag(id.get_identifier32().get_compact()));
190 Pixel_Hole_Abs_Filled->add(new GeoFullPhysVol(Pixel_Abs_Logical));
191
192
193
194
195
196 GeoFullPhysVol *Pixel_Hole_House_Empty = new GeoFullPhysVol(Pixel_Hole_House_Logical);
197
198 GeoFullPhysVol *Pixel_Hole_House_Filled = new GeoFullPhysVol(Pixel_Hole_House_Logical);
200 sprintf(volName, "ZDC::Pixel %s", id.getString().c_str());
201 Pixel_Hole_House_Filled->add(new GeoNameTag(volName));
202 Pixel_Hole_House_Filled->add(new GeoIdentifierTag(id.get_identifier32().get_compact()));
203 Pixel_Hole_House_Filled->add(new GeoFullPhysVol(Pixel_House_Logical));
204
205
206
207
208 GeoFullPhysVol *Pixel_Rad = new GeoFullPhysVol(Pixel_Rad_Logical);
209
210
211 for (int rodChannel = 0; rodChannel < nPixelHolesX; ++rodChannel){
212 float pixelX = firstPixelX + pixelPitch * rodChannel;
213
214 for (int pixelLayer = 0; pixelLayer <= nPixelHolesY; ++pixelLayer){
215 float pixelY = firstPixelY + pixelPitch * pixelLayer;
216
217 if (pixelLayer >= pixelStart && pixelLayer <= pixelStop){
218
220 sprintf(volName, "ZDC::Pixel_Rad %s", id.getString().c_str());
221 RadiatorGap->add(new GeoNameTag(volName));
222 RadiatorGap->add(new GeoIdentifierTag(id.get_identifier32().get_compact()));
223 RadiatorGap->add(new GeoAlignableTransform(GeoTrf::Translate3D(pixelX * Gaudi::Units::mm, pixelY * Gaudi::Units::mm, 0.0 * Gaudi::Units::mm)));
224 RadiatorGap->add(Pixel_Rad);
225
226
227 sprintf(volName, "ZDC::Pixel_Abs %s", id.getString().c_str());
228 Abs_Plate->add(new GeoNameTag(volName));
229 Abs_Plate->add(new GeoIdentifierTag(id.get_identifier32().get_compact()));
230 Abs_Plate->add(new GeoAlignableTransform(GeoTrf::Translate3D(pixelX * Gaudi::Units::mm, pixelY * Gaudi::Units::mm, 0.0 * Gaudi::Units::mm)));
231 Abs_Plate->add(Pixel_Hole_Abs_Filled);
232
233
235 sprintf(volName, "ZDC::Pixel_Housing %s", id.getString().c_str());
236 Housing_Physical->add(new GeoNameTag(volName));
237 Housing_Physical->add(new GeoIdentifierTag(id.get_identifier32().get_compact()));
238 Housing_Physical->add(new GeoAlignableTransform(GeoTrf::Translate3D(pixelX * Gaudi::Units::mm, 0.5 * floorThickness + pixelY * Gaudi::Units::mm, inner_wall_z * Gaudi::Units::mm)));
239 Housing_Physical->add(Pixel_Hole_House_Filled);
240
241 }else{
243 sprintf(volName, "ZDC::Pixel_Hole %s", id.getString().c_str());
244
245
246 Abs_Plate->add(new GeoNameTag(volName));
247 Abs_Plate->add(new GeoIdentifierTag(id.get_identifier32().get_compact()));
248 Abs_Plate->add(new GeoAlignableTransform(GeoTrf::Translate3D(pixelX * Gaudi::Units::mm, pixelY * Gaudi::Units::mm, 0.0 * Gaudi::Units::mm)));
249 Abs_Plate->add(Pixel_Hole_Abs_Empty);
250
251
252 Housing_Physical->add(new GeoNameTag(volName));
253 Housing_Physical->add(new GeoIdentifierTag(id.get_identifier32().get_compact()));
254 Housing_Physical->add(new GeoAlignableTransform(GeoTrf::Translate3D(pixelX * Gaudi::Units::mm, 0.5 * floorThickness + pixelY * Gaudi::Units::mm, inner_wall_z * Gaudi::Units::mm)));
255 Housing_Physical->add(Pixel_Hole_House_Empty);
256 }
257 }
258 }
259 }
260
261
262
263
264
265
266
267
268 for (int radGap = 0; radGap < nRadGaps; ++radGap){
269 float zRadGap = -housing_depth * 0.5 + wallThicknessFront + radiator_gap_depth * 0.5 + zPitch * radGap;
270 float zAbsorber = zRadGap + radiator_gap_depth * 0.5 + absorber_depth * 0.5;
271
272
273
274
275 if (radGap != nRadGaps - 1){
277 sprintf(volName, "ZDC::W_Mod %s", id.getString().c_str());
278 Housing_Physical->add(new GeoNameTag(volName));
279 Housing_Physical->add(new GeoIdentifierTag(id.get_identifier32().get_compact()));
280 Housing_Physical->add(new GeoAlignableTransform(GeoTrf::Translate3D(0.0, 0.5 * floorThickness * Gaudi::Units::mm, zAbsorber * Gaudi::Units::mm)));
281 Housing_Physical->add(Abs_Plate);
282 }
283
284
285
286
287
288
289
290
291 GeoFullPhysVol *thisRadGap = (radGap == nRadGaps - 1) ? RadiatorGap : RadiatorGap->
clone(false);
292
293 for (int rodChannel = 0; rodChannel < nPixelHolesX + 1; ++rodChannel){
294
295 int nRods = nRods_center_gap;
296 float rodPitch = strip_gap_center / nRods;
297 float startX = pixelPitch * (-(nPixelHolesX - 1) * 0.5 + rodChannel - 1) + (pixelGap + rodPitch) * 0.5;
298
299
300 if (rodChannel == 0 || rodChannel == nPixelHolesX){
301
302 nRods = nRods_edge_gap;
303 rodPitch = strip_gap_edge / nRods;
304
305 if (rodChannel == 0){
306 startX = (-absorber_width + rodPitch) * 0.5;
307 }
308 }
309
311 sprintf(volName, "ZDC::Strip %s", id.getString().c_str());
312 for (
int rod = 0;
rod < nRods; ++
rod){
313 thisRadGap->add(new GeoNameTag(volName));
314 thisRadGap->add(new GeoIdentifierTag(id.get_identifier32().get_compact()));
315 thisRadGap->add(new GeoAlignableTransform(GeoTrf::TranslateX3D((startX + rod * rodPitch) * Gaudi::Units::mm)));
316 thisRadGap->add(new GeoAlignableTransform(GeoTrf::RotateX3D(90 * Gaudi::Units::deg)));
317 thisRadGap->add(new GeoFullPhysVol(Strip_Logical));
318 }
319 }
320
321
322
323
325 sprintf(volName, "ZDC::Rad_Gap %s", id.getString().c_str());
326 Housing_Physical->add(new GeoNameTag(volName));
327 Housing_Physical->add(new GeoIdentifierTag(id.get_identifier32().get_compact()));
328 Housing_Physical->add(new GeoAlignableTransform(GeoTrf::Translate3D(0.0, 0.5 * floorThickness * Gaudi::Units::mm, zRadGap * Gaudi::Units::mm)));
329 Housing_Physical->add(thisRadGap);
330 }
331
332
334 sprintf(volName, "Zdc::ZDC_Mod %s", id.getString().c_str());
335 mother->add(new GeoNameTag(volName));
336 mother->add(new GeoIdentifierTag(id.get_identifier32().get_compact()));
337 mother->add(
new GeoAlignableTransform(
m_trf ));
338 mother->add(Housing_Physical);
339
340}
virtual const GeoMaterial * getMaterial(const std::string &name)=0
GeoTrf::Transform3D m_trf
Identifier channel_id(int side, int module, int type, int channel) const
IMessageSvc * getMessageSvc(bool quiet=false)