CMS 3D CMS Logo

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, LocalTagLocal2DPoint
 
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.

7  :
10 
11 #ifdef VERBOSE
12  cout <<"Constructing RectangularStripTopology with"
13  <<" nstrips = "<<ns
14  <<" pitch = "<<p
15  <<" length = "<<l
16  <<endl;
17 #endif
18 }

Member Function Documentation

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

Implements Topology.

Definition at line 39 of file RectangularStripTopology.h.

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

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

Reimplemented from StripTopology.

Definition at line 54 of file RectangularStripTopology.cc.

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

54  {
55  return (lp1.x()-lp2.x())/thePitch;
56 }
T x() const
Definition: PV3DBase.h:62
LocalError RectangularStripTopology::localError ( float  strip,
float  stripErr2 
) const
overridevirtual

Implements StripTopology.

Definition at line 31 of file RectangularStripTopology.cc.

References f, thePitch, and theStripLength.

31  {
32  return LocalError(stripErr2 * thePitch*thePitch,
33  0.f,
35 }
double f[11][100]
LocalError RectangularStripTopology::localError ( const MeasurementPoint ,
const MeasurementError merr 
) const
overridevirtual

Implements Topology.

Definition at line 38 of file RectangularStripTopology.cc.

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

39  {
40  return LocalError(merr.uu() * thePitch*thePitch,
41  merr.uv() * thePitch*theStripLength,
42  merr.vv() * theStripLength*theStripLength);
43 }
float vv() const
float uu() const
float uv() const
float RectangularStripTopology::localPitch ( const LocalPoint ) const
inlineoverridevirtual

Implements StripTopology.

Definition at line 43 of file RectangularStripTopology.h.

References thePitch.

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

Implements StripTopology.

Definition at line 51 of file RectangularStripTopology.h.

References stripLength().

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

Implements Topology.

Definition at line 65 of file RectangularStripTopology.cc.

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

66  {
67  return MeasurementError(lerr.xx()/(thePitch*thePitch),
68  lerr.xy()/(thePitch*theStripLength),
70 }
float xx() const
Definition: LocalError.h:24
float xy() const
Definition: LocalError.h:25
float yy() const
Definition: LocalError.h:26
MeasurementPoint RectangularStripTopology::measurementPosition ( const LocalPoint lp) const
overridevirtual

Implements Topology.

Definition at line 59 of file RectangularStripTopology.cc.

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

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

Implements StripTopology.

Definition at line 47 of file RectangularStripTopology.h.

References theNumberOfStrips.

float RectangularStripTopology::pitch ( ) const
inlineoverridevirtual

Implements StripTopology.

Definition at line 41 of file RectangularStripTopology.h.

References thePitch.

Referenced by RPCEfficiency::analyze(), and DTSegtoRPC::DTSegtoRPC().

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

Implements StripTopology.

Definition at line 46 of file RectangularStripTopology.cc.

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

Referenced by channel().

46  {
47  float aStrip = (lp.x() - theOffset) / thePitch;
48  if (aStrip < 0 ) aStrip = 0;
49  else if (aStrip > theNumberOfStrips) aStrip = theNumberOfStrips;
50  return aStrip;
51 }
T x() const
Definition: PV3DBase.h:62
float RectangularStripTopology::stripAngle ( float  strip) const
inlineoverridevirtual

Implements StripTopology.

Definition at line 45 of file RectangularStripTopology.h.

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

Member Data Documentation

int RectangularStripTopology::theNumberOfStrips
private

Definition at line 57 of file RectangularStripTopology.h.

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

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