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...
 
bool inside (const Local3DPoint &p) const override
 Determine if the point is inside the bounds. 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 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 Local3DPoint &, const LocalError &, float scale=1.f) const=0
 Determine if a point is inside the bounds, taking error into account. More...
 
virtual bool inside (const Local3DPoint &) const=0
 Determine if the point is inside the bounds. More...
 
virtual bool inside (const Local2DPoint &p) const
 
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...
 
virtual bool inside (const Local2DPoint &p, const LocalError &err) const
 
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, float tollerance) const
 Determine if a point is inside the bounds, taking a tollerance into account. More...
 
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...
 
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.

References edm::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.

References SimpleDiskBounds().

18 { return new SimpleDiskBounds(*this); }
SimpleDiskBounds(float rmin, float rmax, float zmin, float zmax)
Construct the bounds from min and max R and Z in LOCAL coordinates.

◆ innerRadius()

float SimpleDiskBounds::innerRadius ( ) const
inline

Extension of the Bounds interface.

Definition at line 34 of file SimpleDiskBounds.h.

References theRmin.

Referenced by ThirdHitRZPredictionBase::initLayer().

34 { return theRmin; }

◆ inside() [1/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.

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

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

◆ inside() [2/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  }
bool inside(const Local3DPoint &p) const override
Determine if the point is inside the bounds.
Point3DBase< float, LocalTag > Local3DPoint
Definition: LocalPoint.h:9

◆ inside() [3/8]

virtual bool Bounds::inside
inline

Definition at line 39 of file Bounds.h.

39 { return inside(Local3DPoint(p.x(), p.y(), 0)); }
bool inside(const Local3DPoint &p) const override
Determine if the point is inside the bounds.
Point3DBase< float, LocalTag > Local3DPoint
Definition: LocalPoint.h:9

◆ inside() [4/8]

virtual bool Bounds::inside

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

◆ inside() [5/8]

virtual bool Bounds::inside

Determine if the point is inside the bounds.

◆ inside() [6/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  }
bool inside(const Local3DPoint &p) const override
Determine if the point is inside the bounds.
double f[11][100]

◆ inside() [7/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.

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

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 }
T perp2() const
Squared magnitude of transverse component.
T sqrt(T t)
Definition: SSEVec.h:19
double f[11][100]
T perp() const
Magnitude of transverse component.

◆ inside() [8/8]

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

Definition at line 16 of file SimpleDiskBounds.cc.

References submitPVResolutionJobs::err, Bounds::inside(), and AlCaHLTBitMon_ParallelJobs::p.

16 { return Bounds::inside(p, err); }
virtual bool inside(const Local3DPoint &) const =0
Determine if the point is inside the bounds.

◆ 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.

References theZmax, and theZmin.

16 { return theZmax - theZmin; }

◆ maxZ()

float SimpleDiskBounds::maxZ ( ) const
inline

Definition at line 38 of file SimpleDiskBounds.h.

References theZmax.

38 { return theZmax; }

◆ minZ()

float SimpleDiskBounds::minZ ( ) const
inline

Definition at line 37 of file SimpleDiskBounds.h.

References theZmin.

37 { return theZmin; }

◆ outerRadius()

float SimpleDiskBounds::outerRadius ( ) const
inline

Definition at line 35 of file SimpleDiskBounds.h.

References theRmax.

Referenced by ThirdHitRZPredictionBase::initLayer().

35 { return theRmax; }

◆ 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.

References theZmax, and theZmin.

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

18 { return theZmax - theZmin; }

◆ 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.

References theRmax.

17 { return 2 * 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().