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 #pragma GCC visibility push(hidden)
13 class DiskSectorBounds : public Bounds {
14 public:
15 
16  DiskSectorBounds( float rmin, float rmax, float zmin, float zmax, float phiExt) :
17  theRmin(rmin), theRmax(rmax), theZmin(zmin), theZmax(zmax), thePhiExt(phiExt) {
20  theOffset = theRmin + (theRmax-theRmin)/2. ;
21  }
22 
23  virtual float length() const { return theRmax-theRmin*cos(thePhiExt/2.);}
24  virtual float width() const { return 2*theRmax*sin(thePhiExt/2.);}
25  virtual float thickness() const { return theZmax-theZmin;}
26 
27  virtual bool inside( const Local3DPoint& p) const;
28 
29  virtual bool inside( const Local3DPoint& p, const LocalError& err, float scale) const;
30 
31  virtual bool inside( const Local2DPoint& p, const LocalError& err) const {
32  return Bounds::inside(p,err);
33  }
34 
35  virtual Bounds* clone() const {
36  return new DiskSectorBounds(*this);
37  }
38 
39  float innerRadius() const {return theRmin;}
40  float outerRadius() const {return theRmax;}
41  float phiExtension() const {return thePhiExt;}
42 
43  private:
44  float theRmin;
45  float theRmax;
46  float theZmin;
47  float theZmax;
48  float thePhiExt;
49  float theOffset;
50  };
51 
52 #pragma GCC visibility pop
53 #endif
54 
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)