Method updating the states. Takes a vector of full parameters: (x,y,z,particle_1,...,particle_n), corresponding linearization point: vector of states and GlobalPoint, and constraint to be applied during the vertex fit. Returns refitted vector of 7n+3 parameters and corresponding covariance matrix, where n - number of tracks.
95 int vSize = lStates.size();
97 assert( nConstraint==0 || cs!=
nullptr);
98 assert(vSize == nConstraint);
107 for(std::vector<KinematicState>::const_iterator
i = lStates.begin();
i != lStates.end();
i++)
108 for (
int j=0; j<7; j++) {
118 if( nConstraint !=0) {
119 cs->
init(lStates, lPoint, fieldValue);
134 v_g_sym = ROOT::Math::Similarity(
g,inCov);
139 edm::LogWarning(
"KinematicConstrainedVertexUpdatorFailed")<<
"invert failed\n" 141 LogDebug(
"KinematicConstrainedVertexFitter3")
142 <<
"Fit failed: unable to invert SYM gain matrix\n";
152 finPar = inPar - inCov * (ROOT::Math::Transpose(
g) *
lambda);
155 ROOT::Math::SMatrix<double,3+7*nTrk,3+7*nTrk,ROOT::Math::MatRepSym<double,3+7*nTrk> >
prod = ROOT::Math::SimilarityT(
g,
v_g_sym);
156 ROOT::Math::SMatrix<double,3+7*nTrk,3+7*nTrk,ROOT::Math::MatRepSym<double,3+7*nTrk> > prod1;
157 ROOT::Math::AssignSym::Evaluate(prod1, inCov * prod * inCov);
161 pCov = inCov.template Sub< ROOT::Math::SMatrix<double,3,3,ROOT::Math::MatRepSym<double,3> > >(0,0);
164 double chi = ROOT::Math::Dot(
lambda,val);
168 float ndf = 2*vSize - 3;
180 for(std::vector<KinematicState>::iterator i_st=lStates.begin(); i_st != lStates.end(); i_st++)
182 for(
int i =0;
i<7;
i++)
183 {newPar(
i) =
finPar(3 + i_int*7 +
i);}
185 nCovariance = inCov.template Sub<ROOT::Math::SMatrix<double, 7,7,ROOT::Math::MatRepSym<double,7> > >(3 + i_int*7, 3 + i_int*7);
ROOT::Math::SVector< double, 3+7 *nTrk > finPar
void init(const std::vector< KinematicState > &states, const GlobalPoint &point, const GlobalVector &mf) override
ROOT::Math::SMatrix< double, nConstraint+4, 3+7 *nTrk > g
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
ROOT::Math::SVector< double, 7 > AlgebraicVector7
ROOT::Math::SVector< double, nConstraint+4 > val
VertexKinematicConstraintT vConstraint
bool invertPosDefMatrix(ROOT::Math::SMatrix< T, N, N, ROOT::Math::MatRepSym< T, N > > &m)
ROOT::Math::SMatrix< double, 7, 7, ROOT::Math::MatRepSym< double, 7 > > nCovariance
parametersDerivativeType const & parametersDerivative() const
ReferenceCountingPointer< KinematicVertex > RefCountedKinematicVertex
positionDerivativeType const & positionDerivative() const
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > pCov
ROOT::Math::SVector< double, 3+7 *nTrk > delta_alpha
ROOT::Math::SVector< double, nConstraint+4 > lambda
static RefCountedKinematicVertex vertex(const VertexState &state, float totalChiSq, float degreesOfFr)
ROOT::Math::SMatrix< double, nConstraint+4, nConstraint+4, ROOT::Math::MatRepSym< double, nConstraint+4 > > v_g_sym
virtual void init(const std::vector< KinematicState > &states, const GlobalPoint &point, const GlobalVector &mf)=0
KinematicVertexFactory vFactory
valueType const & value() const