53 LogStream << MSG::ERROR <<
"execute: Could not retrieve StoredMaterialManager object from the detector store" <<
endmsg;
57 const GeoMaterial *OpAir = materialManager->
getMaterial(
"ZDC::opticalAir" );
58 const GeoMaterial *OpSilica = materialManager->
getMaterial(
"ZDC::opticalSilica");
59 const GeoMaterial *Silica = materialManager->
getMaterial(
"std::Quartz" );
60 const GeoMaterial *Tungsten = materialManager->
getMaterial(
"ZDC::Tungsten" );
61 const GeoMaterial *Steel = materialManager->
getMaterial(
"ZDC::Steel" );
69 const float pixelPitch = 10.3;
70 const float pixelGap = 1.2;
71 const float pixelRodDia = 1.0;
72 const float pixelHoleDia = 1.35;
73 const int nPixelHolesX = 8;
74 const int nPixelHolesY = 16;
75 const float firstPixelX = -pixelPitch * (nPixelHolesX - 1) * 0.5;
76 const float firstPixelY = -pixelPitch * (nPixelHolesY - 1) * 0.5;
80 const float radiator_gap_depth = 2.0;
81 const int nRadGaps = 12;
82 const float strip_diameter = 1.5;
83 const float absorber_width = 89.57;
84 const float absorber_depth = 10.0;
85 const float absorber_height = 180.0;
86 const float wallThicknessFront = 10.0;
87 const float wallThicknessSide = 1.21;
88 const float floorThickness = 1.21;
89 const float zPitch = radiator_gap_depth + absorber_depth;
90 const float strip_gap_center = pixelPitch - pixelGap;
91 const float strip_gap_edge = (absorber_width - pixelPitch * (nPixelHolesX - 1) - pixelGap) * 0.5;
92 const int nRods_center_gap = 6;
93 const int nRods_edge_gap = 5;
94 const float housing_width = absorber_width + 2 * wallThicknessSide;
95 const float housing_height = absorber_height + floorThickness;
99 float zBackCavity = 0.0;
100 float wallThicknessBack = 10.0;
101 float rearCoverThickness = 0.0;
102 int pixelStart = 0, pixelStop = 0;
110 wallThicknessBack = 8.0;
111 rearCoverThickness = 1.21;
117 wallThicknessBack = 8.0;
118 rearCoverThickness = 1.21;
122 LogStream << MSG::ERROR <<
"Invalid module type: " <<
m_modType <<
endmsg;
128 const float housing_depth = (nRadGaps - 1) * zPitch + radiator_gap_depth + wallThicknessFront + wallThicknessBack + zBackCavity + rearCoverThickness;
139 GeoLogVol *Strip_Logical =
new GeoLogVol(
"Strip_Logical" , Strip_Tube , OpSilica );
140 GeoLogVol *Steel_Logical =
new GeoLogVol(
"Steel_Logical" , Steel_Box , Steel );
141 GeoLogVol *RadGap_Logical =
new GeoLogVol(
"RadGap_Logical" , RadGap_Box , OpAir );
142 GeoLogVol *Abs_Plate_Logical =
new GeoLogVol(
"Abs_Plate_Logical" , Abs_Box , Tungsten );
144 GeoFullPhysVol *Housing_Physical =
new GeoFullPhysVol(Steel_Logical );
145 GeoFullPhysVol *Abs_Plate =
new GeoFullPhysVol(Abs_Plate_Logical);
146 GeoFullPhysVol *RadiatorGap =
new GeoFullPhysVol(RadGap_Logical );
159 const float inner_wall_z = -0.5 * housing_depth + wallThicknessFront + (nRadGaps - 1) * zPitch + radiator_gap_depth + 0.5 * wallThicknessBack ;
168 GeoLogVol *Pixel_Abs_Logical =
new GeoLogVol(
"Pixel_Abs_Logical" , Pixel_Rod_Abs , Silica );
169 GeoLogVol *Pixel_Rad_Logical =
new GeoLogVol(
"Pixel_Rad_Logical" , Pixel_Rod_Rad , Silica );
170 GeoLogVol *Pixel_House_Logical =
new GeoLogVol(
"Pixel_House_Logical" , Pixel_Rod_Housing , Silica );
171 GeoLogVol *Pixel_Hole_Abs_Logical =
new GeoLogVol(
"Pixel_Hole_Logical" , Pixel_Hole_Abs , OpAir );
172 GeoLogVol *Pixel_Hole_House_Logical =
new GeoLogVol(
"Pixel_Hole_House_Logical" , Pixel_Hole_Housing , OpAir );
173 GeoLogVol *Pixel_Routing_Logical =
new GeoLogVol(
"Pixel_Routing_Logical" , Pixel_Routing_Box , OpAir );
180 sprintf(volName,
"ZDC::Pixel_Routing %s",
id.getString().c_str());
181 Housing_Physical->add(
new GeoNameTag(volName));
182 Housing_Physical->add(
new GeoIdentifierTag(
id.get_identifier32().get_compact()));
183 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)));
184 Housing_Physical->add(
new GeoFullPhysVol(Pixel_Routing_Logical));
190 GeoFullPhysVol *Pixel_Hole_Abs_Empty =
new GeoFullPhysVol(Pixel_Hole_Abs_Logical);
192 GeoFullPhysVol *Pixel_Hole_Abs_Filled =
new GeoFullPhysVol(Pixel_Hole_Abs_Logical);
194 sprintf(volName,
"ZDC::Pixel %s",
id.getString().c_str());
195 Pixel_Hole_Abs_Filled->add(
new GeoNameTag(volName));
196 Pixel_Hole_Abs_Filled->add(
new GeoIdentifierTag(
id.get_identifier32().get_compact()));
197 Pixel_Hole_Abs_Filled->add(
new GeoFullPhysVol(Pixel_Abs_Logical));
203 GeoFullPhysVol *Pixel_Hole_House_Empty =
new GeoFullPhysVol(Pixel_Hole_House_Logical);
205 GeoFullPhysVol *Pixel_Hole_House_Filled =
new GeoFullPhysVol(Pixel_Hole_House_Logical);
207 sprintf(volName,
"ZDC::Pixel %s",
id.getString().c_str());
208 Pixel_Hole_House_Filled->add(
new GeoNameTag(volName));
209 Pixel_Hole_House_Filled->add(
new GeoIdentifierTag(
id.get_identifier32().get_compact()));
210 Pixel_Hole_House_Filled->add(
new GeoFullPhysVol(Pixel_House_Logical));
215 GeoFullPhysVol *Pixel_Rad =
new GeoFullPhysVol(Pixel_Rad_Logical);
218 for (
int rodChannel = 0; rodChannel < nPixelHolesX; ++rodChannel){
219 float pixelX = firstPixelX + pixelPitch * rodChannel;
221 for (
int pixelLayer = 0; pixelLayer <= nPixelHolesY; ++pixelLayer){
222 float pixelY = firstPixelY + pixelPitch * pixelLayer;
224 if (pixelLayer >= pixelStart && pixelLayer <= pixelStop){
227 sprintf(volName,
"ZDC::Pixel_Rad %s",
id.getString().c_str());
228 RadiatorGap->add(
new GeoNameTag(volName));
229 RadiatorGap->add(
new GeoIdentifierTag(
id.get_identifier32().get_compact()));
231 RadiatorGap->add(Pixel_Rad);
234 sprintf(volName,
"ZDC::Pixel_Abs %s",
id.getString().c_str());
235 Abs_Plate->add(
new GeoNameTag(volName));
236 Abs_Plate->add(
new GeoIdentifierTag(
id.get_identifier32().get_compact()));
238 Abs_Plate->add(Pixel_Hole_Abs_Filled);
242 sprintf(volName,
"ZDC::Pixel_Housing %s",
id.getString().c_str());
243 Housing_Physical->add(
new GeoNameTag(volName));
244 Housing_Physical->add(
new GeoIdentifierTag(
id.get_identifier32().get_compact()));
246 Housing_Physical->add(Pixel_Hole_House_Filled);
250 sprintf(volName,
"ZDC::Pixel_Hole %s",
id.getString().c_str());
253 Abs_Plate->add(
new GeoNameTag(volName));
254 Abs_Plate->add(
new GeoIdentifierTag(
id.get_identifier32().get_compact()));
256 Abs_Plate->add(Pixel_Hole_Abs_Empty);
259 Housing_Physical->add(
new GeoNameTag(volName));
260 Housing_Physical->add(
new GeoIdentifierTag(
id.get_identifier32().get_compact()));
262 Housing_Physical->add(Pixel_Hole_House_Empty);
275 for (
int radGap = 0; radGap < nRadGaps; ++radGap){
276 float zRadGap = -housing_depth * 0.5 + wallThicknessFront + radiator_gap_depth * 0.5 + zPitch * radGap;
277 float zAbsorber = zRadGap + radiator_gap_depth * 0.5 + absorber_depth * 0.5;
282 if (radGap != nRadGaps - 1){
284 sprintf(volName,
"ZDC::W_Mod %s",
id.getString().c_str());
285 Housing_Physical->add(
new GeoNameTag(volName));
286 Housing_Physical->add(
new GeoIdentifierTag(
id.get_identifier32().get_compact()));
288 Housing_Physical->add(Abs_Plate);
298 GeoFullPhysVol *thisRadGap = (radGap == nRadGaps - 1) ? RadiatorGap : RadiatorGap->clone(
false);
300 for (
int rodChannel = 0; rodChannel < nPixelHolesX + 1; ++rodChannel){
302 int nRods = nRods_center_gap;
303 float rodPitch = strip_gap_center / nRods;
304 float startX = pixelPitch * (-(nPixelHolesX - 1) * 0.5 + rodChannel - 1) + (pixelGap + rodPitch) * 0.5;
307 if (rodChannel == 0 || rodChannel == nPixelHolesX){
309 nRods = nRods_edge_gap;
310 rodPitch = strip_gap_edge / nRods;
312 if (rodChannel == 0){
313 startX = (-absorber_width + rodPitch) * 0.5;
318 sprintf(volName,
"ZDC::Strip %s",
id.getString().c_str());
320 thisRadGap->add(
new GeoNameTag(volName));
321 thisRadGap->add(
new GeoIdentifierTag(
id.get_identifier32().get_compact()));
322 thisRadGap->add(
new GeoAlignableTransform(GeoTrf::TranslateX3D((startX +
rod * rodPitch) *
Gaudi::Units::mm)));
323 thisRadGap->add(
new GeoAlignableTransform(GeoTrf::RotateX3D(90 *
Gaudi::Units::deg)));
324 thisRadGap->add(
new GeoFullPhysVol(Strip_Logical));
332 sprintf(volName,
"ZDC::Rad_Gap %s",
id.getString().c_str());
333 Housing_Physical->add(
new GeoNameTag(volName));
334 Housing_Physical->add(
new GeoIdentifierTag(
id.get_identifier32().get_compact()));
336 Housing_Physical->add(thisRadGap);
341 sprintf(volName,
"Zdc::ZDC_Mod %s",
id.getString().c_str());
342 mother->add(
new GeoNameTag(volName));
343 mother->add(
new GeoIdentifierTag(
id.get_identifier32().get_compact()));
345 mother->add(Housing_Physical);