6 diagonalOnly_(iConfig.getParameter<bool>(
"diagonalOnly")),
7 usePosition_(iConfig.getParameter<bool>(
"usePosition")),
20 if (traj.size() != 1) {
29 const std::vector<TrajectoryMeasurement> &tms = trajectory.
measurements();
33 for (
int itm = 3, nm = tms.size() - 3; itm < nm; ++itm) {
41 GlobalPoint pos = (tms[itm].updatedState().isValid() ? tms[itm].updatedState() : pre).globalPosition();
45 if (!found) quality.
trkKink = 999;
50 if (!start.
hasError() && !other.
hasError())
throw cms::Exception(
"LogicError") <<
"At least one of the two states must have errors to make chi2s.\n";
56 return ROOT::Math::Similarity(
diff, cov);
62 for (
size_t i = 0;
i < 5; ++
i) {
for (
size_t j =
i+1; j < 5; ++j) {
70 if (
diagonalOnly_) { momCov(0,1) = 0; momCov(0,2) = 0; momCov(1,2) = 0; }
74 cov.Place_at(momCov,0,0);
76 for (
size_t i = 3;
i < 5; ++
i) {
for (
size_t j =
i; j < 5; ++j) {
double getChi2(const TrajectoryStateOnSurface &start, const TrajectoryStateOnSurface &other) const
void cropAndInvert(AlgebraicSymMatrix55 &cov) const
bool diagonalOnly_
use only on-diagonal terms of the covariance matrices
const LocalTrajectoryParameters & localParameters() const
TrackTransformer refitter_
Track Transformer.
float trkKink
value of the kink algorithm applied to the inner track stub
MuonKinkFinder(const edm::ParameterSet &iConfig)
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
DataContainer const & measurements() const
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
void init(const edm::EventSetup &iSetup)
const AlgebraicSymMatrix55 & matrix() const
const LocalTrajectoryError & localError() const
ROOT::Math::SVector< double, 5 > AlgebraicVector5
XYZPointD XYZPoint
point in space with cartesian internal representation
AlgebraicVector5 mixedFormatVector() const
math::XYZPoint tkKink_position
Kink position for the tracker stub and global track.
bool usePosition_
if true, use full 5x5 track state; if false, use only the track direction
bool fillTrkKink(reco::MuonQuality &quality, const Trajectory &trajectory) const