test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
GlobalDetRodRangeZPhi Class Reference

#include <GlobalDetRodRangeZPhi.h>

Public Types

typedef std::pair< float, float > Range
 

Public Member Functions

 GlobalDetRodRangeZPhi (const Plane &RodPlane)
 
Range phiRange () const
 
Range zRange () const
 

Private Attributes

Range thePhiRange
 
Range theZRange
 

Detailed Description

Implementation class for PhiZMeasurementEstimator etc.

Definition at line 12 of file GlobalDetRodRangeZPhi.h.

Member Typedef Documentation

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

Definition at line 15 of file GlobalDetRodRangeZPhi.h.

Constructor & Destructor Documentation

GlobalDetRodRangeZPhi::GlobalDetRodRangeZPhi ( const Plane RodPlane)

Definition at line 10 of file GlobalDetRodRangeZPhi.cc.

References Surface::bounds(), i, Bounds::length(), PV3DBase< T, PVType, FrameType >::perp(), phi(), phimax, phimin, Bounds::thickness(), Surface::toGlobal(), Bounds::width(), SiStripMonitorClusterAlca_cfi::zmax, and SiStripMonitorClusterAlca_cfi::zmin.

10  {
11 
12  float dx = plane.bounds().width()/2.;
13  float dy = plane.bounds().length()/2.;
14  float dz = plane.bounds().thickness()/2.;
15 
16  // rods may be inverted (actually are in every other layer), so have to find out the
17  // orientation of the local frame
18  float deltaZ = (plane.toGlobal( LocalPoint( 0, 0, -dz)).perp() <
19  plane.toGlobal( LocalPoint( 0, 0, dz)).perp() ) ? -dz : dz ;
20 
21 
22  vector<Surface::GlobalPoint> corners(4);
23  corners[0] = plane.toGlobal( LocalPoint( -dx, -dy, deltaZ));
24  corners[1] = plane.toGlobal( LocalPoint( -dx, dy, deltaZ));
25  corners[2] = plane.toGlobal( LocalPoint( dx, -dy, deltaZ));
26  corners[3] = plane.toGlobal( LocalPoint( dx, dy, deltaZ));
27 
28  float phimin = corners[0].phi(); float phimax = phimin;
29  float zmin = corners[0].z(); float zmax = zmin;
30  for ( int i=1; i<4; i++) {
31  float phi = corners[i].phi();
32  if ( PhiLess()( phi, phimin)) phimin = phi;
33  if ( PhiLess()( phimax, phi)) phimax = phi;
34 
35  float z = corners[i].z();
36  if ( z < zmin) zmin = z;
37  if ( z > zmax) zmax = z;
38  }
39 
40  theZRange.first = zmin;
41  theZRange.second = zmax;
42  thePhiRange.first = phimin;
43  thePhiRange.second = phimax;
44 
45 }
int i
Definition: DBlmapReader.cc:9
Local3DPoint LocalPoint
Definition: LocalPoint.h:11

Member Function Documentation

Range GlobalDetRodRangeZPhi::phiRange ( ) const
inline

Definition at line 20 of file GlobalDetRodRangeZPhi.h.

References thePhiRange.

Range GlobalDetRodRangeZPhi::zRange ( ) const
inline

Definition at line 19 of file GlobalDetRodRangeZPhi.h.

References theZRange.

19 { return theZRange;}

Member Data Documentation

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().