File indexing completed on 2026-09-23 08:24:04
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 def detector_BoxSegment(description, det):
0015 box = det.find('box')
0016 mat = det.find('material')
0017 pos = det.find('position')
0018 rot = det.find('rotation')
0019 mother = description.worldVolume()
0020 de = DetElement(description, det.name, det.type, det.id)
0021 sha = Box(description, det.name + '_envelope', box.x, box.y, box.z)
0022 vol = Volume(description, det.name + '_envelope_volume', sha, description.material(mat.name))
0023 phv = mother.placeVolume(vol, Position(pos.x, pos.y, pos.z),
0024 Rotation(rot.x, rot.y, rot.z))
0025 vol.setVisAttributes(description, det.vis)
0026 phv.addPhysVolID('id', det.id)
0027 de.addPlacement(phv)
0028 return de