CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
CSCWireGeometry Class Referenceabstract

#include <CSCWireGeometry.h>

Inheritance diagram for CSCWireGeometry:
CSCNonslantedWireGeometry CSCSlantedWireGeometry

Public Member Functions

virtual CSCWireGeometryclone () const =0
 
 CSCWireGeometry (double wireSpacing, double yOfFirstWire, double narrowWidthOfPlane, double wideWidthOfPlane, double lengthOfPlane)
 
std::pair< float, float > equationOfWire (float wire) const
 
LocalPoint intersection (float m1, float c1, float m2, float c2) const
 
double lengthOfPlane () const
 
double narrowWidthOfPlane () const
 
virtual int nearestWire (const LocalPoint &lp) const =0
 
double wideWidthOfPlane () const
 
virtual float wireAngle () const =0
 
std::pair< LocalPoint, LocalPointwireEnds (float wire) const
 
double wireSpacing () const
 
std::vector< float > wireValues (float wire) const
 
std::pair< float, float > yLimitsOfWirePlane () const
 
double yOfFirstWire () const
 
virtual float yOfWire (float wire, float x=0.) const =0
 
virtual ~CSCWireGeometry ()
 

Private Attributes

double theLengthOfPlane
 
double theNarrowWidthOfPlane
 
double theWideWidthOfPlane
 
double theWireSpacing
 
double theYOfFirstWire
 

Detailed Description

An ABC defining interface for geometry related to angle which wires of a detector modelled by a WireTopology make with the local x axis.

Author
Tim Cox

Definition at line 17 of file CSCWireGeometry.h.

Constructor & Destructor Documentation

virtual CSCWireGeometry::~CSCWireGeometry ( )
inlinevirtual

Definition at line 19 of file CSCWireGeometry.h.

19 {}
CSCWireGeometry::CSCWireGeometry ( double  wireSpacing,
double  yOfFirstWire,
double  narrowWidthOfPlane,
double  wideWidthOfPlane,
double  lengthOfPlane 
)
inline

Constructor from wire spacing (in cm)

Definition at line 24 of file CSCWireGeometry.h.

Member Function Documentation

virtual CSCWireGeometry* CSCWireGeometry::clone ( ) const
pure virtual

Allow proper copying of derived classes via base pointer

Implemented in CSCNonslantedWireGeometry, and CSCSlantedWireGeometry.

Referenced by CSCWireTopology::CSCWireTopology(), and CSCWireTopology::operator=().

std::pair< float, float > CSCWireGeometry::equationOfWire ( float  wire) const

Return slope and intercept of straight line representing a wire in 2-dim local coordinates.

The return value is a pair p with p.first = m, p.second = c, where y=mx+c.

Definition at line 176 of file CSCWireGeometry.cc.

Referenced by CSCWireTopology::equationOfWire().

LocalPoint CSCWireGeometry::intersection ( float  m1,
float  c1,
float  m2,
float  c2 
) const

2D point of intersection of two straight lines defined by
y = m1*x + c1 and y = m2*x + c2
(in local coordinates x, y)

Definition at line 7 of file CSCWireGeometry.cc.

double CSCWireGeometry::lengthOfPlane ( ) const
inline

Extent of wire plane along long axis of trapezoid

Definition at line 57 of file CSCWireGeometry.h.

References theLengthOfPlane.

57  {
58  return theLengthOfPlane; }
double CSCWireGeometry::narrowWidthOfPlane ( ) const
inline

Extent of wire plane at narrow end of trapezoid

Definition at line 45 of file CSCWireGeometry.h.

References theNarrowWidthOfPlane.

45  {
46  return theNarrowWidthOfPlane; }
double theNarrowWidthOfPlane
virtual int CSCWireGeometry::nearestWire ( const LocalPoint lp) const
pure virtual

The nearest (virtual) wire to a given LocalPoint. Beware that this wire might not exist or be read out!

Implemented in CSCNonslantedWireGeometry, and CSCSlantedWireGeometry.

Referenced by CSCWireTopology::channel().

double CSCWireGeometry::wideWidthOfPlane ( ) const
inline

Extent of wire plane at wide end of trapezoid

Definition at line 51 of file CSCWireGeometry.h.

References theWideWidthOfPlane.

51  {
52  return theWideWidthOfPlane; }
double theWideWidthOfPlane
virtual float CSCWireGeometry::wireAngle ( ) const
pure virtual

The angle of the wires w.r.t local x axis (in radians)

Implemented in CSCNonslantedWireGeometry, and CSCSlantedWireGeometry.

std::pair< LocalPoint, LocalPoint > CSCWireGeometry::wireEnds ( float  wire) const

Return 2-dim local coords of the two ends of a wire

The returned value is a pair of LocalPoints.

Definition at line 35 of file CSCWireGeometry.cc.

double CSCWireGeometry::wireSpacing ( ) const
inline
std::vector< float > CSCWireGeometry::wireValues ( float  wire) const

Return mid-point of a wire in local coordinates, and its length across the chamber volume, in a vector as x, y, length

Definition at line 18 of file CSCWireGeometry.cc.

std::pair< float, float > CSCWireGeometry::yLimitsOfWirePlane ( ) const

Return pair containing y extremes of wire-plane: p.first = low y, p.second= high y

This is supposed to approximate the 'sensitive' region covered by wires (and strips) but there is no sophisticated handling of edge effects, or attempt to estimate a precise region overlapped by both wires and strips.

Definition at line 197 of file CSCWireGeometry.cc.

Referenced by CSCWireTopology::insideYOfWirePlane(), and CSCWireTopology::restrictToYOfWirePlane().

double CSCWireGeometry::yOfFirstWire ( ) const
inline

The local y of the first wire

Definition at line 39 of file CSCWireGeometry.h.

References theYOfFirstWire.

Referenced by CSCNonslantedWireGeometry::nearestWire(), and CSCNonslantedWireGeometry::yOfWire().

39  {
40  return theYOfFirstWire; }
virtual float CSCWireGeometry::yOfWire ( float  wire,
float  x = 0. 
) const
pure virtual

Local y of a given wire 'number' (float) at given x

Implemented in CSCNonslantedWireGeometry, and CSCSlantedWireGeometry.

Referenced by CSCWireTopology::yOfWireGroup().

Member Data Documentation

double CSCWireGeometry::theLengthOfPlane
private

Definition at line 119 of file CSCWireGeometry.h.

Referenced by lengthOfPlane().

double CSCWireGeometry::theNarrowWidthOfPlane
private

Definition at line 117 of file CSCWireGeometry.h.

Referenced by narrowWidthOfPlane().

double CSCWireGeometry::theWideWidthOfPlane
private

Definition at line 118 of file CSCWireGeometry.h.

Referenced by wideWidthOfPlane().

double CSCWireGeometry::theWireSpacing
private

Definition at line 115 of file CSCWireGeometry.h.

Referenced by wireSpacing().

double CSCWireGeometry::theYOfFirstWire
private

Definition at line 116 of file CSCWireGeometry.h.

Referenced by yOfFirstWire().