CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

GlobalDetRangeZPhi Class Reference

#include <GlobalDetRangeZPhi.h>

List of all members.

Public Types

typedef std::pair< float, float > Range

Public Member Functions

 GlobalDetRangeZPhi (const BoundPlane &det)
Range phiRange () const
Range zRange () const

Private Attributes

Range thePhiRange
Range theZRange

Detailed Description

Implementation class for PhiZMeasurementEstimator etc.

Definition at line 11 of file GlobalDetRangeZPhi.h.


Member Typedef Documentation

typedef std::pair<float,float> GlobalDetRangeZPhi::Range

Definition at line 14 of file GlobalDetRangeZPhi.h.


Constructor & Destructor Documentation

GlobalDetRangeZPhi::GlobalDetRangeZPhi ( const BoundPlane det)

Definition at line 11 of file GlobalDetRangeZPhi.cc.

References BoundSurface::bounds(), i, Bounds::length(), phi, phimax, phimin, Surface::toGlobal(), Bounds::width(), z, SiStripMonitorClusterAlca_cfi::zmax, and SiStripMonitorClusterAlca_cfi::zmin.

                                                               {

  float dx = plane.bounds().width()/2.;
  float dy = plane.bounds().length()/2.;

  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 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;

}

Member Function Documentation

Range GlobalDetRangeZPhi::phiRange ( ) const [inline]

Definition at line 19 of file GlobalDetRangeZPhi.h.

References thePhiRange.

Referenced by OuterDetCompatibility::operator()().

{ return thePhiRange;}
Range GlobalDetRangeZPhi::zRange ( ) const [inline]

Definition at line 18 of file GlobalDetRangeZPhi.h.

References theZRange.

Referenced by OuterDetCompatibility::operator()().

{ return theZRange;}

Member Data Documentation

Definition at line 23 of file GlobalDetRangeZPhi.h.

Referenced by phiRange().

Definition at line 22 of file GlobalDetRangeZPhi.h.

Referenced by zRange().