CMS 3D CMS Logo

DiskSectorBounds Class Reference

#include <RecoTracker/TkDetLayers/interface/DiskSectorBounds.h>

Inheritance diagram for DiskSectorBounds:

Bounds

List of all members.

Public Member Functions

virtual Boundsclone () const
 DiskSectorBounds (float rmin, float rmax, float zmin, float zmax, float phiExt)
float innerRadius () const
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
float phiExtension () const
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 theOffset
float thePhiExt
float theRmax
float theRmin
float theZmax
float theZmin


Detailed Description

Definition at line 12 of file DiskSectorBounds.h.


Constructor & Destructor Documentation

DiskSectorBounds::DiskSectorBounds ( float  rmin,
float  rmax,
float  zmin,
float  zmax,
float  phiExt 
) [inline]

Definition at line 15 of file DiskSectorBounds.h.

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

Referenced by clone().

00015                                                                                    : 
00016      theRmin(rmin), theRmax(rmax), theZmin(zmin), theZmax(zmax), thePhiExt(phiExt) {
00017      if ( theRmin > theRmax) std::swap( theRmin, theRmax);
00018      if ( theZmin > theZmax) std::swap( theZmin, theZmax);
00019      theOffset = theRmin + (theRmax-theRmin)/2. ;
00020    }


Member Function Documentation

virtual Bounds* DiskSectorBounds::clone ( void   )  const [inline, virtual]

Implements Bounds.

Definition at line 34 of file DiskSectorBounds.h.

References DiskSectorBounds().

00034                                  { 
00035      return new DiskSectorBounds(*this);
00036    }

float DiskSectorBounds::innerRadius (  )  const [inline]

Definition at line 38 of file DiskSectorBounds.h.

References theRmin.

Referenced by BoundDiskSector::innerRadius().

00038 {return theRmin;}

virtual bool DiskSectorBounds::inside ( const Local2DPoint p,
const LocalError err 
) const [inline, virtual]

Definition at line 30 of file DiskSectorBounds.h.

References Bounds::inside().

00030                                                                             {
00031      return Bounds::inside(p,err);
00032    }

bool DiskSectorBounds::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 17 of file DiskSectorBounds.cc.

References deltaPhi(), deltaR(), f, max, muonGeometry::perp(), funct::sqrt(), theOffset, thePhiExt, theRmax, theRmin, theZmax, theZmin, tmp, PV3DBase< T, PVType, FrameType >::x(), LocalError::xx(), LocalError::xy(), PV3DBase< T, PVType, FrameType >::y(), LocalError::yy(), and PV3DBase< T, PVType, FrameType >::z().

00017                                                                                               {
00018 
00019   if (p.z() < theZmin || p.z() > theZmax) return false;
00020 
00021   Local3DPoint tmp( p.x(), p.y()+ theOffset, p.z());
00022   double perp2 = tmp.perp2();
00023   double perp = sqrt(perp2);
00024 
00025   // this is not really correct, should consider also the angle of the error ellipse
00026    if (perp2 == 0) return scale*scale*err.yy()   > theRmin*theRmin;
00027 
00028    LocalError tmpErr( err.xx(), err.xy(), err.yy());
00029    LocalError rotatedErr = tmpErr.rotate(tmp.x(), tmp.y());
00030    // x direction in this system is now r, phi is y
00031  
00032    float deltaR = scale*sqrt(rotatedErr.xx());
00033    float deltaPhi = atan( scale*sqrt(rotatedErr.yy())/perp);
00034 
00035    float tmpPhi = acos( tmp.y() / perp);
00036    
00037    return  perp >= max(theRmin-deltaR, 0.f) && perp <= theRmax+deltaR 
00038      && tmpPhi <= thePhiExt + deltaPhi ;  
00039 
00040 }

bool DiskSectorBounds::inside ( const Local3DPoint  )  const [virtual]

Determine if the point is inside the bounds.

Implements Bounds.

Definition at line 5 of file DiskSectorBounds.cc.

References theOffset, thePhiExt, theRmax, theRmin, theZmax, theZmin, tmp, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

00005                                                           {
00006   
00007   // transform to system with local frame situated at disk center
00008   // and rotated  x/y axis
00009   Local3DPoint tmp( p.y()+theOffset, -p.x(), p.z());
00010   
00011   return  fabs(tmp.phi()) <= thePhiExt/2. &&
00012     tmp.perp() >= theRmin && tmp.perp() <= theRmax &&
00013     tmp.z() >= theZmin && tmp.z() <= theZmax ;
00014 
00015 }

virtual float DiskSectorBounds::length (  )  const [inline, virtual]

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

Implements Bounds.

Definition at line 22 of file DiskSectorBounds.h.

References funct::cos(), thePhiExt, theRmax, and theRmin.

00022 { return theRmax-theRmin*cos(thePhiExt/2.);}

float DiskSectorBounds::outerRadius (  )  const [inline]

Definition at line 39 of file DiskSectorBounds.h.

References theRmax.

Referenced by BoundDiskSector::outerRadius().

00039 {return theRmax;}

float DiskSectorBounds::phiExtension (  )  const [inline]

Definition at line 40 of file DiskSectorBounds.h.

References thePhiExt.

Referenced by BoundDiskSector::phiExtension().

00040 {return thePhiExt;}

virtual float DiskSectorBounds::thickness (  )  const [inline, virtual]

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

Implements Bounds.

Definition at line 24 of file DiskSectorBounds.h.

References theZmax, and theZmin.

Referenced by CompositeTECPetal::overlap().

00024 { return theZmax-theZmin;}

virtual float DiskSectorBounds::width (  )  const [inline, virtual]

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

Implements Bounds.

Definition at line 23 of file DiskSectorBounds.h.

References funct::sin(), thePhiExt, and theRmax.

00023 { return 2*theRmax*sin(thePhiExt/2.);}


Member Data Documentation

float DiskSectorBounds::theOffset [private]

Definition at line 48 of file DiskSectorBounds.h.

Referenced by DiskSectorBounds(), and inside().

float DiskSectorBounds::thePhiExt [private]

Definition at line 47 of file DiskSectorBounds.h.

Referenced by inside(), length(), phiExtension(), and width().

float DiskSectorBounds::theRmax [private]

Definition at line 44 of file DiskSectorBounds.h.

Referenced by DiskSectorBounds(), inside(), length(), outerRadius(), and width().

float DiskSectorBounds::theRmin [private]

Definition at line 43 of file DiskSectorBounds.h.

Referenced by DiskSectorBounds(), innerRadius(), inside(), and length().

float DiskSectorBounds::theZmax [private]

Definition at line 46 of file DiskSectorBounds.h.

Referenced by DiskSectorBounds(), inside(), and thickness().

float DiskSectorBounds::theZmin [private]

Definition at line 45 of file DiskSectorBounds.h.

Referenced by DiskSectorBounds(), inside(), and thickness().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:18:28 2009 for CMSSW by  doxygen 1.5.4