Difference: DD4Hep ( vs. 1)

Revision 12019-12-30 - XuMing

Line: 1 to 1
META TOPICPARENT name="Lixianruanjian"

Title 将探测器的几何信息进行编译,以libraries的形式供模拟和重建调用。 ---+ 一个新的探测器 将各个载荷分为若干个box(CALO,5*Tracker,5*PSD)作为各子探测器的mother volume,以baseline的几何尺寸为参考,确定各子探测器的尺寸和位置/边界。源代码见/afs/ihep.ac.cn/users/m/mingxu/work/tmp/test_dd4hep_geo。需要在CMakeLists.txt里添加源代码的信息: dd4hep_add_plugin( ddtest SOURCES src/*.cpp OPTIONAL [BOOST SOURCES src_boost/*.cpp] ) ---+ 探测器的创建 探测器创建Detector Construction是通过dd4hep中DECLARE_DETELEMENT()来实现。static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector sens) { xml_det_t x_det = e; string name = x_det.nameStr(); ... } DECLARE_DETELEMENT(SimpleBox,create_detector) The argument signature of the build_detector is:

  • Detector& description: This handle provides the main hook to the detector tree (dd4hep::Detector).
  • xml_h e: Handle to the XML <detector> tag associated with the detector in the "compact" detector description file. This provides the mechanism for feeding in the run-time construction parameters.
  • SensitiveDetector sens: The sensitive detector to be assigned to the sensitive volumes/elements of the detector.

The DD4hep plugin macro DECLARE_DETELEMENT(SimpleBox, build_detector) stamps out the necessary boiler plate code to register a new detector called SimpleBox which is build by calling build_detector.

-- xu ming - 2019-12-30 ---++ Comments

This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback