CMS 3D CMS Logo

Public Member Functions | Private Attributes

RectangularStripTopology Class Reference

#include <RectangularStripTopology.h>

Inheritance diagram for RectangularStripTopology:
StripTopology Topology

List of all members.

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

Private Attributes

int theNumberOfStrips
float theOffset
float thePitch
float theStripLength

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.

                                                                           : 
  thePitch(p), theNumberOfStrips(ns), theStripLength(l) { 
  theOffset = -0.5f*theNumberOfStrips * thePitch;

#ifdef VERBOSE
  cout <<"Constructing RectangularStripTopology with"
       <<" nstrips = "<<ns
       <<" pitch = "<<p
       <<" length = "<<l
       <<endl;
#endif
}

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.

                                                            {
  return std::min(int(strip(lp)),theNumberOfStrips-1);
}
LocalError RectangularStripTopology::localError ( float  strip,
float  stripErr2 
) const [virtual]

Implements StripTopology.

Definition at line 31 of file RectangularStripTopology.cc.

References f, thePitch, and theStripLength.

                                                                      {
  return LocalError(stripErr2 * thePitch*thePitch,
                    0.f,
                    theStripLength*theStripLength*(1.f/12.f));
}
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().

                                     {
  return LocalError(merr.uu() * thePitch*thePitch,
                    merr.uv() * thePitch*theStripLength,
                    merr.vv() * theStripLength*theStripLength);
}
float RectangularStripTopology::localPitch ( const LocalPoint lp) const [virtual]

Implements StripTopology.

Definition at line 78 of file RectangularStripTopology.cc.

References thePitch.

                                                               {
  return thePitch;
}
LocalPoint RectangularStripTopology::localPosition ( const MeasurementPoint mp) const [virtual]
LocalPoint RectangularStripTopology::localPosition ( float  strip) const [virtual]
virtual float RectangularStripTopology::localStripLength ( const LocalPoint aLP) const [inline, virtual]

Implements StripTopology.

Definition at line 45 of file RectangularStripTopology.h.

References stripLength().

                                                              {
    return stripLength();
  }
MeasurementError RectangularStripTopology::measurementError ( const LocalPoint lp,
const LocalError lerr 
) const [virtual]
MeasurementPoint RectangularStripTopology::measurementPosition ( const LocalPoint lp) const [virtual]
int RectangularStripTopology::nstrips ( ) const [virtual]

Implements StripTopology.

Definition at line 88 of file RectangularStripTopology.cc.

References theNumberOfStrips.

                                        { 
  return theNumberOfStrips;
}
float RectangularStripTopology::pitch ( ) const [virtual]

Implements StripTopology.

Definition at line 73 of file RectangularStripTopology.cc.

References thePitch.

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

                                      { 
  return thePitch;
}
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().

                                                          {
  float aStrip = (lp.x() - theOffset) / thePitch;
  if (aStrip < 0 ) aStrip = 0;
  else if (aStrip > theNumberOfStrips)  aStrip = theNumberOfStrips;
  return aStrip;
}
float RectangularStripTopology::stripAngle ( float  strip) const [virtual]

Implements StripTopology.

Definition at line 83 of file RectangularStripTopology.cc.

                                                      {
  return 0;
}
virtual float RectangularStripTopology::stripLength ( ) const [inline, virtual]

Member Data Documentation

Definition at line 51 of file RectangularStripTopology.h.

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