Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-23 08:24:04

0001 # ==========================================================================
0002 #  AIDA Detector description implementation
0003 # --------------------------------------------------------------------------
0004 # Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
0005 # All rights reserved.
0006 #
0007 # For the licensing terms see $DD4hepINSTALL/LICENSE.
0008 # For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
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)  # noqa: F821
0021   sha = Box(description, det.name + '_envelope', box.x, box.y, box.z)  # noqa: F821
0022   vol = Volume(description, det.name + '_envelope_volume', sha, description.material(mat.name))  # noqa: F821
0023   phv = mother.placeVolume(vol, Position(pos.x, pos.y, pos.z),  # noqa: F821
0024                            Rotation(rot.x, rot.y, rot.z))  # noqa: F821
0025   vol.setVisAttributes(description, det.vis)
0026   phv.addPhysVolID('id', det.id)
0027   de.addPlacement(phv)
0028   return de