diff --git a/detector/other/SingleShape_geo.cpp b/detector/other/SingleShape_geo.cpp deleted file mode 100644 index 78b979919..000000000 --- a/detector/other/SingleShape_geo.cpp +++ /dev/null @@ -1,63 +0,0 @@ -//========================================================================== -// AIDA Detector description implementation -//-------------------------------------------------------------------------- -// Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN) -// All rights reserved. -// -// For the licensing terms see $DD4hepINSTALL/LICENSE. -// For the list of contributors see $DD4hepINSTALL/doc/CREDITS. -// -// Author : M.Frank -// -//========================================================================== - -// Edited by A. Ilg, to have only the CAD import left and nothing else - -// Framework includes -#include -#include - -using namespace dd4hep; -using namespace dd4hep::detail; - -static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector sens) { - xml_dim_t x_det = e; - xml_comp_t xshape (x_det.child(_U(shape))); - xml_dim_t xpos (x_det.child(_U(position), false)); - xml_dim_t xrot (x_det.child(_U(rotation))); - xml_elt_t xmat (x_det.child(_U(material))); - xml_dim_t xbox (x_det.child(_U(box))); - DetElement d_det(x_det.nameStr(),x_det.id()); - Volume assembly(x_det.nameStr()+"_vol", Box(xbox.x(), xbox.y(), xbox.z()), description.air()); - //Assembly assembly(x_det.nameStr()+"_envelope"); - Material mat (description.material(xmat.attr(_U(name)))); - Position pos(xpos.x(),xpos.y(),xpos.z()); - RotationZYX rot(xrot.phi(),xrot.theta(),xrot.psi()); - - Solid sh = xml::createShape(description, xshape.typeStr(), xshape); - Volume vol = Volume(x_det.nameStr()+"_vol", sh, mat); - PlacedVolume pv; - - for(xml_coll_t c(xshape,_U(property)); c; ++c) { - xml_elt_t ec = c; - vol.addProperty(ec.attr(_U(name)), ec.attr(_U(value))); - } - - vol.setVisAttributes(description, x_det.visStr()); - - int ipos = 0; - for(xml_coll_t c(xshape, _U(position)); c; ++c) { - xml_dim_t xp = c; - Position vol_pos(xp.x(), xp.y(), xp.z()); - - pv = assembly.placeVolume(vol, Transform3D(rot, vol_pos)); - } - - assembly.setVisAttributes(description, xbox.attr(_U(vis))); - pv = description.pickMotherVolume(d_det).placeVolume(assembly, pos); - pv.addPhysVolID("system",x_det.id()); - d_det.setPlacement(pv); - return d_det; -} - -DECLARE_DETELEMENT(DD4hep_SingleShape,create_detector)