diff --git a/DDCore/include/DD4hep/SurfaceInstaller.h b/DDCore/include/DD4hep/SurfaceInstaller.h index ff00385bb28d671a2c7e10bed8adfd25236a2aab..cba6ad4db25bd506bb66d73f99a35bf3cd3a3267 100644 --- a/DDCore/include/DD4hep/SurfaceInstaller.h +++ b/DDCore/include/DD4hep/SurfaceInstaller.h @@ -145,7 +145,7 @@ namespace { typedef DD4hep::DDRec::Vector3D Vector3D; typedef DD4hep::DDRec::VolSurface VolSurface; typedef DD4hep::DDRec::VolPlane VolPlane; - typedef DDSurfaces::SurfaceType Type; + typedef SurfaceType Type; UserData data; /// Default (empty argument handler diff --git a/DDDetectors/src/Beampipe_o1_v01_geo.cpp b/DDDetectors/src/Beampipe_o1_v01_geo.cpp index c98591a688a1a0d50bd5c544284ec4afcf3798b4..9e99883224c2a72da241681a886255bbef979b7f 100644 --- a/DDDetectors/src/Beampipe_o1_v01_geo.cpp +++ b/DDDetectors/src/Beampipe_o1_v01_geo.cpp @@ -46,8 +46,8 @@ class SimpleCylinderImpl : public dd4hep::rec::VolCylinderImpl{ double _half_length ; public: /// standard c'tor with all necessary arguments - origin is (0,0,0) if not given. - SimpleCylinderImpl( DD4hep::Geometry::Volume vol, DDSurfaces::SurfaceType type, - double thickness_inner ,double thickness_outer, DDSurfaces::Vector3D origin ) : + SimpleCylinderImpl( DD4hep::Geometry::Volume vol, SurfaceType type, + double thickness_inner ,double thickness_outer, Vector3D origin ) : dd4hep::rec::VolCylinderImpl( vol, type, thickness_inner, thickness_outer, origin ), _half_length(0){ } @@ -57,13 +57,13 @@ public: void setID( DD4hep::long64 id ) { _id = id ; } // overwrite to include points inside the inner radius of the barrel - bool insideBounds(const DDSurfaces::Vector3D& point, double epsilon) const { + bool insideBounds(const Vector3D& point, double epsilon) const { return ( std::abs( point.rho() - origin().rho() ) < epsilon && std::abs( point.z() ) < _half_length ) ; } - virtual std::vector< std::pair<DDSurfaces::Vector3D, DDSurfaces::Vector3D> > getLines(unsigned nMax=100){ + virtual std::vector< std::pair<Vector3D, Vector3D> > getLines(unsigned nMax=100){ - std::vector< std::pair<DDSurfaces::Vector3D, DDSurfaces::Vector3D> > lines ; + std::vector< std::pair<Vector3D, Vector3D> > lines ; lines.reserve( nMax ) ; diff --git a/DDDetectors/src/CaloFaceBarrel_surfaces.cpp b/DDDetectors/src/CaloFaceBarrel_surfaces.cpp index 0d558c5398e6722fab21e5a41453375464f7a646..413b43d797e3e776ff111e7c43db2d81cbaa4e6a 100644 --- a/DDDetectors/src/CaloFaceBarrel_surfaces.cpp +++ b/DDDetectors/src/CaloFaceBarrel_surfaces.cpp @@ -43,10 +43,10 @@ namespace{ public: /// standard c'tor with all necessary arguments - origin is (0,0,0) if not given. - CaloBarrelPlaneImpl( DDSurfaces::SurfaceType typ, + CaloBarrelPlaneImpl( dd4hep::rec::SurfaceType typ, double thickness_inner ,double thickness_outer, - DDSurfaces::Vector3D u_val ,DDSurfaces::Vector3D v_val , - DDSurfaces::Vector3D n_val , DDSurfaces::Vector3D o_val, + dd4hep::rec::Vector3D u_val ,dd4hep::rec::Vector3D v_val , + dd4hep::rec::Vector3D n_val , dd4hep::rec::Vector3D o_val, DD4hep::Geometry::Volume vol, int id_val ) : dd4hep::rec::VolPlaneImpl( typ, thickness_inner,thickness_outer, u_val, v_val, n_val, o_val, vol, id_val), _length(0),_width(0) {} @@ -59,17 +59,17 @@ namespace{ void setID( DD4hep::long64 id_val ) { _id = id_val ; } // overwrite to include points inside the inner radius of the barrel - bool insideBounds(const DDSurfaces::Vector3D& point, double epsilon) const { - DDSurfaces::Vector2D uvVec = globalToLocal( point ) ; + bool insideBounds(const dd4hep::rec::Vector3D& point, double epsilon) const { + dd4hep::rec::Vector2D uvVec = globalToLocal( point ) ; return ( std::abs ( distance( point ) ) < epsilon ) && std::abs( uvVec[0] ) < _width/2. && std::abs( uvVec[1] ) < _length/2. ; } /// create outer bounding lines for the given symmetry of the polyhedron - virtual std::vector< std::pair<DDSurfaces::Vector3D, DDSurfaces::Vector3D> > getLines(unsigned){ + virtual std::vector< std::pair<dd4hep::rec::Vector3D, dd4hep::rec::Vector3D> > getLines(unsigned){ - std::vector< std::pair<DDSurfaces::Vector3D, DDSurfaces::Vector3D> > lines ; + std::vector< std::pair<dd4hep::rec::Vector3D, dd4hep::rec::Vector3D> > lines ; lines.push_back( std::make_pair( origin()+_width/2.*u()+_length/2.*v(), origin()-_width/2.*u()+_length/2.*v() ) ) ; lines.push_back( std::make_pair( origin()-_width/2.*u()+_length/2.*v(), origin()-_width/2.*u()-_length/2.*v() ) ) ; @@ -141,7 +141,7 @@ namespace{ double gam = phi0 + alpha/2. + i*alpha; - Vector3D + dd4hep::rec::Vector3D u( cos(gam+M_PI/2.), sin(gam+M_PI/2.), 0. ), v( 0. , 0. , 1. ), n( cos(gam) , sin(gam) , 0. ), diff --git a/DDDetectors/src/CaloFaceEndcap_surfaces.cpp b/DDDetectors/src/CaloFaceEndcap_surfaces.cpp index b4c16778fb78ad8fa3088d599343142ddf8c6ee5..761b586653630fa4348d41665a0ec55e6d2e7261 100644 --- a/DDDetectors/src/CaloFaceEndcap_surfaces.cpp +++ b/DDDetectors/src/CaloFaceEndcap_surfaces.cpp @@ -43,10 +43,10 @@ namespace{ unsigned _sym ; public: /// standard c'tor with all necessary arguments - origin is (0,0,0) if not given. - CaloEndcapPlaneImpl( DDSurfaces::SurfaceType typ, + CaloEndcapPlaneImpl( dd4hep::rec::SurfaceType typ, double thickness_inner ,double thickness_outer, - DDSurfaces::Vector3D u_val ,DDSurfaces::Vector3D v_val , - DDSurfaces::Vector3D n_val , DDSurfaces::Vector3D o_val, + dd4hep::rec::Vector3D u_val ,dd4hep::rec::Vector3D v_val , + dd4hep::rec::Vector3D n_val , dd4hep::rec::Vector3D o_val, DD4hep::Geometry::Volume vol, int id_val ) : dd4hep::rec::VolPlaneImpl( typ, thickness_inner,thickness_outer, u_val, v_val, n_val, o_val, vol, id_val), _r(0),_phi0(0),_sym(0) {} @@ -59,7 +59,7 @@ namespace{ void setID( DD4hep::long64 id_val ) { _id = id_val; } // overwrite to include points inside the inner radius of the endcap - bool insideBounds(const DDSurfaces::Vector3D& point, double epsilon) const { + bool insideBounds(const dd4hep::rec::Vector3D& point, double epsilon) const { double ri = _r * cos( 2.* M_PI / _sym ) ; @@ -69,17 +69,17 @@ namespace{ } /// create outer bounding lines for the given symmetry of the polyhedron - virtual std::vector< std::pair<DDSurfaces::Vector3D, DDSurfaces::Vector3D> > getLines(unsigned){ + virtual std::vector< std::pair<dd4hep::rec::Vector3D, dd4hep::rec::Vector3D> > getLines(unsigned){ - std::vector< std::pair<DDSurfaces::Vector3D, DDSurfaces::Vector3D> > lines ; + std::vector< std::pair<dd4hep::rec::Vector3D, dd4hep::rec::Vector3D> > lines ; double alpha = ( _sym ? 2.* M_PI / _sym : 0. ) ; for(unsigned i=0 ; i < _sym ; ++i){ double gam0 = i * alpha + _phi0 ; double gam1 = (i+1) * alpha + _phi0 ; - lines.push_back( std::make_pair( DDSurfaces::Vector3D( _r*cos(gam0), _r*sin(gam0), origin().z() ), - DDSurfaces::Vector3D( _r*cos(gam1), _r*sin(gam1), origin().z() ) ) ) ; + lines.push_back( std::make_pair( dd4hep::rec::Vector3D( _r*cos(gam0), _r*sin(gam0), origin().z() ), + dd4hep::rec::Vector3D( _r*cos(gam1), _r*sin(gam1), origin().z() ) ) ) ; } return lines; } @@ -139,7 +139,7 @@ namespace{ // shift position of origin of helper plane to pick up Air instead of vacuum - Vector3D u(1.,0.,0.), v(0.,1.,0.), n(0.,0.,1.), o(0., 0.5*radius , zpos ); + dd4hep::rec::Vector3D u(1.,0.,0.), v(0.,1.,0.), n(0.,0.,1.), o(0., 0.5*radius , zpos ); CaloEndcapPlane surf_pz(comp_vol,Type(Type::Helper,Type::Sensitive), inner_thickness, outer_thickness, u, v, n, o); diff --git a/DDRec/include/DDRec/Material.h b/DDRec/include/DDRec/Material.h index 73979d5636519f0cf5973090a4b305950b63d513..0953a10e3146743b4da26c6e68624380d73ca078 100644 --- a/DDRec/include/DDRec/Material.h +++ b/DDRec/include/DDRec/Material.h @@ -2,7 +2,7 @@ #define DDRec_Material_H #include "DD4hep/LCDD.h" -#include "DDSurfaces/IMaterial.h" +#include "DDRec/IMaterial.h" #include <list> @@ -10,14 +10,14 @@ namespace dd4hep { namespace rec { - /** Simple data class that implements the DDSurfaces::IMaterial interface + /** Simple data class that implements the IMaterial interface * and is used in the Surface implementation. * * @author F.Gaede, DESY * @date May, 20 2014 * @version $Id$ */ - class MaterialData : public DDSurfaces::IMaterial{ + class MaterialData : public IMaterial{ protected: std::string _name ; diff --git a/DDRec/include/DDRec/MaterialManager.h b/DDRec/include/DDRec/MaterialManager.h index 555e2c870cc1f44b5874bbab6d9017453d13e471..6c0c601311e7587a803b4f2f4381c1b34baa08df 100644 --- a/DDRec/include/DDRec/MaterialManager.h +++ b/DDRec/include/DDRec/MaterialManager.h @@ -3,7 +3,7 @@ #include "DD4hep/LCDD.h" #include "DD4hep/Objects.h" -#include "DDSurfaces/Vector3D.h" +#include "DDRec/Vector3D.h" #include "DDRec/Material.h" #include "DD4hep/DD4hepUnits.h" #include "DD4hep/Volumes.h" @@ -44,11 +44,11 @@ namespace dd4hep { * are ignored. Avoid calling this method in inner loops as the computation is not cheap. Ideally the result should be cached, * for example as an averaged material @see createAveragedMaterial(). */ - const MaterialVec& materialsBetween(const DDSurfaces::Vector3D& p0, const DDSurfaces::Vector3D& p1 , double epsilon=1e-4 ) ; + const MaterialVec& materialsBetween(const Vector3D& p0, const Vector3D& p1 , double epsilon=1e-4 ) ; /** Get the material at the given position. */ - const Material& materialAt(const DDSurfaces::Vector3D& pos ); + const Material& materialAt(const Vector3D& pos ); /** Create a material with averaged properties from all materials in the list. @@ -64,7 +64,7 @@ namespace dd4hep { Material _m ; // cached last points - DDSurfaces::Vector3D _p0 , _p1, _pos ; + Vector3D _p0 , _p1, _pos ; TGeoManager* _tgeoMgr ; }; diff --git a/DDRec/include/DDRec/Surface.h b/DDRec/include/DDRec/Surface.h index 0969e0f8b060585c6eefc3da62d4083f65222275..7254c9ee1f5242312951b8b26cc8fa064b4cd35a 100644 --- a/DDRec/include/DDRec/Surface.h +++ b/DDRec/include/DDRec/Surface.h @@ -5,7 +5,7 @@ #include "DD4hep/Volumes.h" #include "DD4hep/Detector.h" -#include "DDSurfaces/ISurface.h" +#include "DDRec/ISurface.h" #include "DDRec/Material.h" #include <list> @@ -455,7 +455,7 @@ namespace dd4hep { /** Convert the local position (u,v) on the surface to the global position - v runs along the axis of the cone, u is r*phi*/ virtual Vector3D localToGlobal( const Vector2D& point) const ; - virtual std::vector< std::pair<DDSurfaces::Vector3D, DDSurfaces::Vector3D> > getLines(unsigned nMax=100) ; + virtual std::vector< std::pair<Vector3D, Vector3D> > getLines(unsigned nMax=100) ; } ; diff --git a/DDRec/include/DDRec/SurfaceManager.h b/DDRec/include/DDRec/SurfaceManager.h index ab8799f12be452021940b503e668600320963064..72c218f12317423f8b00ac8b39852134ae2dc3c9 100644 --- a/DDRec/include/DDRec/SurfaceManager.h +++ b/DDRec/include/DDRec/SurfaceManager.h @@ -1,7 +1,7 @@ #ifndef DDRec_SurfaceManager_H_ #define DDRec_SurfaceManager_H_ -#include "DDSurfaces/ISurface.h" +#include "DDRec/ISurface.h" #include "DD4hep/LCDD.h" #include <string> #include <map> @@ -10,7 +10,7 @@ namespace dd4hep { namespace rec { /// typedef for surface maps, keyed by the cellID - typedef std::multimap< unsigned long, DDSurfaces::ISurface*> SurfaceMap ; + typedef std::multimap< unsigned long, ISurface*> SurfaceMap ; /** Surface manager class that holds maps of surfaces for all known * sensitive detector types and individual sub detectors. diff --git a/DDRec/src/MaterialManager.cpp b/DDRec/src/MaterialManager.cpp index 326cd3ac349ddf237017ff98ffadd54700fcce8b..bbec301dcefbc3961480e42b39f1033d20f4f325 100644 --- a/DDRec/src/MaterialManager.cpp +++ b/DDRec/src/MaterialManager.cpp @@ -28,7 +28,7 @@ namespace dd4hep { } - const MaterialVec&MaterialManager:: materialsBetween(const DDSurfaces::Vector3D& p0, const DDSurfaces::Vector3D& p1 , double epsilon) { + const MaterialVec&MaterialManager:: materialsBetween(const Vector3D& p0, const Vector3D& p1 , double epsilon) { if( ( p0 != _p0 ) || ( p1 != _p1 ) ) { @@ -100,7 +100,7 @@ namespace dd4hep { // printf( " -- step length : %1.8e %1.8e %1.8e %1.8e %1.8e %1.8e %1.8e - %s \n" , length , // position[0], position[1], position[2], previouspos[0], previouspos[1], previouspos[2] , node1->GetMedium()->GetMaterial()->GetName() ) ; - DDSurfaces::Vector3D posV( position ) ; + Vector3D posV( position ) ; double currDistance = ( posV - p0 ).r() ; @@ -153,7 +153,7 @@ namespace dd4hep { } - const Geometry::Material& MaterialManager::materialAt(const DDSurfaces::Vector3D& pos ){ + const Geometry::Material& MaterialManager::materialAt(const Vector3D& pos ){ if( pos != _pos ) { diff --git a/DDRec/src/Surface.cpp b/DDRec/src/Surface.cpp index c2db6aa6485e1b2384eb5d5ab6317397a58af802..113a4ad69aab8ff6e1bc68c9ef826cb6a394f773 100644 --- a/DDRec/src/Surface.cpp +++ b/DDRec/src/Surface.cpp @@ -66,9 +66,9 @@ namespace dd4hep { double VolSurfaceBase::length_along_u() const { - const DDSurfaces::Vector3D& o = this->origin() ; - const DDSurfaces::Vector3D& u_val = this->u( o ) ; - DDSurfaces::Vector3D um = -1. * u_val ; + const Vector3D& o = this->origin() ; + const Vector3D& u_val = this->u( o ) ; + Vector3D um = -1. * u_val ; double dist_p = 0. ; double dist_m = 0. ; @@ -107,8 +107,8 @@ namespace dd4hep { // << " dist_m " << dist_m // << std::endl ; - DDSurfaces::Vector3D o_1 = this->origin() + dist_p * u_val ; - DDSurfaces::Vector3D o_2 = this->origin() + dist_m * um ; + Vector3D o_1 = this->origin() + dist_p * u_val ; + Vector3D o_2 = this->origin() + dist_m * um ; dist_p += volume()->GetShape()->DistFromInside( const_cast<double*> ( o_1.const_array() ) , const_cast<double*> ( u_val.const_array() ) ) ; @@ -129,9 +129,9 @@ namespace dd4hep { double VolSurfaceBase::length_along_v() const { - const DDSurfaces::Vector3D& o = this->origin() ; - const DDSurfaces::Vector3D& v_val = this->v( o ) ; - DDSurfaces::Vector3D vm = -1. * v_val ; + const Vector3D& o = this->origin() ; + const Vector3D& v_val = this->v( o ) ; + Vector3D vm = -1. * v_val ; double dist_p = 0. ; double dist_m = 0. ; @@ -170,8 +170,8 @@ namespace dd4hep { // << " dist_m " << dist_m // << std::endl ; - DDSurfaces::Vector3D o_1 = this->origin() + dist_p * v_val ; - DDSurfaces::Vector3D o_2 = this->origin() + dist_m * vm ; + Vector3D o_1 = this->origin() + dist_p * v_val ; + Vector3D o_2 = this->origin() + dist_m * vm ; dist_p += volume()->GetShape()->DistFromInside( const_cast<double*> ( o_1.const_array() ) , const_cast<double*> ( v_val.const_array() ) ) ; @@ -444,9 +444,9 @@ namespace dd4hep { } /// create outer bounding lines for the given symmetry of the polyhedron - std::vector< std::pair<DDSurfaces::Vector3D, DDSurfaces::Vector3D> > VolConeImpl::getLines(unsigned nMax){ + std::vector< std::pair<Vector3D, Vector3D> > VolConeImpl::getLines(unsigned nMax){ - std::vector< std::pair<DDSurfaces::Vector3D, DDSurfaces::Vector3D> > lines ; + std::vector< std::pair<Vector3D, Vector3D> > lines ; lines.reserve( nMax ) ; @@ -839,7 +839,7 @@ namespace dd4hep { for( unsigned i=0;i<n;++i){ - DDSurfaces::Vector3D av,bv; + Vector3D av,bv; _wtM->LocalToMaster( local_lines[i].first , av.array() ) ; _wtM->LocalToMaster( local_lines[i].second , bv.array() ) ; @@ -852,10 +852,10 @@ namespace dd4hep { // get local and global surface vectors - const DDSurfaces::Vector3D& lu = _volSurf.u() ; - // const DDSurfaces::Vector3D& lv = _volSurf.v() ; - const DDSurfaces::Vector3D& ln = _volSurf.normal() ; - DDSurfaces::Vector3D lo = _volSurf.origin() ; + const Vector3D& lu = _volSurf.u() ; + // const Vector3D& lv = _volSurf.v() ; + const Vector3D& ln = _volSurf.normal() ; + Vector3D lo = _volSurf.origin() ; Volume vol = volume() ; const TGeoShape* shape = vol->GetShape() ; @@ -867,7 +867,7 @@ namespace dd4hep { TGeoBBox* box = ( TGeoBBox* ) shape ; - DDSurfaces::Vector3D boxDim( box->GetDX() , box->GetDY() , box->GetDZ() ) ; + Vector3D boxDim( box->GetDX() , box->GetDY() , box->GetDZ() ) ; bool isYZ = std::fabs( ln.x() - 1.0 ) < epsilon ; // normal parallel to x @@ -881,8 +881,8 @@ namespace dd4hep { unsigned uidx = 1 ; unsigned vidx = 2 ; - DDSurfaces::Vector3D ubl( 0., 1., 0. ) ; - DDSurfaces::Vector3D vbl( 0., 0., 1. ) ; + Vector3D ubl( 0., 1., 0. ) ; + Vector3D vbl( 0., 0., 1. ) ; if( isXZ ) { @@ -899,8 +899,8 @@ namespace dd4hep { vidx = 1 ; } - DDSurfaces::Vector3D ub ; - DDSurfaces::Vector3D vb ; + Vector3D ub ; + Vector3D vb ; _wtM->LocalToMasterVect( ubl , ub.array() ) ; _wtM->LocalToMasterVect( vbl , vb.array() ) ; @@ -1004,12 +1004,12 @@ namespace dd4hep { //according to the TGeoTrap definition, the lengths are given such that the normal vector of the surface //points in the e_z direction. - DDSurfaces::Vector3D ubl( 1., 0., 0. ) ; - DDSurfaces::Vector3D vbl( 0., 1., 0. ) ; + Vector3D ubl( 1., 0., 0. ) ; + Vector3D vbl( 0., 1., 0. ) ; //the local span vectors are transformed into the main coordinate system (in LocalToMasterVect()) - DDSurfaces::Vector3D ub ; - DDSurfaces::Vector3D vb ; + Vector3D ub ; + Vector3D vb ; _wtM->LocalToMasterVect( ubl , ub.array() ) ; _wtM->LocalToMasterVect( vbl , vb.array() ) ; @@ -1035,12 +1035,12 @@ namespace dd4hep { //the normal vector is parallel to e_y for all geometry cases in CLIC //if that is at some point not the case anymore, then local plane vectors ubl, vbl //must be initialized like it is done for the boxes (line 674 following) - DDSurfaces::Vector3D ubl( 1., 0., 0. ) ; - DDSurfaces::Vector3D vbl( 0., 0., 1. ) ; + Vector3D ubl( 1., 0., 0. ) ; + Vector3D vbl( 0., 0., 1. ) ; //the local span vectors are transformed into the main coordinate system (in LocalToMasterVect()) - DDSurfaces::Vector3D ub ; - DDSurfaces::Vector3D vb ; + Vector3D ub ; + Vector3D vb ; _wtM->LocalToMasterVect( ubl , ub.array() ) ; _wtM->LocalToMasterVect( vbl , vb.array() ) ; @@ -1067,12 +1067,12 @@ namespace dd4hep { //the normal vector is parallel to e_y for all geometry cases in CLIC //if that is at some point not the case anymore, then local plane vectors ubl, vbl //must be initialized like it is done for the boxes (line 674 following) - DDSurfaces::Vector3D ubl( 1., 0., 0. ) ; - DDSurfaces::Vector3D vbl( 0., 0., 1. ) ; + Vector3D ubl( 1., 0., 0. ) ; + Vector3D vbl( 0., 0., 1. ) ; //the local span vectors are transformed into the main coordinate system (in LocalToMasterVect()) - DDSurfaces::Vector3D ub ; - DDSurfaces::Vector3D vb ; + Vector3D ub ; + Vector3D vb ; _wtM->LocalToMasterVect( ubl , ub.array() ) ; _wtM->LocalToMasterVect( vbl , vb.array() ) ; @@ -1102,7 +1102,7 @@ namespace dd4hep { TVector3 norm( ln.x() , ln.y() , ln.z() ) ; - DDSurfaces::Vector3D first, previous ; + Vector3D first, previous ; for(unsigned i=0 ; i< nMax ; ++i ){ @@ -1115,15 +1115,15 @@ namespace dd4hep { TVector3 vecR = rot * vec ; - DDSurfaces::Vector3D luRot ; + Vector3D luRot ; luRot.fill( vecR ) ; double dist = shape->DistFromInside( const_cast<double*> (lo.const_array()) , const_cast<double*> (luRot.const_array()) , 3, 0.1 ) ; // local point at volume boundary - DDSurfaces::Vector3D lp = lo + dist * luRot ; + Vector3D lp = lo + dist * luRot ; - DDSurfaces::Vector3D gp ; + Vector3D gp ; _wtM->LocalToMaster( lp , gp.array() ) ; @@ -1202,7 +1202,7 @@ namespace dd4hep { Vector3D lp , u_val ; _wtM->MasterToLocal( point , lp.array() ) ; - const DDSurfaces::Vector3D& lu = _volSurf.u( lp ) ; + const Vector3D& lu = _volSurf.u( lp ) ; _wtM->LocalToMasterVect( lu , u_val.array() ) ; return u_val ; } @@ -1210,7 +1210,7 @@ namespace dd4hep { Vector3D CylinderSurface::v(const Vector3D& point ) const { Vector3D lp , v_val ; _wtM->MasterToLocal( point , lp.array() ) ; - const DDSurfaces::Vector3D& lv = _volSurf.v( lp ) ; + const Vector3D& lv = _volSurf.v( lp ) ; _wtM->LocalToMasterVect( lv , v_val.array() ) ; return v_val ; } @@ -1218,7 +1218,7 @@ namespace dd4hep { Vector3D CylinderSurface::normal(const Vector3D& point ) const { Vector3D lp , n ; _wtM->MasterToLocal( point , lp.array() ) ; - const DDSurfaces::Vector3D& ln = _volSurf.normal( lp ) ; + const Vector3D& ln = _volSurf.normal( lp ) ; _wtM->LocalToMasterVect( ln , n.array() ) ; return n ; } diff --git a/DDRec/src/SurfaceManager.cpp b/DDRec/src/SurfaceManager.cpp index f83fd6cc7a3591eb1495927085276c75a50908ea..2be6c7588dd1b11fa313c5f97dac012dd5b4b73a 100644 --- a/DDRec/src/SurfaceManager.cpp +++ b/DDRec/src/SurfaceManager.cpp @@ -6,8 +6,6 @@ #include <sstream> namespace dd4hep { - - using namespace DDSurfaces ; namespace rec { diff --git a/DDTest/src/test_surface.cc b/DDTest/src/test_surface.cc index 4b02c228533c0f57767aea30aba4dd89f89f6a7f..e89482e2fa659d26e5a98ce92428f3137dd09c0b 100644 --- a/DDTest/src/test_surface.cc +++ b/DDTest/src/test_surface.cc @@ -14,10 +14,8 @@ #include <cmath> using namespace std ; -using namespace DD4hep ; -using namespace Geometry; -using namespace DDRec ; -using namespace DDSurfaces ; +using namespace dd4hep ; +using namespace dd4hep::rec ; // this should be the first line in your test diff --git a/UtilityApps/src/dumpdetector.cpp b/UtilityApps/src/dumpdetector.cpp index ff9589d36fdd077ee8f4f9ecc19b268e878e736f..603a2c190b3ddd8218333929613e98e991b9d3f7 100644 --- a/UtilityApps/src/dumpdetector.cpp +++ b/UtilityApps/src/dumpdetector.cpp @@ -31,11 +31,9 @@ using namespace std ; -using namespace DD4hep ; -using namespace DD4hep::Geometry; -using namespace DD4hep::DDRec; -using namespace DDSurfaces ; using namespace dd4hep ; +using namespace dd4hep::rec; + //============================================================================= static void printDetectorData( DetElement det ){ diff --git a/UtilityApps/src/graphicalMaterialScan.cpp b/UtilityApps/src/graphicalMaterialScan.cpp index 81138107a165867fb85855045aa1828745a82b70..3673d94d08a2165d6c0e316bf27a92ba674ac5a7 100644 --- a/UtilityApps/src/graphicalMaterialScan.cpp +++ b/UtilityApps/src/graphicalMaterialScan.cpp @@ -41,8 +41,7 @@ #include <cassert> using namespace DD4hep; -using namespace DDRec; -using DDSurfaces::Vector3D; +using namespace dd4hep::rec; using std::cout; using std::endl; diff --git a/UtilityApps/src/materialScan.cpp b/UtilityApps/src/materialScan.cpp index 38bb73e0d10cf3de33083aa437297b2570d493e8..da548f570ad073c0d6199e29d6ae127989314719 100644 --- a/UtilityApps/src/materialScan.cpp +++ b/UtilityApps/src/materialScan.cpp @@ -25,9 +25,8 @@ #include "DDRec/MaterialManager.h" #include "main.h" -using namespace DD4hep; -using namespace DDRec; -using DDSurfaces::Vector3D; +using namespace dd4hep; +using namespace dd4hep::rec; int main_wrapper(int argc, char** argv) { struct Handler { diff --git a/UtilityApps/src/print_materials.cpp b/UtilityApps/src/print_materials.cpp index 737490f26fd5eceac726258795b671310781403d..1e3bc8fba2615ae0ea14ce614b3c318a409f2ebe 100644 --- a/UtilityApps/src/print_materials.cpp +++ b/UtilityApps/src/print_materials.cpp @@ -21,11 +21,9 @@ #include "DDRec/MaterialManager.h" using namespace std ; -using namespace DD4hep ; -using namespace DD4hep::Geometry; -using namespace DD4hep::DDRec; -using namespace DDSurfaces ; using namespace dd4hep ; +using namespace dd4hep::rec; + //============================================================================= #include "main.h" diff --git a/UtilityApps/src/test_surfaces.cpp b/UtilityApps/src/test_surfaces.cpp index a7c177ddfa93e47e5bb424a8669f4a48fe18854d..a614b35a5684bc5c5d979aeccf9b5bf49b2cdea0 100644 --- a/UtilityApps/src/test_surfaces.cpp +++ b/UtilityApps/src/test_surfaces.cpp @@ -32,10 +32,8 @@ #include <sstream> using namespace std ; -using namespace DD4hep ; -using namespace DD4hep::Geometry; -using namespace DD4hep::DDRec ; -using namespace DDSurfaces ; +using namespace dd4hep ; +using namespace dd4hep::rec ; using namespace lcio; diff --git a/UtilityApps/src/teve_display.cpp b/UtilityApps/src/teve_display.cpp index b0c991ad91edc02a1640a09d9b3b1708020d7b41..ead169cc9324b79bf91b07400ac4c63e8de1aa67 100644 --- a/UtilityApps/src/teve_display.cpp +++ b/UtilityApps/src/teve_display.cpp @@ -58,10 +58,8 @@ #include "TGLScenePad.h" -using namespace DD4hep ; -using namespace DDRec ; -using namespace Geometry ; -using namespace DDSurfaces ; +using namespace dd4hep ; +using namespace dd4hep::rec ; //===================================================================================== // function declarations: @@ -177,14 +175,14 @@ TEveStraightLineSet* getSurfaceVectors(bool addO, bool addU, bool addV, bool add for( SurfaceList::const_iterator it = sL.begin() ; it != sL.end() ; ++it ){ ISurface* surf = *it ; - const DDSurfaces::Vector3D& u = surf->u() ; - const DDSurfaces::Vector3D& v = surf->v() ; - const DDSurfaces::Vector3D& n = surf->normal() ; - const DDSurfaces::Vector3D& o = surf->origin() ; - - DDSurfaces::Vector3D ou = o + u ; - DDSurfaces::Vector3D ov = o + v ; - DDSurfaces::Vector3D on = o + n ; + const Vector3D& u = surf->u() ; + const Vector3D& v = surf->v() ; + const Vector3D& n = surf->normal() ; + const Vector3D& o = surf->origin() ; + + Vector3D ou = o + u ; + Vector3D ov = o + v ; + Vector3D on = o + n ; if (addU) ls->AddLine( o.x(), o.y(), o.z(), ou.x() , ou.y() , ou.z() );