CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Private Attributes

TrapezoidalStripTopology Class Reference

#include <TrapezoidalStripTopology.h>

Inheritance diagram for TrapezoidalStripTopology:
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
float radius () const
virtual float strip (const LocalPoint &) const
virtual float stripAngle (float strip) const
virtual float stripLength () const
 det heigth (strip length in the middle)
 TrapezoidalStripTopology (int nstrip, float pitch, float detheight, float r0, int yAx)
 TrapezoidalStripTopology (int nstrip, float pitch, float detheight, float r0)

Protected Member Functions

virtual float shiftOffset (float pitch_fraction)

Private Attributes

float theDetHeight
float theDistToBeam
int theNumberOfStrips
float theOffset
float thePitch
int theYAxOr

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. Specialization of StripTopology for detectors of symmetric trapezoidal shape. The local Y coordinate is parallel to the central strip, and prpendicular to the paralle sides of the trapezoid. The first and last strips are parallel to the corresponding sides of the trapezoid. The pitch is constant at constant y. This topology makes a non-linear transformation: the pitch is not constant along the strips.

Definition at line 22 of file TrapezoidalStripTopology.h.


Constructor & Destructor Documentation

TrapezoidalStripTopology::TrapezoidalStripTopology ( int  nstrip,
float  pitch,
float  detheight,
float  r0 
)

constructed from: number of strips pitch in the middle det heigth (strip length in the middle) radius of circle passing through the middle of the det with center at the crossing of the two sides.

Definition at line 7 of file TrapezoidalStripTopology.cc.

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

                                                             :
  theNumberOfStrips(ns), thePitch(p),
  theDistToBeam(r0), theDetHeight(l) {
  theOffset = -theNumberOfStrips/2. * thePitch;
  theYAxOr = 1;
#ifdef VERBOSE
  cout<<"Constructing TrapezoidalStripTopology with"
      <<" nstrips = "<<ns
      <<" pitch = "<<p
      <<" length = "<<l
      <<" r0 ="<<r0
      <<endl;
#endif
}
TrapezoidalStripTopology::TrapezoidalStripTopology ( int  nstrip,
float  pitch,
float  detheight,
float  r0,
int  yAx 
)

Definition at line 24 of file TrapezoidalStripTopology.cc.

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

                                                                      :
  theNumberOfStrips(ns), thePitch(p),
  theDistToBeam(r0), theDetHeight(l), theYAxOr(yAx){
  theOffset = -theNumberOfStrips/2. * thePitch;
#ifdef VERBOSE
  cout<<"Constructing TrapezoidalStripTopology with"
      <<" nstrips = "<<ns
      <<" pitch = "<<p
      <<" length = "<<l
      <<" r0 ="<<r0
      <<" yAxOrientation ="<<yAx
      <<endl;
#endif
}

Member Function Documentation

int TrapezoidalStripTopology::channel ( const LocalPoint lp) const [virtual]

Implements Topology.

Definition at line 132 of file TrapezoidalStripTopology.cc.

References min, strip(), and theNumberOfStrips.

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

Implements StripTopology.

Definition at line 55 of file TrapezoidalStripTopology.cc.

References lt, theDetHeight, theDistToBeam, theOffset, thePitch, and theYAxOr.

                                                                       {
  float lt,lc2,ls2,lslc;
  float localL2,localP2;
  float sl2,sp2;
  // angle from strip to local frame (see CMS TN / 95-170)
  lt = -(strip*thePitch + theOffset)*theYAxOr/theDistToBeam;
  lc2 = 1.f/(1.+lt*lt);
  lslc = lt*lc2;
  ls2 = 1.f-lc2;
  localL2 = theDetHeight*theDetHeight / lc2;
  localP2 = thePitch*thePitch*lc2;
  sl2 = localL2/12.;
  sp2 = stripErr2*localP2;
  return LocalError(lc2*sp2+ls2*sl2,
                    lslc*(sp2-sl2),
                    ls2*sp2+lc2*sl2);
}
LocalError TrapezoidalStripTopology::localError ( const MeasurementPoint mp,
const MeasurementError merr 
) const [virtual]

Implements Topology.

Definition at line 74 of file TrapezoidalStripTopology.cc.

References localPitch(), localPosition(), lt, mathSSE::sqrt(), theDetHeight, theDistToBeam, theOffset, thePitch, theYAxOr, MeasurementError::uu(), MeasurementError::uv(), MeasurementError::vv(), and PV2DBase< T, PVType, FrameType >::x().

                                                                         {
  float lt,lc2,ls2,lslc;
  float localL,localP;
  float sl2,sp2,spl;
  // angle from strip to local frame (see CMS TN / 95-170)
  lt = -(mp.x()*thePitch + theOffset)*theYAxOr/theDistToBeam;
  lc2 = 1./(1.+lt*lt);
  lslc = lt*lc2;
  ls2 = 1.f-lc2;
  localL = theDetHeight / std::sqrt(lc2);
  localP = localPitch(localPosition(mp));
  sp2 = merr.uu() * localP*localP;
  sl2 = merr.vv() * localL*localL;
  spl = merr.uv() * localP*localL;
  return LocalError(lc2*sp2+ls2*sl2-2*lslc*spl,
                    lslc*(sp2-sl2)+(lc2-ls2)*spl,
                    ls2*sp2+lc2*sl2+2*lslc*spl);
}
float TrapezoidalStripTopology::localPitch ( const LocalPoint lp) const [virtual]
LocalPoint TrapezoidalStripTopology::localPosition ( const MeasurementPoint mp) const [virtual]
LocalPoint TrapezoidalStripTopology::localPosition ( float  strip) const [virtual]
float TrapezoidalStripTopology::localStripLength ( const LocalPoint aLP) const [virtual]

Implements StripTopology.

Definition at line 163 of file TrapezoidalStripTopology.cc.

References f, mathSSE::sqrt(), theDetHeight, theDistToBeam, theYAxOr, PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

        {
  float ltan = -lp.x()/(theYAxOr*lp.y()+theDistToBeam)*theYAxOr;
  float localL = theDetHeight * std::sqrt(1.f+ltan*ltan);
  //  float lcos2 = 1.f/(1.f+ltan*ltan);
  //  float localL = theDetHeight / std::sqrt(lcos2);

  return localL;
}
MeasurementError TrapezoidalStripTopology::measurementError ( const LocalPoint lp,
const LocalError lerr 
) const [virtual]

Implements Topology.

Definition at line 111 of file TrapezoidalStripTopology.cc.

References localPitch(), lt, mathSSE::sqrt(), theDetHeight, theDistToBeam, theYAxOr, PV3DBase< T, PVType, FrameType >::x(), LocalError::xx(), LocalError::xy(), PV3DBase< T, PVType, FrameType >::y(), and LocalError::yy().

                                                                         {
  float lt,lc2,ls2,lslc;
  float localL,localP;
  float sl2,sp2,spl;
  lt = -lp.x()/(theYAxOr*lp.y()+theDistToBeam)*theYAxOr;
  lc2 = 1./(1.+lt*lt);
  lslc = lt*lc2;
  ls2 = 1.-lc2;
  localL = theDetHeight / std::sqrt(lc2);
  localP = localPitch(lp);
  sp2 = lc2*lerr.xx()+ls2*lerr.yy()+2*lslc*lerr.xy();
  sl2 = ls2*lerr.xx()+lc2*lerr.yy()-2*lslc*lerr.xy();
  spl = lslc*(lerr.yy()-lerr.xx())+(lc2-ls2)*lerr.xy();
  return MeasurementError(sp2/(localP*localP),
                          spl/(localP*localL),
                          sl2/(localL*localL));

}
MeasurementPoint TrapezoidalStripTopology::measurementPosition ( const LocalPoint lp) const [virtual]
int TrapezoidalStripTopology::nstrips ( ) const [virtual]

Implements StripTopology.

Definition at line 154 of file TrapezoidalStripTopology.cc.

References theNumberOfStrips.

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

Pitch in the middle of the DetUnit

Implements StripTopology.

Definition at line 137 of file TrapezoidalStripTopology.cc.

References thePitch.

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

                                      {
  return thePitch;
}
float TrapezoidalStripTopology::radius ( void  ) const [inline]

radius of circle passing through the middle of the det with center at the crossing of the two sides.

Definition at line 72 of file TrapezoidalStripTopology.h.

References theDistToBeam.

{ return theDistToBeam;}
float TrapezoidalStripTopology::shiftOffset ( float  pitch_fraction) [protected, virtual]

Definition at line 158 of file TrapezoidalStripTopology.cc.

References theOffset, and thePitch.

                                                                 {
  theOffset += thePitch * pitch_fraction;
  return theOffset;
}
float TrapezoidalStripTopology::strip ( const LocalPoint lp) const [virtual]

Implements StripTopology.

Definition at line 95 of file TrapezoidalStripTopology.cc.

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

Referenced by channel().

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

angle between strip and symmetry axis

Implements StripTopology.

Definition at line 149 of file TrapezoidalStripTopology.cc.

References theDistToBeam, theOffset, thePitch, and theYAxOr.

                                                      {
  return std::atan( -(strip*thePitch + theOffset)*theYAxOr/theDistToBeam );
}
virtual float TrapezoidalStripTopology::stripLength ( ) const [inline, virtual]

Member Data Documentation

Definition at line 79 of file TrapezoidalStripTopology.h.

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