File indexing completed on 2025-01-18 09:14:40
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "DD4hep/DetFactoryHelper.h"
0010 #include "XML/Layering.h"
0011 #include "XML/Utilities.h"
0012
0013 using namespace std;
0014
0015 using dd4hep::DetElement;
0016 using dd4hep::Detector;
0017 using dd4hep::Ref_t;
0018 using dd4hep::SensitiveDetector;
0019
0020
0021 #ifndef DD4HEP_VERSION_GE
0022 #define DD4HEP_VERSION_GE(a, b) 0
0023 #endif
0024
0025 static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector) {
0026 xml_det_t x_det = e;
0027 string det_name = x_det.nameStr();
0028 DetElement sdet(det_name, x_det.id());
0029
0030 dd4hep::xml::createPlacedEnvelope(theDetector, e, sdet);
0031
0032 return sdet;
0033 }
0034
0035 DECLARE_DETELEMENT(MaterialEnvelope_o1_v01, create_detector)