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 }
RadialStripTopology
Definition: RadialStripTopology.h:28
class-composition.H
H
Definition: class-composition.py:31
DDAxes::y
Strip1DMeasurementTransformator::theTopology
const StripTopology * theTopology
Definition: Strip1DMeasurementTransformator.h:47
Strip1DMeasurementTransformator::hitParameters
double hitParameters() const
Definition: Strip1DMeasurementTransformator.cc:17
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
funct::D2
Divides< B, C > D2
Definition: Factorize.h:137
RadialStripTopology.h
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
GeomDetType.h
hgcal_conditions::parameters
Definition: HGCConditions.h:86
LocalTrajectoryError::matrix
const AlgebraicSymMatrix55 & matrix() const
Definition: LocalTrajectoryError.h:60
Strip1DMeasurementTransformator::trajectoryParameters
AV5 trajectoryParameters() const
Definition: Strip1DMeasurementTransformator.cc:21
indexGen.s2
s2
Definition: indexGen.py:107
Strip1DMeasurementTransformator::hitError
double hitError() const
Definition: Strip1DMeasurementTransformator.cc:29
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
TrackingRecHit::localPosition
virtual LocalPoint localPosition() const =0
StripTopology::localPitch
virtual float localPitch(const LocalPoint &) const =0
Strip1DMeasurementTransformator::Strip1DMeasurementTransformator
Strip1DMeasurementTransformator(const TSOS &aTsos, const TrackingRecHit &aHit)
Definition: Strip1DMeasurementTransformator.cc:7
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Strip1DMeasurementTransformator::init
void init()
Definition: Strip1DMeasurementTransformator.cc:12
Strip1DMeasurementTransformator::theIdealTopology
const StripTopology * theIdealTopology
Definition: Strip1DMeasurementTransformator.h:47
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
Topology::measurementError
virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const =0
LocalTrajectoryParameters::vector
AlgebraicVector5 vector() const
Definition: LocalTrajectoryParameters.h:120
Strip1DMeasurementTransformator::idealTopology
const StripTopology * idealTopology() const
return ideal topology, as if the sensor were flat
Definition: Strip1DMeasurementTransformator.h:40
TrajectoryStateOnSurface::localParameters
const LocalTrajectoryParameters & localParameters() const
Definition: TrajectoryStateOnSurface.h:73
Strip1DMeasurementTransformator::state
const TSOS & state() const
Definition: Strip1DMeasurementTransformator.h:38
PV2DBase::x
T x() const
Definition: PV2DBase.h:43
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:40
Strip1DMeasurementTransformator::projectedTrajectoryError
double projectedTrajectoryError() const
Definition: Strip1DMeasurementTransformator.cc:37
Strip1DMeasurementTransformator::projectionMatrix
AM15 projectionMatrix() const
Definition: Strip1DMeasurementTransformator.cc:41
A
StripTopology::stripAngle
virtual float stripAngle(float strip) const =0
Topology::measurementPosition
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
AlgebraicVector5
ROOT::Math::SVector< double, 5 > AlgebraicVector5
Definition: AlgebraicROOTObjects.h:14
Strip1DMeasurementTransformator::hit
const TrackingRecHit & hit() const
Definition: Strip1DMeasurementTransformator.h:37
Strip1DMeasurementTransformator.h
TrackingRecHit
Definition: TrackingRecHit.h:21
DDAxes::phi
Strip1DMeasurementTransformator::topology
const StripTopology * topology() const
return real topology, taking sensor deformations into account
Definition: Strip1DMeasurementTransformator.h:42
GeomDet.h
MaterialEffects_cfi.A
A
Definition: MaterialEffects_cfi.py:11
funct::D
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:141
AlgebraicMatrix15
ROOT::Math::SMatrix< double, 1, 5, ROOT::Math::MatRepStd< double, 1, 5 > > AlgebraicMatrix15
Definition: AlgebraicROOTObjects.h:31
Strip1DMeasurementTransformator::projectedTrajectoryParameters
double projectedTrajectoryParameters() const
Definition: Strip1DMeasurementTransformator.cc:25
MeasurementError::uu
float uu() const
Definition: MeasurementError.h:14
Strip1DMeasurementTransformator::trajectoryError
const ASM55 & trajectoryError() const
Definition: Strip1DMeasurementTransformator.cc:33
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
TrajectoryStateOnSurface::localError
const LocalTrajectoryError & localError() const
Definition: TrajectoryStateOnSurface.h:77
AlgebraicSymMatrix55
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
Definition: AlgebraicROOTObjects.h:23
hit
Definition: SiStripHitEffFromCalibTree.cc:88