CMS 3D CMS Logo

TrajectoryStateCombiner Class Reference

Combines the information from two trajectory states via a weighted mean. More...

#include <TrackingTools/TrackFitters/interface/TrajectoryStateCombiner.h>

List of all members.

Public Types

typedef TrajectoryStateOnSurface TSOS

Public Member Functions

TSOS combine (const TSOS &pTsos1, const TSOS &pTsos2) const
TSOS operator() (const TSOS &pTsos1, const TSOS &pTsos2) const


Detailed Description

Combines the information from two trajectory states via a weighted mean.

The input states should not be correlated. Ported from ORCA

Date
2007/05/09 14:17:57
Revision
1.2
Author:
todorov, cerati

Definition at line 15 of file TrajectoryStateCombiner.h.


Member Typedef Documentation

typedef TrajectoryStateOnSurface TrajectoryStateCombiner::TSOS

Definition at line 18 of file TrajectoryStateCombiner.h.


Member Function Documentation

TrajectoryStateOnSurface TrajectoryStateCombiner::combine ( const TSOS pTsos1,
const TSOS pTsos2 
) const

Definition at line 8 of file TrajectoryStateCombiner.cc.

References TrajectoryStateOnSurface::globalParameters(), K, TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localParameters(), GlobalTrajectoryParameters::magneticField(), LocalTrajectoryError::matrix(), LocalTrajectoryParameters::pzSign(), TrajectoryStateOnSurface::surface(), and LocalTrajectoryParameters::vector().

Referenced by AlignmentMonitorMuonHIP::event(), AlignmentMonitorTemplate::event(), AlignmentMonitorMuonResiduals::event(), operator()(), AlignmentMuonHIPTrajectorySelector::produce(), HIPAlignmentAlgorithm::run(), and TrackInfoProducerAlgorithm::run().

00008                                                                            {
00009 
00010   int ierr;
00011   double pzSign = Tsos1.localParameters().pzSign();
00012   AlgebraicVector5 x1(Tsos1.localParameters().vector());
00013   AlgebraicVector5 x2(Tsos2.localParameters().vector());
00014   const AlgebraicSymMatrix55 &C1 = (Tsos1.localError().matrix());
00015   const AlgebraicSymMatrix55 &C2 = (Tsos2.localError().matrix());
00016 
00017   AlgebraicSymMatrix55 Csum = C1 + C2;
00018   AlgebraicMatrix55 K = C1*(Csum.Inverse(ierr));
00019 
00020   if(ierr != 0) {
00021 //     if ( infoV )
00022 //       cout<<"KFTrajectorySmoother: inversion of Csum failed!"
00023 //        <<Tsos1.localError().matrix()<<endl;
00024     return TSOS();
00025   }
00026 
00027   AlgebraicVector5 xcomb = x1 + K*(x2 - x1);
00028   //AlgebraicSymMatrix55 Ccomb; Ccomb.assign(K*C2);
00029   AlgebraicSymMatrix55 Ccomb = (AlgebraicMatrix55(K*C2)).LowerBlock();
00030 
00031   TSOS combTsos( LocalTrajectoryParameters(xcomb, pzSign),
00032                  LocalTrajectoryError(Ccomb), Tsos1.surface(),
00033                  &(Tsos1.globalParameters().magneticField()));
00034   return combTsos;  
00035 }

TSOS TrajectoryStateCombiner::operator() ( const TSOS pTsos1,
const TSOS pTsos2 
) const [inline]

Definition at line 22 of file TrajectoryStateCombiner.h.

References combine().

00022                                                                 {
00023     return combine( pTsos1, pTsos2);
00024   }


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:34:23 2009 for CMSSW by  doxygen 1.5.4