CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes
TrapezoidalStripTopology Class Reference

#include <TrapezoidalStripTopology.h>

Inheritance diagram for TrapezoidalStripTopology:
StripTopology Topology

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) 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 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 &ltp) 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 &ltp) const
 conversion taking also the angle from the track state (LocalTrajectoryParameters) More...
 
virtual float strip (const LocalPoint &lp, const Topology::LocalTrackAngles &ltp) const
 conversion taking also the angle from the track state (LocalTrajectoryParameters) More...
 
virtual ~StripTopology ()
 
- Public Member Functions inherited from Topology
virtual int channel (const LocalPoint &lp, const LocalTrackAngles &dir) 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 &dir) const
 conversion taking also the angle from the track state More...
 
virtual MeasurementPoint measurementPosition (const LocalPoint &lp, const LocalTrackAngles &dir) 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,
LocalTag
Local2DPoint
 

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 }
tuple cout
Definition: gather_cfg.py:41
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 }
tuple cout
Definition: gather_cfg.py:41

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.

132  {
133  return std::min(int(strip(lp)),theNumberOfStrips-1);
134 }
#define min(a, b)
Definition: mlp_lapack.h:161
virtual float strip(const LocalPoint &) const
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.

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 }
< trclass="colgroup">< tdclass="colgroup"colspan=5 > Muon Digi collections</td >< tr >< td >< ahref="classDTDigi.html"> DTDigi</a ></td >< td >< ahref="DataFormats_DTDigi.html"> MuonDigiCollection & lt
virtual float strip(const LocalPoint &) const
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().

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
virtual float localPitch(const LocalPoint &) const
T sqrt(T t)
Definition: SSEVec.h:28
< trclass="colgroup">< tdclass="colgroup"colspan=5 > Muon Digi collections</td >< tr >< td >< ahref="classDTDigi.html"> DTDigi</a ></td >< td >< ahref="DataFormats_DTDigi.html"> MuonDigiCollection & lt
float uu() const
virtual LocalPoint localPosition(float strip) const
T x() const
Definition: PV2DBase.h:39
float uv() const
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, x, PV3DBase< T, PVType, FrameType >::x(), detailsBasic3DVector::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:57
T sqrt(T t)
Definition: SSEVec.h:28
double f[11][100]
Definition: DDAxes.h:10
T x() const
Definition: PV3DBase.h:56
LocalPoint TrapezoidalStripTopology::localPosition ( float  strip) const
virtual
LocalPoint TrapezoidalStripTopology::localPosition ( const MeasurementPoint mp) 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().

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:28
double f[11][100]
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().

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:19
virtual float localPitch(const LocalPoint &) const
T y() const
Definition: PV3DBase.h:57
float xy() const
Definition: LocalError.h:20
float yy() const
Definition: LocalError.h:21
T sqrt(T t)
Definition: SSEVec.h:28
< trclass="colgroup">< tdclass="colgroup"colspan=5 > Muon Digi collections</td >< tr >< td >< ahref="classDTDigi.html"> DTDigi</a ></td >< td >< ahref="DataFormats_DTDigi.html"> MuonDigiCollection & lt
T x() const
Definition: PV3DBase.h:56
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().

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

Implements StripTopology.

Definition at line 154 of file TrapezoidalStripTopology.cc.

References theNumberOfStrips.

154  {
155  return theNumberOfStrips;
156 }
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().

137  {
138  return thePitch;
139 }
float TrapezoidalStripTopology::radius ( ) 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.

float TrapezoidalStripTopology::shiftOffset ( float  pitch_fraction)
protectedvirtual

Definition at line 158 of file TrapezoidalStripTopology.cc.

References theOffset, and thePitch.

158  {
159  theOffset += thePitch * pitch_fraction;
160  return theOffset;
161 }
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().

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:57
T x() const
Definition: PV3DBase.h:56
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.

virtual float TrapezoidalStripTopology::stripLength ( ) const
inlinevirtual

Member Data Documentation

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

Definition at line 79 of file TrapezoidalStripTopology.h.

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

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