#include <RecoTracker/TkDetLayers/interface/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 |
Definition at line 11 of file GlobalDetRodRangeZPhi.h.
typedef std::pair<float,float> GlobalDetRodRangeZPhi::Range |
Definition at line 14 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(), PV3DBase< T, PVType, FrameType >::phi(), phi, thePhiRange, theZRange, Bounds::thickness(), Surface::toGlobal(), Bounds::width(), and z.
00010 { 00011 00012 float dx = plane.bounds().width()/2.; 00013 float dy = plane.bounds().length()/2.; 00014 float dz = plane.bounds().thickness()/2.; 00015 00016 // rods may be inverted (actually are in every other layer), so have to find out the 00017 // orientation of the local frame 00018 float deltaZ = (plane.toGlobal( LocalPoint( 0, 0, -dz)).perp() < 00019 plane.toGlobal( LocalPoint( 0, 0, dz)).perp() ) ? -dz : dz ; 00020 00021 00022 vector<Surface::GlobalPoint> corners(4); 00023 corners[0] = plane.toGlobal( LocalPoint( -dx, -dy, deltaZ)); 00024 corners[1] = plane.toGlobal( LocalPoint( -dx, dy, deltaZ)); 00025 corners[2] = plane.toGlobal( LocalPoint( dx, -dy, deltaZ)); 00026 corners[3] = plane.toGlobal( LocalPoint( dx, dy, deltaZ)); 00027 00028 float phimin = corners[0].phi(); float phimax = phimin; 00029 float zmin = corners[0].z(); float zmax = zmin; 00030 for ( int i=1; i<4; i++) { 00031 float phi = corners[i].phi(); 00032 if ( PhiLess()( phi, phimin)) phimin = phi; 00033 if ( PhiLess()( phimax, phi)) phimax = phi; 00034 00035 float z = corners[i].z(); 00036 if ( z < zmin) zmin = z; 00037 if ( z > zmax) zmax = z; 00038 } 00039 00040 theZRange.first = zmin; 00041 theZRange.second = zmax; 00042 thePhiRange.first = phimin; 00043 thePhiRange.second = phimax; 00044 00045 }
Range GlobalDetRodRangeZPhi::phiRange | ( | ) | const [inline] |
Definition at line 19 of file GlobalDetRodRangeZPhi.h.
References thePhiRange.
00019 { return thePhiRange;}
Range GlobalDetRodRangeZPhi::zRange | ( | ) | const [inline] |
Definition at line 18 of file GlobalDetRodRangeZPhi.h.
References theZRange.
00018 { return theZRange;}
Range GlobalDetRodRangeZPhi::thePhiRange [private] |
Definition at line 23 of file GlobalDetRodRangeZPhi.h.
Referenced by GlobalDetRodRangeZPhi(), and phiRange().
Range GlobalDetRodRangeZPhi::theZRange [private] |
Definition at line 22 of file GlobalDetRodRangeZPhi.h.
Referenced by GlobalDetRodRangeZPhi(), and zRange().