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 Member Functions | Private Attributes
CurrentAlignmentKFUpdator Class Reference

#include <CurrentAlignmentKFUpdator.h>

Inheritance diagram for CurrentAlignmentKFUpdator:
TrajectoryStateUpdator

Public Member Functions

virtual CurrentAlignmentKFUpdatorclone (void) const
 
 CurrentAlignmentKFUpdator (void)
 
 CurrentAlignmentKFUpdator (AlignableNavigator *navigator)
 
template<unsigned int D>
TrajectoryStateOnSurface update (const TrajectoryStateOnSurface &, const TrackingRecHit &) const
 
TrajectoryStateOnSurface update (const TrajectoryStateOnSurface &, const TrackingRecHit &) const
 
 ~CurrentAlignmentKFUpdator (void)
 
- Public Member Functions inherited from TrajectoryStateUpdator
 TrajectoryStateUpdator ()
 
virtual ~TrajectoryStateUpdator ()
 

Private Member Functions

AlignmentParameters const * getAlignmentParameters (const AlignableDetOrUnitPtr &alignableDet) const
 
AlignmentParameters const * getHigherLevelParameters (const Alignable *aAlignable) const
 
template<unsigned int D>
void includeCurrentAlignmentEstimate (const TrackingRecHit &aRecHit, const TrajectoryStateOnSurface &tsos, typename AlgebraicROOTObject< D >::Vector &vecR, typename AlgebraicROOTObject< D >::SymMatrix &matV) const
 

Private Attributes

AlignableNavigatortheAlignableNavigator
 

Detailed Description

Definition at line 14 of file CurrentAlignmentKFUpdator.h.

Constructor & Destructor Documentation

CurrentAlignmentKFUpdator::CurrentAlignmentKFUpdator ( void  )
inline

Definition at line 19 of file CurrentAlignmentKFUpdator.h.

Referenced by clone().

19 : theAlignableNavigator( 0 ) {}
AlignableNavigator * theAlignableNavigator
CurrentAlignmentKFUpdator::CurrentAlignmentKFUpdator ( AlignableNavigator navigator)
inline

Definition at line 20 of file CurrentAlignmentKFUpdator.h.

20 : theAlignableNavigator( navigator ) {}
AlignableNavigator * theAlignableNavigator
CurrentAlignmentKFUpdator::~CurrentAlignmentKFUpdator ( void  )
inline

Definition at line 21 of file CurrentAlignmentKFUpdator.h.

21 {}

Member Function Documentation

virtual CurrentAlignmentKFUpdator* CurrentAlignmentKFUpdator::clone ( void  ) const
inlinevirtual

Implements TrajectoryStateUpdator.

Definition at line 28 of file CurrentAlignmentKFUpdator.h.

References CurrentAlignmentKFUpdator().

28 { return new CurrentAlignmentKFUpdator( *this ); }
AlignmentParameters const * CurrentAlignmentKFUpdator::getAlignmentParameters ( const AlignableDetOrUnitPtr alignableDet) const
private

Definition at line 122 of file CurrentAlignmentKFUpdator.cc.

References Alignable::alignmentParameters(), and getHigherLevelParameters().

Referenced by includeCurrentAlignmentEstimate().

123 {
124  // Get alignment parameters from AlignableDet ...
125  AlignmentParameters const* alignmentParameters = alignableDet->alignmentParameters();
126  // ... or any higher level alignable.
127  if ( !alignmentParameters ) alignmentParameters = getHigherLevelParameters( alignableDet );
128  return alignmentParameters;
129 }
AlignmentParameters const * getHigherLevelParameters(const Alignable *aAlignable) const
AlignmentParameters * alignmentParameters() const
Get the AlignmentParameters.
Definition: Alignable.h:57
AlignmentParameters const * CurrentAlignmentKFUpdator::getHigherLevelParameters ( const Alignable aAlignable) const
private

Definition at line 132 of file CurrentAlignmentKFUpdator.cc.

References Alignable::alignmentParameters(), and Alignable::mother().

Referenced by getAlignmentParameters().

133 {
134  Alignable* higherLevelAlignable = aAlignable->mother();
135  // Alignable has no mother ... most probably the alignable is already the full tracker.
136  if ( !higherLevelAlignable ) return 0;
137  AlignmentParameters* higherLevelParameters = higherLevelAlignable->alignmentParameters();
138  // Found alignment parameters? If not, go one level higher in the hierarchy.
139  return higherLevelParameters ? higherLevelParameters : getHigherLevelParameters( higherLevelAlignable );
140 }
AlignmentParameters const * getHigherLevelParameters(const Alignable *aAlignable) const
AlignmentParameters * alignmentParameters() const
Get the AlignmentParameters.
Definition: Alignable.h:57
Alignable * mother() const
Return pointer to container alignable (if any)
Definition: Alignable.h:85
template<unsigned int D>
void CurrentAlignmentKFUpdator::includeCurrentAlignmentEstimate ( const TrackingRecHit aRecHit,
const TrajectoryStateOnSurface tsos,
typename AlgebraicROOTObject< D >::Vector vecR,
typename AlgebraicROOTObject< D >::SymMatrix &  matV 
) const
private

Definition at line 80 of file CurrentAlignmentKFUpdator.cc.

References AlignableNavigator::alignableFromGeomDet(), gather_cfg::cout, deltaR(), TrackingRecHit::det(), getAlignmentParameters(), AlignableDetOrUnitPtr::isNull(), AlignmentParameters::selectedCovariance(), AlignmentParameters::selectedDerivatives(), AlignmentParameters::selectedParameters(), and theAlignableNavigator.

84 {
85  const GeomDet* det = aRecHit.det();
86  if ( !det ) return;
87 
89  if ( alignableDet.isNull() )
90  {
91  //std::cout << "[CurrentAlignmentKFUpdator::includeCurrentAlignmentEstimate] No AlignableDet associated with RecHit." << std::endl;
92  return;
93  }
94 
95  AlignmentParameters const* alignmentParameters = getAlignmentParameters( alignableDet );
96 
97  if ( alignmentParameters )
98  {
99  AlgebraicMatrix selectedDerivatives = alignmentParameters->selectedDerivatives( tsos, alignableDet );
100  AlgebraicVector selectedParameters = alignmentParameters->selectedParameters();
101  AlgebraicSymMatrix selectedCovariance = alignmentParameters->selectedCovariance();
102 
103  AlgebraicSymMatrix deltaV = selectedCovariance.similarityT( selectedDerivatives );
104  AlgebraicVector deltaR = selectedDerivatives.T()*selectedParameters;
105 
106  //AlignmentUserVariables* auv = alignmentParameters->userVariables();
107  //if ( !auv ) std::cout << "[CurrentAlignmentKFUpdator::includeCurrentAlignmentEstimate] No AlignmentUserVariables associated with AlignableDet." << std::endl;
108  //if ( theAnnealing ) matV *= (*theAnnealing)( auv );
109 
110  if ( deltaR.num_row() == D )
111  {
112  vecR += asSVector<D>(deltaR);
113  matV += asSMatrix<D>(deltaV);
114  }
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;
117 
118  return;
119 }
AlignableDetOrUnitPtr alignableFromGeomDet(const GeomDet *geomDet)
Returns AlignableDetOrUnitPtr corresponding to given GeomDet.
AlgebraicVector selectedParameters(void) const
Get selected parameters.
bool isNull() const
check for empty pointer
CLHEP::HepMatrix AlgebraicMatrix
const GeomDet * det() const
AlignableNavigator * theAlignableNavigator
AlgebraicSymMatrix selectedCovariance(void) const
Get covariance matrix of selected parameters.
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
CLHEP::HepVector AlgebraicVector
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:150
CLHEP::HepSymMatrix AlgebraicSymMatrix
tuple cout
Definition: gather_cfg.py:121
AlignmentParameters const * getAlignmentParameters(const AlignableDetOrUnitPtr &alignableDet) const
virtual AlgebraicMatrix selectedDerivatives(const TrajectoryStateOnSurface &tsos, const AlignableDetOrUnitPtr &alidet) const
template<unsigned int D>
TrajectoryStateOnSurface CurrentAlignmentKFUpdator::update ( const TrajectoryStateOnSurface tsos,
const TrackingRecHit aRecHit 
) const
virtual

Implements TrajectoryStateUpdator.

Definition at line 11 of file CurrentAlignmentKFUpdator.cc.

References TrackingRecHit::dimension(), and edm::hlt::Exception.

Referenced by progressbar.ProgressBar::__next__(), relval_steps.Matrix::__setitem__(), relval_steps.Steps::__setitem__(), python.seqvaluedict.seqdict::__setslice__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), python.seqvaluedict.seqdict::extend(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), relval_steps.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

13 {
14  switch (aRecHit.dimension()) {
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);
20  }
21  throw cms::Exception("Rec hit of invalid dimension (not 1,2,3,4,5)");
22 }
virtual int dimension() const =0
TrajectoryStateOnSurface CurrentAlignmentKFUpdator::update ( const TrajectoryStateOnSurface ,
const TrackingRecHit  
) const
virtual

Implements TrajectoryStateUpdator.

Referenced by progressbar.ProgressBar::__next__(), relval_steps.Matrix::__setitem__(), relval_steps.Steps::__setitem__(), python.seqvaluedict.seqdict::__setslice__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), python.seqvaluedict.seqdict::extend(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), relval_steps.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

Member Data Documentation

AlignableNavigator* CurrentAlignmentKFUpdator::theAlignableNavigator
private

Definition at line 41 of file CurrentAlignmentKFUpdator.h.

Referenced by includeCurrentAlignmentEstimate().