7 #include "GeoModelKernel/GeoElement.h"
8 #include "GeoModelKernel/GeoBox.h"
9 #include "GeoModelKernel/GeoTube.h"
10 #include "GeoModelKernel/GeoLogVol.h"
11 #include "GeoModelKernel/GeoNameTag.h"
12 #include "GeoModelKernel/GeoPhysVol.h"
13 #include "GeoModelKernel/GeoFullPhysVol.h"
14 #include "GeoModelKernel/GeoIdentifierTag.h"
15 #include "GeoModelKernel/GeoAlignableTransform.h"
16 #include "GeoModelKernel/GeoDefinitions.h"
17 #include "GeoModelKernel/Units.h"
18 #include "GaudiKernel/SystemOfUnits.h"
21 #include "GeoModelKernel/GeoMaterial.h"
25 #include "CLHEP/Geometry/Transform3D.h"
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" );
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;
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;
92 float zBackCavity = 0.0;
93 float wallThicknessBack = 10.0;
94 float rearCoverThickness = 0.0;
95 int pixelStart = 0, pixelStop = 0;
103 wallThicknessBack = 8.0;
104 rearCoverThickness = 1.21;
110 wallThicknessBack = 8.0;
111 rearCoverThickness = 1.21;
115 LogStream << MSG::ERROR <<
"Invalid module type: " <<
m_modType <<
endmsg;
121 const float housing_depth = (nRadGaps - 1) * zPitch + radiator_gap_depth + wallThicknessFront + wallThicknessBack + zBackCavity + rearCoverThickness;
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 );
137 GeoFullPhysVol *Housing_Physical =
new GeoFullPhysVol(Steel_Logical );
138 GeoFullPhysVol *Abs_Plate =
new GeoFullPhysVol(Abs_Plate_Logical);
139 GeoFullPhysVol *RadiatorGap =
new GeoFullPhysVol(RadGap_Logical );
152 const float inner_wall_z = -0.5 * housing_depth + wallThicknessFront + (nRadGaps - 1) * zPitch + radiator_gap_depth + 0.5 * wallThicknessBack ;
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 );
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));
183 GeoFullPhysVol *Pixel_Hole_Abs_Empty =
new GeoFullPhysVol(Pixel_Hole_Abs_Logical);
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));
196 GeoFullPhysVol *Pixel_Hole_House_Empty =
new GeoFullPhysVol(Pixel_Hole_House_Logical);
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));
208 GeoFullPhysVol *Pixel_Rad =
new GeoFullPhysVol(Pixel_Rad_Logical);
211 for (
int rodChannel = 0; rodChannel < nPixelHolesX; ++rodChannel){
212 float pixelX = firstPixelX + pixelPitch * rodChannel;
214 for (
int pixelLayer = 0; pixelLayer <= nPixelHolesY; ++pixelLayer){
215 float pixelY = firstPixelY + pixelPitch * pixelLayer;
217 if (pixelLayer >= pixelStart && pixelLayer <= pixelStop){
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()));
224 RadiatorGap->add(Pixel_Rad);
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()));
231 Abs_Plate->add(Pixel_Hole_Abs_Filled);
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()));
239 Housing_Physical->add(Pixel_Hole_House_Filled);
243 sprintf(volName,
"ZDC::Pixel_Hole %s",
id.getString().c_str());
246 Abs_Plate->add(
new GeoNameTag(volName));
247 Abs_Plate->add(
new GeoIdentifierTag(
id.get_identifier32().get_compact()));
249 Abs_Plate->add(Pixel_Hole_Abs_Empty);
252 Housing_Physical->add(
new GeoNameTag(volName));
253 Housing_Physical->add(
new GeoIdentifierTag(
id.get_identifier32().get_compact()));
255 Housing_Physical->add(Pixel_Hole_House_Empty);
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;
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()));
281 Housing_Physical->add(Abs_Plate);
291 GeoFullPhysVol *thisRadGap = (radGap == nRadGaps - 1) ? RadiatorGap : RadiatorGap->clone(
false);
293 for (
int rodChannel = 0; rodChannel < nPixelHolesX + 1; ++rodChannel){
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;
300 if (rodChannel == 0 || rodChannel == nPixelHolesX){
302 nRods = nRods_edge_gap;
303 rodPitch = strip_gap_edge / nRods;
305 if (rodChannel == 0){
306 startX = (-absorber_width + rodPitch) * 0.5;
311 sprintf(volName,
"ZDC::Strip %s",
id.getString().c_str());
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));
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()));
329 Housing_Physical->add(thisRadGap);
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);