CMS 3D CMS Logo

EmulatedME0Segment.cc
Go to the documentation of this file.
1 
8 #include <iostream>
9 
11  const LocalVector& direction,
13  const double chi2)
14  : theOrigin(origin), theLocalDirection(direction), theCovMatrix(errors), theChi2(chi2) {}
15 
17 
19  return LocalError(theCovMatrix[2][2], theCovMatrix[2][3], theCovMatrix[3][3]);
20 }
21 
23  return LocalError(theCovMatrix[0][0], theCovMatrix[0][1], theCovMatrix[1][1]);
24 }
25 
27  // For consistency with DT and what we require for the TrackingRecHit interface,
28  // the order of the parameters in the returned vector should be (dx/dz, dy/dz, x, z)
29 
31 
32  result[0] = theLocalDirection.x() / theLocalDirection.z();
33  result[1] = theLocalDirection.y() / theLocalDirection.z();
34  result[2] = theOrigin.x();
35  result[3] = theOrigin.y();
36 
37  return result;
38 }
39 
40 namespace {
42  AlgebraicMatrix m(4, 5, 0);
43  m[0][1] = 1;
44  m[1][2] = 1;
45  m[2][3] = 1;
46  m[3][4] = 1;
47  return m;
48  }
49 }; // namespace
50 
51 namespace {
53 };
54 
56 
57 //
58 void EmulatedME0Segment::print() const { std::cout << *this << std::endl; }
59 
60 std::ostream& operator<<(std::ostream& os, const EmulatedME0Segment& seg) {
61  os << "EmulatedME0Segment: local pos = " << seg.localPosition() << " posErr = ("
62  << sqrt(seg.localPositionError().xx()) << "," << sqrt(seg.localPositionError().yy()) << "0,)\n"
63  << " dir = " << seg.localDirection() << " dirErr = (" << sqrt(seg.localDirectionError().xx()) << ","
64  << sqrt(seg.localDirectionError().yy()) << "0,)\n";
65  return os;
66 }
float xx() const
Definition: LocalError.h:22
LocalVector localDirection() const override
Local direction.
EmulatedME0Segment()
Default constructor.
std::ostream & operator<<(std::ostream &os, const EmulatedME0Segment &seg)
LocalError localPositionError() const override
T y() const
Definition: PV3DBase.h:60
~EmulatedME0Segment() override
Destructor.
static const AlgebraicMatrix theProjectionMatrix
Definition: CSCSegment.cc:79
LocalPoint localPosition() const override
CLHEP::HepMatrix AlgebraicMatrix
float yy() const
Definition: LocalError.h:24
T sqrt(T t)
Definition: SSEVec.h:19
T z() const
Definition: PV3DBase.h:61
CLHEP::HepVector AlgebraicVector
AlgebraicMatrix projectionMatrix() const override
The projection matrix relates the trajectory state parameters to the segment parameters().
AlgebraicMatrix createStaticMatrix()
Definition: CSCSegment.cc:70
CLHEP::HepSymMatrix AlgebraicSymMatrix
LocalVector theLocalDirection
AlgebraicVector parameters() const override
Parameters of the segment, for the track fit in the order (dx/dz, dy/dz, x, y )
Definition: errors.py:1
LocalError localDirectionError() const override
Error on the local direction.
AlgebraicSymMatrix theCovMatrix
T x() const
Definition: PV3DBase.h:59