CMS 3D CMS Logo

Surface.h
Go to the documentation of this file.
1 #ifndef Geom_Surface_H
2 #define Geom_Surface_H
3 
5 
7 
10 
12 #include <algorithm>
13 
17 namespace SurfaceOrientation {
20 } // namespace SurfaceOrientation
21 
22 //template <class T> class ReferenceCountingPointer;
23 
24 class Plane;
26 
37 public:
39 
41 
42  ~Surface() override {}
43 
44 protected:
45  Surface() {}
47 
49 
51  : Base(pos, rot), theMediumProperties(mp) {}
52 
55 
56  Surface(const Surface& iSurface)
57  : ReferenceCountedInConditions(iSurface),
58  Base(iSurface),
60  theBounds(iSurface.theBounds) {}
61 
62  Surface(Surface&& iSurface)
63  : ReferenceCountedInConditions(iSurface),
64  Base(iSurface),
66  theBounds(std::move(iSurface.theBounds)) {}
67 
68 public:
73  virtual Side side(const LocalPoint& p, Scalar tolerance = 0) const = 0;
74  virtual Side side(const GlobalPoint& p, Scalar tolerance = 0) const { return side(toLocal(p), tolerance); }
75 
76  using Base::toGlobal;
77  using Base::toLocal;
78 
80  return GlobalPoint(rotation().multiplyInverse(lp.basicVector()) + position().basicVector());
81  }
82 
84 
86 
87  const Bounds& bounds() const { return *theBounds; }
88 
89  // here and not in plane because of PixelBarrelLayer::overlap
90  std::pair<float, float> const& phiSpan() const { return bounds().phiSpan(); }
91  std::pair<float, float> const& zSpan() const { return bounds().zSpan(); }
92  std::pair<float, float> const& rSpan() const { return bounds().rSpan(); }
93 
104 
105 protected:
108 };
109 
110 #endif // Geom_Surface_H
GloballyPositioned
Definition: GloballyPositioned.h:18
Point2DBase
Definition: Point2DBase.h:9
SurfaceOrientation::phiplus
Definition: Surface.h:19
TkRotation< float >
Surface::theMediumProperties
MediumProperties theMediumProperties
Definition: Surface.h:106
GloballyPositioned< float >::GlobalPoint
Point3DBase< float, GlobalTag > GlobalPoint
Definition: GloballyPositioned.h:23
Surface::~Surface
~Surface() override
Definition: Surface.h:42
BasicReferenceCounted
Definition: ReferenceCounted.h:29
SurfaceOrientation::onSurface
Definition: Surface.h:18
Surface::Surface
Surface(const PositionType &pos, const RotationType &rot)
Definition: Surface.h:46
Surface::Side
SurfaceOrientation::Side Side
Definition: Surface.h:38
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
Surface::side
virtual Side side(const GlobalPoint &p, Scalar tolerance=0) const
Definition: Surface.h:74
pos
Definition: PixelAliasList.h:18
PV2DBase< T, PointTag, FrameTag >::basicVector
const BasicVectorType & basicVector() const
Definition: PV2DBase.h:37
Bounds
Definition: Bounds.h:18
ConstReferenceCountingPointer
Definition: ReferenceCounted.h:67
Surface
Definition: Surface.h:36
extstd::clone_ptr< Bounds >
Surface::Surface
Surface(Surface &&iSurface)
Definition: Surface.h:62
Surface::mediumProperties
const MediumProperties & mediumProperties() const
Definition: Surface.h:83
Surface::phiSpan
std::pair< float, float > const & phiSpan() const
Definition: Surface.h:90
Surface::Surface
Surface(const PositionType &pos, const RotationType &rot, Bounds *bounds)
Definition: Surface.h:48
Surface::Surface
Surface(const PositionType &pos, const RotationType &rot, MediumProperties mp)
Definition: Surface.h:50
Bounds::phiSpan
std::pair< float, float > const & phiSpan() const
Definition: Bounds.h:65
Surface::zSpan
std::pair< float, float > const & zSpan() const
Definition: Surface.h:91
SurfaceOrientation::inner
Definition: Surface.h:19
Surface::bounds
const Bounds & bounds() const
Definition: Surface.h:87
Surface::toGlobal
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
GloballyPositioned.h
MediumProperties.h
Surface::Surface
Surface(const PositionType &pos, const RotationType &rot, MediumProperties mp, Bounds *bounds)
Definition: Surface.h:53
Surface::Surface
Surface(const Surface &iSurface)
Definition: Surface.h:56
Surface::setMediumProperties
void setMediumProperties(const MediumProperties &mp)
Definition: Surface.h:85
Bounds.h
Point3DBase< float, GlobalTag >
SurfaceOrientation::zminus
Definition: Surface.h:19
Surface::tangentPlane
virtual ConstReferenceCountingPointer< TangentPlane > tangentPlane(const GlobalPoint &) const =0
tolerance
const double tolerance
Definition: HGCalGeomParameters.cc:26
GloballyPositioned< float >::move
void move(const GlobalVector &displacement)
Definition: GloballyPositioned.h:128
SurfaceOrientation::negativeSide
Definition: Surface.h:18
PV3DBase::basicVector
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:53
SurfaceOrientation::Side
Side
Definition: Surface.h:18
Plane::Plane
Plane(Args &&... args)
Definition: Plane.h:19
GloballyPositioned< float >::position
const PositionType & position() const
Definition: GloballyPositioned.h:36
ReferenceCounted.h
MediumProperties
Definition: MediumProperties.h:12
std
Definition: JetResolutionObject.h:76
Surface::side
virtual Side side(const LocalPoint &p, Scalar tolerance=0) const =0
GloballyPositioned< float >::toLocal
LocalPoint toLocal(const GlobalPoint &gp) const
Definition: GloballyPositioned.h:98
SurfaceOrientation::zplus
Definition: Surface.h:19
Surface::theBounds
extstd::clone_ptr< Bounds > theBounds
Definition: Surface.h:107
Plane
Definition: Plane.h:16
makeMuonMisalignmentScenario.rot
rot
Definition: makeMuonMisalignmentScenario.py:322
clone_ptr.h
Surface::Surface
Surface()
Definition: Surface.h:45
SurfaceOrientation::GlobalFace
GlobalFace
Definition: Surface.h:19
SurfaceOrientation::positiveSide
Definition: Surface.h:18
SurfaceOrientation::phiminus
Definition: Surface.h:19
Surface::rSpan
std::pair< float, float > const & rSpan() const
Definition: Surface.h:92
GloballyPositioned< float >::rotation
const RotationType & rotation() const
Definition: GloballyPositioned.h:38
SurfaceOrientation::outer
Definition: Surface.h:19
SurfaceOrientation
Definition: Surface.h:17
Bounds::rSpan
std::pair< float, float > const & rSpan() const
Definition: Bounds.h:67
GloballyPositioned< float >::toGlobal
GlobalPoint toGlobal(const LocalPoint &lp) const
Definition: GloballyPositioned.h:66
GloballyPositioned< float >::Scalar
float Scalar
Definition: GloballyPositioned.h:20
Bounds::zSpan
std::pair< float, float > const & zSpan() const
Definition: Bounds.h:66