27 string det_name = x_det.nameStr();
29 double z = dim.outer_z();
30 double rmin = dim.inner_r();
33 Tube envelope(rmin,2*rmin,2*z);
34 Volume envelopeVol(det_name+
"_envelope",envelope,air);
38 for(
int i=0, im=0, repeat=x_layer.repeat(); i<repeat; ++i, im=0) {
39 string layer_name = det_name +
_toString(n,
"_layer%d");
41 Tube layer_tub(rmin,rlayer,2*z);
42 Volume layer_vol(layer_name,layer_tub,air);
46 double router = r + x_slice.thickness();
48 string slice_name = layer_name +
_toString(im,
"slice%d");
49 Tube slice_tube(r,router,z*2);
50 Volume slice_vol (slice_name,slice_tube,slice_mat);
52 if ( x_slice.isSensitive() ) {
54 slice_vol.setSensitiveDetector(sens);
57 slice_vol.setAttributes(description,x_slice.regionStr(),x_slice.limitsStr(),x_slice.visStr());
59 layer_vol.placeVolume(slice_vol);
61 layer_vol.setVisAttributes(description,x_layer.visStr());
62 layer_tub.setDimensions(rlayer,r,z*2,0,2*
M_PI);
64 PlacedVolume layer_physvol = envelopeVol.placeVolume(layer_vol);
69 envelope.setDimensions(rmin,r,2*z);
71 envelopeVol.setAttributes(description,x_det.regionStr(),x_det.limitsStr(),x_det.visStr());
75 sdet.setPlacement(physvol);