#include <Alignment/KalmanAlignmentAlgorithm/interface/CurrentAlignmentKFUpdator.h>
Public Member Functions | |
virtual CurrentAlignmentKFUpdator * | clone (void) const |
CurrentAlignmentKFUpdator (AlignableNavigator *navigator) | |
CurrentAlignmentKFUpdator (void) | |
TrajectoryStateOnSurface | update (const TrajectoryStateOnSurface &, const TransientTrackingRecHit &) const |
template<unsigned int D> | |
TrajectoryStateOnSurface | update (const TrajectoryStateOnSurface &, const TransientTrackingRecHit &) const |
~CurrentAlignmentKFUpdator (void) | |
Private Member Functions | |
AlignmentParameters * | getAlignmentParameters (const AlignableDet *alignableDet) const |
AlignmentParameters * | getHigherLevelParameters (const Alignable *aAlignable) const |
template<unsigned int D> | |
void | includeCurrentAlignmentEstimate (const TransientTrackingRecHit &aRecHit, const TrajectoryStateOnSurface &tsos, typename AlgebraicROOTObject< D >::Vector &vecR, typename AlgebraicROOTObject< D >::SymMatrix &matV) const |
Private Attributes | |
AlignableNavigator * | theAlignableNavigator |
Definition at line 14 of file CurrentAlignmentKFUpdator.h.
CurrentAlignmentKFUpdator::CurrentAlignmentKFUpdator | ( | void | ) | [inline] |
Definition at line 19 of file CurrentAlignmentKFUpdator.h.
Referenced by clone().
00019 : theAlignableNavigator( 0 ) {}
CurrentAlignmentKFUpdator::CurrentAlignmentKFUpdator | ( | AlignableNavigator * | navigator | ) | [inline] |
Definition at line 20 of file CurrentAlignmentKFUpdator.h.
00020 : theAlignableNavigator( navigator ) {}
CurrentAlignmentKFUpdator::~CurrentAlignmentKFUpdator | ( | void | ) | [inline] |
virtual CurrentAlignmentKFUpdator* CurrentAlignmentKFUpdator::clone | ( | void | ) | const [inline, virtual] |
Implements TrajectoryStateUpdator.
Definition at line 28 of file CurrentAlignmentKFUpdator.h.
References CurrentAlignmentKFUpdator().
00028 { return new CurrentAlignmentKFUpdator( *this ); }
AlignmentParameters * CurrentAlignmentKFUpdator::getAlignmentParameters | ( | const AlignableDet * | alignableDet | ) | const [private] |
Definition at line 119 of file CurrentAlignmentKFUpdator.cc.
References Alignable::alignmentParameters(), and getHigherLevelParameters().
Referenced by includeCurrentAlignmentEstimate().
00120 { 00121 // Get alignment parameters from AlignableDet ... 00122 AlignmentParameters* alignmentParameters = alignableDet->alignmentParameters(); 00123 // ... or any higher level alignable. 00124 if ( !alignmentParameters ) alignmentParameters = getHigherLevelParameters( alignableDet ); 00125 return alignmentParameters; 00126 }
AlignmentParameters * CurrentAlignmentKFUpdator::getHigherLevelParameters | ( | const Alignable * | aAlignable | ) | const [private] |
Definition at line 129 of file CurrentAlignmentKFUpdator.cc.
References Alignable::alignmentParameters(), and Alignable::mother().
Referenced by getAlignmentParameters().
00130 { 00131 Alignable* higherLevelAlignable = aAlignable->mother(); 00132 // Alignable has no mother ... most probably the alignable is already the full tracker. 00133 if ( !higherLevelAlignable ) return 0; 00134 AlignmentParameters* higherLevelParameters = higherLevelAlignable->alignmentParameters(); 00135 // Found alignment parameters? If not, go one level higher in the hierarchy. 00136 return higherLevelParameters ? higherLevelParameters : getHigherLevelParameters( higherLevelAlignable ); 00137 }
void CurrentAlignmentKFUpdator::includeCurrentAlignmentEstimate | ( | const TransientTrackingRecHit & | aRecHit, | |
const TrajectoryStateOnSurface & | tsos, | |||
typename AlgebraicROOTObject< D >::Vector & | vecR, | |||
typename AlgebraicROOTObject< D >::SymMatrix & | matV | |||
) | const [inline, private] |
Definition at line 80 of file CurrentAlignmentKFUpdator.cc.
References AlignableNavigator::alignableDetFromGeomDet(), GenMuonPlsPt100GeV_cfg::cout, funct::D, deltaR(), TransientTrackingRecHit::det(), lat::endl(), getAlignmentParameters(), AlignmentParameters::selectedCovariance(), AlignmentParameters::selectedDerivatives(), AlignmentParameters::selectedParameters(), and theAlignableNavigator.
00084 { 00085 AlignableDet* alignableDet = theAlignableNavigator->alignableDetFromGeomDet( aRecHit.det() ); 00086 if ( !alignableDet ) 00087 { 00088 std::cout << "[CurrentAlignmentKFUpdator::includeCurrentAlignmentEstimate] No AlignableDet associated with RecHit." << std::endl; 00089 return; 00090 } 00091 00092 AlignmentParameters* alignmentParameters = getAlignmentParameters( alignableDet ); 00093 00094 if ( alignmentParameters ) 00095 { 00096 AlgebraicMatrix selectedDerivatives = alignmentParameters->selectedDerivatives( tsos, alignableDet ); 00097 AlgebraicVector selectedParameters = alignmentParameters->selectedParameters(); 00098 AlgebraicSymMatrix selectedCovariance = alignmentParameters->selectedCovariance(); 00099 00100 AlgebraicSymMatrix deltaV = selectedCovariance.similarityT( selectedDerivatives ); 00101 AlgebraicVector deltaR = selectedDerivatives.T()*selectedParameters; 00102 00103 //AlignmentUserVariables* auv = alignmentParameters->userVariables(); 00104 //if ( !auv ) std::cout << "[CurrentAlignmentKFUpdator::includeCurrentAlignmentEstimate] No AlignmentUserVariables associated with AlignableDet." << std::endl; 00105 //if ( theAnnealing ) matV *= (*theAnnealing)( auv ); 00106 00107 if ( deltaR.num_row() == D ) 00108 { 00109 vecR += asSVector<D>(deltaR); 00110 matV += asSMatrix<D>(deltaV); 00111 } 00112 else std::cout << "[CurrentAlignmentKFUpdator::includeCurrentAlignmentEstimate] Predicted state and misalignment correction not compatible." << std::endl; 00113 } else std::cout << "[CurrentAlignmentKFUpdator::includeCurrentAlignmentEstimate] No AlignmentParameters associated with AlignableDet." << std::endl; 00114 00115 return; 00116 }
TrajectoryStateOnSurface CurrentAlignmentKFUpdator::update | ( | const TrajectoryStateOnSurface & | , | |
const TransientTrackingRecHit & | ||||
) | const [virtual] |
Implements TrajectoryStateUpdator.
TrajectoryStateOnSurface CurrentAlignmentKFUpdator::update | ( | const TrajectoryStateOnSurface & | tsos, | |
const TransientTrackingRecHit & | aRecHit | |||
) | const [inline, virtual] |
Implements TrajectoryStateUpdator.
Definition at line 11 of file CurrentAlignmentKFUpdator.cc.
References TrackingRecHit::dimension(), and Exception.
00013 { 00014 switch (aRecHit.dimension()) { 00015 case 1: return update<1>(tsos,aRecHit); 00016 case 2: return update<2>(tsos,aRecHit); 00017 case 3: return update<3>(tsos,aRecHit); 00018 case 4: return update<4>(tsos,aRecHit); 00019 case 5: return update<5>(tsos,aRecHit); 00020 } 00021 throw cms::Exception("Rec hit of invalid dimension (not 1,2,3,4,5)"); 00022 }
Definition at line 41 of file CurrentAlignmentKFUpdator.h.
Referenced by includeCurrentAlignmentEstimate().