19 edm::LogVerbatim(
"CSCSegFit") <<
"[CSCSegFit::fit] - cannot fit just 1 hit!!";
31 edm::LogVerbatim(
"CSCSegFit") <<
"[CSCSegFit::fit] - cannot fit more than 6 hits!!";
43 CSCSetOfHits::const_iterator ih =
hits_.begin();
44 int il1 = (*ih)->cscDetId().layer();
52 edm::LogVerbatim(
"CSCSegFit") <<
"[CSCSegFit:fit]2 - 2 hits on same layer!!";
66 float dz = h2pos.
z()-h1pos.
z();
68 uslope_ = ( h2pos.
x() - h1pos.
x() ) / dz ;
69 vslope_ = ( h2pos.
y() - h1pos.
y() ) / dz ;
71 float uintercept = ( h1pos.
x()*h2pos.
z() - h2pos.
x()*h1pos.
z() ) / dz;
72 float vintercept = ( h1pos.
y()*h2pos.
z() - h2pos.
y()*h1pos.
z() ) / dz;
158 CSCSetOfHits::const_iterator ih =
hits_.begin();
160 for (ih =
hits_.begin(); ih !=
hits_.end(); ++ih) {
182 bool ok = IC.Invert();
184 edm::LogVerbatim(
"CSCSegment|CSCSegFit") <<
"[CSCSegFit::fit] Failed to invert covariance matrix: \n" << IC;
190 M(0,2) += IC(0,0) *
z;
191 M(0,3) += IC(0,1) *
z;
192 B(0) += u * IC(0,0) + v * IC(0,1);
196 M(1,2) += IC(1,0) *
z;
197 M(1,3) += IC(1,1) *
z;
198 B(1) += u * IC(1,0) + v * IC(1,1);
200 M(2,0) += IC(0,0) *
z;
201 M(2,1) += IC(0,1) *
z;
202 M(2,2) += IC(0,0) * z *
z;
203 M(2,3) += IC(0,1) * z *
z;
204 B(2) += ( u * IC(0,0) + v * IC(0,1) ) * z;
206 M(3,0) += IC(1,0) *
z;
207 M(3,1) += IC(1,1) *
z;
208 M(3,2) += IC(1,0) * z *
z;
209 M(3,3) += IC(1,1) * z *
z;
210 B(3) += ( u * IC(1,0) + v * IC(1,1) ) * z;
215 bool ok = M.Invert();
217 edm::LogVerbatim(
"CSCSegment|CSCSegFit") <<
"[CSCSegFit::fit] Failed to invert matrix: \n" << M;
250 CSCSetOfHits::const_iterator ih;
251 for (ih =
hits_.begin(); ih !=
hits_.end(); ++ih) {
278 bool ok = IC.Invert();
280 edm::LogVerbatim(
"CSCSegment|CSCSegFit") <<
"[CSCSegFit::setChi2] Failed to invert covariance matrix: \n" << IC;
284 chsq += du*du*IC(0,0) + 2.*du*dv*IC(0,1) + dv*dv*IC(1,1);
306 for (CSCSetOfHits::const_iterator it =
hits_.begin(); it !=
hits_.end(); ++it) {
320 ok = matrix.Invert();
322 edm::LogVerbatim(
"CSCSegment|CSCSegFit") <<
"[CSCSegFit::weightMatrix] Failed to invert matrix: \n" <<
matrix;
336 for( CSCSetOfHits::const_iterator it =
hits_.begin(); it !=
hits_.end(); ++it) {
361 double dz = 1./
sqrt(1. + dxdz*dxdz + dydz*dydz);
372 double directionSign = globalZpos * globalZdir;
391 ok = result.Invert();
393 edm::LogVerbatim(
"CSCSegment|CSCSegFit") <<
"[CSCSegFit::calculateError] Failed to invert matrix: \n" <<
result;
416 for (
short j=0;
j!=4; ++
j) {
417 for (
short i=0;
i!=4; ++
i) {
418 hold(
i+1,
j+1) =
a(
i,
j);
CSCDetId cscDetId() const
ROOT::Math::SMatrix< double, 12, 4 > SMatrix12by4
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
AlgebraicSymMatrix flipErrors(const SMatrixSym4 &)
float Rdev(float x, float y, float z) const
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
LocalError localPositionError() const
ROOT::Math::SMatrix< double, 4, 4, ROOT::Math::MatRepSym< double, 4 > > SMatrixSym4
ROOT::Math::SVector< double, 4 > SVector4
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to the given id.
float xfit(float z) const
ROOT::Math::SMatrix< double, 12, 12, ROOT::Math::MatRepSym< double, 12 > > SMatrixSym12
float xdev(float x, float z) const
ROOT::Math::SMatrix< double, 4 > SMatrix4
AlgebraicSymMatrix covarianceMatrix(void)
float ydev(float y, float z) const
const CSCChamber * chamber() const
SMatrixSym12 weightMatrix(void)
SMatrix12by4 derivativeMatrix(void)
CLHEP::HepSymMatrix AlgebraicSymMatrix
ROOT::Math::SMatrix< double, 2, 2, ROOT::Math::MatRepSym< double, 2 > > SMatrixSym2
LocalPoint localPosition() const
double scaleXError(void) const
float yfit(float z) const