CMS 3D CMS Logo

print.cc
Go to the documentation of this file.
3 #include <sstream>
4 
5 using namespace std;
6 
7 namespace reco
8 {
9 
10 string print(const Track &trk, edm::Verbosity v)
11 {
12  ostringstream out;
13  if (v > edm::Silent) {
14  out << "track parameters: "
15  << " vtx = " << trk.vertex()
16  << " p = " << trk.momentum()
17  << endl;
18  }
19 
20  if (v >= edm::Detailed) {
21  out << "covariance" << endl;
22  for (int i = 0; i < 5; i++) {
23  for (int j = 0; j < 5; j++) {
24  out.precision(6);
25  out.width(13);
26  out << trk.covariance(i, j);
27  }
28  out << endl;
29  }
30  out << endl;
31  }
32  return out.str();
33 }
34 
35 } // namespace reco
36 
std::string print(const Track &, edm::Verbosity=edm::Concise)
Track print utility.
Definition: print.cc:10
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:670
Verbosity
Definition: Verbosity.h:5
const Point & vertex() const
reference point on the track. This method is DEPRECATED, please use referencePoint() instead ...
Definition: TrackBase.h:682
CovarianceMatrix covariance() const
return track covariance matrix
Definition: TrackBase.h:726
fixed size matrix