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
GlobalDetRangeRPhi Class Reference

#include <GlobalDetRangeRPhi.h>

Public Types

typedef std::pair< float, float > Range
 

Public Member Functions

 GlobalDetRangeRPhi (const Plane &det)
 
Range phiRange () const
 
Range rRange () const
 

Private Attributes

Range thePhiRange
 
Range theRRange
 

Detailed Description

Keep R and Phi range for detunit

Definition at line 10 of file GlobalDetRangeRPhi.h.

Member Typedef Documentation

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

Definition at line 13 of file GlobalDetRangeRPhi.h.

Constructor & Destructor Documentation

GlobalDetRangeRPhi::GlobalDetRangeRPhi ( const Plane det)

Definition at line 11 of file GlobalDetRangeRPhi.cc.

References i, phi(), and alignCSCRings::r.

11  {
12 
13  float dx = plane.bounds().width()/2.;
14  float dy = plane.bounds().length()/2.;
15 
16  std::vector<Surface::GlobalPoint> corners(4);
17  corners[0] = plane.toGlobal( LocalPoint( -dx, -dy, 0));
18  corners[1] = plane.toGlobal( LocalPoint( -dx, dy, 0));
19  corners[2] = plane.toGlobal( LocalPoint( dx, -dy, 0));
20  corners[3] = plane.toGlobal( LocalPoint( dx, dy, 0));
21 
22  float phimin = corners[0].phi(); float phimax = phimin;
23  float rmin = corners[0].perp(); float rmax = rmin;
24  for ( int i=1; i<4; i++) {
25  float phi = corners[i].phi();
26  if ( PhiLess()( phi, phimin)) phimin = phi;
27  if ( PhiLess()( phimax, phi)) phimax = phi;
28 
29 // if ( phi < phimin) phimin = phi;
30 // if ( phi > phimax) phimax = phi;
31 
32  float r = corners[i].perp();
33  if ( r < rmin) rmin = r;
34  if ( r > rmax) rmax = r;
35  }
36 
37  theRRange.first = rmin;
38  theRRange.second = rmax;
39  thePhiRange.first = phimin;
40  thePhiRange.second = phimax;
41 
42 }
int i
Definition: DBlmapReader.cc:9
Local3DPoint LocalPoint
Definition: LocalPoint.h:11

Member Function Documentation

Range GlobalDetRangeRPhi::phiRange ( ) const
inline

Definition at line 18 of file GlobalDetRangeRPhi.h.

References thePhiRange.

Referenced by OuterDetCompatibility::operator()().

18 { return thePhiRange;}
Range GlobalDetRangeRPhi::rRange ( ) const
inline

Definition at line 17 of file GlobalDetRangeRPhi.h.

References theRRange.

Referenced by OuterDetCompatibility::operator()().

17 { return theRRange;}

Member Data Documentation

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