CMS 3D CMS Logo

CylinderBuilderFromDet Class Reference

Given a container of GeomDets, constructs a cylinder of minimal dimensions that contains all of the Dets completely (all corners etc. More...

#include <TrackingTools/DetLayers/interface/CylinderBuilderFromDet.h>

List of all members.

Public Types

typedef GeomDet Det
typedef Surface::PositionType PositionType
typedef Surface::RotationType RotationType
typedef
PositionType::BasicVectorType 
Vector

Public Member Functions

BoundCylinderbuild () const
 CylinderBuilderFromDet ()
void operator() (const Det &det)
BoundCylinderoperator() (std::vector< const Det * >::const_iterator first, std::vector< const Det * >::const_iterator last) const

Private Attributes

float rmax
float rmin
float zmax
float zmin


Detailed Description

Given a container of GeomDets, constructs a cylinder of minimal dimensions that contains all of the Dets completely (all corners etc.

) Useful for defining a BarrelDetLayer from a group of DetUnits.

Date
2007/08/22 16:07:44
Revision
1.4

Definition at line 20 of file CylinderBuilderFromDet.h.


Member Typedef Documentation

typedef GeomDet CylinderBuilderFromDet::Det

Definition at line 22 of file CylinderBuilderFromDet.h.

typedef Surface::PositionType CylinderBuilderFromDet::PositionType

Definition at line 23 of file CylinderBuilderFromDet.h.

typedef Surface::RotationType CylinderBuilderFromDet::RotationType

Definition at line 24 of file CylinderBuilderFromDet.h.

typedef PositionType::BasicVectorType CylinderBuilderFromDet::Vector

Definition at line 25 of file CylinderBuilderFromDet.h.


Constructor & Destructor Documentation

CylinderBuilderFromDet::CylinderBuilderFromDet (  )  [inline]

Definition at line 27 of file CylinderBuilderFromDet.h.


Member Function Documentation

BoundCylinder * CylinderBuilderFromDet::build (  )  const

Definition at line 83 of file CylinderBuilderFromDet.cc.

References PV3DBase< T, PVType, FrameType >::z().

00083                                                    {
00084   
00085   PositionType pos( 0, 0, 0.5*(zmin+zmax));
00086   RotationType rot;      // only "barrel" orientation supported
00087   
00088   return new BoundCylinder( pos, rot, 
00089                             SimpleCylinderBounds( rmin, rmax, 
00090                                                   zmin-pos.z(), zmax-pos.z()));
00091 }

void CylinderBuilderFromDet::operator() ( const Det det  ) 

Definition at line 64 of file CylinderBuilderFromDet.cc.

References BoundSurface::bounds(), max, min, PV3DBase< T, PVType, FrameType >::perp(), GloballyPositioned< T >::position(), GeomDet::surface(), and Bounds::thickness().

00064                                                       {
00065   BoundingBox bb( dynamic_cast<const BoundPlane&>(det.surface()));
00066   for (int nc=0; nc<8; ++nc) {
00067     float r = bb[nc].perp();
00068     float z = bb[nc].z();
00069     rmin = std::min( rmin, r);
00070     rmax = std::max( rmax, r);
00071     zmin = std::min( zmin, z);
00072     zmax = std::max( zmax, z);
00073   }
00074   // in addition to the corners we have to check the middle of the 
00075   // det +/- thickness/2
00076   // , since the min  radius for some barrel dets is reached there
00077   float rdet = det.surface().position().perp();
00078   float halfThick = det.surface().bounds().thickness() / 2.F;
00079   rmin = std::min( rmin, rdet-halfThick);
00080   rmax = std::max( rmax, rdet+halfThick);
00081 }

BoundCylinder* CylinderBuilderFromDet::operator() ( std::vector< const Det * >::const_iterator  first,
std::vector< const Det * >::const_iterator  last 
) const


Member Data Documentation

float CylinderBuilderFromDet::rmax [private]

Definition at line 42 of file CylinderBuilderFromDet.h.

float CylinderBuilderFromDet::rmin [private]

Definition at line 41 of file CylinderBuilderFromDet.h.

float CylinderBuilderFromDet::zmax [private]

Definition at line 44 of file CylinderBuilderFromDet.h.

float CylinderBuilderFromDet::zmin [private]

Definition at line 43 of file CylinderBuilderFromDet.h.


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:17:37 2009 for CMSSW by  doxygen 1.5.4