CMS 3D CMS Logo

List of all members | Public Member Functions
CSCNonslantedWireGeometry Class Reference

#include <CSCNonslantedWireGeometry.h>

Inheritance diagram for CSCNonslantedWireGeometry:
CSCWireGeometry

Public Member Functions

CSCWireGeometryclone () const override
 
 CSCNonslantedWireGeometry (double wireSpacing, double yOfFirstWire, double narrow, double wide, double length)
 
int nearestWire (const LocalPoint &lp) const override
 
float wireAngle () const override
 
float yOfWire (float wire, float x=0.) const override
 
 ~CSCNonslantedWireGeometry () override
 
- Public Member Functions inherited from CSCWireGeometry
 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
 
double wideWidthOfPlane () const
 
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 ~CSCWireGeometry ()
 

Detailed Description

A concrete CSCWireGeometry in which the wires are not slanted, i.e. they are all parallel to the local x axis.

Author
Tim Cox

Definition at line 16 of file CSCNonslantedWireGeometry.h.

Constructor & Destructor Documentation

◆ ~CSCNonslantedWireGeometry()

CSCNonslantedWireGeometry::~CSCNonslantedWireGeometry ( )
inlineoverride

Definition at line 18 of file CSCNonslantedWireGeometry.h.

18 {}

◆ CSCNonslantedWireGeometry()

CSCNonslantedWireGeometry::CSCNonslantedWireGeometry ( double  wireSpacing,
double  yOfFirstWire,
double  narrow,
double  wide,
double  length 
)
inline

Constructor from wire spacing

Definition at line 23 of file CSCNonslantedWireGeometry.h.

24  : CSCWireGeometry(wireSpacing, yOfFirstWire, narrow, wide, length) {}

Referenced by clone().

Member Function Documentation

◆ clone()

CSCWireGeometry* CSCNonslantedWireGeometry::clone ( void  ) const
inlineoverridevirtual

Clone to handle correct copy of component objects referenced by base class pointer.

Implements CSCWireGeometry.

Definition at line 47 of file CSCNonslantedWireGeometry.h.

47 { return new CSCNonslantedWireGeometry(*this); }

References CSCNonslantedWireGeometry().

◆ nearestWire()

int CSCNonslantedWireGeometry::nearestWire ( const LocalPoint lp) const
inlineoverridevirtual

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

Implements CSCWireGeometry.

Definition at line 35 of file CSCNonslantedWireGeometry.h.

35 { return 1 + nint((lp.y() - yOfFirstWire()) / wireSpacing()); }

References nint(), CSCWireGeometry::wireSpacing(), PV3DBase< T, PVType, FrameType >::y(), and CSCWireGeometry::yOfFirstWire().

◆ wireAngle()

float CSCNonslantedWireGeometry::wireAngle ( ) const
inlineoverridevirtual

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

Implements CSCWireGeometry.

Definition at line 29 of file CSCNonslantedWireGeometry.h.

29 { return 0.; }

◆ yOfWire()

float CSCNonslantedWireGeometry::yOfWire ( float  wire,
float  x = 0. 
) const
inlineoverridevirtual

Local y of a given wire 'number' (float) at given x For nonslanted wires this y is independent of x.

Implements CSCWireGeometry.

Definition at line 41 of file CSCNonslantedWireGeometry.h.

41 { return yOfFirstWire() + (wire - 1.) * wireSpacing(); }

References CSCWireGeometry::wireSpacing(), and CSCWireGeometry::yOfFirstWire().

CSCWireGeometry::wireSpacing
double wireSpacing() const
Definition: CSCWireGeometry.h:35
nint
int nint(float a)
Return the nearest integer - analogous to the FORTRAN intrinsic NINT.
Definition: nint.h:8
CSCWireGeometry::CSCWireGeometry
CSCWireGeometry(double wireSpacing, double yOfFirstWire, double narrowWidthOfPlane, double wideWidthOfPlane, double lengthOfPlane)
Definition: CSCWireGeometry.h:24
CSCNonslantedWireGeometry::CSCNonslantedWireGeometry
CSCNonslantedWireGeometry(double wireSpacing, double yOfFirstWire, double narrow, double wide, double length)
Definition: CSCNonslantedWireGeometry.h:23
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
CSCWireGeometry::yOfFirstWire
double yOfFirstWire() const
Definition: CSCWireGeometry.h:40