CMS 3D CMS Logo

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

#include <Strip1DMeasurementTransformator.h>

Public Member Functions

const TrackingRecHithit () const
 
double hitError () const
 
double hitParameters () const
 
const StripTopologyidealTopology () const
 return ideal topology, as if the sensor were flat More...
 
double projectedTrajectoryError () const
 
double projectedTrajectoryParameters () const
 
AM15 projectionMatrix () const
 
const TSOSstate () const
 
 Strip1DMeasurementTransformator (const TSOS &aTsos, const TrackingRecHit &aHit)
 
const StripTopologytopology () const
 return real topology, taking sensor deformations into account More...
 
const ASM55trajectoryError () const
 
AV5 trajectoryParameters () const
 
 ~Strip1DMeasurementTransformator ()
 

Private Types

typedef AlgebraicMatrix15 AM15
 
typedef AlgebraicSymMatrix55 ASM55
 
typedef AlgebraicVector5 AV5
 
typedef TrajectoryStateOnSurface TSOS
 

Private Member Functions

void init ()
 

Private Attributes

const StripTopologytheIdealTopology
 
const TrackingRecHittheRecHit
 
TSOS theState
 
const StripTopologytheTopology
 

Detailed Description

Helper class for accessing the RecHit and the TrajectoryState parameters and errors in the measurement frame. The RecHits are treated as 1-dimensional, the second coordinate is ignored. Ported from ORCA.

Author
todorov, cerati

Definition at line 17 of file Strip1DMeasurementTransformator.h.

Member Typedef Documentation

Definition at line 23 of file Strip1DMeasurementTransformator.h.

Definition at line 22 of file Strip1DMeasurementTransformator.h.

Definition at line 24 of file Strip1DMeasurementTransformator.h.

Definition at line 21 of file Strip1DMeasurementTransformator.h.

Constructor & Destructor Documentation

Strip1DMeasurementTransformator::Strip1DMeasurementTransformator ( const TSOS aTsos,
const TrackingRecHit aHit 
)
Strip1DMeasurementTransformator::~Strip1DMeasurementTransformator ( )
inline

Definition at line 30 of file Strip1DMeasurementTransformator.h.

30 {}

Member Function Documentation

const TrackingRecHit& Strip1DMeasurementTransformator::hit ( void  ) const
inline

Definition at line 40 of file Strip1DMeasurementTransformator.h.

References theRecHit.

Referenced by hitError(), hitParameters(), init(), and projectionMatrix().

40 {return theRecHit;}
double Strip1DMeasurementTransformator::hitError ( ) const

Definition at line 37 of file Strip1DMeasurementTransformator.cc.

References hit(), Topology::measurementError(), topology(), and MeasurementError::uu().

Referenced by KFStrip1DUpdator::update().

37  {
38 
39  return
40  topology()->measurementError(hit().localPosition(),
41  hit().localPositionError()).uu();
42 }
virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const =0
float uu() const
const StripTopology * topology() const
return real topology, taking sensor deformations into account
double Strip1DMeasurementTransformator::hitParameters ( ) const

Definition at line 22 of file Strip1DMeasurementTransformator.cc.

References hit(), Topology::measurementPosition(), topology(), and PV2DBase< T, PVType, FrameType >::x().

Referenced by KFStrip1DUpdator::update().

22  {
23 
24  return topology()->measurementPosition(hit().localPosition()).x();
25 }
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
const StripTopology * topology() const
return real topology, taking sensor deformations into account
T x() const
Definition: PV2DBase.h:45
const StripTopology* Strip1DMeasurementTransformator::idealTopology ( ) const
inline

return ideal topology, as if the sensor were flat

Definition at line 43 of file Strip1DMeasurementTransformator.h.

References theIdealTopology.

Referenced by projectionMatrix().

void Strip1DMeasurementTransformator::init ( void  )
private

Definition at line 16 of file Strip1DMeasurementTransformator.cc.

References TrackingRecHit::detUnit(), hit(), theIdealTopology, theTopology, GeomDetType::topology(), GeomDet::topology(), and GeomDet::type().

Referenced by Strip1DMeasurementTransformator().

16  {
17 
18  theTopology = dynamic_cast<const StripTopology*>(&(hit().detUnit()->topology()));
19  theIdealTopology = dynamic_cast<const StripTopology*>(&(hit().detUnit()->type().topology()));
20 }
virtual const GeomDetType & type() const
Definition: GeomDet.cc:90
virtual const Topology & topology() const
Definition: GeomDet.cc:86
virtual const Topology & topology() const =0
virtual const GeomDetUnit * detUnit() const
double Strip1DMeasurementTransformator::projectedTrajectoryError ( ) const

Definition at line 49 of file Strip1DMeasurementTransformator.cc.

References Topology::measurementError(), state(), topology(), and MeasurementError::uu().

Referenced by KFStrip1DUpdator::update().

49  {
50 
51  return
52  topology()->measurementError(state().localPosition(),
53  state().localError().positionError()).uu();
54 }
virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const =0
float uu() const
const StripTopology * topology() const
return real topology, taking sensor deformations into account
double Strip1DMeasurementTransformator::projectedTrajectoryParameters ( ) const

Definition at line 32 of file Strip1DMeasurementTransformator.cc.

References Topology::measurementPosition(), state(), topology(), and PV2DBase< T, PVType, FrameType >::x().

Referenced by KFStrip1DUpdator::update().

32  {
33 
34  return topology()->measurementPosition(state().localPosition()).x();
35 }
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
const StripTopology * topology() const
return real topology, taking sensor deformations into account
T x() const
Definition: PV2DBase.h:45
AlgebraicMatrix15 Strip1DMeasurementTransformator::projectionMatrix ( ) const

Definition at line 56 of file Strip1DMeasurementTransformator.cc.

References HLT_25ns14e33_v1_cff::A, counter::c2, funct::cos(), CommonMethods::cp(), class-composition::H, hit(), idealTopology(), StripTopology::localPitch(), TrackingRecHit::localPosition(), phi, indexGen::s2, funct::sin(), mathSSE::sqrt(), state(), StripTopology::stripAngle(), edmStreamStallGrapher::t, tmp, topology(), PV3DBase< T, PVType, FrameType >::x(), and detailsBasic3DVector::y.

Referenced by KFStrip1DUpdator::update().

56  {
57 
58  // H(measurement <- local)
59  // m_meas = H*x_local + c
61  if(const RadialStripTopology* tmp = dynamic_cast<const RadialStripTopology*>(idealTopology())) {
62  double yHitToInter = tmp->yDistanceToIntersection( hit().localPosition().y() );
63  double t = tmp->yAxisOrientation() * hit().localPosition().x() / yHitToInter;
64  double c2 = 1./(1. + t*t); // cos(angle)**2
65  //double cs = t*c2; // sin(angle)*cos(angle); tan carries sign of sin!
66  double s2 = 1. - c2; // sin(angle)**2
67  double A = tmp->angularWidth();
68  // D is distance from intersection of edges to hit on strip
69  double D2 = hit().localPosition().x()*hit().localPosition().x() + yHitToInter*yHitToInter;
70  double D = std::sqrt(D2);
71 
72  double cp = std::sqrt(c2);
73  double sp;
74  if(t > 0) {
75  sp = std::sqrt(s2);
76  } else {
77  sp = -std::sqrt(s2);
78  }
79  H(0,3) = cp/(D*A); H(0,4) = -sp/(D*A);
80  } else {
81  double phi =
82  topology()->stripAngle(topology()->strip(state().localPosition()));
83  double pitch = topology()->localPitch(state().localPosition());
84  H(0,3) = cos(phi)/pitch; H(0,4) = sin(phi)/pitch;
85  }
86  return H;
87 }
Divides< B, C > D2
Definition: Factorize.h:145
virtual float stripAngle(float strip) const =0
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
tuple s2
Definition: indexGen.py:106
tuple c2
Definition: counter.py:145
virtual float localPitch(const LocalPoint &) const =0
const StripTopology * idealTopology() const
return ideal topology, as if the sensor were flat
T sqrt(T t)
Definition: SSEVec.h:48
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
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:150
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
T x() const
Definition: PV3DBase.h:62
virtual LocalPoint localPosition() const =0
Definition: DDAxes.h:10
const TSOS& Strip1DMeasurementTransformator::state ( ) const
inline
const StripTopology* Strip1DMeasurementTransformator::topology ( ) const
inline

return real topology, taking sensor deformations into account

Definition at line 45 of file Strip1DMeasurementTransformator.h.

References theTopology.

Referenced by hitError(), hitParameters(), projectedTrajectoryError(), projectedTrajectoryParameters(), and projectionMatrix().

45 {return theTopology;}
const AlgebraicSymMatrix55 & Strip1DMeasurementTransformator::trajectoryError ( ) const

Definition at line 44 of file Strip1DMeasurementTransformator.cc.

References TrajectoryStateOnSurface::localError(), LocalTrajectoryError::matrix(), and state().

Referenced by KFStrip1DUpdator::update().

44  {
45 
46  return state().localError().matrix();
47 }
const AlgebraicSymMatrix55 & matrix() const
const LocalTrajectoryError & localError() const
AlgebraicVector5 Strip1DMeasurementTransformator::trajectoryParameters ( ) const

Definition at line 27 of file Strip1DMeasurementTransformator.cc.

References TrajectoryStateOnSurface::localParameters(), state(), and LocalTrajectoryParameters::vector().

Referenced by KFStrip1DUpdator::update().

27  {
28 
29  return state().localParameters().vector();
30 }
const LocalTrajectoryParameters & localParameters() const
AlgebraicVector5 vector() const

Member Data Documentation

const StripTopology * Strip1DMeasurementTransformator::theIdealTopology
private

Definition at line 51 of file Strip1DMeasurementTransformator.h.

Referenced by idealTopology(), and init().

const TrackingRecHit& Strip1DMeasurementTransformator::theRecHit
private

Definition at line 49 of file Strip1DMeasurementTransformator.h.

Referenced by hit().

TSOS Strip1DMeasurementTransformator::theState
private

Definition at line 50 of file Strip1DMeasurementTransformator.h.

Referenced by state().

const StripTopology* Strip1DMeasurementTransformator::theTopology
private

Definition at line 51 of file Strip1DMeasurementTransformator.h.

Referenced by init(), and topology().