CMS 3D CMS Logo

DiskSectorBounds.h
Go to the documentation of this file.
1 #ifndef DataFormats_GeometrySurface_DiskSectorBounds_h
2 #define DataFormats_GeometrySurface_DiskSectorBounds_h
3 
7 #include <algorithm>
8 #include <cmath>
9 #include <cassert>
10 
11 class DiskSectorBounds final : public Bounds {
12 public:
13  DiskSectorBounds(float rmin, float rmax, float zmin, float zmax, float phiExt)
14  : theRmin(rmin), theRmax(rmax), theZmin(zmin), theZmax(zmax), thePhiExtH(0.5f * phiExt) {
15  assert(thePhiExtH > 0);
16  if (theRmin > theRmax)
18  if (theZmin > theZmax)
20  theOffset = theRmin + 0.5f * (theRmax - theRmin);
21  }
22 
23  float length() const override { return theRmax - theRmin * std::cos(thePhiExtH); }
24  float width() const override { return 2.f * theRmax * std::sin(thePhiExtH); }
25  float thickness() const override { return theZmax - theZmin; }
26 
27  bool inside(const Local3DPoint& p) const override;
28 
29  bool inside(const Local3DPoint& p, const LocalError& err, float scale) const override;
30 
31  Bounds* clone() const override { return new DiskSectorBounds(*this); }
32 
33  float innerRadius() const { return theRmin; }
34  float outerRadius() const { return theRmax; }
35  float phiHalfExtension() const { return thePhiExtH; }
36 
37 private:
38  float theRmin;
39  float theRmax;
40  float theZmin;
41  float theZmax;
42  float thePhiExtH;
43  float theOffset;
44 };
45 
46 #endif
DiskSectorBounds::outerRadius
float outerRadius() const
Definition: DiskSectorBounds.h:34
DiskSectorBounds::innerRadius
float innerRadius() const
Definition: DiskSectorBounds.h:33
DiskSectorBounds::inside
bool inside(const Local3DPoint &p) const override
Determine if the point is inside the bounds.
Definition: DiskSectorBounds.cc:5
L1EGammaCrystalsEmulatorProducer_cfi.scale
scale
Definition: L1EGammaCrystalsEmulatorProducer_cfi.py:10
DiskSectorBounds
Definition: DiskSectorBounds.h:11
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
DiskSectorBounds::thePhiExtH
float thePhiExtH
Definition: DiskSectorBounds.h:42
DiskSectorBounds::length
float length() const override
Definition: DiskSectorBounds.h:23
Bounds
Definition: Bounds.h:18
cms::cuda::assert
assert(be >=bs)
SiStripMonitorCluster_cfi.zmin
zmin
Definition: SiStripMonitorCluster_cfi.py:200
DiskSectorBounds::theZmin
float theZmin
Definition: DiskSectorBounds.h:40
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
DiskSectorBounds::theOffset
float theOffset
Definition: DiskSectorBounds.h:43
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
std::swap
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Definition: DataFrameContainer.h:209
SiStripMonitorCluster_cfi.zmax
zmax
Definition: SiStripMonitorCluster_cfi.py:201
LocalError.h
DiskSectorBounds::theRmax
float theRmax
Definition: DiskSectorBounds.h:39
Bounds.h
Point3DBase< float, LocalTag >
DiskSectorBounds::clone
Bounds * clone() const override
Definition: DiskSectorBounds.h:31
DiskSectorBounds::DiskSectorBounds
DiskSectorBounds(float rmin, float rmax, float zmin, float zmax, float phiExt)
Definition: DiskSectorBounds.h:13
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
LocalError
Definition: LocalError.h:12
DiskSectorBounds::phiHalfExtension
float phiHalfExtension() const
Definition: DiskSectorBounds.h:35
submitPVResolutionJobs.err
err
Definition: submitPVResolutionJobs.py:85
DiskSectorBounds::theZmax
float theZmax
Definition: DiskSectorBounds.h:41
LocalPoint.h
DiskSectorBounds::width
float width() const override
Definition: DiskSectorBounds.h:24
DiskSectorBounds::theRmin
float theRmin
Definition: DiskSectorBounds.h:38
DiskSectorBounds::thickness
float thickness() const override
Definition: DiskSectorBounds.h:25