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
RectangularStripTopology Class Reference

#include <RectangularStripTopology.h>

Inheritance diagram for RectangularStripTopology:
StripTopology Topology

Public Member Functions

virtual int channel (const LocalPoint &) const
 
virtual LocalError localError (float strip, float stripErr2) const
 
virtual LocalError localError (const MeasurementPoint &, const MeasurementError &) const
 
virtual float localPitch (const LocalPoint &) const
 
virtual LocalPoint localPosition (float strip) const
 
virtual LocalPoint localPosition (const MeasurementPoint &) const
 
virtual float localStripLength (const LocalPoint &aLP) const
 
virtual MeasurementError measurementError (const LocalPoint &, const LocalError &) const
 
virtual MeasurementPoint measurementPosition (const LocalPoint &) const
 
virtual int nstrips () const
 
virtual float pitch () const
 
 RectangularStripTopology (int nstrips, float pitch, float detlength)
 
virtual float strip (const LocalPoint &) const
 
virtual float stripAngle (float strip) const
 
virtual float stripLength () const
 
- 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 &ltp) 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 &ltp) const
 conversion taking also the angle from the track state (LocalTrajectoryParameters) More...
 
virtual float strip (const LocalPoint &lp, const Topology::LocalTrackAngles &ltp) const
 conversion taking also the angle from the track state (LocalTrajectoryParameters) More...
 
virtual ~StripTopology ()
 
- Public Member Functions inherited from Topology
virtual int channel (const LocalPoint &lp, const LocalTrackAngles &dir) 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 &dir) const
 conversion taking also the angle from the track state More...
 
virtual MeasurementPoint measurementPosition (const LocalPoint &lp, const LocalTrackAngles &dir) 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
 

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 }
tuple cout
Definition: gather_cfg.py:41

Member Function Documentation

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

Implements Topology.

Definition at line 68 of file RectangularStripTopology.cc.

References min, strip(), and theNumberOfStrips.

68  {
69  return std::min(int(strip(lp)),theNumberOfStrips-1);
70 }
#define min(a, b)
Definition: mlp_lapack.h:161
virtual float strip(const LocalPoint &) const
LocalError RectangularStripTopology::localError ( float  strip,
float  stripErr2 
) const
virtual

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 mp,
const MeasurementError merr 
) const
virtual

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 lp) const
virtual

Implements StripTopology.

Definition at line 78 of file RectangularStripTopology.cc.

References thePitch.

78  {
79  return thePitch;
80 }
LocalPoint RectangularStripTopology::localPosition ( float  strip) const
virtual
LocalPoint RectangularStripTopology::localPosition ( const MeasurementPoint mp) const
virtual
virtual float RectangularStripTopology::localStripLength ( const LocalPoint aLP) const
inlinevirtual

Implements StripTopology.

Definition at line 45 of file RectangularStripTopology.h.

References stripLength().

45  {
46  return stripLength();
47  }
virtual float stripLength() const
MeasurementError RectangularStripTopology::measurementError ( const LocalPoint lp,
const LocalError lerr 
) const
virtual

Implements Topology.

Definition at line 60 of file RectangularStripTopology.cc.

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

61  {
62  return MeasurementError(lerr.xx()/(thePitch*thePitch),
63  lerr.xy()/(thePitch*theStripLength),
65 }
float xx() const
Definition: LocalError.h:19
float xy() const
Definition: LocalError.h:20
float yy() const
Definition: LocalError.h:21
MeasurementPoint RectangularStripTopology::measurementPosition ( const LocalPoint lp) const
virtual

Implements Topology.

Definition at line 54 of file RectangularStripTopology.cc.

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

54  {
55  return MeasurementPoint((lp.x()-theOffset)/thePitch,
56  lp.y()/theStripLength);
57 }
T y() const
Definition: PV3DBase.h:57
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
T x() const
Definition: PV3DBase.h:56
int RectangularStripTopology::nstrips ( ) const
virtual

Implements StripTopology.

Definition at line 88 of file RectangularStripTopology.cc.

References theNumberOfStrips.

88  {
89  return theNumberOfStrips;
90 }
float RectangularStripTopology::pitch ( ) const
virtual

Implements StripTopology.

Definition at line 73 of file RectangularStripTopology.cc.

References thePitch.

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

73  {
74  return thePitch;
75 }
float RectangularStripTopology::strip ( const LocalPoint lp) const
virtual

Implements StripTopology.

Definition at line 46 of file RectangularStripTopology.cc.

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

Referenced by channel(), and SiClusterTranslator::produce().

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:56
float RectangularStripTopology::stripAngle ( float  strip) const
virtual

Implements StripTopology.

Definition at line 83 of file RectangularStripTopology.cc.

83  {
84  return 0;
85 }
virtual float RectangularStripTopology::stripLength ( ) const
inlinevirtual

Member Data Documentation

int RectangularStripTopology::theNumberOfStrips
private

Definition at line 51 of file RectangularStripTopology.h.

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

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