114 if (!linTrack1 || !linTrack2)
return false;
126 int checkInversion = 0;
129 std::pair< AlgebraicMatrix, AlgebraicMatrix > derivatives = tpeDerivatives.
derivatives( linearizationPoint );
132 std::pair< AlgebraicVector, AlgebraicVector > linCartMomenta = decayModel.
cartesianSecondaryMomenta( linearizationPoint );
140 AlgebraicMatrix curv2cart1 = decayModel.curvilinearToCartesianJacobian( curvMomentum1, zMagField );
142 AlgebraicVector cartMomentum1 = decayModel.convertCurvilinearToCartesian( curvMomentum1, zMagField );
143 vecC1 += matB1*( curvMomentum1 - curv2cart1*cartMomentum1 );
144 matB1 = matB1*curv2cart1;
153 if ( checkInversion != 0 )
155 LogDebug(
"Alignment" ) <<
"@SUB=TwoBodyDecayEstimator::constructMatrices" 156 <<
"Matrix covM1 not invertible.";
169 AlgebraicMatrix curv2cart2 = decayModel.curvilinearToCartesianJacobian( curvMomentum2, zMagField );
171 AlgebraicVector cartMomentum2 = decayModel.convertCurvilinearToCartesian( curvMomentum2, zMagField );
172 vecC2 += matB2*( curvMomentum2 - curv2cart2*cartMomentum2 );
173 matB2 = matB2*curv2cart2;
181 if ( checkInversion != 0 )
183 LogDebug(
"Alignment" ) <<
"@SUB=TwoBodyDecayEstimator::constructMatrices" 184 <<
"Matrix covM2 not invertible.";
193 vecM.sub( 1, matU1*vecM1 );
194 vecM.sub( 6, matU2*vecM2 );
202 matG.sub( 1, matG1 );
203 matG.sub( 6, matG2 );
207 matG.sub( 12, vm.
beamSpotError().inverse( checkInversion ) );
211 matA.sub( 1, 1, matU1*matA1 );
212 matA.sub( 6, 1, matU2*matA2 );
213 matA.sub( 1, 4, matU1*matB1*matF1 );
214 matA.sub( 6, 4, matU2*matB2*matF2 );
bool checkValues(const AlgebraicVector &vec) const
CLHEP::HepMatrix asHepMatrix(const ROOT::Math::SMatrix< double, N1, N2, typename ROOT::Math::MatRepStd< double, N1, N2 > > &rm)
const AlgebraicVector & parameters(void) const
Get decay parameters.
const GlobalPoint & linearizationPoint() const override
const MagneticField * field() const
AlgebraicVector3 predictedStateMomentumParameters() const override
const std::pair< AlgebraicMatrix, AlgebraicMatrix > derivatives(const TwoBodyDecay &tbd) const
const AlgebraicVector beamSpotPosition(void) const
GlobalVector inInverseGeV(const GlobalPoint &gp) const
Field value ad specified global point, in 1/Gev.
CLHEP::HepMatrix AlgebraicMatrix
const double & primaryWidth(void) const
const AlgebraicSymMatrix beamSpotError(void) const
reco::TransientTrack track() const override
CLHEP::HepVector AlgebraicVector
AlgebraicSymMatrix55 predictedStateError() const override
const AlgebraicMatrix53 & momentumJacobian() const override
const AlgebraicVector5 & constantTerm() const override
const AlgebraicMatrix53 & positionJacobian() const override
const AlgebraicVector sub(ParameterName first, ParameterName last) const
Get specified range of decay parameters.
const double & secondaryMass(void) const
CLHEP::HepSymMatrix AlgebraicSymMatrix
CLHEP::HepVector asHepVector(const ROOT::Math::SVector< double, N > &v)
const std::pair< AlgebraicVector, AlgebraicVector > cartesianSecondaryMomenta(const AlgebraicVector ¶m)
AlgebraicVector5 predictedStateParameters() const override
const double & primaryMass(void) const