#include <ForwardDiskSectorBuilderFromDet.h>
Public Member Functions | |
std::pair< DiskSectorBounds *, GlobalVector > | computeBounds (const std::vector< const GeomDet * > &dets) const |
BoundDiskSector * | operator() (const std::vector< const GeomDet * > &dets) const |
Private Member Functions | |
Surface::RotationType | computeRotation (const std::vector< const GeomDet * > &dets, Surface::PositionType pos) const |
std::vector< GlobalPoint > | computeTrapezoidalCorners (const GeomDet *detu) const |
As it's name indicates, it's a builder of a BoundDiskSector from a collection of Dets. The disk sector has the minimal size fully containing all Dets.
Definition at line 18 of file ForwardDiskSectorBuilderFromDet.h.
std::pair<DiskSectorBounds *, GlobalVector> ForwardDiskSectorBuilderFromDet::computeBounds | ( | const std::vector< const GeomDet * > & | dets | ) | const |
Surface::RotationType ForwardDiskSectorBuilderFromDet::computeRotation | ( | const std::vector< const GeomDet * > & | dets, |
Surface::PositionType | pos | ||
) | const [private] |
vector< GlobalPoint > ForwardDiskSectorBuilderFromDet::computeTrapezoidalCorners | ( | const GeomDet * | detu | ) | const [private] |
Definition at line 164 of file ForwardDiskSectorBuilderFromDet.cc.
References i, Parameters::parameters, and GeomDet::specificSurface().
{ const Plane& plane( det->specificSurface()); const TrapezoidalPlaneBounds* myBounds( static_cast<const TrapezoidalPlaneBounds*>(&(plane.bounds()))); /* if (myBounds == 0) { string errmsg="ForwardDiskSectorBuilderFromDet: problems with dynamic cast to trapezoidal bounds for DetUnits"; throw DetLayerException(errmsg); edm::LogError("TkDetLayers") << errmsg ; } */ // array<const float, 4> auto const & parameters = (*myBounds).parameters(); if ( parameters[0] == 0 ) { edm::LogError("TkDetLayers") << "ForwardDiskSectorBuilder: something weird going on !" ; edm::LogError("TkDetLayers") << " Trapezoidal parameters of GeomDet (L2/L1/T/H): " ; for (int i = 0; i < 4; i++ ) edm::LogError("TkDetLayers") << " " << 2.*parameters[i] << "\n"; } float hbotedge = parameters[0]; float htopedge = parameters[1]; float hapothem = parameters[3]; float hthick = parameters[2]; vector<GlobalPoint> corners; corners.push_back( plane.toGlobal( LocalPoint( -htopedge, hapothem, hthick))); corners.push_back( plane.toGlobal( LocalPoint( -htopedge, hapothem, -hthick))); corners.push_back( plane.toGlobal( LocalPoint( htopedge, hapothem, hthick))); corners.push_back( plane.toGlobal( LocalPoint( htopedge, hapothem, -hthick))); corners.push_back( plane.toGlobal( LocalPoint( hbotedge, -hapothem, hthick))); corners.push_back( plane.toGlobal( LocalPoint( hbotedge, -hapothem, -hthick))); corners.push_back( plane.toGlobal( LocalPoint( -hbotedge, -hapothem, hthick))); corners.push_back( plane.toGlobal( LocalPoint( -hbotedge, -hapothem, -hthick))); return corners; }
BoundDiskSector* ForwardDiskSectorBuilderFromDet::operator() | ( | const std::vector< const GeomDet * > & | dets | ) | const |
Warning, remember to assign this pointer to a ReferenceCountingPointer! Should be changed to return a ReferenceCountingPointer<BoundDisk>