diff --git a/examples/ILDExDet/src/ILDExVXD_geo.cpp b/examples/ILDExDet/src/ILDExVXD_geo.cpp index 9ed3fba3838ff852f9cf923a3f5de8a0c07a4ec7..c8f0d5e0380aad30d3620eeb72fc4e2f73461907 100644 --- a/examples/ILDExDet/src/ILDExVXD_geo.cpp +++ b/examples/ILDExDet/src/ILDExVXD_geo.cpp @@ -9,6 +9,7 @@ #include "DD4hep/DetFactoryHelper.h" #include "VXDData.h" +//#include "GearWrapper.h" using namespace std; using namespace DD4hep; @@ -33,6 +34,11 @@ static Ref_t create_element(LCDD& lcdd, xml_h e, SensitiveDetector sens) { vxd_data->id = x_det.id(); + // //--------------- create gear::ZPlanarParameters and add them as Extension + // GearZPlanarParameters* gearZPlanar = new GearZPlanarParameters ; + // vxd.addExtension<GearZPlanarParameters>( gearZPlanar ) ; + // //-------------------------------------------------------------------- + for(xml_coll_t c(e,_U(layer)); c; ++c) { xml_comp_t x_layer (c); @@ -119,16 +125,35 @@ static Ref_t create_element(LCDD& lcdd, xml_h e, SensitiveDetector sens) { double lthick = sens_thick + supp_thick ; - Position pos( (radius + lthick/2.)*cos(phi) - offset * sin( phi ) , - (radius + lthick/2.)*sin(phi) + offset * cos( phi ) , - 0. ) ; - RotationZYX rot( 0, 0 , phi ) ; - pv = assembly.placeVolume( laddervol,Transform3D(RotationZ(phi),pos)); +#if 0 + pv = assembly.placeVolume( laddervol,Transform3D( rot, Position( (radius + lthick/2.)*cos(phi) - offset * sin( phi ) , + (radius + lthick/2.)*sin(phi) + offset * cos( phi ) , + 0. ) )); + pv.addPhysVolID("layer", layer_id ).addPhysVolID( "module" , j ).addPhysVolID("sensor", 0 ) ; +#else + + // put one wafer at plus z and one at minus z + + pv = assembly.placeVolume( laddervol, Transform3D( rot , Position( (radius + lthick/2.)*cos(phi) - offset * sin( phi ) , + (radius + lthick/2.)*sin(phi) + offset * cos( phi ) , + zhalf ) ) ); + + pv.addPhysVolID("layer", layer_id ).addPhysVolID( "module" , j ).addPhysVolID("sensor", 0 ).addPhysVolID("side", 1 ) ; + + + pv = assembly.placeVolume( laddervol, Transform3D( rot , Position( (radius + lthick/2.)*cos(phi) - offset * sin( phi ) , + (radius + lthick/2.)*sin(phi) + offset * cos( phi ) , + -zhalf ) ) ); + + pv.addPhysVolID("layer", layer_id ).addPhysVolID( "module" , j ).addPhysVolID("sensor", 0 ).addPhysVolID("side", -1 ) ; ; + +#endif + //pv = assembly.placeVolume( sensvol, pos, rot ) ; }