CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
SimpleDiskBounds Class Referencefinal

#include <SimpleDiskBounds.h>

Inheritance diagram for SimpleDiskBounds:
Bounds

Public Member Functions

Boundsclone () const override
 
float innerRadius () const
 Extension of the Bounds interface. More...
 
virtual bool inside (const Local2DPoint &p) const
 
virtual bool inside (const Local2DPoint &p, const LocalError &err) const
 
virtual bool inside (const Local2DPoint &p, const LocalError &err, float scale=1.f) const
 Determine if a 2D point is inside the bounds, taking error into account. More...
 
virtual bool inside (const Local2DPoint &p, float tollerance) const
 Determine if a point is inside the bounds, taking a tollerance into account. More...
 
virtual bool inside (const Local3DPoint &) const=0
 Determine if the point is inside the bounds. More...
 
virtual bool inside (const Local3DPoint &, const LocalError &, float scale=1.f) const=0
 Determine if a point is inside the bounds, taking error into account. More...
 
bool inside (const Local3DPoint &p) const override
 Determine if the point is inside the bounds. More...
 
bool inside (const Local3DPoint &p, const LocalError &err, float scale) const override
 Determine if a point is inside the bounds, taking error into account. More...
 
float length () const override
 
float maxZ () const
 
float minZ () const
 
float outerRadius () const
 
 SimpleDiskBounds (float rmin, float rmax, float zmin, float zmax)
 Construct the bounds from min and max R and Z in LOCAL coordinates. More...
 
float thickness () const override
 
float width () const override
 
- Public Member Functions inherited from Bounds
void computeSpan (Surface const &plane)
 
virtual bool inside (const Local2DPoint &p) const
 
virtual bool inside (const Local2DPoint &p, const LocalError &err, float scale=1.f) const
 Determine if a 2D point is inside the bounds, taking error into account. More...
 
virtual bool inside (const Local2DPoint &p, float tollerance) const
 Determine if a point is inside the bounds, taking a tollerance into account. More...
 
std::pair< float, float > const & phiSpan () const
 
std::pair< float, float > const & rSpan () const
 
virtual float significanceInside (const Local3DPoint &, const LocalError &) const
 
virtual float widthAtHalfLength () const
 Width at half length. Useful for e.g. pitch definition. More...
 
std::pair< float, float > const & zSpan () const
 
virtual ~Bounds ()
 

Private Attributes

float theRmax
 
float theRmin
 
float theZmax
 
float theZmin
 

Detailed Description

Plane bounds that define a disk with a concentric hole in the middle.

Definition at line 11 of file SimpleDiskBounds.h.

Constructor & Destructor Documentation

◆ SimpleDiskBounds()

SimpleDiskBounds::SimpleDiskBounds ( float  rmin,
float  rmax,
float  zmin,
float  zmax 
)

Construct the bounds from min and max R and Z in LOCAL coordinates.

Definition at line 8 of file SimpleDiskBounds.cc.

9  : theRmin(rmin), theRmax(rmax), theZmin(zmin), theZmax(zmax) {
10  if (theRmin > theRmax)
12  if (theZmin > theZmax)
14 }

References std::swap(), theRmax, theRmin, theZmax, and theZmin.

Referenced by clone().

Member Function Documentation

◆ clone()

Bounds * SimpleDiskBounds::clone ( void  ) const
overridevirtual

Implements Bounds.

Definition at line 18 of file SimpleDiskBounds.cc.

18 { return new SimpleDiskBounds(*this); }

References SimpleDiskBounds().

◆ innerRadius()

float SimpleDiskBounds::innerRadius ( ) const
inline

Extension of the Bounds interface.

Definition at line 34 of file SimpleDiskBounds.h.

34 { return theRmin; }

References theRmin.

Referenced by ThirdHitRZPredictionBase::initLayer().

◆ inside() [1/8]

virtual bool Bounds::inside
inline

Definition at line 39 of file Bounds.h.

39 { return inside(Local3DPoint(p.x(), p.y(), 0)); }

◆ inside() [2/8]

bool SimpleDiskBounds::inside ( const Local2DPoint p,
const LocalError err 
) const
virtual

◆ inside() [3/8]

virtual bool Bounds::inside
inline

Determine if a 2D point is inside the bounds, taking error into account.

Definition at line 57 of file Bounds.h.

57  {
58  return inside(Local3DPoint(p.x(), p.y(), 0), err, scale);
59  }

◆ inside() [4/8]

virtual bool Bounds::inside
inline

Determine if a point is inside the bounds, taking a tollerance into account.

Definition at line 42 of file Bounds.h.

42  {
43  return inside(p, LocalError(tollerance * tollerance, 0.f, tollerance * tollerance));
44  }

◆ inside() [5/8]

virtual bool Bounds::inside

Determine if the point is inside the bounds.

◆ inside() [6/8]

virtual bool Bounds::inside

Determine if a point is inside the bounds, taking error into account.

◆ inside() [7/8]

bool SimpleDiskBounds::inside ( const Local3DPoint ) const
inlineoverridevirtual

Determine if the point is inside the bounds.

Implements Bounds.

Definition at line 20 of file SimpleDiskBounds.h.

20  {
21  return ((p.z() > theZmin) & (p.z() < theZmax)) &&
22  ((p.perp2() > theRmin * theRmin) & (p.perp2() < theRmax * theRmax));
23  }

References AlCaHLTBitMon_ParallelJobs::p, theRmax, theRmin, theZmax, and theZmin.

◆ inside() [8/8]

bool SimpleDiskBounds::inside ( const Local3DPoint ,
const LocalError ,
float  scale 
) const
overridevirtual

Determine if a point is inside the bounds, taking error into account.

Implements Bounds.

Definition at line 20 of file SimpleDiskBounds.cc.

20  {
21  if (p.z() < theZmin || p.z() > theZmax)
22  return false; // check the easy part first
23 
24  double perp2 = p.perp2();
25  double perp = sqrt(perp2);
26  if (perp2 == 0)
27  return scale * scale * (err.xx() + err.xy()) > theRmin * theRmin;
28 
29  // rotated error along p.x(),p.y()
30  // equivalent to (but faster than) err.rotate(p.x(),p.y()).xx()
31  // since we don't need all matrix elements
32  float deltaR = scale * sqrt(p.x() * p.x() / perp2 * err.xx() - 2 * p.x() * p.y() / perp2 * err.xy() +
33  p.y() * p.y() / perp2 * err.yy());
34  return perp > std::max(theRmin - deltaR, 0.f) && perp < theRmax + deltaR;
35 }

References PbPb_ZMuSkimMuonDPG_cff::deltaR, submitPVResolutionJobs::err, f, SiStripPI::max, AlCaHLTBitMon_ParallelJobs::p, perp(), perp2(), L1EGammaCrystalsEmulatorProducer_cfi::scale, mathSSE::sqrt(), theRmax, theRmin, theZmax, and theZmin.

◆ length()

float SimpleDiskBounds::length ( ) const
inlineoverridevirtual

"Lenght" of the bounded volume; refer to the concrete class documentation for the specific definition.

Implements Bounds.

Definition at line 16 of file SimpleDiskBounds.h.

16 { return theZmax - theZmin; }

References theZmax, and theZmin.

◆ maxZ()

float SimpleDiskBounds::maxZ ( ) const
inline

Definition at line 38 of file SimpleDiskBounds.h.

38 { return theZmax; }

References theZmax.

◆ minZ()

float SimpleDiskBounds::minZ ( ) const
inline

Definition at line 37 of file SimpleDiskBounds.h.

37 { return theZmin; }

References theZmin.

◆ outerRadius()

float SimpleDiskBounds::outerRadius ( ) const
inline

Definition at line 35 of file SimpleDiskBounds.h.

35 { return theRmax; }

References theRmax.

Referenced by ThirdHitRZPredictionBase::initLayer().

◆ thickness()

float SimpleDiskBounds::thickness ( ) const
inlineoverridevirtual

"Thickness" of the bound around the surface; refer to the concrete class documentation for the specific definition.

Implements Bounds.

Definition at line 18 of file SimpleDiskBounds.h.

18 { return theZmax - theZmin; }

References theZmax, and theZmin.

Referenced by ForwardDetLayer::zmax(), and ForwardDetLayer::zmin().

◆ width()

float SimpleDiskBounds::width ( ) const
inlineoverridevirtual

"width" of the bounds; refer to the concrete class documentation for the specific definition.

Implements Bounds.

Definition at line 17 of file SimpleDiskBounds.h.

17 { return 2 * theRmax; }

References theRmax.

Member Data Documentation

◆ theRmax

float SimpleDiskBounds::theRmax
private

Definition at line 42 of file SimpleDiskBounds.h.

Referenced by inside(), outerRadius(), SimpleDiskBounds(), and width().

◆ theRmin

float SimpleDiskBounds::theRmin
private

Definition at line 41 of file SimpleDiskBounds.h.

Referenced by innerRadius(), inside(), and SimpleDiskBounds().

◆ theZmax

float SimpleDiskBounds::theZmax
private

Definition at line 44 of file SimpleDiskBounds.h.

Referenced by inside(), length(), maxZ(), SimpleDiskBounds(), and thickness().

◆ theZmin

float SimpleDiskBounds::theZmin
private

Definition at line 43 of file SimpleDiskBounds.h.

Referenced by inside(), length(), minZ(), SimpleDiskBounds(), and thickness().

L1EGammaCrystalsEmulatorProducer_cfi.scale
scale
Definition: L1EGammaCrystalsEmulatorProducer_cfi.py:10
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
perp
T perp() const
Magnitude of transverse component.
Definition: Basic3DVectorLD.h:133
SiStripMonitorCluster_cfi.zmin
zmin
Definition: SiStripMonitorCluster_cfi.py:200
std::swap
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Definition: DataFrameContainer.h:209
SiStripMonitorCluster_cfi.zmax
zmax
Definition: SiStripMonitorCluster_cfi.py:201
Bounds::inside
virtual bool inside(const Local3DPoint &) const =0
Determine if the point is inside the bounds.
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
SimpleDiskBounds::theZmax
float theZmax
Definition: SimpleDiskBounds.h:44
PbPb_ZMuSkimMuonDPG_cff.deltaR
deltaR
Definition: PbPb_ZMuSkimMuonDPG_cff.py:63
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
SimpleDiskBounds::SimpleDiskBounds
SimpleDiskBounds(float rmin, float rmax, float zmin, float zmax)
Construct the bounds from min and max R and Z in LOCAL coordinates.
Definition: SimpleDiskBounds.cc:8
LocalError
Definition: LocalError.h:12
SimpleDiskBounds::theZmin
float theZmin
Definition: SimpleDiskBounds.h:43
SimpleDiskBounds::theRmin
float theRmin
Definition: SimpleDiskBounds.h:41
SimpleDiskBounds::theRmax
float theRmax
Definition: SimpleDiskBounds.h:42
perp2
T perp2() const
Squared magnitude of transverse component.
Definition: Basic3DVectorLD.h:130
submitPVResolutionJobs.err
err
Definition: submitPVResolutionJobs.py:85
SimpleDiskBounds::inside
bool inside(const Local3DPoint &p) const override
Determine if the point is inside the bounds.
Definition: SimpleDiskBounds.h:20
Local3DPoint
Point3DBase< float, LocalTag > Local3DPoint
Definition: LocalPoint.h:9