CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
OffsetRadialStripTopology Class Referenceabstract

#include <OffsetRadialStripTopology.h>

Inheritance diagram for OffsetRadialStripTopology:
CSCRadialStripTopology RadialStripTopology StripTopology Topology CSCStripTopology CSCGangedStripTopology CSCUngangedStripTopology

Public Member Functions

int channel (const LocalPoint &lp) const override=0
 
virtual int channel (int strip) const =0
 
LocalPoint localPosition (const MeasurementPoint &) const override
 
LocalPoint localPosition (float strip) const override
 
MeasurementPoint measurementPosition (const LocalPoint &) const override
 
 OffsetRadialStripTopology (int numberOfStrips, float stripPhiPitch, float detectorHeight, float radialDistance, float stripOffset, float yCentre)
 
float strip (const LocalPoint &) const override
 
float stripAngle (float strip) const override
 
virtual float stripOffset (void) const
 
 ~OffsetRadialStripTopology () override
 
- Public Member Functions inherited from CSCRadialStripTopology
float angularWidth () const override
 
float centreToIntersection () const override
 
 CSCRadialStripTopology (int ns, float aw, float dh, float r, float yAx=1.f, float yMid=0.)
 
float detHeight () const override
 
LocalError localError (const MeasurementPoint &, const MeasurementError &) const override
 
LocalError localError (float strip, float stripErr2) const override
 
float localPitch (const LocalPoint &) const override
 
float localStripLength (const LocalPoint &) const override
 
MeasurementError measurementError (const LocalPoint &, const LocalError &) const override
 
int nearestStrip (const LocalPoint &) const override
 
int nstrips () const override
 
float originToIntersection () const override
 
float phiOfOneEdge () const override
 
float phiPitch (void) const override
 
float stripLength () const override
 
float xOfStrip (int strip, float y) const override
 
float yAxisOrientation () const override
 
float yCentreOfStripPlane () const override
 
float yDistanceToIntersection (float y) const override
 
float yExtentOfStripPlane () const override
 
 ~CSCRadialStripTopology () override
 
- Public Member Functions inherited from RadialStripTopology
virtual LocalError localError (float strip, float stripErr2) const=0
 
virtual LocalError localError (float strip, float stripErr2, const Topology::LocalTrackPred &) const
 conversion taking also the angle from the predicted track state More...
 
virtual LocalPoint localPosition (float strip) const=0
 
virtual LocalPoint localPosition (float strip, const Topology::LocalTrackPred &) const
 conversion taking also the predicted track state More...
 
float pitch () const final
 
 ~RadialStripTopology () override
 
- Public Member Functions inherited from StripTopology
virtual float coveredStrips (const LocalPoint &lp1, const LocalPoint &lp2) const
 
virtual LocalError localError (const MeasurementPoint &, const MeasurementError &) const=0
 
virtual LocalError localError (const MeasurementPoint &mp, const MeasurementError &me, const LocalTrackPred &) const
 conversion taking also the angle from the predicted track state More...
 
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 (const MeasurementPoint &) const=0
 
virtual LocalPoint localPosition (const MeasurementPoint &mp, const LocalTrackPred &) const
 conversion taking also the angle from the predicted track state 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 Member Functions

LocalPoint toLocal (float xprime, float yprime) const
 
LocalPoint toPrime (const LocalPoint &) const
 

Private Attributes

float theCosOff
 
float theSinOff
 
float theStripOffset
 

Friends

std::ostream & operator<< (std::ostream &, const OffsetRadialStripTopology &)
 

Additional Inherited Members

- Public Types inherited from Topology
typedef Point2DBase< double, LocalTagLocal2DPoint
 
typedef Vector2D::MathVector MathVector2D
 
typedef Basic2DVector< double > Vector2D
 

Detailed Description

ABC defining RadialStripTopology with shifted offset so that it is not centred on local y (of parent chamber)

The offset is specified as a fraction of the strip angular width.

Author
Tim Cox

Definition at line 17 of file OffsetRadialStripTopology.h.

Constructor & Destructor Documentation

◆ OffsetRadialStripTopology()

OffsetRadialStripTopology::OffsetRadialStripTopology ( int  numberOfStrips,
float  stripPhiPitch,
float  detectorHeight,
float  radialDistance,
float  stripOffset,
float  yCentre 
)

Constructor Note that yCentre is local y of symmetry centre of strip plane before the rotation shift: it is passed directly to RST base.

Definition at line 26 of file OffsetRadialStripTopology.cc.

32  : CSCRadialStripTopology(numberOfStrips, stripPhiPitch, detectorHeight, radialDistance, +1, yCentre),
34  float rotate_by = stripOffset * angularWidth(); // now in angular units (radians, I hope)
35  theCosOff = cos(rotate_by);
36  theSinOff = sin(rotate_by);
37 
38  LogTrace("CSCStripTopology|CSC") << "fractional strip offset = " << stripOffset << "\n angle = " << rotate_by
39  << " cos = " << theCosOff << " sin = " << theSinOff;
40 }

References CSCRadialStripTopology::angularWidth(), funct::cos(), LogTrace, funct::sin(), stripOffset(), theCosOff, and theSinOff.

◆ ~OffsetRadialStripTopology()

OffsetRadialStripTopology::~OffsetRadialStripTopology ( )
inlineoverride

Definition at line 30 of file OffsetRadialStripTopology.h.

30 {};

Member Function Documentation

◆ channel() [1/2]

int OffsetRadialStripTopology::channel ( const LocalPoint lp) const
overridepure virtual

Channel number corresponding to a given LocalPoint.
This is effectively an integer version of strip(), with range 0 to nstrips-1.
LocalPoints outside the detector strip plane will be considered as contributing to the edge channels 0 or nstrips-1.

Reimplemented from CSCRadialStripTopology.

Implemented in CSCUngangedStripTopology, and CSCGangedStripTopology.

◆ channel() [2/2]

virtual int OffsetRadialStripTopology::channel ( int  strip) const
pure virtual

Channel number corresponding to a strip or a LocalPoint. Sometimes more than one strip is OR'ed into one channel.

Implemented in CSCUngangedStripTopology, and CSCGangedStripTopology.

Referenced by CSCLayerGeometry::channel().

◆ localPosition() [1/2]

LocalPoint OffsetRadialStripTopology::localPosition ( const MeasurementPoint mp) const
overridevirtual

LocalPoint for a given MeasurementPoint

What's a MeasurementPoint?
A MeasurementPoint is a 2-dim object, with the 1st dim specifying the angular position in strip widths, and the 2nd dim specifying the fractional distance alone a strip.

Thus the 1st dimension measures the angular position wrt central line of symmetry of detector, in units of strip (angular) widths (range 0 to total angle subtended by a detector). The 2nd dimension measures the fractional position along the strip (range -0.5 to +0.5).

BEWARE! The components are not Cartesian.
BEWARE! Neither coordinate may correspond to either local x or local y.
BEWARE! This involves ONLY strip-related measurements, not CSC wires!

Reimplemented from CSCRadialStripTopology.

Definition at line 42 of file OffsetRadialStripTopology.cc.

42  {
43  // Local coordinates are (x,y). Coordinates along symmetry axes of strip
44  // plane are (x',y'). These are rotated w.r.t. (x,y)
45 
46  // You might first think you could implement this as follows (cf. measurementPosition below):
47  // LocalPoint lpp = RST::localPosition(MP);
48  // return this->toLocal(lpp);
49  // But this does not work because RST::localPosition makes use of stripAngle() - virtual - and thus
50  // this is not the appropriate angle - it has the offset added, which is unwanted in this case!
51  // So have to implement it directly...
52 
53  // 1st component of MP measures angular position within strip plane
54  float phi = phiOfOneEdge() + mp.x() * angularWidth();
55  // 2nd component of MP is fractional position along strip, with range +/-0.5,
56  // so distance along strip, measured from mid-point of length of strip, is
57  // mp.y() * (length of strip).
58  // Distance in direction of coordinate y' is
59  // mp.y() * (length of strip) * cos(phi)
60  // where phi is angle between strip and y' axis.
61  // But (length of strip) = detHeight/cos(phi), so
62  float yprime = mp.y() * detHeight() + yCentreOfStripPlane();
63  float xprime = (originToIntersection() + yprime) * tan(phi);
64  // Rotate to (x,y)
65  return toLocal(xprime, yprime);
66 }

References CSCRadialStripTopology::angularWidth(), CSCRadialStripTopology::detHeight(), CSCRadialStripTopology::originToIntersection(), phi, CSCRadialStripTopology::phiOfOneEdge(), funct::tan(), toLocal(), PV2DBase< T, PVType, FrameType >::x(), PV2DBase< T, PVType, FrameType >::y(), and CSCRadialStripTopology::yCentreOfStripPlane().

◆ localPosition() [2/2]

LocalPoint OffsetRadialStripTopology::localPosition ( float  strip) const
inlineoverridevirtual

LocalPoint for a given strip

Reimplemented from CSCRadialStripTopology.

Definition at line 39 of file OffsetRadialStripTopology.h.

39  {
40  // Pass through to base class since otherwise it is shadowed by the localPosition(const MP&).
41  // Note that base class version is OK because it uses stripAngle() which is overridden in ORST!
42  // Also note that xOfStrip from base class RST also works for ORST for the same reason.
44  }

References CSCRadialStripTopology::localPosition(), and strip().

Referenced by CSCCathodeLCTAnalyzer::getStripPhi().

◆ measurementPosition()

MeasurementPoint OffsetRadialStripTopology::measurementPosition ( const LocalPoint lp) const
overridevirtual

MeasurementPoint corresponding to given LocalPoint

Reimplemented from CSCRadialStripTopology.

Definition at line 68 of file OffsetRadialStripTopology.cc.

68  {
69  LocalPoint lpp = this->toPrime(lp); // in prime system, aligned with strip plane sym axes
70  return CSCRadialStripTopology::measurementPosition(lpp); // now can use the base class method
71 }

References CSCRadialStripTopology::measurementPosition(), and toPrime().

◆ strip()

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

Strip in which a given LocalPoint lies. This is a float which represents the fractional strip position within the detector.
Returns zero if the LocalPoint falls at the extreme low edge of the detector or BELOW, and float(nstrips) if it falls at the extreme high edge or ABOVE.

Reimplemented from CSCRadialStripTopology.

Definition at line 73 of file OffsetRadialStripTopology.cc.

73  {
74  LocalPoint pnt = toPrime(lp);
75  float phi = atan2(pnt.x(), pnt.y() + originToIntersection());
76  float fstrip = (phi - phiOfOneEdge()) / angularWidth();
77  fstrip = (fstrip >= 0. ? fstrip : 0.);
78  fstrip = (fstrip <= nstrips() ? fstrip : nstrips());
79  return fstrip;
80 }

References CSCRadialStripTopology::angularWidth(), CSCRadialStripTopology::nstrips(), CSCRadialStripTopology::originToIntersection(), phi, CSCRadialStripTopology::phiOfOneEdge(), toPrime(), PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

Referenced by CSCGangedStripTopology::channel(), CSCUngangedStripTopology::channel(), CSCStripTopology::equationOfStrip(), CSCLayerGeometry::inside(), localPosition(), CSCCathodeLCTAnalyzer::nearestHS(), CSCLayerGeometry::strip(), and stripAngle().

◆ stripAngle()

float OffsetRadialStripTopology::stripAngle ( float  strip) const
overridevirtual

Angle between strip and local y axis (measured clockwise from y axis)

Reimplemented from CSCRadialStripTopology.

Definition at line 82 of file OffsetRadialStripTopology.cc.

82  {
83  return (phiOfOneEdge() + (strip + theStripOffset) * angularWidth());
84 }

References CSCRadialStripTopology::angularWidth(), CSCRadialStripTopology::phiOfOneEdge(), strip(), and theStripOffset.

Referenced by CSCStripTopology::equationOfStrip(), CSCLayerGeometry::intersectionOfStripAndWire(), and CSCLayerGeometry::stripAngle().

◆ stripOffset()

virtual float OffsetRadialStripTopology::stripOffset ( void  ) const
inlinevirtual

Fraction of a strip offset of layer relative to symmetry axis (local y). (This is an angular value)

Definition at line 35 of file OffsetRadialStripTopology.h.

35 { return theStripOffset; }

References theStripOffset.

Referenced by FWRecoGeometryESProducer::addCSCGeometry(), OffsetRadialStripTopology(), operator<<(), CSCLayerGeometry::stripOffset(), and ValidateGeometry::validateCSCLayerGeometry().

◆ toLocal()

LocalPoint OffsetRadialStripTopology::toLocal ( float  xprime,
float  yprime 
) const
private

Transform from coordinates wrt strip plane symmetry axes to local coordinates

Definition at line 86 of file OffsetRadialStripTopology.cc.

86  {
87  float x = theCosOff * xprime + theSinOff * yprime + originToIntersection() * theSinOff;
88  float y = -theSinOff * xprime + theCosOff * yprime - originToIntersection() * (1. - theCosOff);
89  return LocalPoint(x, y);
90 }

References CSCRadialStripTopology::originToIntersection(), theCosOff, theSinOff, x, and y.

Referenced by localPosition().

◆ toPrime()

LocalPoint OffsetRadialStripTopology::toPrime ( const LocalPoint lp) const
private

Transform from local coordinates to coordinates wrt strip plane symmetry axes

Definition at line 92 of file OffsetRadialStripTopology.cc.

92  {
93  float xprime = theCosOff * lp.x() - theSinOff * lp.y() - originToIntersection() * theSinOff;
94  float yprime = theSinOff * lp.x() + theCosOff * lp.y() - originToIntersection() * (1. - theCosOff);
95  return LocalPoint(xprime, yprime);
96 }

References CSCRadialStripTopology::originToIntersection(), theCosOff, theSinOff, PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

Referenced by measurementPosition(), and strip().

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const OffsetRadialStripTopology orst 
)
friend

Definition at line 98 of file OffsetRadialStripTopology.cc.

98  {
99  os << "OffsetRadialStripTopology isa " << static_cast<const CSCRadialStripTopology&>(orst)
100  << "fractional strip offset " << orst.stripOffset() << "\ncos(angular offset) " << orst.theCosOff
101  << "\nsin(angular offset) " << orst.theSinOff << std::endl;
102  return os;
103 }

Member Data Documentation

◆ theCosOff

float OffsetRadialStripTopology::theCosOff
private

◆ theSinOff

float OffsetRadialStripTopology::theSinOff
private

◆ theStripOffset

float OffsetRadialStripTopology::theStripOffset
private

Definition at line 104 of file OffsetRadialStripTopology.h.

Referenced by stripAngle(), and stripOffset().

DDAxes::y
CSCRadialStripTopology::CSCRadialStripTopology
CSCRadialStripTopology(int ns, float aw, float dh, float r, float yAx=1.f, float yMid=0.)
Definition: CSCRadialStripTopology.cc:7
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
OffsetRadialStripTopology::theStripOffset
float theStripOffset
Definition: OffsetRadialStripTopology.h:104
CSCRadialStripTopology::angularWidth
float angularWidth() const override
Definition: CSCRadialStripTopology.h:159
DDAxes::x
align::LocalPoint
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
CSCRadialStripTopology::yCentreOfStripPlane
float yCentreOfStripPlane() const override
Definition: CSCRadialStripTopology.h:223
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
OffsetRadialStripTopology::toPrime
LocalPoint toPrime(const LocalPoint &) const
Definition: OffsetRadialStripTopology.cc:92
Point3DBase< float, LocalTag >
OffsetRadialStripTopology::theSinOff
float theSinOff
Definition: OffsetRadialStripTopology.h:106
PV2DBase::y
T y() const
Definition: PV2DBase.h:44
PV2DBase::x
T x() const
Definition: PV2DBase.h:43
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
funct::tan
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
CSCRadialStripTopology::localPosition
LocalPoint localPosition(float strip) const override
Definition: CSCRadialStripTopology.cc:56
OffsetRadialStripTopology::toLocal
LocalPoint toLocal(float xprime, float yprime) const
Definition: OffsetRadialStripTopology.cc:86
CSCRadialStripTopology::nstrips
int nstrips() const override
Definition: CSCRadialStripTopology.h:122
DDAxes::phi
OffsetRadialStripTopology::stripOffset
virtual float stripOffset(void) const
Definition: OffsetRadialStripTopology.h:35
muonME0PseudoReDigis_cfi.numberOfStrips
numberOfStrips
Definition: muonME0PseudoReDigis_cfi.py:8
CSCRadialStripTopology::detHeight
float detHeight() const override
Definition: CSCRadialStripTopology.h:169
OffsetRadialStripTopology::strip
float strip(const LocalPoint &) const override
Definition: OffsetRadialStripTopology.cc:73
OffsetRadialStripTopology::theCosOff
float theCosOff
Definition: OffsetRadialStripTopology.h:105
CSCRadialStripTopology::phiOfOneEdge
float phiOfOneEdge() const override
Definition: CSCRadialStripTopology.h:202
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:224
CSCRadialStripTopology::originToIntersection
float originToIntersection() const override
Definition: CSCRadialStripTopology.h:188
CSCRadialStripTopology::yCentre
float yCentre
Definition: CSCRadialStripTopology.h:239
CSCRadialStripTopology::measurementPosition
MeasurementPoint measurementPosition(const LocalPoint &) const override
Definition: CSCRadialStripTopology.cc:67