43 if ( !theUpdateState.isValid() ||
44 !theForwardState.isValid() ||
45 !theBackwardState.isValid() ) Valid =
false;
52 std::vector<TrajectoryStateOnSurface>
components(theUpdateState.components());
55 std::vector<SingleGaussianState1D> pxStates; pxStates.reserve(numb);
56 std::vector<SingleGaussianState1D> pyStates; pyStates.reserve(numb);
57 std::vector<SingleGaussianState1D> pzStates; pzStates.reserve(numb);
58 for ( std::vector<TrajectoryStateOnSurface>::const_iterator ic=
components.begin();
87 computeQpMode(theForwardState,fwdPars,fwdCov);
90 computeQpMode(theBackwardState,bwdPars,bwdCov);
93 if ( tm.
recHit()->isValid() ) {
94 hitPos = tm.
recHit()->localPosition();
95 hitErr = tm.
recHit()->localPositionError();
103 if ( !collinearFit.
fit(fwdPars,fwdCov,bwdPars,bwdCov,
105 fitParameters,fitCovariance,fitChi2) ) CollFit =
false;
108 double qpIn = fitParameters(0);
109 double sig2In = fitCovariance(0,0);
110 double qpOut = fitParameters(1);
111 double sig2Out = fitCovariance(1,1);
112 double corrInOut = fitCovariance(0,1);
113 double pIn = 1./fabs(qpIn);
114 double pOut = 1./fabs(qpOut);
115 double sig2DeltaP = pIn/qpIn*pIn/qpIn*sig2In - 2*pIn/qpIn*pOut/qpOut*corrInOut +
116 pOut/qpOut*pOut/qpOut*sig2Out;
120 sigmaDp =
sqrt(sig2DeltaP);
132 if (ComputeMode) gsfp =
GlobalVector(mode_Px,mode_Py,mode_Pz);
133 else gsfp = theUpdateState.globalMomentum();
169 double VarQpRatio =
sqrt(varQp/covariance(0,0));
171 covariance(0,0) = varQp;
172 for (
int i=1;
i<5; ++
i ) covariance(
i,0) *= VarQpRatio;
void computeQpMode(const TrajectoryStateOnSurface tsos, AlgebraicVector5 ¶meters, AlgebraicSymMatrix55 &covariance) const
ConstRecHitPointer const & recHit() const
const LocalTrajectoryParameters & localParameters() const
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > ResultMatrix
bool fit(const TrajectoryMeasurement &tm, ResultVector ¶meters, ResultMatrix &covariance, double &chi2)
Fit for one TM. Return value "true" for success.
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > AlgebraicSymMatrix66
ROOT::Math::SVector< double, 6 > ResultVector
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
double sigmafittedDP() const
static double fitChi2(const CachingVertex< 5 > &vtx)
AlgebraicVector5 vector() const
double mean() const
parameter vector
double variance() const
variance
const SingleGaussianState1D & mode() const
const AlgebraicSymMatrix55 & matrix() const
const LocalTrajectoryError & localError() const
TrajectoryStateOnSurface const & forwardPredictedState() const
Access to forward predicted state (from fitter or builder)
ROOT::Math::SVector< double, 5 > AlgebraicVector5
PFGsfHelper(const TrajectoryMeasurement &)
TrajectoryStateOnSurface const & updatedState() const
GlobalVector computeP(bool ComputeMode) const
bool modeIsValid() const
mode status
TrajectoryStateOnSurface const & backwardPredictedState() const
Access to backward predicted state (from smoother)
Global3DVector GlobalVector