CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DiskSectorBounds.h
Go to the documentation of this file.
1 #ifndef RecoTracker_TkDetLayers_DiskSectorBounds_h
2 #define RecoTracker_TkDetLayers_DiskSectorBounds_h
3 
4 
8 #include <algorithm>
9 #include <cmath>
10 
11 
12 class DiskSectorBounds : public Bounds {
13 public:
14 
15  DiskSectorBounds( float rmin, float rmax, float zmin, float zmax, float phiExt) :
16  theRmin(rmin), theRmax(rmax), theZmin(zmin), theZmax(zmax), thePhiExt(phiExt) {
19  theOffset = theRmin + (theRmax-theRmin)/2. ;
20  }
21 
22  virtual float length() const { return theRmax-theRmin*cos(thePhiExt/2.);}
23  virtual float width() const { return 2*theRmax*sin(thePhiExt/2.);}
24  virtual float thickness() const { return theZmax-theZmin;}
25 
26  virtual bool inside( const Local3DPoint& p) const;
27 
28  virtual bool inside( const Local3DPoint& p, const LocalError& err, float scale) const;
29 
30  virtual bool inside( const Local2DPoint& p, const LocalError& err) const {
31  return Bounds::inside(p,err);
32  }
33 
34  virtual Bounds* clone() const {
35  return new DiskSectorBounds(*this);
36  }
37 
38  float innerRadius() const {return theRmin;}
39  float outerRadius() const {return theRmax;}
40  float phiExtension() const {return thePhiExt;}
41 
42  private:
43  float theRmin;
44  float theRmax;
45  float theZmin;
46  float theZmax;
47  float thePhiExt;
48  float theOffset;
49  };
50 
51  #endif
52 
virtual float thickness() const
virtual bool inside(const Local3DPoint &p) const
Determine if the point is inside the bounds.
virtual bool inside(const Local3DPoint &) const =0
Determine if the point is inside the bounds.
float phiExtension() const
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
float innerRadius() const
virtual bool inside(const Local2DPoint &p, const LocalError &err) const
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
virtual Bounds * clone() const
virtual float width() const
Definition: Bounds.h:18
virtual float length() const
float outerRadius() const
DiskSectorBounds(float rmin, float rmax, float zmin, float zmax, float phiExt)