diff --git a/DDCore/include/DD4hep/LCDD.h b/DDCore/include/DD4hep/LCDD.h index 4ef65b038e059f8719ebe77ca220eea41983bfdd..a43903ed23d20c3eb6fceafb443f6602f7025f58 100644 --- a/DDCore/include/DD4hep/LCDD.h +++ b/DDCore/include/DD4hep/LCDD.h @@ -37,6 +37,14 @@ // Forward declarations class TGeoManager; + +//fg: for the transition period we define the old namespaces also in the new ones: +namespace dd4hep { + using namespace DD4hep ; + using namespace DD4hep::Geometry ; +} + + /// Namespace for the AIDA detector description toolkit namespace DD4hep { diff --git a/DDCore/include/DD4hep/SurfaceInstaller.h b/DDCore/include/DD4hep/SurfaceInstaller.h index 6ef0160c96009271f1e0c812caf59278976c8bff..ff00385bb28d671a2c7e10bed8adfd25236a2aab 100644 --- a/DDCore/include/DD4hep/SurfaceInstaller.h +++ b/DDCore/include/DD4hep/SurfaceInstaller.h @@ -22,16 +22,18 @@ #include <map> #include <algorithm> -/// Namespace for the AIDA detector description toolkit -namespace DD4hep { - - /// Namespace for the reconstruction part of the AIDA detector description toolkit - namespace DDRec { - /// Class describing surface data - // class SurfaceData; + + +namespace dd4hep{ + namespace rec{ class VolSurfaceBase; class SurfaceType; - } + } +} + + +/// Namespace for the AIDA detector description toolkit +namespace DD4hep { /** Base class to implement surface installers for known detector patterns * @@ -51,8 +53,8 @@ namespace DD4hep { typedef Geometry::PlacedVolume PlacedVolume; typedef Geometry::DetectorTools::ElementPath ElementPath; typedef Geometry::DetectorTools::PlacementPath PlacementPath; - typedef DDRec::VolSurfaceBase SurfaceData; - typedef DDRec::SurfaceType SurfaceType; + typedef dd4hep::rec::VolSurfaceBase SurfaceData; + typedef dd4hep::rec::SurfaceType SurfaceType; typedef std::map<TGeoVolume*, SurfaceData* > Surfaces; /// Reference to the LCDD instance diff --git a/DDDetectors/src/Beampipe_o1_v01_geo.cpp b/DDDetectors/src/Beampipe_o1_v01_geo.cpp index 508c11a9a87047abe76822db2b316881e7d89ce3..c98591a688a1a0d50bd5c544284ec4afcf3798b4 100644 --- a/DDDetectors/src/Beampipe_o1_v01_geo.cpp +++ b/DDDetectors/src/Beampipe_o1_v01_geo.cpp @@ -36,19 +36,19 @@ using DD4hep::Geometry::Volume; using DD4hep::Geometry::Solid; using DD4hep::Geometry::Tube; -using DD4hep::DDRec::Vector3D; -using DD4hep::DDRec::VolCylinder; -using DD4hep::DDRec::VolCone; -using DD4hep::DDRec::SurfaceType; +using dd4hep::rec::Vector3D; +using dd4hep::rec::VolCylinder; +using dd4hep::rec::VolCone; +using dd4hep::rec::SurfaceType; /// helper class for a simple cylinder surface parallel to z with a given length - used as IP layer -class SimpleCylinderImpl : public DD4hep::DDRec::VolCylinderImpl{ +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 ) : - DD4hep::DDRec::VolCylinderImpl( vol, type, thickness_inner, thickness_outer, origin ), + dd4hep::rec::VolCylinderImpl( vol, type, thickness_inner, thickness_outer, origin ), _half_length(0){ } void setHalfLength( double half_length){ @@ -92,11 +92,11 @@ public: } }; -class SimpleCylinder : public DD4hep::DDRec::VolSurface{ +class SimpleCylinder : public dd4hep::rec::VolSurface{ public: - SimpleCylinder( DD4hep::Geometry::Volume vol, DD4hep::DDRec::SurfaceType type, double thickness_inner , + SimpleCylinder( DD4hep::Geometry::Volume vol, dd4hep::rec::SurfaceType type, double thickness_inner , double thickness_outer, Vector3D origin ) : - DD4hep::DDRec::VolSurface( new SimpleCylinderImpl( vol, type, thickness_inner , thickness_outer, origin ) ) { + dd4hep::rec::VolSurface( new SimpleCylinderImpl( vol, type, thickness_inner , thickness_outer, origin ) ) { } SimpleCylinderImpl* operator->() { return static_cast<SimpleCylinderImpl*>( _surf ) ; } } ; @@ -126,7 +126,7 @@ static DD4hep::Geometry::Ref_t create_element(DD4hep::Geometry::LCDD& lcdd, //----------------------------------------------------------------------------------- - DD4hep::DDRec::ConicalSupportData* beampipeData = new DD4hep::DDRec::ConicalSupportData ; + dd4hep::rec::ConicalSupportData* beampipeData = new dd4hep::rec::ConicalSupportData ; //DD4hep/TGeo seems to need rad (as opposed to the manual) const double phi1 = 0 ; @@ -169,7 +169,7 @@ static DD4hep::Geometry::Ref_t create_element(DD4hep::Geometry::LCDD& lcdd, printout(DD4hep::INFO, "DD4hep_Beampipe", pipeInfo.str() ); if( crossType == ODH::kCenter ) { // store only the central sections ! - DD4hep::DDRec::ConicalSupportData::Section section ; + dd4hep::rec::ConicalSupportData::Section section ; section.rInner = rInnerStart ; section.rOuter = rOuterStart ; section.zPos = zStart ; @@ -237,8 +237,8 @@ static DD4hep::Geometry::Ref_t create_element(DD4hep::Geometry::LCDD& lcdd, VolCylinder cylSurf1( wallLog , SurfaceType( SurfaceType::Helper ) , 0.5*thickness , 0.5*thickness , ocyl ); VolCylinder cylSurf2( wallLog2, SurfaceType( SurfaceType::Helper ) , 0.5*thickness , 0.5*thickness , ocyl ); - DD4hep::DDRec::volSurfaceList( tube )->push_back( cylSurf1 ); - DD4hep::DDRec::volSurfaceList( tube )->push_back( cylSurf2 ); + dd4hep::rec::volSurfaceList( tube )->push_back( cylSurf1 ); + dd4hep::rec::volSurfaceList( tube )->push_back( cylSurf2 ); }else{ // cone @@ -252,8 +252,8 @@ static DD4hep::Geometry::Ref_t create_element(DD4hep::Geometry::LCDD& lcdd, VolCone conSurf1( wallLog , SurfaceType( SurfaceType::Helper ) , 0.5*thickness , 0.5*thickness , v, ocon ); VolCone conSurf2( wallLog2, SurfaceType( SurfaceType::Helper ) , 0.5*thickness , 0.5*thickness , v, ocon ); - DD4hep::DDRec::volSurfaceList( tube )->push_back( conSurf1 ); - DD4hep::DDRec::volSurfaceList( tube )->push_back( conSurf2 ); + dd4hep::rec::volSurfaceList( tube )->push_back( conSurf1 ); + dd4hep::rec::volSurfaceList( tube )->push_back( conSurf2 ); } @@ -607,9 +607,9 @@ static DD4hep::Geometry::Ref_t create_element(DD4hep::Geometry::LCDD& lcdd, SimpleCylinder ipCylSurf( envelope , SurfaceType( SurfaceType::Helper ) , 1.e-5 , 1e-5 , oIPCyl ) ; // the length does not really matter here as long as it is long enough for all tracks ... ipCylSurf->setHalfLength( 100*dd4hep::cm ) ; - DD4hep::DDRec::volSurfaceList( tube )->push_back( ipCylSurf ) ; + dd4hep::rec::volSurfaceList( tube )->push_back( ipCylSurf ) ; - tube.addExtension< DD4hep::DDRec::ConicalSupportData >( beampipeData ) ; + tube.addExtension< dd4hep::rec::ConicalSupportData >( beampipeData ) ; //-------------------------------------- diff --git a/DDDetectors/src/CaloFaceBarrel_surfaces.cpp b/DDDetectors/src/CaloFaceBarrel_surfaces.cpp index bf36e82dd1d87d53466552e8f463612e34c5f722..0d558c5398e6722fab21e5a41453375464f7a646 100644 --- a/DDDetectors/src/CaloFaceBarrel_surfaces.cpp +++ b/DDDetectors/src/CaloFaceBarrel_surfaces.cpp @@ -38,7 +38,7 @@ namespace { namespace{ /// helper class for a planar surface placed into a polyhedral calorimeter barrel - class CaloBarrelPlaneImpl : public DD4hep::DDRec::VolPlaneImpl { + class CaloBarrelPlaneImpl : public dd4hep::rec::VolPlaneImpl { double _length, _width ; public: @@ -48,7 +48,7 @@ namespace{ DDSurfaces::Vector3D u_val ,DDSurfaces::Vector3D v_val , DDSurfaces::Vector3D n_val , DDSurfaces::Vector3D o_val, DD4hep::Geometry::Volume vol, int id_val ) : - DD4hep::DDRec::VolPlaneImpl( typ, thickness_inner,thickness_outer, u_val, v_val, n_val, o_val, vol, 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) {} void setData( double length, double width){ @@ -80,7 +80,7 @@ namespace{ } }; - typedef DD4hep::DDRec::VolSurfaceHandle<CaloBarrelPlaneImpl> CaloBarrelPlane ; + typedef dd4hep::rec::VolSurfaceHandle<CaloBarrelPlaneImpl> CaloBarrelPlane ; template <> void Installer<UserData>::handle_arguments(int argc, char** argv) { diff --git a/DDDetectors/src/CaloFaceEndcap_surfaces.cpp b/DDDetectors/src/CaloFaceEndcap_surfaces.cpp index 0813f0943171ad570e99b071db9f21c4a91f7ced..b4c16778fb78ad8fa3088d599343142ddf8c6ee5 100644 --- a/DDDetectors/src/CaloFaceEndcap_surfaces.cpp +++ b/DDDetectors/src/CaloFaceEndcap_surfaces.cpp @@ -37,7 +37,7 @@ namespace { namespace{ /// helper class for a planar surface placed into a polyhedral calorimeter endcap - class CaloEndcapPlaneImpl : public DD4hep::DDRec::VolPlaneImpl{ + class CaloEndcapPlaneImpl : public dd4hep::rec::VolPlaneImpl{ double _r ; double _phi0 ; unsigned _sym ; @@ -48,7 +48,7 @@ namespace{ DDSurfaces::Vector3D u_val ,DDSurfaces::Vector3D v_val , DDSurfaces::Vector3D n_val , DDSurfaces::Vector3D o_val, DD4hep::Geometry::Volume vol, int id_val ) : - DD4hep::DDRec::VolPlaneImpl( typ, thickness_inner,thickness_outer, u_val, v_val, n_val, o_val, vol, 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) {} void setData( double radius, double phi0, unsigned symmetry){ @@ -85,7 +85,7 @@ namespace{ } }; - typedef DD4hep::DDRec::VolSurfaceHandle<CaloEndcapPlaneImpl> CaloEndcapPlane ; + typedef dd4hep::rec::VolSurfaceHandle<CaloEndcapPlaneImpl> CaloEndcapPlane ; template <> void Installer<UserData>::handle_arguments(int argc, char** argv) { diff --git a/DDDetectors/src/Solenoid_o1_v01_gep.cpp b/DDDetectors/src/Solenoid_o1_v01_gep.cpp index af085baebf95829a45903344b44012627874b52e..95dc903d0a2eabb204aad37726c1f09513591f7c 100644 --- a/DDDetectors/src/Solenoid_o1_v01_gep.cpp +++ b/DDDetectors/src/Solenoid_o1_v01_gep.cpp @@ -45,10 +45,10 @@ static Ref_t create_detector(LCDD& lcdd, xml_h e, SensitiveDetector sens) { int n = 0; //added code by Thorben Quast for event display - DDRec::LayeredCalorimeterData* solenoidData = new DDRec::LayeredCalorimeterData; + dd4hep::rec::LayeredCalorimeterData* solenoidData = new dd4hep::rec::LayeredCalorimeterData; solenoidData->inner_symmetry = 0; solenoidData->outer_symmetry = 0; - solenoidData->layoutType = DDRec::LayeredCalorimeterData::BarrelLayout ; + solenoidData->layoutType = dd4hep::rec::LayeredCalorimeterData::BarrelLayout ; double inner_radius= std::numeric_limits<double>::max(); double outer_radius= 0; @@ -75,7 +75,7 @@ static Ref_t create_detector(LCDD& lcdd, xml_h e, SensitiveDetector sens) { //NN: These probably need to be fixed and ced modified to read the extent, rather than the layer //added code by Thorben Quast for event display - DDRec::LayeredCalorimeterData::Layer solenoidLayer; + dd4hep::rec::LayeredCalorimeterData::Layer solenoidLayer; solenoidLayer.distance = r; solenoidLayer.inner_thickness = thickness/2.; @@ -127,7 +127,7 @@ static Ref_t create_detector(LCDD& lcdd, xml_h e, SensitiveDetector sens) { solenoidData->extent[3] = detZ; //added code by Thorben Quast for event display - sdet.addExtension< DDRec::LayeredCalorimeterData >( solenoidData ) ; + sdet.addExtension< dd4hep::rec::LayeredCalorimeterData >( solenoidData ) ; return sdet; diff --git a/DDRec/include/DDRec/CellIDPositionConverter.h b/DDRec/include/DDRec/CellIDPositionConverter.h index 17965823d579c22fb3446dcac8a7cf39c1dba6e4..42aaa81b34041ff0ee3b17f11c991de48dfd012a 100644 --- a/DDRec/include/DDRec/CellIDPositionConverter.h +++ b/DDRec/include/DDRec/CellIDPositionConverter.h @@ -1,6 +1,7 @@ #ifndef CellIDPositionConverter_H_ #define CellIDPositionConverter_H_ +#include "DD4hep/LCDD.h" #include "DD4hep/Readout.h" #include "DD4hep/VolumeManager.h" @@ -10,11 +11,11 @@ #include <string> -namespace DD4hep { - namespace DDRec { - - typedef DDSegmentation::CellID CellID; - typedef DDSegmentation::VolumeID VolumeID; +namespace dd4hep { + namespace rec { + + typedef DD4hep::DDSegmentation::CellID CellID; + typedef DD4hep::DDSegmentation::VolumeID VolumeID; /** Utility for position to cellID and cellID to position conversions. * (Correctly re-implements some of the functionality of the deprecated IDDecoder). @@ -32,8 +33,8 @@ namespace DD4hep { public: /// The constructor - takes the main lcdd object. - CellIDPositionConverter( Geometry::LCDD& lcdd ) : _lcdd( &lcdd ) { - _volumeManager = Geometry::VolumeManager::getVolumeManager(lcdd); + CellIDPositionConverter( LCDD& lcdd ) : _lcdd( &lcdd ) { + _volumeManager = VolumeManager::getVolumeManager(lcdd); } /// Destructor @@ -43,43 +44,43 @@ namespace DD4hep { * No Alignment corrections are applied. * If no sensitive volume is found, (0,0,0) is returned. */ - Geometry::Position positionNominal(const CellID& cellID) const; + Position positionNominal(const CellID& cellID) const; /** Return the global position for a given cellID of a sensitive volume. * Alignment corrections are applied (TO BE DONE). * If no sensitive volume is found, (0,0,0) is returned. */ - Geometry::Position position(const CellID& cellID) const; + Position position(const CellID& cellID) const; /** Return the global cellID for the given global position. * Note: this call is rather slow - only use it when really needed ! * */ - CellID cellID(const Geometry::Position& global) const; + CellID cellID(const Position& global) const; /** Find the context with DetElement, placements etc for a given cellID of a sensitive volume. * Returns NULL if not found (e.g. if the cellID does not correspond to a sensitive volume). */ - const Geometry::VolumeManagerContext* findContext(const CellID& cellID) const; + const VolumeManagerContext* findContext(const CellID& cellID) const; /** Find the DetElement that contains the given point - if no DetElement is found, an * invalid DetElement is returned. Uses the optionally given DetElement as start for the search. */ - Geometry::DetElement findDetElement(const Geometry::Position& global, - const Geometry::DetElement& det=Geometry::DetElement() ) const; - - + DetElement findDetElement(const Position& global, + const DetElement& det=DetElement() ) const; + + /** Find the lowest daughter Placement in the given Placement that * contains the point (in the coordinate system of the mother placement). * Return the local coordinates in this daughter Placement and collect all volIDs * on the way. */ - Geometry::PlacedVolume findPlacement(const Geometry::Position& point, const Geometry::PlacedVolume& mother, double locPos[3], Geometry::PlacedVolume::VolIDs& volIDs) const ; + PlacedVolume findPlacement(const Position& point, const PlacedVolume& mother, double locPos[3], PlacedVolume::VolIDs& volIDs) const ; /** Find the readout object for the given DetElement. If the DetElement is sensitive the corresondig @@ -87,21 +88,28 @@ namespace DD4hep { * volume is performed and the first Readout object is returned. * */ - Geometry::Readout findReadout(const Geometry::DetElement& det) const ; + Readout findReadout(const DetElement& det) const ; /** Return this PlacedVolume's Readout or, if the volume is not sensitive, recursively search for * a Readout object in the daughter nodes (volumes). */ - Geometry::Readout findReadout(const Geometry::PlacedVolume& pv) const ; + Readout findReadout(const PlacedVolume& pv) const ; protected: - Geometry::VolumeManager _volumeManager{} ; - const Geometry::LCDD* _lcdd ; + VolumeManager _volumeManager{} ; + const LCDD* _lcdd ; }; - } /* namespace DDRec */ -} /* namespace DD4hep */ + } /* namespace rec */ +} /* namespace dd4hep */ + + + +namespace DD4hep { namespace DDRec { using namespace dd4hep::rec ; } } // bwd compatibility for old namsepaces + + + #endif /* CellIDPositionConverter_H_ */ diff --git a/DDRec/include/DDRec/DDGear.h b/DDRec/include/DDRec/DDGear.h index 2609b2d906285580eef967201b2651437da38c30..96cd3ba7bebd36425202334c481a2ead5a13a958 100644 --- a/DDRec/include/DDRec/DDGear.h +++ b/DDRec/include/DDRec/DDGear.h @@ -1,6 +1,7 @@ #ifndef DDGear_H #define DDGear_H +#include "DD4hep/LCDD.h" #include "DD4hep/Detector.h" #include "gear/GEAR.h" @@ -13,8 +14,9 @@ namespace gear{ class GearMgr ; } -namespace DD4hep { - +namespace dd4hep { + namespace rec { + /** Simple wrapper class for objects of type GearParametersImpl that can be added to DetElements with the extension mechanism. @@ -23,7 +25,7 @@ namespace DD4hep { @version $Id$ */ - class GearHandle { //: public gear::GearParametersImpl { + class GearHandle { protected: gear::GearParametersImpl* _gObj ; @@ -69,8 +71,8 @@ namespace DD4hep { /** dummy implementation of required c'tors to allow using the extension mechanism */ - GearHandle(const Geometry::DetElement& /*d*/) : _gObj(0) {} - GearHandle(const GearHandle& /*c*/,const Geometry::DetElement& /*det*/) : _gObj(0) {} + GearHandle(const DetElement& /*d*/) : _gObj(0) {} + GearHandle(const GearHandle& /*c*/,const DetElement& /*det*/) : _gObj(0) {} } ; @@ -81,8 +83,10 @@ namespace DD4hep { @author F.Gaede, DESY @version $Id$ */ - gear::GearMgr* createGearMgr( Geometry::LCDD& lcdd , const std::string& pluginName="GearForILD" ) ; + gear::GearMgr* createGearMgr( LCDD& lcdd , const std::string& pluginName="GearForILD" ) ; -} + }} + +namespace DD4hep { namespace DDRec { using namespace dd4hep::rec ; } } // bwd compatibility for old namsepaces #endif diff --git a/DDRec/include/DDRec/DetectorData.h b/DDRec/include/DDRec/DetectorData.h index d9ac543eca82b33d8a7792ffeebaf7f90d54b125..d51263ff2c84c219bc894328614fe45e54b8658b 100644 --- a/DDRec/include/DDRec/DetectorData.h +++ b/DDRec/include/DDRec/DetectorData.h @@ -5,10 +5,11 @@ #include <bitset> #include <ostream> +#include "DD4hep/LCDD.h" #include "DD4hep/Detector.h" -namespace DD4hep { - namespace DDRec { +namespace dd4hep { + namespace rec { /** Wrapper class for adding structs or pods as extensions to DetElements. * Provides default implementations of the c'tors required by the extension mechamism. @@ -24,8 +25,8 @@ namespace DD4hep { StructExtension() : T() { } StructExtension(const StructExtension<T>& t) : T(t) {} StructExtension(const T& t) : T(t) {} - StructExtension(const Geometry::DetElement&) : T() {} - StructExtension(const StructExtension<T>& t, const Geometry::DetElement&) : T(t) {} + StructExtension(const DetElement&) : T() {} + StructExtension(const StructExtension<T>& t, const DetElement&) : T(t) {} }; /** Simple data structure with key parameters for @@ -477,7 +478,7 @@ namespace DD4hep { std::ostream& operator<<( std::ostream& io , const NeighbourSurfacesData& d ) ; - } /* namespace DDRec */ -} /* namespace DD4hep */ + } /* namespace rec */ +} /* namespace dd4hep */ #endif // DDRec_DetectorData_H_ diff --git a/DDRec/include/DDRec/DetectorSurfaces.h b/DDRec/include/DDRec/DetectorSurfaces.h index bf689c5f42a8c915f8a63b1bd5db87cba6b49bd5..e84645f729a1e99d78885e393cccbda48548788f 100644 --- a/DDRec/include/DDRec/DetectorSurfaces.h +++ b/DDRec/include/DDRec/DetectorSurfaces.h @@ -3,8 +3,8 @@ #include "DDRec/Surface.h" -namespace DD4hep { - namespace DDRec { +namespace dd4hep { + namespace rec { /** View on DetElements for accessing the surfaces assigned to this DetElement * in detector construction. @@ -13,10 +13,10 @@ namespace DD4hep { * @date Apr, 10 2014 * @version $Id$ */ - class DetectorSurfaces: virtual public Geometry::DetElement { + class DetectorSurfaces: virtual public DetElement { public: - typedef Geometry::DetElement DetElement; + typedef DetElement DetElement; DetectorSurfaces(const DetElement& e); @@ -33,7 +33,9 @@ namespace DD4hep { }; - } /* namespace DDRec */ -} /* namespace DD4hep */ + } /* namespace rec */ +} /* namespace dd4hep */ + +namespace DD4hep { namespace DDRec { using namespace dd4hep::rec ; } } // bwd compatibility for old namsepaces #endif // DDRec_DetectorSurfaces_H_ diff --git a/DDRec/include/DDRec/Exceptions.h b/DDRec/include/DDRec/Exceptions.h index 460322d2b7fe941f413aa3db0230f8d9e24a01ba..7e4d8da7da71881c08855169a65f91712279c4ac 100644 --- a/DDRec/include/DDRec/Exceptions.h +++ b/DDRec/include/DDRec/Exceptions.h @@ -15,7 +15,7 @@ namespace DD4hep { //define some exception to throw - class OutsideGeometryException : public std::exception{ + class [[gnu:deprecated("unused class - to be removed ...")]] OutsideGeometryException : public std::exception{ protected: std::string message; diff --git a/DDRec/include/DDRec/IMaterial.h b/DDRec/include/DDRec/IMaterial.h index 006537f1325b2d244b6c98866757cb6acc6090f1..db190c9508c025321e7afbf999ec80395a31d515 100644 --- a/DDRec/include/DDRec/IMaterial.h +++ b/DDRec/include/DDRec/IMaterial.h @@ -4,7 +4,7 @@ #include <string> #include <ostream> -namespace DD4hep { namespace DDRec { +namespace dd4hep { namespace rec { /** Interface for material description for tracking. * @@ -53,6 +53,8 @@ namespace DD4hep { namespace DDRec { return os ; } - } } /* namespace DDRec */ + } } /* namespace rec */ + +namespace DD4hep { namespace DDRec { using namespace dd4hep::rec ; } } // bwd compatibility for old namsepaces #endif /* DDRec_MATERIAL_H_ */ diff --git a/DDRec/include/DDRec/ISurface.h b/DDRec/include/DDRec/ISurface.h index 75697cd31d1d5383c4abf51f4cf363febe3fbc8c..9bb030a270eebe7bf98798bedd12095a64b3aef4 100644 --- a/DDRec/include/DDRec/ISurface.h +++ b/DDRec/include/DDRec/ISurface.h @@ -9,7 +9,7 @@ #include <bitset> #include <cmath> -namespace DD4hep { namespace DDRec { +namespace dd4hep { namespace rec { class SurfaceType ; @@ -313,6 +313,8 @@ namespace DD4hep { namespace DDRec { } -} } /* namespace DDRec */ +} } /* namespace rec */ + +namespace DD4hep { namespace DDRec { using namespace dd4hep::rec ; } } // bwd compatibility for old namsepaces #endif /* DDRec_ISurface_H */ diff --git a/DDRec/include/DDRec/Material.h b/DDRec/include/DDRec/Material.h index 077f7aa34d273602962564804a75875c2d1987c7..73979d5636519f0cf5973090a4b305950b63d513 100644 --- a/DDRec/include/DDRec/Material.h +++ b/DDRec/include/DDRec/Material.h @@ -1,13 +1,13 @@ #ifndef DDRec_Material_H #define DDRec_Material_H -#include "DD4hep/Objects.h" +#include "DD4hep/LCDD.h" #include "DDSurfaces/IMaterial.h" #include <list> -namespace DD4hep { - namespace DDRec { +namespace dd4hep { + namespace rec { /** Simple data class that implements the DDSurfaces::IMaterial interface @@ -29,8 +29,8 @@ namespace DD4hep { public: - /** Instantiate from Geometry::Material - default initialization if handle is not valid */ - MaterialData( Geometry::Material m ) : + /** Instantiate from Material - default initialization if handle is not valid */ + MaterialData( Material m ) : _name("unknown"), _Z( -1. ), @@ -97,7 +97,7 @@ namespace DD4hep { return *this ; } - /// assignment from Geometry::Material + /// assignment from Material MaterialData& operator=(const IMaterial& m){ if ( this != &m ) { _name = m.name() ; @@ -110,8 +110,8 @@ namespace DD4hep { return *this ; } - /// assignment from Geometry::Material - MaterialData& operator=(const Geometry::Material& m){ + /// assignment from Material + MaterialData& operator=(const Material& m){ if( m.isValid() ) { @@ -165,4 +165,6 @@ namespace DD4hep { } /* namespace */ } /* namespace */ +namespace DD4hep { namespace DDRec { using namespace dd4hep::rec ; } } // bwd compatibility for old namsepaces + #endif /* DDRec_Material_H */ diff --git a/DDRec/include/DDRec/MaterialManager.h b/DDRec/include/DDRec/MaterialManager.h index f637a3d831c5bc03c7df682f59ce37eec3b80f6c..555e2c870cc1f44b5874bbab6d9017453d13e471 100644 --- a/DDRec/include/DDRec/MaterialManager.h +++ b/DDRec/include/DDRec/MaterialManager.h @@ -1,6 +1,7 @@ #ifndef DDRec_MaterialManager_H_ #define DDRec_MaterialManager_H_ +#include "DD4hep/LCDD.h" #include "DD4hep/Objects.h" #include "DDSurfaces/Vector3D.h" #include "DDRec/Material.h" @@ -12,11 +13,8 @@ class TGeoManager ; -namespace DD4hep { - namespace DDRec { - - // export Geometry::Material to this namespace ; - using Geometry::Material ; +namespace dd4hep { + namespace rec { typedef std::vector< std::pair< Material, double > > MaterialVec ; @@ -33,7 +31,7 @@ namespace DD4hep { public: /// Instantiate the MaterialManager for this (world) volume - MaterialManager(DD4hep::Geometry::Volume world); + MaterialManager(Volume world); /// default c'tor [[gnu::deprecated("use MaterialManager(Volume world) instead")]] @@ -90,7 +88,9 @@ namespace DD4hep { return os ; } - } /* namespace DDRec */ -} /* namespace DD4hep */ + } /* namespace rec */ +} /* namespace dd4hep */ + +namespace DD4hep { namespace DDRec { using namespace dd4hep::rec ; } } // bwd compatibility for old namsepaces #endif // DDRec_MaterialManager_H_ diff --git a/DDRec/include/DDRec/Surface.h b/DDRec/include/DDRec/Surface.h index 6d754eb6f506526b16f19dde0cdaf20a8a86588a..0969e0f8b060585c6eefc3da62d4083f65222275 100644 --- a/DDRec/include/DDRec/Surface.h +++ b/DDRec/include/DDRec/Surface.h @@ -12,8 +12,8 @@ class TGeoMatrix ; -namespace DD4hep { - namespace DDRec { +namespace dd4hep { + namespace rec { //------------------------------------------------------------------------------------------- @@ -41,7 +41,7 @@ namespace DD4hep { double _th_o ; MaterialData _innerMat ; MaterialData _outerMat ; - Geometry::Volume _vol ; + Volume _vol ; long64 _id ; unsigned _refCount ; @@ -78,7 +78,7 @@ namespace DD4hep { VolSurfaceBase( SurfaceType typ, double thickness_inner ,double thickness_outer, Vector3D u_val ,Vector3D v_val , - Vector3D n ,Vector3D o, Geometry::Volume vol,int identifier ) : + Vector3D n ,Vector3D o, Volume vol,int identifier ) : _type(typ ) , _u( u_val ) , _v( v_val ) , @@ -111,7 +111,7 @@ namespace DD4hep { /// the volume to which this surface is attached. - Geometry::Volume volume() const { return _vol ; } + Volume volume() const { return _vol ; } /// The id of this surface virtual long64 id() const ; @@ -222,7 +222,7 @@ namespace DD4hep { /// the volume to which this surface is attached. - Geometry::Volume volume() const { return _surf->volume() ; } + Volume volume() const { return _surf->volume() ; } /// pointer to underlying object VolSurfaceBase* ptr() const { return _surf ; } @@ -301,7 +301,7 @@ namespace DD4hep { /** Helper function for accessing the list assigned to a DetElement - attaches * empty list if needed. */ - VolSurfaceList* volSurfaceList( Geometry::DetElement& det) ; + VolSurfaceList* volSurfaceList( DetElement& det) ; /** std::list of VolSurfaces that takes ownership. * @author F.Gaede, DESY @@ -313,7 +313,7 @@ namespace DD4hep { VolSurfaceList() {} // required c'tor for extension mechanism - VolSurfaceList(Geometry::DetElement& det){ + VolSurfaceList(DetElement& det){ VolSurfaceList* sL = volSurfaceList( det ) ; @@ -322,7 +322,7 @@ namespace DD4hep { // required c'tor for extension mechanism - VolSurfaceList(const VolSurfaceList& vsl, Geometry::DetElement& /*det*/ ){ + VolSurfaceList(const VolSurfaceList& vsl, DetElement& /*det*/ ){ this->insert( this->end() , vsl.begin() , vsl.end() ) ; } @@ -348,7 +348,7 @@ namespace DD4hep { /// standard c'tor with all necessary arguments - origin is (0,0,0) if not given. VolPlaneImpl( SurfaceType typ, double thickness_inner ,double thickness_outer, - Vector3D u_val ,Vector3D v_val ,Vector3D n_val , Vector3D o_val, Geometry::Volume vol, int id_val ) : + Vector3D u_val ,Vector3D v_val ,Vector3D n_val , Vector3D o_val, Volume vol, int id_val ) : VolSurfaceBase( typ, thickness_inner, thickness_outer, u_val,v_val, n_val, o_val, vol, id_val ) { @@ -381,7 +381,7 @@ namespace DD4hep { * its rho defining the radius of the cylinder. The measurement direction v is set to be (0,0,1), the normal is * chosen to be parallel to the origin vector and u = n X v. */ - VolCylinderImpl( Geometry::Volume vol, SurfaceType type, double thickness_inner ,double thickness_outer, Vector3D origin ) ; + VolCylinderImpl( Volume vol, SurfaceType type, double thickness_inner ,double thickness_outer, Vector3D origin ) ; /** First direction of measurement U - rotated to point projected onto the cylinder. * No check is done whether the point actually is on the cylinder surface @@ -428,7 +428,7 @@ namespace DD4hep { * The measurement direction v defines the opening angle of the cone, * the normal is chosen to be orthogonal to v. NB: the cone is always parallel to the local z axis. */ - VolConeImpl( Geometry::Volume vol, SurfaceType type, double thickness_inner ,double thickness_outer, + VolConeImpl( Volume vol, SurfaceType type, double thickness_inner ,double thickness_outer, Vector3D v, Vector3D origin ) ; /** First direction of measurement U - rotated to point projected onto the cone. @@ -472,7 +472,7 @@ namespace DD4hep { class VolSurfaceHandle : public VolSurface { public: - VolSurfaceHandle( Geometry::Volume vol, SurfaceType typ, double thickness_inner ,double thickness_outer, + VolSurfaceHandle( Volume vol, SurfaceType typ, double thickness_inner ,double thickness_outer, Vector3D u_val ,Vector3D v_val ,Vector3D n_val , Vector3D o_val = Vector3D(0.,0.,0.) ) : VolSurface( new T( typ, thickness_inner, thickness_outer, u_val, v_val, n_val, o_val, vol , 0 ) ){ @@ -487,13 +487,13 @@ namespace DD4hep { class VolCylinder : public VolSurface{ public: - VolCylinder( Geometry::Volume vol, SurfaceType typ_val, double thickness_inner ,double thickness_outer, Vector3D origin_val ) : + VolCylinder( Volume vol, SurfaceType typ_val, double thickness_inner ,double thickness_outer, Vector3D origin_val ) : VolSurface( new VolCylinderImpl( vol, typ_val, thickness_inner , thickness_outer, origin_val ) ) {} } ; class VolCone : public VolSurface{ public: - VolCone( Geometry::Volume vol, SurfaceType typ_val, double thickness_inner ,double thickness_outer, Vector3D v_val, Vector3D origin_val ) : + VolCone( Volume vol, SurfaceType typ_val, double thickness_inner ,double thickness_outer, Vector3D v_val, Vector3D origin_val ) : VolSurface( new VolConeImpl( vol, typ_val, thickness_inner , thickness_outer, v_val, origin_val ) ) {} } ; @@ -510,7 +510,7 @@ namespace DD4hep { protected: - Geometry::DetElement _det ; + DetElement _det ; mutable VolSurface _volSurf ; TGeoMatrix* _wtM ; // matrix for world transformation of surface @@ -523,7 +523,7 @@ namespace DD4hep { Vector3D _o ; /// default c'tor - Surface() :_det( Geometry::DetElement() ), _volSurf( VolSurface() ), _wtM( 0 ) , _id( 0) { } + Surface() :_det( DetElement() ), _volSurf( VolSurface() ), _wtM( 0 ) , _id( 0) { } public: @@ -532,7 +532,7 @@ namespace DD4hep { /** Standard c'tor initializes the surface from the parameters of the VolSurface and the * transform (placement) of the corresponding volume, if found in DetElement */ - Surface( Geometry::DetElement det, VolSurface volSurf ) ; + Surface( DetElement det, VolSurface volSurf ) ; /// The id of this surface - corresponds to DetElement id. virtual long64 id() const ; @@ -543,7 +543,7 @@ namespace DD4hep { virtual const SurfaceType& type() const ; /// The volume that has the surface attached. - Geometry::Volume volume() const { return _volSurf.volume() ; } + Volume volume() const { return _volSurf.volume() ; } /// The VolSurface attched to the volume. VolSurface volSurface() const { return _volSurf ; } @@ -622,7 +622,7 @@ namespace DD4hep { public: ///Standard c'tor. - CylinderSurface( Geometry::DetElement det, VolSurface volSurf ) : Surface( det, volSurf ) { } + CylinderSurface( DetElement det, VolSurface volSurf ) : Surface( det, volSurf ) { } /** First direction of measurement U - rotated to point projected onto the cylinder. * No check is done whether the point actually is on the cylinder surface @@ -660,7 +660,7 @@ namespace DD4hep { */ class ConeSurface : public CylinderSurface, public ICone { public: - ConeSurface( Geometry::DetElement det, VolSurface volSurf ) : CylinderSurface( det, volSurf ) { } + ConeSurface( DetElement det, VolSurface volSurf ) : CylinderSurface( det, volSurf ) { } /// the start radius of the cone virtual double radius0() const ; @@ -697,11 +697,11 @@ namespace DD4hep { SurfaceList(const SurfaceList& other ) : std::list< ISurface* >( other ), _isOwner( false ){} /// required c'tor for extension mechanism - SurfaceList(const Geometry::DetElement& ) : _isOwner( false ) { + SurfaceList(const DetElement& ) : _isOwner( false ) { // anything to do here ? } /// required c'tor for extension mechanism - SurfaceList(const SurfaceList& ,const Geometry::DetElement& ) : _isOwner( false ) { + SurfaceList(const SurfaceList& ,const DetElement& ) : _isOwner( false ) { // anything to do here ? } @@ -710,7 +710,7 @@ namespace DD4hep { } ; - // SurfaceList* surfaceList( Geometry::DetElement& det ) ; + // SurfaceList* surfaceList( DetElement& det ) ; //====================================================================================================== @@ -718,4 +718,6 @@ namespace DD4hep { } /* namespace */ } /* namespace */ +namespace DD4hep { namespace DDRec { using namespace dd4hep::rec ; } } // bwd compatibility for old namsepaces + #endif /* Surface */ diff --git a/DDRec/include/DDRec/SurfaceHelper.h b/DDRec/include/DDRec/SurfaceHelper.h index ac9df5727fcd96930109c0257d17c1d197527d15..049e84ae1be12f55ecd33c8a9fc4ad9648f01074 100644 --- a/DDRec/include/DDRec/SurfaceHelper.h +++ b/DDRec/include/DDRec/SurfaceHelper.h @@ -3,8 +3,8 @@ #include "DDRec/Surface.h" -namespace DD4hep { - namespace DDRec { +namespace dd4hep { + namespace rec { /** Surface helper class that allows to access all surfaces * assigned to a DetElement and all its daughters. @@ -18,7 +18,7 @@ namespace DD4hep { public: - SurfaceHelper(const Geometry::DetElement& e); + SurfaceHelper(const DetElement& e); ~SurfaceHelper(); @@ -29,14 +29,16 @@ namespace DD4hep { protected : SurfaceList _sL ; - const Geometry::DetElement& _det ; + const DetElement& _det ; /// initializes surfaces from VolSurfaces assigned to this DetElement in detector construction void initialize() ; }; - } /* namespace DDRec */ -} /* namespace DD4hep */ + } /* namespace rec */ +} /* namespace dd4hep */ + +namespace DD4hep { namespace DDRec { using namespace dd4hep::rec ; } } // bwd compatibility for old namsepaces #endif // DDRec_SurfaceHelper_H_ diff --git a/DDRec/include/DDRec/SurfaceManager.h b/DDRec/include/DDRec/SurfaceManager.h index 521e836b3dd0433ed2e1dffa23be0d48d164aae2..ab8799f12be452021940b503e668600320963064 100644 --- a/DDRec/include/DDRec/SurfaceManager.h +++ b/DDRec/include/DDRec/SurfaceManager.h @@ -2,16 +2,12 @@ #define DDRec_SurfaceManager_H_ #include "DDSurfaces/ISurface.h" +#include "DD4hep/LCDD.h" #include <string> #include <map> -namespace DD4hep { - - namespace Geometry{ - class LCDD ; - } - - namespace DDRec { +namespace dd4hep { + namespace rec { /// typedef for surface maps, keyed by the cellID typedef std::multimap< unsigned long, DDSurfaces::ISurface*> SurfaceMap ; @@ -30,7 +26,7 @@ namespace DD4hep { public: /// The constructor - SurfaceManager(DD4hep::Geometry::LCDD& theDetector); + SurfaceManager(LCDD& theDetector); /// No default constructor SurfaceManager() = delete ; @@ -58,12 +54,14 @@ namespace DD4hep { /// initialize all known surface maps - void initialize(DD4hep::Geometry::LCDD& theDetector) ; + void initialize(LCDD& theDetector) ; SurfaceMapsMap _map ; }; - } /* namespace DDRec */ -} /* namespace DD4hep */ + } /* namespace rec */ +} /* namespace dd4hep */ + +namespace DD4hep { namespace DDRec { using namespace dd4hep::rec ; } } // bwd compatibility for old namsepaces #endif // DDRec_SurfaceManager_H_ diff --git a/DDRec/include/DDRec/Vector2D.h b/DDRec/include/DDRec/Vector2D.h index 18a11a7e375157e1fe7b4ba45cc1775d4b8806dd..8f1fd41e7a4f13e0c74d21b47306a5a49e917a7b 100644 --- a/DDRec/include/DDRec/Vector2D.h +++ b/DDRec/include/DDRec/Vector2D.h @@ -1,7 +1,7 @@ #ifndef DDRec_Vector2D_h #define DDRec_Vector2D_h 1 -namespace DD4hep { namespace DDRec { +namespace dd4hep { namespace rec { /** Simple 2D vector helper class; moved out of ISurface definition. * @@ -31,4 +31,7 @@ namespace DD4hep { namespace DDRec { }; } } // namespace + +namespace DD4hep { namespace DDRec { using namespace dd4hep::rec ; } } // bwd compatibility for old namsepaces + #endif diff --git a/DDRec/include/DDRec/Vector3D.h b/DDRec/include/DDRec/Vector3D.h index ac412d58af95a1996f58f5143c0e861d4b9b8453..5c143f881f0a0e759b35292cfe3e3072c450473c 100644 --- a/DDRec/include/DDRec/Vector3D.h +++ b/DDRec/include/DDRec/Vector3D.h @@ -6,8 +6,8 @@ #include <cassert> -namespace DD4hep { namespace DDRec { - +namespace dd4hep{ namespace rec { + /** Simple three dimensional vector providing the components for cartesian, * cylindrical and spherical coordinate systems - internal reperesentation is * cartesian. (copy of original version from gear). @@ -358,6 +358,11 @@ namespace DD4hep { namespace DDRec { - }} // namespace +}} // namespace + + + +namespace DD4hep { namespace DDRec { using namespace dd4hep::rec ; } } // bwd compatibility for old namsepaces + #endif diff --git a/DDRec/src/CellIDPositionConverter.cpp b/DDRec/src/CellIDPositionConverter.cpp index 7dc8e41c6f60b5b6b0ad3ff710c88ec1db02c4b6..0a5bf142cb3212e935e8cdcdc17bcc2fca86c1bc 100644 --- a/DDRec/src/CellIDPositionConverter.cpp +++ b/DDRec/src/CellIDPositionConverter.cpp @@ -6,24 +6,10 @@ #include "TGeoManager.h" -namespace DD4hep { - namespace DDRec { +namespace dd4hep { + namespace rec { - using Geometry::DetElement; - using Geometry::LCDD; - using Geometry::PlacedVolume; - using Geometry::Readout; - using Geometry::Solid; - using Geometry::VolumeManager; - using Geometry::Volume; - using Geometry::SensitiveDetector; - using Geometry::Position; - using Geometry::Segmentation; - using std::set; - - - - const DD4hep::Geometry::VolumeManagerContext* + const VolumeManagerContext* CellIDPositionConverter::findContext(const CellID& cellID) const { return _volumeManager.lookupContext( cellID ) ; } @@ -40,7 +26,7 @@ namespace DD4hep { double l[3], e[3], g[3]; - const Geometry::VolumeManagerContext* context = findContext( cell ) ; + const VolumeManagerContext* context = findContext( cell ) ; if( context == NULL) return Position() ; @@ -55,7 +41,7 @@ namespace DD4hep { if( ! pv.volume().isSensitive() ) return Position() ; - Geometry::SensitiveDetector sd = pv.volume().sensitiveDetector(); + SensitiveDetector sd = pv.volume().sensitiveDetector(); Readout r = sd.readout() ; #else @@ -100,7 +86,7 @@ namespace DD4hep { global.GetCoordinates( g ) ; m->MasterToLocal( g, l ); - Geometry::SensitiveDetector sd = pv.volume().sensitiveDetector(); + SensitiveDetector sd = pv.volume().sensitiveDetector(); Readout r = sd.readout() ; // collect all volIDs for the current path @@ -189,7 +175,7 @@ namespace DD4hep { namespace { - bool containsPoint( const DetElement& det, const Geometry::Position& global ) { + bool containsPoint( const DetElement& det, const Position& global ) { if( det.volume().isValid() and det.volume().solid().isValid() ) { @@ -206,7 +192,7 @@ namespace DD4hep { } - DetElement CellIDPositionConverter::findDetElement(const Geometry::Position& global, + DetElement CellIDPositionConverter::findDetElement(const Position& global, const DetElement& d) const { DetElement det = ( d.isValid() ? d : _lcdd->world() ) ; @@ -245,7 +231,7 @@ namespace DD4hep { return DetElement() ; } - Geometry::PlacedVolume CellIDPositionConverter::findPlacement(const Geometry::Position& pos, const Geometry::PlacedVolume& pv , double locPos[3], Geometry::PlacedVolume::VolIDs& volIDs) const { + PlacedVolume CellIDPositionConverter::findPlacement(const Position& pos, const PlacedVolume& pv , double locPos[3], PlacedVolume::VolIDs& volIDs) const { double l[3] ; @@ -299,11 +285,11 @@ namespace DD4hep { } - Readout CellIDPositionConverter::findReadout(const Geometry::DetElement& det) const { + Readout CellIDPositionConverter::findReadout(const DetElement& det) const { // first check if top level is a sensitive detector if (det.volume().isValid() and det.volume().isSensitive()) { - Geometry::SensitiveDetector sd = det.volume().sensitiveDetector(); + SensitiveDetector sd = det.volume().sensitiveDetector(); if (sd.isValid() and sd.readout().isValid()) { return sd.readout(); } @@ -318,11 +304,11 @@ namespace DD4hep { return Readout(); } - Readout CellIDPositionConverter::findReadout(const Geometry::PlacedVolume& pv) const { + Readout CellIDPositionConverter::findReadout(const PlacedVolume& pv) const { // first check if we are in a sensitive volume if( pv.volume().isSensitive() ){ - Geometry::SensitiveDetector sd = pv.volume().sensitiveDetector(); + SensitiveDetector sd = pv.volume().sensitiveDetector(); if (sd.isValid() and sd.readout().isValid()) { return sd.readout(); } @@ -342,5 +328,5 @@ namespace DD4hep { - } /* namespace DDRec */ -} /* namespace DD4hep */ + } /* namespace rec */ +} /* namespace dd4hep */ diff --git a/DDRec/src/DetectorData.cpp b/DDRec/src/DetectorData.cpp index e94335418e0f70684e6502887210c19597e0fa81..463a2a5db400c452c3ca7bacc63740e79389710c 100644 --- a/DDRec/src/DetectorData.cpp +++ b/DDRec/src/DetectorData.cpp @@ -2,8 +2,8 @@ #include <boost/io/ios_state.hpp> -namespace DD4hep { - namespace DDRec { +namespace dd4hep { + namespace rec { std::ostream& operator<<( std::ostream& io , const FixedPadSizeTPCData& d ){ diff --git a/DDRec/src/DetectorSurfaces.cpp b/DDRec/src/DetectorSurfaces.cpp index 1a59123be614ecfc108aebc117753671da25f261..266ca73b456fa4f1ca88916a7fc7aa669eccca59 100644 --- a/DDRec/src/DetectorSurfaces.cpp +++ b/DDRec/src/DetectorSurfaces.cpp @@ -1,7 +1,7 @@ #include "DDRec/DetectorSurfaces.h" -namespace DD4hep { - namespace DDRec { +namespace dd4hep { + namespace rec { diff --git a/DDRec/src/MaterialManager.cpp b/DDRec/src/MaterialManager.cpp index 8e23e03afd0921af2d75e25c0682751351dac8ec..326cd3ac349ddf237017ff98ffadd54700fcce8b 100644 --- a/DDRec/src/MaterialManager.cpp +++ b/DDRec/src/MaterialManager.cpp @@ -9,8 +9,8 @@ #define MINSTEP 1.e-5 -namespace DD4hep { - namespace DDRec { +namespace dd4hep { + namespace rec { MaterialManager::MaterialManager(DD4hep::Geometry::Volume world) : _mV(0), _m( Material() ), _p0(),_p1(),_pos() { @@ -230,5 +230,5 @@ namespace DD4hep { } - } /* namespace DDRec */ -} /* namespace DD4hep */ + } /* namespace rec */ +} /* namespace dd4hep */ diff --git a/DDRec/src/Surface.cpp b/DDRec/src/Surface.cpp index 8183fed95b263f2290d70ef67c21bd9dccf3119b..c2db6aa6485e1b2384eb5d5ab6317397a58af802 100644 --- a/DDRec/src/Surface.cpp +++ b/DDRec/src/Surface.cpp @@ -14,8 +14,8 @@ //TGeoTrd1 is apparently not included by defautl #include "TGeoTrd1.h" -namespace DD4hep { - namespace DDRec { +namespace dd4hep { + namespace rec { using namespace Geometry ; diff --git a/DDRec/src/SurfaceHelper.cpp b/DDRec/src/SurfaceHelper.cpp index c1209a6142ac987d885cee3fc44e294a8e161644..d5c97b0e6e6af56117c1939a208d9f987502d7ca 100644 --- a/DDRec/src/SurfaceHelper.cpp +++ b/DDRec/src/SurfaceHelper.cpp @@ -4,11 +4,11 @@ #include "DD4hep/Detector.h" #include "DD4hep/LCDD.h" -namespace DD4hep { +namespace dd4hep { using namespace Geometry ; - namespace DDRec { + namespace rec { SurfaceHelper::SurfaceHelper(DD4hep::Geometry::DetElement const& e) : _det(e) { diff --git a/DDRec/src/SurfaceManager.cpp b/DDRec/src/SurfaceManager.cpp index 05ce395e72458e98c2ea2504adae58d6efcb7ebc..f83fd6cc7a3591eb1495927085276c75a50908ea 100644 --- a/DDRec/src/SurfaceManager.cpp +++ b/DDRec/src/SurfaceManager.cpp @@ -1,21 +1,19 @@ #include "DDRec/SurfaceManager.h" #include "DDRec/SurfaceHelper.h" -#include "DD4hep/LCDD.h" #include "DD4hep/VolumeManager.h" #include <sstream> -namespace DD4hep { +namespace dd4hep { - using namespace Geometry ; using namespace DDSurfaces ; - namespace DDRec { + namespace rec { - SurfaceManager::SurfaceManager(DD4hep::Geometry::LCDD& theDetector){ + SurfaceManager::SurfaceManager(LCDD& theDetector){ // have to make sure the volume manager is populated once in order to have // the volumeIDs attached to the DetElements @@ -42,7 +40,7 @@ namespace DD4hep { return 0 ; } - void SurfaceManager::initialize(DD4hep::Geometry::LCDD& theDetector) { + void SurfaceManager::initialize(LCDD& theDetector) { const std::vector<std::string>& types = theDetector.detectorTypes() ; diff --git a/DDRec/src/convertToGear.cc b/DDRec/src/convertToGear.cc index fdd7e3ebca9b69fee2839cfd60986ee23ac11608..ce66178f53f411563f9c07e283e7bf996f99007d 100644 --- a/DDRec/src/convertToGear.cc +++ b/DDRec/src/convertToGear.cc @@ -18,9 +18,8 @@ #include "DDRec/DDGear.h" using namespace std ; -using namespace DD4hep ; -using namespace DD4hep::Geometry; using namespace dd4hep ; +using namespace dd4hep::rec ; //============================================================================= diff --git a/DDRec/src/gear/DDGear.cpp b/DDRec/src/gear/DDGear.cpp index 2b027564e559eee1d7688ffe7f5975011c0fe6b2..9af1dc04881d6c2621557998f7e6a2b01ebb8e21 100644 --- a/DDRec/src/gear/DDGear.cpp +++ b/DDRec/src/gear/DDGear.cpp @@ -20,9 +20,8 @@ #include "geartgeo/TGeoGearDistanceProperties.h" -namespace DD4hep{ - - using namespace Geometry ; +namespace dd4hep{ + namespace rec{ gear::GearMgr* createGearMgr( Geometry::LCDD& lcdd , const std::string& pluginName ){ @@ -68,11 +67,11 @@ namespace DD4hep{ for( unsigned i=0, N= dets.size() ; i<N ; ++i){ - DD4hep::GearHandle* gearH = 0 ; + GearHandle* gearH = 0 ; try{ - gearH = dets[i].extension<DD4hep::GearHandle>() ; + gearH = dets[i].extension<GearHandle>() ; std::cout << " *** subdetector " << dets[i].name() << " - found gear object : " << gearH->name() << std::endl ; @@ -145,5 +144,6 @@ namespace DD4hep{ return gearMgr ; } -} + + }} diff --git a/DDRec/src/gear/createGearForCLIC.cpp b/DDRec/src/gear/createGearForCLIC.cpp index 5fdd700c2670959b1e41e1c34ed43428fa42f648..97e1a555d7829c487ac3970d5265cd71a5c1632f 100644 --- a/DDRec/src/gear/createGearForCLIC.cpp +++ b/DDRec/src/gear/createGearForCLIC.cpp @@ -17,8 +17,8 @@ #include <iostream> -namespace DD4hep{ - namespace DDRec{ +namespace dd4hep{ + namespace rec{ using namespace Geometry ; // using namespace gear ; diff --git a/DDRec/src/gear/createGearForILD.cpp b/DDRec/src/gear/createGearForILD.cpp index 84718a3bb9e668e7799ca898d7d8a4c265ac18ba..922641012e61071c72d6efadd1ea3d56207dc614 100644 --- a/DDRec/src/gear/createGearForILD.cpp +++ b/DDRec/src/gear/createGearForILD.cpp @@ -19,8 +19,8 @@ #include <iostream> -namespace DD4hep{ - namespace DDRec{ +namespace dd4hep{ + namespace rec{ using namespace Geometry ; // using namespace gear ; diff --git a/DDRec/src/plugins/createSurfaceManager.cpp b/DDRec/src/plugins/createSurfaceManager.cpp index c9969ac6ce088f4f3c2a53b70179c4a74906e6b4..18bb0c15649dcfe84a87b9a84bee83b94fe21c2f 100644 --- a/DDRec/src/plugins/createSurfaceManager.cpp +++ b/DDRec/src/plugins/createSurfaceManager.cpp @@ -4,8 +4,8 @@ #include "DDRec/SurfaceManager.h" -namespace DD4hep{ - namespace DDRec{ +namespace dd4hep{ + namespace rec{ using namespace Geometry ;