![]() |
![]() |
#include <DataFormats/GeometrySurface/interface/SimpleDiskBounds.h>
Public Member Functions | |
virtual Bounds * | clone () const |
float | innerRadius () const |
Extension of the Bounds interface. | |
virtual bool | inside (const Local2DPoint &p, const LocalError &err) const |
virtual bool | inside (const Local3DPoint &p, const LocalError &err, float scale) const |
Determine if a point is inside the bounds, taking error into account. | |
virtual bool | inside (const Local3DPoint &p) const |
Determine if the point is inside the bounds. | |
virtual float | length () const |
"Lenght" of the bounded volume; refer to the concrete class documentation for the specific definition. | |
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. | |
virtual float | thickness () const |
"Thickness" of the bound around the surface; refer to the concrete class documentation for the specific definition. | |
virtual float | width () const |
"width" of the bounds; refer to the concrete class documentation for the specific definition. | |
Private Attributes | |
float | theRmax |
float | theRmin |
float | theZmax |
float | theZmin |
Definition at line 13 of file SimpleDiskBounds.h.
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 std::swap(), theRmax, theRmin, theZmax, and theZmin.
Referenced by clone().
00008 : 00009 theRmin(rmin), theRmax(rmax), theZmin(zmin), theZmax(zmax) { 00010 if ( theRmin > theRmax) std::swap( theRmin, theRmax); 00011 if ( theZmin > theZmax) std::swap( theZmin, theZmax); 00012 }
Implements Bounds.
Definition at line 23 of file SimpleDiskBounds.cc.
References SimpleDiskBounds().
00023 { 00024 return new SimpleDiskBounds(*this); 00025 }
float SimpleDiskBounds::innerRadius | ( | ) | const [inline] |
Extension of the Bounds interface.
Definition at line 32 of file SimpleDiskBounds.h.
References theRmin.
Referenced by MuonRoadTrajectoryBuilder::makeTrajectories_0().
00032 {return theRmin;}
bool SimpleDiskBounds::inside | ( | const Local2DPoint & | p, | |
const LocalError & | err | |||
) | const [virtual] |
Definition at line 19 of file SimpleDiskBounds.cc.
References Bounds::inside().
00019 { 00020 return Bounds::inside(p,err); 00021 }
bool SimpleDiskBounds::inside | ( | const Local3DPoint & | , | |
const LocalError & | , | |||
float | scale | |||
) | const [virtual] |
Determine if a point is inside the bounds, taking error into account.
Implements Bounds.
Definition at line 29 of file SimpleDiskBounds.cc.
References deltaR(), f, max, muonGeometry::perp(), PV3DBase< T, PVType, FrameType >::perp2(), funct::sqrt(), theRmax, theRmin, theZmax, theZmin, PV3DBase< T, PVType, FrameType >::x(), LocalError::xx(), LocalError::xy(), PV3DBase< T, PVType, FrameType >::y(), LocalError::yy(), and PV3DBase< T, PVType, FrameType >::z().
00030 { 00031 if (p.z() < theZmin || p.z() > theZmax) return false; // check the easy part first 00032 00033 double perp2 = p.perp2(); 00034 double perp = sqrt(perp2); 00035 if (perp2 == 0) return scale*scale*(err.xx() + err.xy()) > theRmin*theRmin; 00036 00037 // rotated error along p.x(),p.y() 00038 // equivalent to (but faster than) err.rotate(p.x(),p.y()).xx() 00039 // since we don't need all matrix elements 00040 float deltaR = scale * sqrt( p.x()*p.x()/perp2 * err.xx() - 00041 2*p.x()*p.y()/perp2 * err.xy() + 00042 p.y()*p.y()/perp2 * err.yy()); 00043 return perp > std::max(theRmin-deltaR, 0.f) && perp < theRmax+deltaR; 00044 }
bool SimpleDiskBounds::inside | ( | const Local3DPoint & | ) | const [virtual] |
Determine if the point is inside the bounds.
Implements Bounds.
Definition at line 14 of file SimpleDiskBounds.cc.
References PV3DBase< T, PVType, FrameType >::perp(), theRmax, theRmin, theZmax, theZmin, and PV3DBase< T, PVType, FrameType >::z().
Referenced by MuRingForwardDoubleLayer::compatible(), and ForwardDetLayer::compatible().
00014 { 00015 return p.z() > theZmin && p.z() < theZmax && 00016 p.perp() > theRmin && p.perp() < theRmax; 00017 }
virtual float SimpleDiskBounds::length | ( | ) | const [inline, virtual] |
float SimpleDiskBounds::outerRadius | ( | ) | const [inline] |
Definition at line 33 of file SimpleDiskBounds.h.
References theRmax.
Referenced by MuonRoadTrajectoryBuilder::makeTrajectories_0().
00033 {return theRmax;}
virtual float SimpleDiskBounds::thickness | ( | ) | const [inline, virtual] |
virtual float SimpleDiskBounds::width | ( | ) | const [inline, virtual] |
"width" of the bounds; refer to the concrete class documentation for the specific definition.
Implements Bounds.
Definition at line 20 of file SimpleDiskBounds.h.
References theRmax.
00020 { return 2*theRmax;}
float SimpleDiskBounds::theRmax [private] |
Definition at line 37 of file SimpleDiskBounds.h.
Referenced by inside(), outerRadius(), SimpleDiskBounds(), and width().
float SimpleDiskBounds::theRmin [private] |
Definition at line 36 of file SimpleDiskBounds.h.
Referenced by innerRadius(), inside(), and SimpleDiskBounds().
float SimpleDiskBounds::theZmax [private] |
Definition at line 39 of file SimpleDiskBounds.h.
Referenced by inside(), length(), SimpleDiskBounds(), and thickness().
float SimpleDiskBounds::theZmin [private] |
Definition at line 38 of file SimpleDiskBounds.h.
Referenced by inside(), length(), SimpleDiskBounds(), and thickness().