#include <GlobalDetRangeRPhi.h>
Public Types | |
typedef std::pair< float, float > | Range |
Public Member Functions | |
GlobalDetRangeRPhi (const BoundPlane &det) | |
Range | phiRange () const |
Range | rRange () const |
Private Attributes | |
Range | thePhiRange |
Range | theRRange |
Keep R and Phi range for detunit
Definition at line 10 of file GlobalDetRangeRPhi.h.
typedef std::pair<float,float> GlobalDetRangeRPhi::Range |
Definition at line 13 of file GlobalDetRangeRPhi.h.
GlobalDetRangeRPhi::GlobalDetRangeRPhi | ( | const BoundPlane & | det | ) |
Definition at line 11 of file GlobalDetRangeRPhi.cc.
References BoundSurface::bounds(), i, Bounds::length(), phi, phimax, phimin, alignCSCRings::r, Surface::toGlobal(), and Bounds::width().
{ float dx = plane.bounds().width()/2.; float dy = plane.bounds().length()/2.; std::vector<Surface::GlobalPoint> corners(4); corners[0] = plane.toGlobal( LocalPoint( -dx, -dy, 0)); corners[1] = plane.toGlobal( LocalPoint( -dx, dy, 0)); corners[2] = plane.toGlobal( LocalPoint( dx, -dy, 0)); corners[3] = plane.toGlobal( LocalPoint( dx, dy, 0)); float phimin = corners[0].phi(); float phimax = phimin; float rmin = corners[0].perp(); float rmax = rmin; for ( int i=1; i<4; i++) { float phi = corners[i].phi(); if ( PhiLess()( phi, phimin)) phimin = phi; if ( PhiLess()( phimax, phi)) phimax = phi; // if ( phi < phimin) phimin = phi; // if ( phi > phimax) phimax = phi; float r = corners[i].perp(); if ( r < rmin) rmin = r; if ( r > rmax) rmax = r; } theRRange.first = rmin; theRRange.second = rmax; thePhiRange.first = phimin; thePhiRange.second = phimax; }
Range GlobalDetRangeRPhi::phiRange | ( | ) | const [inline] |
Definition at line 18 of file GlobalDetRangeRPhi.h.
References thePhiRange.
Referenced by OuterDetCompatibility::operator()().
{ return thePhiRange;}
Range GlobalDetRangeRPhi::rRange | ( | ) | const [inline] |
Definition at line 17 of file GlobalDetRangeRPhi.h.
References theRRange.
Referenced by OuterDetCompatibility::operator()().
{ return theRRange;}
Range GlobalDetRangeRPhi::thePhiRange [private] |
Definition at line 22 of file GlobalDetRangeRPhi.h.
Referenced by phiRange().
Range GlobalDetRangeRPhi::theRRange [private] |
Definition at line 21 of file GlobalDetRangeRPhi.h.
Referenced by rRange().