CMS 3D CMS Logo

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

#include <SimpleConeBounds.h>

Inheritance diagram for SimpleConeBounds:
Bounds

Public Member Functions

Boundsclone () const override
 
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
 Length along Z. More...
 
Geom::Theta< float > openingAngle () const
 
 SimpleConeBounds (float zmin, float rmin_zmin, float rmax_zmin, float zmax, float rmin_zmax, float rmax_zmax)
 Construct from inner/outer radius on the two Z faces. More...
 
float thickness () const override
 
GlobalPoint vertex () const
 
float width () const override
 Maximum diameter. More...
 
- 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 theRmaxZmax
 
float theRmaxZmin
 
float theRminZmax
 
float theRminZmin
 
float theZmax
 
float theZmin
 

Detailed Description

Cone bounds. The cone axis coincides with the Z axis. The bounds limit the length at constant Z, and allow finite thickness.

Warning
: should be revised, probably works only when local and global Z axis coincide

Definition at line 23 of file SimpleConeBounds.h.

Constructor & Destructor Documentation

◆ SimpleConeBounds()

SimpleConeBounds::SimpleConeBounds ( float  zmin,
float  rmin_zmin,
float  rmax_zmin,
float  zmax,
float  rmin_zmax,
float  rmax_zmax 
)
inline

Construct from inner/outer radius on the two Z faces.

Definition at line 26 of file SimpleConeBounds.h.

27  : theZmin(zmin),
28  theRminZmin(rmin_zmin),
29  theRmaxZmin(rmax_zmin),
30  theZmax(zmax),
31  theRminZmax(rmin_zmax),
32  theRmaxZmax(rmax_zmax) {
33  if (theZmin > theZmax) {
36  }
41  }

References std::swap(), theRmaxZmax, theRmaxZmin, theRminZmax, theRminZmin, theZmax, and theZmin.

Referenced by clone().

Member Function Documentation

◆ clone()

Bounds* SimpleConeBounds::clone ( void  ) const
inlineoverridevirtual

Implements Bounds.

Definition at line 73 of file SimpleConeBounds.h.

73 { return new SimpleConeBounds(*this); }

References SimpleConeBounds().

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

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

◆ 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 SimpleConeBounds::inside ( const Local3DPoint ) const
inlineoverridevirtual

Determine if the point is inside the bounds.

Implements Bounds.

Definition at line 53 of file SimpleConeBounds.h.

53  {
54  float lrmin = (p.z() - theZmin) * (theRminZmax - theRminZmin) / (theZmax - theZmin);
55  float lrmax = (p.z() - theZmin) * (theRmaxZmax - theRmaxZmin) / (theZmax - theZmin);
56  return p.z() > theZmin && p.z() < theZmax && p.perp() > lrmin && p.perp() < lrmax;
57  }

References AlCaHLTBitMon_ParallelJobs::p, theRmaxZmax, theRmaxZmin, theRminZmax, theRminZmin, theZmax, and theZmin.

◆ inside() [8/8]

bool SimpleConeBounds::inside ( const Local3DPoint ,
const LocalError ,
float  scale 
) const
inlineoverridevirtual

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

Implements Bounds.

Definition at line 59 of file SimpleConeBounds.h.

59  {
60  // std::cout << "WARNING: SimpleConeBounds::inside(const Local3DPoint&, const LocalError not fully implemented"
61  // << std::endl; // FIXME! does not check R.
65  theZmax + sqrt(err.yy()) * scale,
67  theRmaxZmax);
68  return tmp.inside(p);
69  }

References submitPVResolutionJobs::err, AlCaHLTBitMon_ParallelJobs::p, L1EGammaCrystalsEmulatorProducer_cfi::scale, mathSSE::sqrt(), theRmaxZmax, theRmaxZmin, theRminZmax, theRminZmin, theZmax, theZmin, and createJobs::tmp.

◆ length()

float SimpleConeBounds::length ( ) const
inlineoverridevirtual

Length along Z.

Implements Bounds.

Definition at line 44 of file SimpleConeBounds.h.

44 { return theZmax - theZmin; }

References theZmax, and theZmin.

Referenced by openingAngle().

◆ openingAngle()

Geom::Theta<float> SimpleConeBounds::openingAngle ( ) const
inline

Definition at line 76 of file SimpleConeBounds.h.

76  {
77  float theta = atan(((theRmaxZmax + theRminZmax) / 2. - (theRmaxZmin + theRminZmin) / 2.) / length());
78  return Geom::Theta<float>(theta < 0 ? theta + Geom::pi() : theta);
79  }

References length(), Geom::pi(), theRmaxZmax, theRmaxZmin, theRminZmax, theRminZmin, and theta().

◆ thickness()

float SimpleConeBounds::thickness ( ) const
inlineoverridevirtual

Thickness in the middle (Z center). Maybe it's useless, but it is pure abstract in Bounds...

Implements Bounds.

Definition at line 49 of file SimpleConeBounds.h.

49 { return ((theRmaxZmin - theRminZmin) + (theRmaxZmax - theRminZmax)) / 2.; }

References theRmaxZmax, theRmaxZmin, theRminZmax, and theRminZmin.

◆ vertex()

GlobalPoint SimpleConeBounds::vertex ( ) const
inline

Definition at line 81 of file SimpleConeBounds.h.

81  {
82  float rAtZmax = (theRmaxZmax + theRminZmax) / 2.;
83  float rAtZmin = (theRmaxZmin + theRminZmin) / 2.;
84  float dr = (rAtZmax - rAtZmin);
85 
86  if (std::abs(dr) < 0.0001) { // handle degenerate case (cone->cylinder)
88  } else {
89  return GlobalPoint(0, 0, (theZmin * rAtZmax - theZmax * rAtZmin) / dr);
90  }
91  }

References funct::abs(), flavorHistoryFilter_cfi::dr, SiStripPI::max, theRmaxZmax, theRmaxZmin, theRminZmax, theRminZmin, theZmax, and theZmin.

Referenced by Tau.Tau::dxy().

◆ width()

float SimpleConeBounds::width ( ) const
inlineoverridevirtual

Maximum diameter.

Implements Bounds.

Definition at line 46 of file SimpleConeBounds.h.

46 { return 2 * std::max(theRmaxZmin, theRmaxZmax); }

References SiStripPI::max, theRmaxZmax, and theRmaxZmin.

Member Data Documentation

◆ theRmaxZmax

float SimpleConeBounds::theRmaxZmax
private

Definition at line 99 of file SimpleConeBounds.h.

Referenced by inside(), openingAngle(), SimpleConeBounds(), thickness(), vertex(), and width().

◆ theRmaxZmin

float SimpleConeBounds::theRmaxZmin
private

Definition at line 96 of file SimpleConeBounds.h.

Referenced by inside(), openingAngle(), SimpleConeBounds(), thickness(), vertex(), and width().

◆ theRminZmax

float SimpleConeBounds::theRminZmax
private

Definition at line 98 of file SimpleConeBounds.h.

Referenced by inside(), openingAngle(), SimpleConeBounds(), thickness(), and vertex().

◆ theRminZmin

float SimpleConeBounds::theRminZmin
private

Definition at line 95 of file SimpleConeBounds.h.

Referenced by inside(), openingAngle(), SimpleConeBounds(), thickness(), and vertex().

◆ theZmax

float SimpleConeBounds::theZmax
private

Definition at line 97 of file SimpleConeBounds.h.

Referenced by inside(), length(), SimpleConeBounds(), and vertex().

◆ theZmin

float SimpleConeBounds::theZmin
private

Definition at line 94 of file SimpleConeBounds.h.

Referenced by inside(), length(), SimpleConeBounds(), and vertex().

SimpleConeBounds
Definition: SimpleConeBounds.h:23
L1EGammaCrystalsEmulatorProducer_cfi.scale
scale
Definition: L1EGammaCrystalsEmulatorProducer_cfi.py:10
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
Geom::Theta
Definition: Theta.h:12
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
SiStripMonitorCluster_cfi.zmin
zmin
Definition: SiStripMonitorCluster_cfi.py:200
SimpleConeBounds::theRminZmax
float theRminZmax
Definition: SimpleConeBounds.h:98
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
Geom::pi
constexpr double pi()
Definition: Pi.h:31
theta
Geom::Theta< T > theta() const
Definition: Basic3DVectorLD.h:150
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
SimpleConeBounds::theRminZmin
float theRminZmin
Definition: SimpleConeBounds.h:95
SimpleConeBounds::theRmaxZmin
float theRmaxZmin
Definition: SimpleConeBounds.h:96
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
SimpleConeBounds::inside
bool inside(const Local3DPoint &p) const override
Determine if the point is inside the bounds.
Definition: SimpleConeBounds.h:53
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
LocalError
Definition: LocalError.h:12
SimpleConeBounds::theZmin
float theZmin
Definition: SimpleConeBounds.h:94
submitPVResolutionJobs.err
err
Definition: submitPVResolutionJobs.py:85
SimpleConeBounds::SimpleConeBounds
SimpleConeBounds(float zmin, float rmin_zmin, float rmax_zmin, float zmax, float rmin_zmax, float rmax_zmax)
Construct from inner/outer radius on the two Z faces.
Definition: SimpleConeBounds.h:26
flavorHistoryFilter_cfi.dr
dr
Definition: flavorHistoryFilter_cfi.py:37
SimpleConeBounds::theZmax
float theZmax
Definition: SimpleConeBounds.h:97
SimpleConeBounds::theRmaxZmax
float theRmaxZmax
Definition: SimpleConeBounds.h:99
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Local3DPoint
Point3DBase< float, LocalTag > Local3DPoint
Definition: LocalPoint.h:9
SimpleConeBounds::length
float length() const override
Length along Z.
Definition: SimpleConeBounds.h:44