Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:29:19

0001 #include "RecoVertex/VertexPrimitives/interface/VertexTrack.h"
0002 
0003 template <unsigned int N>
0004 VertexTrack<N>::VertexTrack(RefCountedLinearizedTrackState lt, VertexState v, float weight)
0005     : theLinTrack(std::move(lt)),
0006       theVertexState(std::move(v)),
0007       theWeight(weight),
0008       stAvailable(false),
0009       covAvailable(false),
0010       smoothedChi2_(-1.) {}
0011 
0012 template <unsigned int N>
0013 VertexTrack<N>::VertexTrack(RefCountedLinearizedTrackState lt,
0014                             VertexState v,
0015                             float weight,
0016                             const RefCountedRefittedTrackState& refittedState,
0017                             float smoothedChi2)
0018     : theLinTrack(std::move(lt)),
0019       theVertexState(std::move(v)),
0020       theWeight(weight),
0021       stAvailable(true),
0022       covAvailable(false),
0023       theRefittedState(refittedState),
0024       smoothedChi2_(smoothedChi2) {}
0025 
0026 template <unsigned int N>
0027 VertexTrack<N>::VertexTrack(RefCountedLinearizedTrackState lt,
0028                             VertexState v,
0029                             float weight,
0030                             const RefCountedRefittedTrackState& refittedState,
0031                             float smoothedChi2,
0032                             const AlgebraicSymMatrixOO& fullCov)
0033     : theLinTrack(std::move(lt)),
0034       theVertexState(std::move(v)),
0035       theWeight(weight),
0036       stAvailable(true),
0037       covAvailable(true),
0038       theRefittedState(refittedState),
0039       fullCovariance_(fullCov),
0040       smoothedChi2_(smoothedChi2) {}
0041 
0042 template <unsigned int N>
0043 typename VertexTrack<N>::AlgebraicVectorN VertexTrack<N>::refittedParamFromEquation() const {
0044   return linearizedTrack()->refittedParamFromEquation(theRefittedState);
0045 }
0046 
0047 template class VertexTrack<5>;
0048 template class VertexTrack<6>;
0049 
0050 //   /** Track to vertex covariance
0051 //    */
0052 // template <unsigned int N>
0053 // typename VertexTrack<N>::AlgebraicMatrix3M VertexTrack<N>::tkToVtxCovariance() const {
0054 //     if (!tkToVertexCovarianceAvailable()) {
0055 //       throw VertexException("VertexTrack::track to vertex covariance not available");
0056 //     }
0057 // //     if (N==5) {
0058 // //       ROOT::Math::SMatrix<double,6,6,ROOT::Math::MatRepSym<double,6> > b6 = fullCovariance_;
0059 // //       return b.Sub<AlgebraicMatrix3M>(3,0);
0060 // //       //a = b.Sub< ROOT::Math::SMatrix<double,3,N-2,ROOT::Math::MatRepStd<double,3,N-2> > >(3,0);
0061 // //     }
0062 //     ROOT::Math::SMatrix<double,3,N-2,ROOT::Math::MatRepStd<double,3,N-2> > a;
0063 //     return a;
0064 //   }