21 using namespace DD4hep::DDRec;
22 using namespace DD4hep::Geometry;
25 struct LayeringContext {
28 std::map<int,DetElement> layers;
33 for(std::map<int,DetElement>::const_iterator i=layers.begin(); i!=layers.end();++i) {
36 std::cout <<
" Add layer:" << de.
name()
38 <<
" Parent:" << de.
parent().
name() << std::endl;
43 #define SURFACEINSTALLER_DATA LayeringContext
44 #define DD4HEP_USE_SURFACEINSTALL_HELPER LayeringExtensionPlugin
50 if ( ::strstr(de.
name(),
"layer") != 0 ) {
51 if ( !data.parent.isValid() ) {
55 if ( data.parent == de.
parent() && data.layers.find(de.
id()) == data.layers.end() ) {
56 data.layers[de.
id()] = de;
Handle class holding a placed volume (also called physical volume)
const char * name() const
Access the object name (or "" if not supported by the object)
ROOT::Math::XYZVector Position
int id() const
Get the detector identifier.
DetElement parent() const
Access to the detector elements's parent.
Handle class describing a detector element.
void setLayer(int layerIndex, Geometry::DetElement layer, const Position &normal)
Stores the layer information for the given layer index.