CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Strip1DMeasurementTransformator.cc
Go to the documentation of this file.
5 
8  theRecHit(hit),
9  theState(tsos),
10  theTopology(0) {
11 
12  init();
13 }
14 
16 
17  theTopology = dynamic_cast<const StripTopology*>(&(hit().detUnit()->topology()));
18  theIdealTopology = dynamic_cast<const StripTopology*>(&(hit().detUnit()->type().topology()));
19 }
20 
22 
23  return topology()->measurementPosition(hit().localPosition()).x();
24 }
25 
27 
28  return state().localParameters().vector();
29 }
30 
32 
33  return topology()->measurementPosition(state().localPosition()).x();
34 }
35 
37 
38  return
39  topology()->measurementError(hit().localPosition(),
40  hit().localPositionError()).uu();
41 }
42 
44 
45  return state().localError().matrix();
46 }
47 
49 
50  return
51  topology()->measurementError(state().localPosition(),
52  state().localError().positionError()).uu();
53 }
54 
56 
57  // H(measurement <- local)
58  // m_meas = H*x_local + c
60  if(const RadialStripTopology* tmp = dynamic_cast<const RadialStripTopology*>(idealTopology())) {
61  double yHitToInter = tmp->yDistanceToIntersection( hit().localPosition().y() );
62  double t = tmp->yAxisOrientation() * hit().localPosition().x() / yHitToInter;
63  double c2 = 1./(1. + t*t); // cos(angle)**2
64  //double cs = t*c2; // sin(angle)*cos(angle); tan carries sign of sin!
65  double s2 = 1. - c2; // sin(angle)**2
66  double A = tmp->angularWidth();
67  // D is distance from intersection of edges to hit on strip
68  double D2 = hit().localPosition().x()*hit().localPosition().x() + yHitToInter*yHitToInter;
69  double D = std::sqrt(D2);
70 
71  double cp = std::sqrt(c2);
72  double sp;
73  if(t > 0) {
74  sp = std::sqrt(s2);
75  } else {
76  sp = -std::sqrt(s2);
77  }
78  H(0,3) = cp/(D*A); H(0,4) = -sp/(D*A);
79  } else {
80  double phi =
81  topology()->stripAngle(topology()->strip(state().localPosition()));
82  double pitch = topology()->localPitch(state().localPosition());
83  H(0,3) = cos(phi)/pitch; H(0,4) = sin(phi)/pitch;
84  }
85  return H;
86 }
87 
88 
89 
90 
91 
92 
Divides< B, C > D2
Definition: Factorize.h:145
void strip(std::string &input, const std::string &blanks=" \n\t")
Definition: stringTools.cc:16
virtual float stripAngle(float strip) const =0
const LocalTrajectoryParameters & localParameters() const
Strip1DMeasurementTransformator(const TSOS &aTsos, const TransientTrackingRecHit &aHit)
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
tuple s2
Definition: indexGen.py:106
AlgebraicVector5 vector() const
virtual const Topology & topology() const =0
virtual float localPitch(const LocalPoint &) const =0
virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const =0
const StripTopology * idealTopology() const
return ideal topology, as if the sensor were flat
T sqrt(T t)
Definition: SSEVec.h:28
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
float uu() const
ROOT::Math::SMatrix< double, 1, 5, ROOT::Math::MatRepStd< double, 1, 5 > > AlgebraicMatrix15
const AlgebraicSymMatrix55 & matrix() const
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
const LocalTrajectoryError & localError() const
virtual const GeomDetType & type() const =0
const StripTopology * topology() const
return real topology, taking sensor deformations into account
ROOT::Math::SVector< double, 5 > AlgebraicVector5
const TransientTrackingRecHit & hit() const
virtual const Topology & topology() const =0
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
virtual const GeomDetUnit * detUnit() const
T x() const
Definition: PV2DBase.h:39
T x() const
Definition: PV3DBase.h:56
virtual LocalPoint localPosition() const =0
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:150
Definition: DDAxes.h:10