CMS 3D CMS Logo

Strip1DMeasurementTransformator.cc
Go to the documentation of this file.
4 // #include "Geometry/TrackerGeometryBuilder/interface/StripGeomDetType.h"
6 
8  : theRecHit(hit), theState(tsos), theTopology(nullptr) {
9  init();
10 }
11 
13  theTopology = dynamic_cast<const StripTopology*>(&(hit().detUnit()->topology()));
14  theIdealTopology = dynamic_cast<const StripTopology*>(&(hit().detUnit()->type().topology()));
15 }
16 
18  return topology()->measurementPosition(hit().localPosition()).x();
19 }
20 
22  return state().localParameters().vector();
23 }
24 
26  return topology()->measurementPosition(state().localPosition()).x();
27 }
28 
30  return topology()->measurementError(hit().localPosition(), hit().localPositionError()).uu();
31 }
32 
34  return state().localError().matrix();
35 }
36 
38  return topology()->measurementError(state().localPosition(), state().localError().positionError()).uu();
39 }
40 
42  // H(measurement <- local)
43  // m_meas = H*x_local + c
45  if (const RadialStripTopology* tmp = dynamic_cast<const RadialStripTopology*>(idealTopology())) {
46  double yHitToInter = tmp->yDistanceToIntersection(hit().localPosition().y());
47  double t = tmp->yAxisOrientation() * hit().localPosition().x() / yHitToInter;
48  double c2 = 1. / (1. + t * t); // cos(angle)**2
49  //double cs = t*c2; // sin(angle)*cos(angle); tan carries sign of sin!
50  double s2 = 1. - c2; // sin(angle)**2
51  double A = tmp->angularWidth();
52  // D is distance from intersection of edges to hit on strip
53  double D2 = hit().localPosition().x() * hit().localPosition().x() + yHitToInter * yHitToInter;
54  double D = std::sqrt(D2);
55 
56  double cp = std::sqrt(c2);
57  double sp;
58  if (t > 0) {
59  sp = std::sqrt(s2);
60  } else {
61  sp = -std::sqrt(s2);
62  }
63  H(0, 3) = cp / (D * A);
64  H(0, 4) = -sp / (D * A);
65  } else {
66  double phi = topology()->stripAngle(topology()->strip(state().localPosition()));
67  double pitch = topology()->localPitch(state().localPosition());
68  H(0, 3) = cos(phi) / pitch;
69  H(0, 4) = sin(phi) / pitch;
70  }
71  return H;
72 }
Divides< B, C > D2
Definition: Factorize.h:137
float uu() const
const LocalTrajectoryError & localError() const
virtual float stripAngle(float strip) const =0
virtual const Topology & topology() const
Definition: GeomDet.cc:67
Strip1DMeasurementTransformator(const TSOS &aTsos, const TrackingRecHit &aHit)
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
const LocalTrajectoryParameters & localParameters() const
T x() const
Definition: PV2DBase.h:43
virtual const GeomDetType & type() const
Definition: GeomDet.cc:69
T x() const
Definition: PV3DBase.h:59
virtual float localPitch(const LocalPoint &) const =0
const StripTopology * idealTopology() const
return ideal topology, as if the sensor were flat
virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const =0
T sqrt(T t)
Definition: SSEVec.h:23
AlgebraicVector5 vector() const
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
ROOT::Math::SVector< double, 5 > AlgebraicVector5
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
virtual const GeomDetUnit * detUnit() const
ROOT::Math::SMatrix< double, 1, 5, ROOT::Math::MatRepStd< double, 1, 5 > > AlgebraicMatrix15
const StripTopology * topology() const
return real topology, taking sensor deformations into account
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:141
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
virtual const Topology & topology() const =0
const AlgebraicSymMatrix55 & matrix() const
Definition: APVGainStruct.h:7
tmp
align.sh
Definition: createJobs.py:716
virtual LocalPoint localPosition() const =0