#include <TrapezoidalStripTopology.h>
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 |
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.
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 }
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] |
Implements StripTopology.
Definition at line 142 of file TrapezoidalStripTopology.cc.
References f, mathSSE::sqrt(), theDistToBeam, thePitch, theYAxOr, PV3DBase< T, PVType, FrameType >::x(), x, PV3DBase< T, PVType, FrameType >::y(), and detailsBasic3DVector::y.
Referenced by localError(), and measurementError().
{ float x=lp.x(); float y=theYAxOr*lp.y()+theDistToBeam; return thePitch*y/(theDistToBeam*std::sqrt(1.f+x*x/(y*y))); }
LocalPoint TrapezoidalStripTopology::localPosition | ( | const MeasurementPoint & | mp | ) | const [virtual] |
Implements Topology.
Definition at line 47 of file TrapezoidalStripTopology.cc.
References theDetHeight, theDistToBeam, theOffset, thePitch, theYAxOr, PV2DBase< T, PVType, FrameType >::x(), x, PV2DBase< T, PVType, FrameType >::y(), and detailsBasic3DVector::y.
{ float y = mp.y()*theDetHeight; float x = (mp.x()*thePitch + theOffset)*(theYAxOr*y+theDistToBeam)/theDistToBeam; return LocalPoint(x,y); }
LocalPoint TrapezoidalStripTopology::localPosition | ( | float | strip | ) | const [virtual] |
Implements StripTopology.
Definition at line 42 of file TrapezoidalStripTopology.cc.
References theOffset, and thePitch.
Referenced by RPCEfficiency::analyze(), CSCSegtoRPC::CSCSegtoRPC(), localError(), RPCSimAverageNoise::simulateNoise(), RPCSimTriv::simulateNoise(), RPCSimAverage::simulateNoise(), RPCSimSimple::simulateNoise(), RPCSimAverageNoiseEff::simulateNoise(), RPCSimAverageNoiseEffCls::simulateNoise(), RPCSimParam::simulateNoise(), and TracktoRPC::TracktoRPC().
{ return LocalPoint( strip*thePitch + theOffset, 0.0); }
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] |
Implements Topology.
Definition at line 104 of file TrapezoidalStripTopology.cc.
References theDetHeight, theDistToBeam, theOffset, thePitch, theYAxOr, PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().
{ return MeasurementPoint(((lp.x()*theDistToBeam/(theYAxOr*lp.y()+theDistToBeam))-theOffset)/thePitch, lp.y()/theDetHeight); }
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] |
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] |
det heigth (strip length in the middle)
Implements StripTopology.
Definition at line 66 of file TrapezoidalStripTopology.h.
References theDetHeight.
Referenced by RPCEfficiency::analyze(), CSCSegtoRPC::CSCSegtoRPC(), RPCSynchronizer::getSimHitBx(), RPCSimAverageNoise::simulateNoise(), RPCSimTriv::simulateNoise(), RPCSimAverage::simulateNoise(), RPCSimSimple::simulateNoise(), RPCSimAverageNoiseEff::simulateNoise(), RPCSimAverageNoiseEffCls::simulateNoise(), RPCSimParam::simulateNoise(), and TracktoRPC::TracktoRPC().
{return theDetHeight;}
float TrapezoidalStripTopology::theDetHeight [private] |
Definition at line 83 of file TrapezoidalStripTopology.h.
Referenced by localError(), localPosition(), localStripLength(), measurementError(), measurementPosition(), and stripLength().
float TrapezoidalStripTopology::theDistToBeam [private] |
Definition at line 82 of file TrapezoidalStripTopology.h.
Referenced by localError(), localPitch(), localPosition(), localStripLength(), measurementError(), measurementPosition(), radius(), strip(), and stripAngle().
int TrapezoidalStripTopology::theNumberOfStrips [private] |
Definition at line 79 of file TrapezoidalStripTopology.h.
Referenced by channel(), nstrips(), strip(), and TrapezoidalStripTopology().
float TrapezoidalStripTopology::theOffset [private] |
Definition at line 81 of file TrapezoidalStripTopology.h.
Referenced by localError(), localPosition(), measurementPosition(), shiftOffset(), strip(), stripAngle(), and TrapezoidalStripTopology().
float TrapezoidalStripTopology::thePitch [private] |
Definition at line 80 of file TrapezoidalStripTopology.h.
Referenced by localError(), localPitch(), localPosition(), measurementPosition(), pitch(), shiftOffset(), strip(), stripAngle(), and TrapezoidalStripTopology().
int TrapezoidalStripTopology::theYAxOr [private] |
Definition at line 84 of file TrapezoidalStripTopology.h.
Referenced by localError(), localPitch(), localPosition(), localStripLength(), measurementError(), measurementPosition(), strip(), stripAngle(), and TrapezoidalStripTopology().