CMS 3D CMS Logo

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 #include <cassert>
11 
12 #pragma GCC visibility push(hidden)
13 class DiskSectorBounds final : 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), thePhiExtH(0.5f*phiExt) {
18  assert(thePhiExtH>0);
21  theOffset = theRmin + 0.5f*(theRmax-theRmin);
22  }
23 
24  float length() const override { return theRmax-theRmin*std::cos(thePhiExtH);}
25  float width() const override { return 2.f*theRmax*std::sin(thePhiExtH);}
26  float thickness() const override { return theZmax-theZmin;}
27 
28 
29 
30  bool inside( const Local3DPoint& p) const override;
31 
32  bool inside( const Local3DPoint& p, const LocalError& err, float scale) const override;
33 
34  Bounds* clone() const override {
35  return new DiskSectorBounds(*this);
36  }
37 
38  float innerRadius() const {return theRmin;}
39  float outerRadius() const {return theRmax;}
40  float phiHalfExtension() const {return thePhiExtH;}
41 
42  private:
43  float theRmin;
44  float theRmax;
45  float theZmin;
46  float theZmax;
47  float thePhiExtH;
48  float theOffset;
49  };
50 
51 #pragma GCC visibility pop
52 #endif
53 
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
float innerRadius() const
bool inside(const Local3DPoint &p) const override
Determine if the point is inside the bounds.
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
float length() const override
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
float thickness() const override
double f[11][100]
Bounds * clone() const override
float phiHalfExtension() const
float width() const override
Definition: Bounds.h:22
float outerRadius() const
DiskSectorBounds(float rmin, float rmax, float zmin, float zmax, float phiExt)