#include <TrackingTools/TrackFitters/interface/TrajectoryStateCombiner.h>
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 |
The input states should not be correlated. Ported from ORCA
Definition at line 15 of file TrajectoryStateCombiner.h.
Definition at line 18 of file TrajectoryStateCombiner.h.
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 }