#include <GlobalDetRodRangeZPhi.h>
Public Types | |
typedef std::pair< float, float > | Range |
Public Member Functions | |
GlobalDetRodRangeZPhi (const BoundPlane &RodPlane) | |
Range | phiRange () const |
Range | zRange () const |
Private Attributes | |
Range | thePhiRange |
Range | theZRange |
Implementation class for PhiZMeasurementEstimator etc.
Definition at line 12 of file GlobalDetRodRangeZPhi.h.
typedef std::pair<float,float> GlobalDetRodRangeZPhi::Range |
Definition at line 15 of file GlobalDetRodRangeZPhi.h.
GlobalDetRodRangeZPhi::GlobalDetRodRangeZPhi | ( | const BoundPlane & | RodPlane | ) |
Definition at line 10 of file GlobalDetRodRangeZPhi.cc.
References BoundSurface::bounds(), i, Bounds::length(), PV3DBase< T, PVType, FrameType >::perp(), phi, phimax, phimin, Bounds::thickness(), Surface::toGlobal(), Bounds::width(), and z.
{ float dx = plane.bounds().width()/2.; float dy = plane.bounds().length()/2.; float dz = plane.bounds().thickness()/2.; // rods may be inverted (actually are in every other layer), so have to find out the // orientation of the local frame float deltaZ = (plane.toGlobal( LocalPoint( 0, 0, -dz)).perp() < plane.toGlobal( LocalPoint( 0, 0, dz)).perp() ) ? -dz : dz ; vector<Surface::GlobalPoint> corners(4); corners[0] = plane.toGlobal( LocalPoint( -dx, -dy, deltaZ)); corners[1] = plane.toGlobal( LocalPoint( -dx, dy, deltaZ)); corners[2] = plane.toGlobal( LocalPoint( dx, -dy, deltaZ)); corners[3] = plane.toGlobal( LocalPoint( dx, dy, deltaZ)); float phimin = corners[0].phi(); float phimax = phimin; float zmin = corners[0].z(); float zmax = zmin; for ( int i=1; i<4; i++) { float phi = corners[i].phi(); if ( PhiLess()( phi, phimin)) phimin = phi; if ( PhiLess()( phimax, phi)) phimax = phi; float z = corners[i].z(); if ( z < zmin) zmin = z; if ( z > zmax) zmax = z; } theZRange.first = zmin; theZRange.second = zmax; thePhiRange.first = phimin; thePhiRange.second = phimax; }
Range GlobalDetRodRangeZPhi::phiRange | ( | ) | const [inline] |
Definition at line 20 of file GlobalDetRodRangeZPhi.h.
References thePhiRange.
{ return thePhiRange;}
Range GlobalDetRodRangeZPhi::zRange | ( | ) | const [inline] |
Range GlobalDetRodRangeZPhi::thePhiRange [private] |
Definition at line 24 of file GlobalDetRodRangeZPhi.h.
Referenced by phiRange().
Range GlobalDetRodRangeZPhi::theZRange [private] |
Definition at line 23 of file GlobalDetRodRangeZPhi.h.
Referenced by zRange().