CMS 3D CMS Logo

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

#include <RectangularStripTopology.h>

Inheritance diagram for RectangularStripTopology:
StripTopology Topology

Public Member Functions

int channel (const LocalPoint &lp) const override
 
float coveredStrips (const LocalPoint &lp1, const LocalPoint &lp2) const override
 
LocalError localError (float strip, float stripErr2) const override
 
LocalError localError (const MeasurementPoint &, const MeasurementError &) const override
 
float localPitch (const LocalPoint &) const override
 
LocalPoint localPosition (float strip) const override
 
LocalPoint localPosition (const MeasurementPoint &) const override
 
float localStripLength (const LocalPoint &) const override
 
MeasurementError measurementError (const LocalPoint &, const LocalError &) const override
 
MeasurementPoint measurementPosition (const LocalPoint &) const override
 
int nstrips () const override
 
float pitch () const override
 
 RectangularStripTopology (int nstrips, float pitch, float detlength)
 
float strip (const LocalPoint &) const override
 
float stripAngle (float strip) const override
 
float stripLength () const override
 
- Public Member Functions inherited from StripTopology
virtual LocalError localError (float strip, float stripErr2, const Topology::LocalTrackPred &) const
 conversion taking also the angle from the predicted track state More...
 
virtual float localPitch (const LocalPoint &lp, const Topology::LocalTrackAngles &) const
 conversion taking also the angle from the track state (LocalTrajectoryParameters) More...
 
virtual LocalPoint localPosition (float strip, const Topology::LocalTrackPred &) const
 conversion taking also the predicted track state More...
 
virtual float localStripLength (const LocalPoint &lp, const Topology::LocalTrackAngles &) const
 conversion taking also the angle from the track state (LocalTrajectoryParameters) More...
 
virtual float strip (const LocalPoint &lp, const Topology::LocalTrackAngles &) const
 conversion taking also the angle from the track state (LocalTrajectoryParameters) More...
 
 ~StripTopology () override
 
- Public Member Functions inherited from Topology
virtual int channel (const LocalPoint &lp, const LocalTrackAngles &) const
 conversion taking also the angle from the track state More...
 
virtual LocalError localError (const MeasurementPoint &mp, const MeasurementError &me, const LocalTrackPred &) const
 conversion taking also the angle from the predicted track state More...
 
virtual LocalPoint localPosition (const MeasurementPoint &mp, const LocalTrackPred &) const
 conversion taking also the angle from the predicted track state More...
 
virtual MeasurementError measurementError (const LocalPoint &lp, const LocalError &le, const LocalTrackAngles &) const
 conversion taking also the angle from the track state More...
 
virtual MeasurementPoint measurementPosition (const LocalPoint &lp, const LocalTrackAngles &) const
 conversion taking also the angle from the track state More...
 
virtual ~Topology ()
 

Private Attributes

int theNumberOfStrips
 
float theOffset
 
float thePitch
 
float theStripLength
 

Additional Inherited Members

- Public Types inherited from Topology
typedef Point2DBase< double,
LocalTag
Local2DPoint
 
typedef Vector2D::MathVector MathVector2D
 
typedef Basic2DVector< double > Vector2D
 

Detailed Description

Specialised strip topology for rectangular barrel detectors. The strips are parallel to the local Y axis, so X is the precisely measured coordinate.

Definition at line 11 of file RectangularStripTopology.h.

Constructor & Destructor Documentation

RectangularStripTopology::RectangularStripTopology ( int  nstrips,
float  pitch,
float  detlength 
)

Definition at line 7 of file RectangularStripTopology.cc.

References gather_cfg::cout, theNumberOfStrips, theOffset, and thePitch.

10 
11 #ifdef VERBOSE
12  cout << "Constructing RectangularStripTopology with"
13  << " nstrips = " << ns << " pitch = " << p << " length = " << l << endl;
14 #endif
15 }
tuple cout
Definition: gather_cfg.py:144

Member Function Documentation

int RectangularStripTopology::channel ( const LocalPoint lp) const
inlineoverridevirtual

Implements Topology.

Definition at line 34 of file RectangularStripTopology.h.

References min(), strip(), and theNumberOfStrips.

34 { return std::min(int(strip(lp)), theNumberOfStrips - 1); }
float strip(const LocalPoint &) const override
T min(T a, T b)
Definition: MathUtil.h:58
float RectangularStripTopology::coveredStrips ( const LocalPoint lp1,
const LocalPoint lp2 
) const
overridevirtual

Reimplemented from StripTopology.

Definition at line 44 of file RectangularStripTopology.cc.

References thePitch, and PV3DBase< T, PVType, FrameType >::x().

44  {
45  return (lp1.x() - lp2.x()) / thePitch;
46 }
T x() const
Definition: PV3DBase.h:59
LocalError RectangularStripTopology::localError ( float  strip,
float  stripErr2 
) const
overridevirtual
LocalError RectangularStripTopology::localError ( const MeasurementPoint ,
const MeasurementError merr 
) const
overridevirtual

Implements Topology.

Definition at line 29 of file RectangularStripTopology.cc.

References thePitch, theStripLength, MeasurementError::uu(), MeasurementError::uv(), and MeasurementError::vv().

29  {
30  return LocalError(merr.uu() * thePitch * thePitch,
31  merr.uv() * thePitch * theStripLength,
32  merr.vv() * theStripLength * theStripLength);
33 }
float vv() const
float uu() const
float uv() const
float RectangularStripTopology::localPitch ( const LocalPoint ) const
inlineoverridevirtual

Implements StripTopology.

Definition at line 38 of file RectangularStripTopology.h.

References thePitch.

LocalPoint RectangularStripTopology::localPosition ( float  strip) const
overridevirtual
LocalPoint RectangularStripTopology::localPosition ( const MeasurementPoint mp) const
overridevirtual

Implements Topology.

Definition at line 21 of file RectangularStripTopology.cc.

References theOffset, thePitch, theStripLength, PV2DBase< T, PVType, FrameType >::x(), and PV2DBase< T, PVType, FrameType >::y().

21  {
22  return LocalPoint(mp.x() * thePitch + theOffset, mp.y() * theStripLength);
23 }
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
T y() const
Definition: PV2DBase.h:44
T x() const
Definition: PV2DBase.h:43
float RectangularStripTopology::localStripLength ( const LocalPoint ) const
inlineoverridevirtual

Implements StripTopology.

Definition at line 46 of file RectangularStripTopology.h.

References stripLength().

46 { return stripLength(); }
float stripLength() const override
MeasurementError RectangularStripTopology::measurementError ( const LocalPoint ,
const LocalError lerr 
) const
overridevirtual

Implements Topology.

Definition at line 52 of file RectangularStripTopology.cc.

References thePitch, theStripLength, LocalError::xx(), LocalError::xy(), and LocalError::yy().

52  {
53  return MeasurementError(lerr.xx() / (thePitch * thePitch),
54  lerr.xy() / (thePitch * theStripLength),
55  lerr.yy() / (theStripLength * theStripLength));
56 }
float xx() const
Definition: LocalError.h:22
float xy() const
Definition: LocalError.h:23
float yy() const
Definition: LocalError.h:24
MeasurementPoint RectangularStripTopology::measurementPosition ( const LocalPoint lp) const
overridevirtual

Implements Topology.

Definition at line 48 of file RectangularStripTopology.cc.

References theOffset, thePitch, theStripLength, PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

48  {
49  return MeasurementPoint((lp.x() - theOffset) / thePitch, lp.y() / theStripLength);
50 }
T y() const
Definition: PV3DBase.h:60
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
T x() const
Definition: PV3DBase.h:59
int RectangularStripTopology::nstrips ( ) const
inlineoverridevirtual

Implements StripTopology.

Definition at line 42 of file RectangularStripTopology.h.

References theNumberOfStrips.

float RectangularStripTopology::pitch ( ) const
inlineoverridevirtual

Implements StripTopology.

Definition at line 36 of file RectangularStripTopology.h.

References thePitch.

Referenced by DTSegtoRPC::thePoints().

float RectangularStripTopology::strip ( const LocalPoint lp) const
overridevirtual

Implements StripTopology.

Definition at line 35 of file RectangularStripTopology.cc.

References theNumberOfStrips, theOffset, thePitch, and PV3DBase< T, PVType, FrameType >::x().

Referenced by channel().

35  {
36  float aStrip = (lp.x() - theOffset) / thePitch;
37  if (aStrip < 0)
38  aStrip = 0;
39  else if (aStrip > theNumberOfStrips)
40  aStrip = theNumberOfStrips;
41  return aStrip;
42 }
T x() const
Definition: PV3DBase.h:59
float RectangularStripTopology::stripAngle ( float  strip) const
inlineoverridevirtual

Implements StripTopology.

Definition at line 40 of file RectangularStripTopology.h.

40 { return 0; }
float RectangularStripTopology::stripLength ( ) const
inlineoverridevirtual

Member Data Documentation

int RectangularStripTopology::theNumberOfStrips
private

Definition at line 50 of file RectangularStripTopology.h.

Referenced by channel(), nstrips(), RectangularStripTopology(), and strip().

float RectangularStripTopology::theOffset
private
float RectangularStripTopology::thePitch
private
float RectangularStripTopology::theStripLength
private