CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
GEMStripTopology Class Referencefinal

#include <GEMStripTopology.h>

Inheritance diagram for GEMStripTopology:
StripTopology Topology

Public Member Functions

float angularWidth () const
 
float centreToIntersection () const
 
int channel (const LocalPoint &) const override
 
float detHeight () const
 
 GEMStripTopology (int ns, float aw, float dh, float r0)
 
 GEMStripTopology (int ns, float aw, float dh, float r0, float yAx)
 
LocalError localError (float strip, float stripErr2) const override
 
LocalError localError (const MeasurementPoint &, const MeasurementError &) const override
 
float localPitch (const LocalPoint &) const override
 
LocalPoint localPosition (float strip) const override
 
LocalPoint localPosition (const MeasurementPoint &) const override
 
float localStripLength (const LocalPoint &) const override
 
MeasurementError measurementError (const LocalPoint &, const LocalError &) const override
 
MeasurementPoint measurementPosition (const LocalPoint &) const override
 
int nearestStrip (const LocalPoint &) const
 
int nstrips () const override
 
float originToIntersection () const
 
float phiOfOneEdge () const
 
float phiPitch (void) const
 
float pitch () const override
 
float radius () const
 
float strip (const LocalPoint &) const override
 
float stripAngle (float strip) const override
 
float stripLength () const override
 
float xOfStrip (int strip, float y) const
 
float yAxisOrientation () const
 
float yCentreOfStripPlane () const
 
float yDistanceToIntersection (float y) const
 
float yExtentOfStripPlane () const
 
 ~GEMStripTopology () override
 
- Public Member Functions inherited from StripTopology
virtual float coveredStrips (const LocalPoint &lp1, const LocalPoint &lp2) const
 
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 (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 Attributes

float angularWidth_
 
float centreToIntersection_
 
float detHeight_
 
int numberOfStrips_
 
float phiOfOneEdge_
 
float yAxisOrientation_
 
float yCentre_
 

Additional Inherited Members

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

Detailed Description

based on CSCRadialStripTopology and TrapezoidalStripTopology

Author
Hyunyong Kim - TAMU

Definition at line 11 of file GEMStripTopology.h.

Constructor & Destructor Documentation

GEMStripTopology::GEMStripTopology ( int  ns,
float  aw,
float  dh,
float  r0 
)

GEMStripTopology based on CSCRadialStripTopology and TrapezoidalStripTopology

Author
Hyunyong Kim - TAMU

Definition at line 11 of file GEMStripTopology.cc.

References angularWidth_, cms::cuda::assert(), detHeight_, LogTrace, numberOfStrips_, phiOfOneEdge_, yAxisOrientation_, and yCentre_.

13  assert(angularWidth_ != 0);
14  assert(detHeight_ != 0);
17  yCentre_ = 0;
18  LogTrace("GEMStripTopology") << "Constructing GEMStripTopology with"
19  << " nstrips = " << ns << " angular width = " << aw << " det. height = " << dh
20  << " r0 = " << r0 << "\n";
21 }
assert(be >=bs)
#define LogTrace(id)
tuple dh
Definition: cuy.py:354
GEMStripTopology::GEMStripTopology ( int  ns,
float  aw,
float  dh,
float  r0,
float  yAx 
)

Definition at line 23 of file GEMStripTopology.cc.

References angularWidth_, cms::cuda::assert(), detHeight_, LogTrace, numberOfStrips_, phiOfOneEdge_, yAxisOrientation_, and yCentre_.

25  assert(angularWidth_ != 0);
26  assert(detHeight_ != 0);
28  yCentre_ = 0;
29  LogTrace("GEMStripTopology") << "Constructing GEMStripTopology with"
30  << " nstrips = " << ns << " angular width = " << aw << " det. height = " << dh
31  << " r0 = " << r0 << " yAxOrientation = " << yAx << "\n";
32 }
assert(be >=bs)
#define LogTrace(id)
tuple dh
Definition: cuy.py:354
GEMStripTopology::~GEMStripTopology ( )
inlineoverride

Definition at line 15 of file GEMStripTopology.h.

15 {}

Member Function Documentation

float GEMStripTopology::angularWidth ( ) const
inline
float GEMStripTopology::centreToIntersection ( ) const
inline

Definition at line 53 of file GEMStripTopology.h.

References centreToIntersection_.

Referenced by localError().

53 { return centreToIntersection_; }
int GEMStripTopology::channel ( const LocalPoint lp) const
overridevirtual

Implements Topology.

Definition at line 107 of file GEMStripTopology.cc.

References min(), numberOfStrips_, and strip().

Referenced by GEMSignalModel::simulateClustering().

107 { return std::min(int(strip(lp)), numberOfStrips_ - 1); }
float strip(const LocalPoint &) const override
T min(T a, T b)
Definition: MathUtil.h:58
float GEMStripTopology::detHeight ( ) const
inline

Definition at line 51 of file GEMStripTopology.h.

References detHeight_.

Referenced by localError(), localPosition(), localStripLength(), measurementError(), and measurementPosition().

51 { return detHeight_; }
LocalError GEMStripTopology::localError ( float  strip,
float  stripErr2 
) const
overridevirtual

Implements StripTopology.

Definition at line 45 of file GEMStripTopology.cc.

References angularWidth(), centreToIntersection(), detHeight(), validate-o2o-wbm::f, phi, funct::pow(), findQualityFiles::rr, stripAngle(), funct::tan(), groupFilesInBlocks::tt, and xy().

45  {
46  const double phi(stripAngle(strip)), t1(std::tan(phi)), t2(t1 * t1),
47  tt(stripErr2 * std::pow(centreToIntersection() * angularWidth(), 2)), // tangential sigma^2 *c2
48  rr(std::pow(detHeight(), 2) * (1.f / 12.f)), // radial sigma^2( uniform prob density along strip) *c2
49 
50  xx(tt + t2 * rr), yy(t2 * tt + rr), xy(t1 * (rr - tt));
51 
52  return LocalError(xx, xy, yy);
53 }
float strip(const LocalPoint &) const override
float angularWidth() const
float centreToIntersection() const
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
float stripAngle(float strip) const override
Basic2DVector< T > xy() const
float detHeight() const
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
LocalError GEMStripTopology::localError ( const MeasurementPoint mp,
const MeasurementError me 
) const
overridevirtual

Implements Topology.

Definition at line 55 of file GEMStripTopology.cc.

References angularWidth(), cms::cuda::assert(), alignmentValidation::c1, centreToIntersection(), funct::cos(), fwrapper::cs, detHeight(), phi, dttmaxenums::R, findQualityFiles::rr, funct::sin(), stripAngle(), groupFilesInBlocks::tt, MeasurementError::uu(), MeasurementError::uv(), MeasurementError::vv(), PV2DBase< T, PVType, FrameType >::x(), xy(), PV2DBase< T, PVType, FrameType >::y(), and yAxisOrientation().

55  {
56  const double phi(stripAngle(mp.x())), s1(std::sin(phi)), c1(std::cos(phi));
57  assert(c1 != 0);
58  const double cs(s1 * c1), s2(s1 * s1),
59  c2(1 - s2), // rotation matrix
60 
62  c1), // tangential measurement unit (local pitch)
63  R(detHeight() / c1), // radial measurement unit (strip length)
64  tt(me.uu() * T * T), // tangential sigma^2
65  rr(me.vv() * R * R), // radial sigma^2
66  tr(me.uv() * T * R),
67 
68  xx(c2 * tt + 2 * cs * tr + s2 * rr), yy(s2 * tt - 2 * cs * tr + c2 * rr), xy(cs * (rr - tt) + tr * (c2 - s2));
69 
70  return LocalError(xx, xy, yy);
71 }
float vv() const
T y() const
Definition: PV2DBase.h:44
unique_ptr< ClusterSequence > cs
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
float angularWidth() const
assert(be >=bs)
float centreToIntersection() const
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
float uu() const
float yAxisOrientation() const
float stripAngle(float strip) const override
Basic2DVector< T > xy() const
T x() const
Definition: PV2DBase.h:43
long double T
float detHeight() const
float uv() const
float GEMStripTopology::localPitch ( const LocalPoint lp) const
overridevirtual

Implements StripTopology.

Definition at line 111 of file GEMStripTopology.cc.

References angularWidth(), cms::cuda::assert(), funct::cos(), validate-o2o-wbm::f, min(), nstrips(), funct::pow(), funct::sin(), strip(), stripAngle(), PV3DBase< T, PVType, FrameType >::y(), and yDistanceToIntersection().

Referenced by pitch().

111  {
112  const int istrip = std::min(nstrips(), static_cast<int>(strip(lp)) + 1); // which strip number
113  const float fangle = stripAngle(static_cast<float>(istrip) - 0.5); // angle of strip centre
114  assert(std::cos(fangle - 0.5f * angularWidth()) != 0);
115  return yDistanceToIntersection(lp.y()) * std::sin(angularWidth()) /
116  std::pow(std::cos(fangle - 0.5f * angularWidth()), 2);
117 }
float strip(const LocalPoint &) const override
int nstrips() const override
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
float angularWidth() const
T y() const
Definition: PV3DBase.h:60
assert(be >=bs)
float yDistanceToIntersection(float y) const
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
T min(T a, T b)
Definition: MathUtil.h:58
float stripAngle(float strip) const override
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
LocalPoint GEMStripTopology::localPosition ( float  strip) const
overridevirtual

Implements StripTopology.

Definition at line 34 of file GEMStripTopology.cc.

References originToIntersection(), stripAngle(), funct::tan(), and yAxisOrientation().

34  {
36 }
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
float strip(const LocalPoint &) const override
float originToIntersection() const
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
float yAxisOrientation() const
float stripAngle(float strip) const override
LocalPoint GEMStripTopology::localPosition ( const MeasurementPoint mp) const
overridevirtual

Implements Topology.

Definition at line 38 of file GEMStripTopology.cc.

References detHeight(), stripAngle(), funct::tan(), x, PV2DBase< T, PVType, FrameType >::x(), y, PV2DBase< T, PVType, FrameType >::y(), yAxisOrientation(), yCentreOfStripPlane(), and yDistanceToIntersection().

38  {
39  const float // y = (L/cos(phi))*mp.y()*cos(phi)
40  y(mp.y() * detHeight() + yCentreOfStripPlane()),
42  return LocalPoint(x, y);
43 }
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
T y() const
Definition: PV2DBase.h:44
float yDistanceToIntersection(float y) const
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
float yAxisOrientation() const
float stripAngle(float strip) const override
T x() const
Definition: PV2DBase.h:43
float detHeight() const
float yCentreOfStripPlane() const
float GEMStripTopology::localStripLength ( const LocalPoint lp) const
overridevirtual

Implements StripTopology.

Definition at line 123 of file GEMStripTopology.cc.

References cms::cuda::assert(), detHeight(), validate-o2o-wbm::f, funct::pow(), mathSSE::sqrt(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and yDistanceToIntersection().

123  {
124  assert(yDistanceToIntersection(lp.y()) != 0);
125  return detHeight() * std::sqrt(1.f + std::pow(lp.x() / yDistanceToIntersection(lp.y()), 2));
126 }
T y() const
Definition: PV3DBase.h:60
assert(be >=bs)
float yDistanceToIntersection(float y) const
T sqrt(T t)
Definition: SSEVec.h:19
T x() const
Definition: PV3DBase.h:59
float detHeight() const
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
MeasurementError GEMStripTopology::measurementError ( const LocalPoint p,
const LocalError e 
) const
overridevirtual

Implements Topology.

Definition at line 91 of file GEMStripTopology.cc.

References angularWidth(), cms::cuda::assert(), fwrapper::cs, detHeight(), funct::pow(), mathSSE::sqrt(), submitPVValidationJobs::t, PV3DBase< T, PVType, FrameType >::x(), LocalError::xx(), LocalError::xy(), PV3DBase< T, PVType, FrameType >::y(), yAxisOrientation(), yDistanceToIntersection(), and LocalError::yy().

91  {
92  const double yHitToInter(yDistanceToIntersection(p.y()));
93  assert(yHitToInter != 0);
94  const double t(yAxisOrientation() * p.x() / yHitToInter), // tan(strip angle)
95  cs(t / (1 + t * t)), s2(t * cs), c2(1 - s2), // rotation matrix
96 
97  T2(1. / (std::pow(angularWidth(), 2) *
98  (std::pow(p.x(), 2) + std::pow(yHitToInter, 2)))), // 1./tangential measurement unit (local pitch) ^2
99  R2(c2 / std::pow(detHeight(), 2)), // 1./ radial measurement unit (strip length) ^2
100 
101  uu((c2 * e.xx() - 2 * cs * e.xy() + s2 * e.yy()) * T2), vv((s2 * e.xx() + 2 * cs * e.xy() + c2 * e.yy()) * R2),
102  uv((cs * (e.xx() - e.yy()) + e.xy() * (c2 - s2)) * std::sqrt(T2 * R2));
103 
104  return MeasurementError(uu, uv, vv);
105 }
float xx() const
Definition: LocalError.h:22
unique_ptr< ClusterSequence > cs
float angularWidth() const
T y() const
Definition: PV3DBase.h:60
assert(be >=bs)
float yDistanceToIntersection(float y) const
float xy() const
Definition: LocalError.h:23
float yy() const
Definition: LocalError.h:24
T sqrt(T t)
Definition: SSEVec.h:19
float yAxisOrientation() const
T x() const
Definition: PV3DBase.h:59
float detHeight() const
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
MeasurementPoint GEMStripTopology::measurementPosition ( const LocalPoint lp) const
overridevirtual

Implements Topology.

Definition at line 84 of file GEMStripTopology.cc.

References angularWidth(), detHeight(), phi, phiOfOneEdge(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), yAxisOrientation(), yCentreOfStripPlane(), and yDistanceToIntersection().

84  {
85  const float // phi is [pi/2 - conventional local phi], use atan2(x,y) rather than atan2(y,x)
86  phi(yAxisOrientation() * std::atan2(lp.x(), yDistanceToIntersection(lp.y())));
88  (lp.y() - yCentreOfStripPlane()) / detHeight());
89 }
float phiOfOneEdge() const
float angularWidth() const
T y() const
Definition: PV3DBase.h:60
float yDistanceToIntersection(float y) const
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
float yAxisOrientation() const
T x() const
Definition: PV3DBase.h:59
float detHeight() const
float yCentreOfStripPlane() const
int GEMStripTopology::nearestStrip ( const LocalPoint lp) const

Definition at line 80 of file GEMStripTopology.cc.

References SiStripPI::max, min(), nstrips(), and strip().

80  {
81  return std::min(nstrips(), static_cast<int>(std::max(float(0), strip(lp))) + 1);
82 }
float strip(const LocalPoint &) const override
int nstrips() const override
T min(T a, T b)
Definition: MathUtil.h:58
int GEMStripTopology::nstrips ( ) const
inlineoverridevirtual

Implements StripTopology.

Definition at line 44 of file GEMStripTopology.h.

References numberOfStrips_.

Referenced by localPitch(), nearestStrip(), and strip().

44 { return numberOfStrips_; }
float GEMStripTopology::originToIntersection ( ) const
inline

Definition at line 55 of file GEMStripTopology.h.

References centreToIntersection_, and yCentre_.

Referenced by localPosition(), and yDistanceToIntersection().

float GEMStripTopology::phiOfOneEdge ( ) const
inline

Definition at line 60 of file GEMStripTopology.h.

References phiOfOneEdge_.

Referenced by measurementPosition(), strip(), and stripAngle().

60 { return phiOfOneEdge_; }
float GEMStripTopology::phiPitch ( void  ) const
inline

Definition at line 36 of file GEMStripTopology.h.

References angularWidth().

36 { return angularWidth(); }
float angularWidth() const
float GEMStripTopology::pitch ( ) const
overridevirtual

Implements StripTopology.

Definition at line 109 of file GEMStripTopology.cc.

References localPitch().

109 { return localPitch(LocalPoint(0, 0)); }
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
float localPitch(const LocalPoint &) const override
float GEMStripTopology::radius ( void  ) const
inline

Definition at line 54 of file GEMStripTopology.h.

References centreToIntersection_.

54 { return centreToIntersection_; }
float GEMStripTopology::strip ( const LocalPoint lp) const
overridevirtual

Implements StripTopology.

Definition at line 73 of file GEMStripTopology.cc.

References angularWidth(), SiStripPI::max, min(), nstrips(), phi, phiOfOneEdge(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), yAxisOrientation(), and yDistanceToIntersection().

Referenced by channel(), localPitch(), and nearestStrip().

73  {
74  const float // phi is measured from y axis --> sign of angle is sign of x * yAxisOrientation --> use atan2(x,y), not atan2(y,x)
75  phi(std::atan2(lp.x(), yDistanceToIntersection(lp.y()))),
76  aStrip((phi - yAxisOrientation() * phiOfOneEdge()) / angularWidth());
77  return std::max(float(0), std::min((float)nstrips(), aStrip));
78 }
float phiOfOneEdge() const
int nstrips() const override
float angularWidth() const
T y() const
Definition: PV3DBase.h:60
float yDistanceToIntersection(float y) const
float yAxisOrientation() const
T min(T a, T b)
Definition: MathUtil.h:58
T x() const
Definition: PV3DBase.h:59
float GEMStripTopology::stripAngle ( float  strip) const
overridevirtual

Implements StripTopology.

Definition at line 119 of file GEMStripTopology.cc.

References angularWidth(), phiOfOneEdge(), and yAxisOrientation().

Referenced by localError(), localPitch(), localPosition(), and xOfStrip().

119  {
120  return phiOfOneEdge() + yAxisOrientation() * strip * angularWidth();
121 }
float phiOfOneEdge() const
float strip(const LocalPoint &) const override
float angularWidth() const
float yAxisOrientation() const
float GEMStripTopology::stripLength ( ) const
inlineoverridevirtual

Implements StripTopology.

Definition at line 46 of file GEMStripTopology.h.

References detHeight_.

46 { return detHeight_; }
float GEMStripTopology::xOfStrip ( int  strip,
float  y 
) const

Definition at line 132 of file GEMStripTopology.cc.

References stripAngle(), funct::tan(), yAxisOrientation(), and yDistanceToIntersection().

132  {
133  return yAxisOrientation() * yDistanceToIntersection(y) * std::tan(stripAngle(static_cast<float>(strip) - 0.5));
134 }
float strip(const LocalPoint &) const override
float yDistanceToIntersection(float y) const
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
float yAxisOrientation() const
float stripAngle(float strip) const override
float GEMStripTopology::yAxisOrientation ( ) const
inline
float GEMStripTopology::yCentreOfStripPlane ( ) const
inline

Definition at line 61 of file GEMStripTopology.h.

References yCentre_.

Referenced by localPosition(), and measurementPosition().

61 { return yCentre_; }
float GEMStripTopology::yDistanceToIntersection ( float  y) const
float GEMStripTopology::yExtentOfStripPlane ( ) const
inline

Definition at line 52 of file GEMStripTopology.h.

References detHeight_.

52 { return detHeight_; }

Member Data Documentation

float GEMStripTopology::angularWidth_
private

Definition at line 65 of file GEMStripTopology.h.

Referenced by angularWidth(), and GEMStripTopology().

float GEMStripTopology::centreToIntersection_
private

Definition at line 67 of file GEMStripTopology.h.

Referenced by centreToIntersection(), originToIntersection(), and radius().

float GEMStripTopology::detHeight_
private

Definition at line 66 of file GEMStripTopology.h.

Referenced by detHeight(), GEMStripTopology(), stripLength(), and yExtentOfStripPlane().

int GEMStripTopology::numberOfStrips_
private

Definition at line 64 of file GEMStripTopology.h.

Referenced by channel(), GEMStripTopology(), and nstrips().

float GEMStripTopology::phiOfOneEdge_
private

Definition at line 68 of file GEMStripTopology.h.

Referenced by GEMStripTopology(), and phiOfOneEdge().

float GEMStripTopology::yAxisOrientation_
private

Definition at line 69 of file GEMStripTopology.h.

Referenced by GEMStripTopology(), and yAxisOrientation().

float GEMStripTopology::yCentre_
private

Definition at line 70 of file GEMStripTopology.h.

Referenced by GEMStripTopology(), originToIntersection(), and yCentreOfStripPlane().