#include <CylinderBuilderFromDet.h>
Public Types | |
typedef GeomDet | Det |
typedef Surface::PositionType | PositionType |
typedef Surface::RotationType | RotationType |
typedef PositionType::BasicVectorType | Vector |
Public Member Functions | |
BoundCylinder * | build () const |
CylinderBuilderFromDet () | |
void | operator() (const Det &det) |
BoundCylinder * | operator() (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 |
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.
Definition at line 20 of file CylinderBuilderFromDet.h.
typedef GeomDet CylinderBuilderFromDet::Det |
Definition at line 22 of file CylinderBuilderFromDet.h.
Definition at line 23 of file CylinderBuilderFromDet.h.
Definition at line 24 of file CylinderBuilderFromDet.h.
Definition at line 25 of file CylinderBuilderFromDet.h.
CylinderBuilderFromDet::CylinderBuilderFromDet | ( | ) | [inline] |
Definition at line 27 of file CylinderBuilderFromDet.h.
BoundCylinder * CylinderBuilderFromDet::build | ( | ) | const |
Definition at line 83 of file CylinderBuilderFromDet.cc.
References pos, makeMuonMisalignmentScenario::rot, and PV3DBase< T, PVType, FrameType >::z().
{ PositionType pos( 0, 0, 0.5*(zmin+zmax)); RotationType rot; // only "barrel" orientation supported return new BoundCylinder( pos, rot, SimpleCylinderBounds( rmin, rmax, zmin-pos.z(), zmax-pos.z())); }
BoundCylinder* CylinderBuilderFromDet::operator() | ( | std::vector< const Det * >::const_iterator | first, |
std::vector< const Det * >::const_iterator | last | ||
) | const |
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().
{ BoundingBox bb( dynamic_cast<const BoundPlane&>(det.surface())); for (int nc=0; nc<8; ++nc) { float r = bb[nc].perp(); float z = bb[nc].z(); rmin = std::min( rmin, r); rmax = std::max( rmax, r); zmin = std::min( zmin, z); zmax = std::max( zmax, z); } // in addition to the corners we have to check the middle of the // det +/- thickness/2 // , since the min radius for some barrel dets is reached there float rdet = det.surface().position().perp(); float halfThick = det.surface().bounds().thickness() / 2.F; rmin = std::min( rmin, rdet-halfThick); rmax = std::max( rmax, rdet+halfThick); }
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.