diff --git a/doc/LaTex/DDRecManual.tex b/doc/LaTex/DDRecManual.tex index 233ee0fdb417ff6c0a3dc305b95f4d522b61d79e..5c79ae597be733899cc430bed6d3ed8196bd4503 100644 --- a/doc/LaTex/DDRecManual.tex +++ b/doc/LaTex/DDRecManual.tex @@ -278,24 +278,24 @@ This is demonstrated in the following example code: // --- loop over layers ---- // ... - Box box( dimX/2, dimY/2, dimZ/2 ) ; - Volume vol( volumeName, lcdd.material( x_layer.materialStr() )) ; + DD4hep::Geometry::Box box( dimX/2, dimY/2, dimZ/2 ) ; + DD4hep::Geometry::Volume vol( volumeName, lcdd.material( x_layer.materialStr() )) ; - DetElement layerDetElement( parentDetElement , "layer"+_toString(i,"_%02d") , det_id ) ; + DD4hep::Geometry::DetElement layerDetElement( parentDetElement , "layer"+_toString(i,"_%02d") , det_id ) ; // add a measurement surface to the layer for every sensitive slice: - DDRec::VolPlane surf( vol , + DD4hep::DDRec::VolPlane surf( vol , DDSurfaces::SurfaceType(DDSurfaces::SurfaceType::Sensitive), dimZ, dimZ, u, v, n , o ) ; // place the layer - PlacedVolume pv = parentVol.placeVolume( vol, layerPlacement ); + DD4hep::Geometry::PlacedVolume pv = parentVol.placeVolume( vol, layerPlacement ); layerDetElement.setPlacement( pv ) ; - DDRec::volSurfaceList( layerDetElement )->push_back( surf ) ; + DD4hep::DDRec::volSurfaceList( layerDetElement )->push_back( surf ) ; // --- end loop over layers ---- @@ -321,18 +321,18 @@ averaged along the thickness of the tube. \begin{code} //... - Tube innerWallSolid(rInner ,rInner + dr_InnerWall ,dz_Wall / 2.0 ) ; + DD4hep::Geometry::Tube innerWallSolid(rInner ,rInner + dr_InnerWall ,dz_Wall / 2.0 ) ; - Volume innerWallVol( "TPCInnerWallVol", innerWallSolid, materialAir ) ; + DD4hep::Geometry::Volume innerWallVol( "TPCInnerWallVol", innerWallSolid, materialAir ) ; pv = tpc_motherLog.placeVolume( innerWallVol ) ; - Vector3D ocyl( rInner + 0.5*dr_InnerWall , 0. , 0. ) ; + DDSurfaces::Vector3D ocyl( rInner + 0.5*dr_InnerWall , 0. , 0. ) ; - VolCylinder surfI( innerWallVol , - SurfaceType( SurfaceType::Helper ) , - 0.5*dr_InnerWall, 0.5*dr_InnerWall, - ocyl ) ; + DD4hep::DDRec::VolCylinder surfI( innerWallVol , + SurfaceType( SurfaceType::Helper ) , + 0.5*dr_InnerWall, 0.5*dr_InnerWall, + ocyl ) ; volSurfaceList( tpc )->push_back( surfI ) ; //... @@ -369,23 +369,23 @@ surface. \begin{code} // ... - LCDD& lcdd = LCDD::getInstance(); + DD4hep::Geometry::LCDD& lcdd = DD4hep::Geometry::LCDD::getInstance(); lcdd.fromCompact( inFile ); - DetElement world = lcdd.world() ; + DD4hep::Geometry::DetElement world = lcdd.world() ; // create a list of all surfaces in the detector: - SurfaceManager surfMan( world ) ; + DD4hep::DDRec::SurfaceManager surfMan( world ) ; - const SurfaceList& sL = surfMan.surfaceList() ; + const DD4hep::DDRec::SurfaceList& sL = surfMan.surfaceList() ; // map of surfaces - std::map< long64, Surface* > surfMap ; + std::map< long64, DD4hep::DDRec::Surface* > surfMap ; - for( SurfaceList::const_iterator it = sL.begin() ; it != sL.end() ; ++it ){ + for( DD4hep::DDRec::SurfaceList::const_iterator it = sL.begin() ; it != sL.end() ; ++it ){ - Surface* surf = *it ; + DD4hep::DDRec::Surface* surf = *it ; std::cout << " ------------------------- " << " surface: " << *surf << std::endl @@ -403,17 +403,17 @@ for a particular detector element: \begin{code} // ... - DetElement ladderDE = lcdd.detector("VXD_layer02_ladder42") ; + DD4hep::Geometry::DetElement ladderDE = lcdd.detector("VXD_layer02_ladder42") ; // create surfaces - DetectorSurfaces ds( ladderDE ) ; + DD4hep::DDRec::DetectorSurfaces ds( ladderDE ) ; - const SurfaceList& detSL = ds.surfaceList() ; + const DD4hep::DDRec::SurfaceList& detSL = ds.surfaceList() ; + + for( DD4hep::DDRec::SurfaceList::const_iterator it = detSL.begin() ; it != detSL.end() ; ++it ){ + + DD4hep::DDRec::Surface* surf = *it ; - for( SurfaceList::const_iterator it = sL.begin() ; it != sL.end() ; ++it ){ - - Surface* surf = *it ; - std::cout << " ------------------------- " << " surface: " << *surf << std::endl << " ------------------------- " << std::endl ; @@ -464,16 +464,16 @@ The usage of this class is simple and best demonstrated with an example: \begin{code} - LCDD& lcdd = LCDD::getInstance(); + DD4hep::Geometry::LCDD& lcdd = DD4hep::Geometry::LCDD::getInstance(); lcdd.fromCompact( inFile ); - Vector3D p0( x0, y0, z0 ) ; - Vector3D p1( x1, y1, z1 ) ; + DDSurfaces::Vector3D p0( x0, y0, z0 ) ; + DDSurfaces::Vector3D p1( x1, y1, z1 ) ; - MaterialManager matMgr ; + DD4hep::DDRec::MaterialManager matMgr ; - const MaterialVec& materials = matMgr.materialsBetween( p0 , p1 ) ; + const DD4hep::DDRec::MaterialVec& materials = matMgr.materialsBetween( p0 , p1 ) ; std::cout << std::endl << " ####### materials between the two points : " @@ -485,7 +485,7 @@ The usage of this class is simple and best demonstrated with an example: double path_length = 0 ; for( unsigned i=0,n=materials.size();i<n;++i){ - Material mat = materials[i].first ; + DD4hep::DDRec::Material mat = materials[i].first ; double length = materials[i].second ; double nx0 = length / mat.radLength() ; @@ -511,9 +511,9 @@ Creation of an averaged material: \begin{code} // ... - const MaterialVec& materials = matMgr.materialsBetween( p0 , p1 ) ; + const DD4hep::DDRec::MaterialVec& materials = matMgr.materialsBetween( p0 , p1 ) ; - const MaterialData& avMat = matMgr.createAveragedMaterial( materials ) ; + const DD4hep::DDRec::MaterialData& avMat = matMgr.createAveragedMaterial( materials ) ; std::cout << " averaged Material : " << " Z: " << avMat.Z() << " A: " << avMat.A() << " densitiy: " << avMat.density()