15 case 1:
return update<1>(tsos,aRecHit);
16 case 2:
return update<2>(tsos,aRecHit);
17 case 3:
return update<3>(tsos,aRecHit);
18 case 4:
return update<4>(tsos,aRecHit);
19 case 5:
return update<5>(tsos,aRecHit);
21 throw cms::Exception(
"Rec hit of invalid dimension (not 1,2,3,4,5)");
25 template <
unsigned int D>
45 VecD vecR = asSVector<D>(aRecHit.
parameters()) - me.measuredParameters<
D>( aRecHit );
51 includeCurrentAlignmentEstimate<D>( aRecHit, tsos, vecR, matV );
53 SMatDD matR( matV + me.measuredError<
D>( aRecHit ) );
55 int checkInversion = 0;
56 SMatDD invR = matR.Inverse( checkInversion );
57 if ( checkInversion != 0 )
59 std::cout <<
"[CurrentAlignmentKFUpdator::update] Inversion of matrix R failed." << std::endl;
64 Mat5D matK = matC*ROOT::Math::Transpose(matH)*invR ;
72 AlgebraicSymMatrix55 fse( ROOT::Math::Similarity(matM, matC) + ROOT::Math::Similarity(matK, matV) );
75 tsos.surface(),&( tsos.globalParameters().magneticField() ) );
79 template <
unsigned int D>
89 if ( alignableDet.
isNull() )
97 if ( alignmentParameters )
110 if ( deltaR.num_row() ==
D )
112 vecR += asSVector<D>(
deltaR);
113 matV += asSMatrix<D>(deltaV);
115 else std::cout <<
"[CurrentAlignmentKFUpdator::includeCurrentAlignmentEstimate] Predicted state and misalignment correction not compatible." << std::endl;
116 }
else std::cout <<
"[CurrentAlignmentKFUpdator::includeCurrentAlignmentEstimate] No AlignmentParameters associated with AlignableDet." << std::endl;
128 return alignmentParameters;
136 if ( !higherLevelAlignable )
return 0;
virtual int dimension() const =0
double pzSign() const
Sign of the z-component of the momentum in the local frame.
ROOT::Math::SMatrix< double, D1, D1, ROOT::Math::MatRepSym< double, D1 > > SymMatrix
AlignableDetOrUnitPtr alignableFromGeomDet(const GeomDet *geomDet)
Returns AlignableDetOrUnitPtr corresponding to given GeomDet.
const LocalTrajectoryParameters & localParameters() const
AlignmentParameters * getHigherLevelParameters(const Alignable *aAlignable) const
AlgebraicVector selectedParameters(void) const
Get selected parameters.
ROOT::Math::SMatrixIdentity AlgebraicMatrixID
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
bool isNull() const
check for empty pointer
AlignmentParameters * alignmentParameters() const
Get the AlignmentParameters.
virtual AlgebraicVector parameters() const =0
AlgebraicVector5 vector() const
ROOT::Math::SMatrix< double, D1, D2, ROOT::Math::MatRepStd< double, D1, D2 > > Matrix
CLHEP::HepMatrix AlgebraicMatrix
AlignableNavigator * theAlignableNavigator
const AlgebraicSymMatrix55 & matrix() const
const LocalTrajectoryError & localError() const
AlignmentParameters * getAlignmentParameters(const AlignableDetOrUnitPtr alignableDet) const
AlgebraicSymMatrix selectedCovariance(void) const
Get covariance matrix of selected parameters.
double deltaR(double eta1, double eta2, double phi1, double phi2)
CLHEP::HepVector AlgebraicVector
ROOT::Math::SVector< double, D1 > Vector
DecomposeProduct< arg, typename Div::arg > D
ROOT::Math::SVector< double, 5 > AlgebraicVector5
virtual AlgebraicMatrix projectionMatrix() const =0
const GeomDet * det() const
The GomeDet* can be zero for InvalidTransientRecHits and for TConstraintRecHit2Ds.
CLHEP::HepSymMatrix AlgebraicSymMatrix
void includeCurrentAlignmentEstimate(const TransientTrackingRecHit &aRecHit, const TrajectoryStateOnSurface &tsos, typename AlgebraicROOTObject< D >::Vector &vecR, typename AlgebraicROOTObject< D >::SymMatrix &matV) const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepStd< double, 5, 5 > > AlgebraicMatrix55
Alignable * mother() const
Return pointer to container alignable (if any)
TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TransientTrackingRecHit &) const
virtual AlgebraicMatrix selectedDerivatives(const TrajectoryStateOnSurface &tsos, const AlignableDetOrUnitPtr &alidet) const
virtual AlgebraicSymMatrix parametersError() const =0