CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Attributes
TrapezoidalStripTopology Class Referencefinal

#include <TrapezoidalStripTopology.h>

Inheritance diagram for TrapezoidalStripTopology:
StripTopology Topology

Public Member Functions

int channel (const LocalPoint &) const override
 
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 &aLP) const override
 
MeasurementError measurementError (const LocalPoint &, const LocalError &) const override
 
MeasurementPoint measurementPosition (const LocalPoint &) const override
 
int nstrips () const override
 
float pitch () const override
 
float radius () const
 
float strip (const LocalPoint &) const override
 
float stripAngle (float strip) const override
 
float stripLength () const override
 det heigth (strip length in the middle) More...
 
 TrapezoidalStripTopology (int nstrip, float pitch, float detheight, float r0)
 
 TrapezoidalStripTopology (int nstrip, float pitch, float detheight, float r0, int yAx)
 
- 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 ()
 

Protected Member Functions

virtual float shiftOffset (float pitch_fraction)
 

Private Attributes

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

Additional Inherited Members

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

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.

9  :
13  theYAxOr = 1;
14 #ifdef VERBOSE
15  cout<<"Constructing TrapezoidalStripTopology with"
16  <<" nstrips = "<<ns
17  <<" pitch = "<<p
18  <<" length = "<<l
19  <<" r0 ="<<r0
20  <<endl;
21 #endif
22 }
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.

26  :
30 #ifdef VERBOSE
31  cout<<"Constructing TrapezoidalStripTopology with"
32  <<" nstrips = "<<ns
33  <<" pitch = "<<p
34  <<" length = "<<l
35  <<" r0 ="<<r0
36  <<" yAxOrientation ="<<yAx
37  <<endl;
38 #endif
39 }

Member Function Documentation

int TrapezoidalStripTopology::channel ( const LocalPoint lp) const
overridevirtual

Implements Topology.

Definition at line 132 of file TrapezoidalStripTopology.cc.

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

132  {
133  return std::min(int(strip(lp)),theNumberOfStrips-1);
134 }
float strip(const LocalPoint &) const override
T min(T a, T b)
Definition: MathUtil.h:58
LocalError TrapezoidalStripTopology::localError ( float  strip,
float  stripErr2 
) const
overridevirtual

Implements StripTopology.

Definition at line 55 of file TrapezoidalStripTopology.cc.

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

55  {
56  float lt,lc2,ls2,lslc;
57  float localL2,localP2;
58  float sl2,sp2;
59  // angle from strip to local frame (see CMS TN / 95-170)
61  lc2 = 1.f/(1.+lt*lt);
62  lslc = lt*lc2;
63  ls2 = 1.f-lc2;
64  localL2 = theDetHeight*theDetHeight / lc2;
65  localP2 = thePitch*thePitch*lc2;
66  sl2 = localL2/12.;
67  sp2 = stripErr2*localP2;
68  return LocalError(lc2*sp2+ls2*sl2,
69  lslc*(sp2-sl2),
70  ls2*sp2+lc2*sl2);
71 }
float strip(const LocalPoint &) const override
LocalError TrapezoidalStripTopology::localError ( const MeasurementPoint mp,
const MeasurementError merr 
) const
overridevirtual

Implements Topology.

Definition at line 74 of file TrapezoidalStripTopology.cc.

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

75  {
76  float lt,lc2,ls2,lslc;
77  float localL,localP;
78  float sl2,sp2,spl;
79  // angle from strip to local frame (see CMS TN / 95-170)
80  lt = -(mp.x()*thePitch + theOffset)*theYAxOr/theDistToBeam;
81  lc2 = 1./(1.+lt*lt);
82  lslc = lt*lc2;
83  ls2 = 1.f-lc2;
84  localL = theDetHeight / std::sqrt(lc2);
85  localP = localPitch(localPosition(mp));
86  sp2 = merr.uu() * localP*localP;
87  sl2 = merr.vv() * localL*localL;
88  spl = merr.uv() * localP*localL;
89  return LocalError(lc2*sp2+ls2*sl2-2*lslc*spl,
90  lslc*(sp2-sl2)+(lc2-ls2)*spl,
91  ls2*sp2+lc2*sl2+2*lslc*spl);
92 }
float vv() const
LocalPoint localPosition(float strip) const override
float localPitch(const LocalPoint &) const override
T sqrt(T t)
Definition: SSEVec.h:18
float uu() const
T x() const
Definition: PV2DBase.h:45
float uv() const
float TrapezoidalStripTopology::localPitch ( const LocalPoint lp) const
overridevirtual

Implements StripTopology.

Definition at line 142 of file TrapezoidalStripTopology.cc.

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

Referenced by localError(), and measurementError().

142  {
143  float x=lp.x();
144  float y=theYAxOr*lp.y()+theDistToBeam;
145  return thePitch*y/(theDistToBeam*std::sqrt(1.f+x*x/(y*y)));
146 }
T y() const
Definition: PV3DBase.h:63
T sqrt(T t)
Definition: SSEVec.h:18
double f[11][100]
T x() const
Definition: PV3DBase.h:62
LocalPoint TrapezoidalStripTopology::localPosition ( float  strip) const
overridevirtual
LocalPoint TrapezoidalStripTopology::localPosition ( const MeasurementPoint mp) const
overridevirtual
float TrapezoidalStripTopology::localStripLength ( const LocalPoint aLP) const
overridevirtual

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().

Referenced by stripLength().

164  {
165  float ltan = -lp.x()/(theYAxOr*lp.y()+theDistToBeam)*theYAxOr;
166  float localL = theDetHeight * std::sqrt(1.f+ltan*ltan);
167  // float lcos2 = 1.f/(1.f+ltan*ltan);
168  // float localL = theDetHeight / std::sqrt(lcos2);
169 
170  return localL;
171 }
T sqrt(T t)
Definition: SSEVec.h:18
double f[11][100]
MeasurementError TrapezoidalStripTopology::measurementError ( const LocalPoint lp,
const LocalError lerr 
) const
overridevirtual

Implements Topology.

Definition at line 111 of file TrapezoidalStripTopology.cc.

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

112  {
113  float lt,lc2,ls2,lslc;
114  float localL,localP;
115  float sl2,sp2,spl;
116  lt = -lp.x()/(theYAxOr*lp.y()+theDistToBeam)*theYAxOr;
117  lc2 = 1./(1.+lt*lt);
118  lslc = lt*lc2;
119  ls2 = 1.-lc2;
120  localL = theDetHeight / std::sqrt(lc2);
121  localP = localPitch(lp);
122  sp2 = lc2*lerr.xx()+ls2*lerr.yy()+2*lslc*lerr.xy();
123  sl2 = ls2*lerr.xx()+lc2*lerr.yy()-2*lslc*lerr.xy();
124  spl = lslc*(lerr.yy()-lerr.xx())+(lc2-ls2)*lerr.xy();
125  return MeasurementError(sp2/(localP*localP),
126  spl/(localP*localL),
127  sl2/(localL*localL));
128 
129 }
float xx() const
Definition: LocalError.h:24
float localPitch(const LocalPoint &) const override
T y() const
Definition: PV3DBase.h:63
float xy() const
Definition: LocalError.h:25
float yy() const
Definition: LocalError.h:26
T sqrt(T t)
Definition: SSEVec.h:18
T x() const
Definition: PV3DBase.h:62
MeasurementPoint TrapezoidalStripTopology::measurementPosition ( const LocalPoint lp) const
overridevirtual

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().

104  {
105  return
107  lp.y()/theDetHeight);
108 }
T y() const
Definition: PV3DBase.h:63
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
T x() const
Definition: PV3DBase.h:62
int TrapezoidalStripTopology::nstrips ( ) const
overridevirtual

Implements StripTopology.

Definition at line 154 of file TrapezoidalStripTopology.cc.

References theNumberOfStrips.

Referenced by ME0ReDigiProducer::getStripProperties().

154  {
155  return theNumberOfStrips;
156 }
float TrapezoidalStripTopology::pitch ( ) const
overridevirtual

Pitch in the middle of the DetUnit

Implements StripTopology.

Definition at line 137 of file TrapezoidalStripTopology.cc.

References thePitch.

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

137  {
138  return thePitch;
139 }
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 74 of file TrapezoidalStripTopology.h.

References shiftOffset(), and theDistToBeam.

Referenced by ME0ReDigiProducer::getStripProperties(), and ME0ReDigiProducer::TemporaryGeometry::TemporaryGeometry().

float TrapezoidalStripTopology::shiftOffset ( float  pitch_fraction)
protectedvirtual

Definition at line 158 of file TrapezoidalStripTopology.cc.

References theOffset, and thePitch.

Referenced by radius().

158  {
159  theOffset += thePitch * pitch_fraction;
160  return theOffset;
161 }
float TrapezoidalStripTopology::strip ( const LocalPoint lp) const
overridevirtual

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().

95  {
96  float aStrip =
98  if (aStrip < 0 ) aStrip = 0;
99  else if (aStrip > theNumberOfStrips) aStrip = theNumberOfStrips;
100  return aStrip;
101 }
T y() const
Definition: PV3DBase.h:63
T x() const
Definition: PV3DBase.h:62
float TrapezoidalStripTopology::stripAngle ( float  strip) const
overridevirtual

angle between strip and symmetry axis

Implements StripTopology.

Definition at line 149 of file TrapezoidalStripTopology.cc.

References theDistToBeam, theOffset, thePitch, and theYAxOr.

float TrapezoidalStripTopology::stripLength ( ) const
inlineoverridevirtual

Member Data Documentation

float TrapezoidalStripTopology::theDetHeight
private
float TrapezoidalStripTopology::theDistToBeam
private
int TrapezoidalStripTopology::theNumberOfStrips
private

Definition at line 81 of file TrapezoidalStripTopology.h.

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

float TrapezoidalStripTopology::theOffset
private
float TrapezoidalStripTopology::thePitch
private
int TrapezoidalStripTopology::theYAxOr
private