CMS 3D CMS Logo

Functions
TrajectoryStateOnSurfacePrint.cc File Reference
#include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
#include <ostream>

Go to the source code of this file.

Functions

ostream & operator<< (std::ostream &os, const TrajectoryStateOnSurface &tsos)
 

Function Documentation

◆ operator<<()

ostream& operator<< ( std::ostream &  os,
const TrajectoryStateOnSurface tsos 
)

Definition at line 6 of file TrajectoryStateOnSurfacePrint.cc.

References SurfaceSideDefinition::afterSurface, SurfaceSideDefinition::beforeSurface, LocalTrajectoryParameters::charge(), TrajectoryStateOnSurface::curvilinearError(), TrajectoryStateOnSurface::globalParameters(), TrajectoryStateOnSurface::globalPosition(), TrajectoryStateOnSurface::hasError(), mps_fire::i, dqmiolumiharvest::j, TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localParameters(), visualization-live-secondInstance_cfg::m, GlobalTrajectoryParameters::magneticFieldInInverseGeV(), LocalTrajectoryError::matrix(), CurvilinearTrajectoryError::matrix(), LocalTrajectoryParameters::mixedFormatVector(), l1tGTMenu_BTagSeeds_cff::os, TrajectoryStateOnSurface::surfaceSide(), findQualityFiles::v, and GlobalTrajectoryParameters::vector().

6  {
7  os << "global parameters" << endl;
8  {
9  const AlgebraicVector6 &v = tsos.globalParameters().vector();
10  os << "x = ";
11  {
12  for (int i = 0; i < 3; i++) {
13  os.precision(6);
14  os.width(13);
15  os << v[i];
16  }
17  }
18  os << endl;
19  os << "p = ";
20  {
21  for (int i = 3; i < 6; i++) {
22  os.precision(6);
23  os.width(13);
24  os << v[i];
25  }
26  }
27  os << endl;
28  }
29  if (tsos.hasError()) {
30  os << "global error" << endl;
31  {
33  for (int i = 0; i < 5; i++) {
34  for (int j = 0; j < 5; j++) {
35  os.precision(6);
36  os.width(13);
37  os << m(i, j);
38  }
39  os << endl;
40  }
41  }
42  }
43  if (tsos.localParameters().charge() != 0)
44  os << "local parameters (q/p,v',w',v,w)" << endl;
45  else
46  os << "local parameters for neutral (1/p,v',w',v,w)" << endl;
47  {
49  for (int i = 0; i < 5; i++) {
50  os.precision(6);
51  os.width(13);
52  os << v[i];
53  }
54  os << endl;
55  }
56  if (tsos.hasError()) {
57  os << "local error" << endl;
58  {
59  const AlgebraicSymMatrix55 &m = tsos.localError().matrix();
60  for (int i = 0; i < 5; i++) {
61  for (int j = 0; j < 5; j++) {
62  os.precision(6);
63  os.width(13);
64  os << m(i, j);
65  }
66  os << endl;
67  }
68  }
69  }
70  os << "Defined at ";
72  os << "beforeSurface";
74  os << "afterSurface";
75  else
76  os << "atCenterOfSurface";
77  os << endl;
78 
79  // magnetic field
80  os << "Magnetic field in inverse GeV: " << tsos.globalParameters().magneticFieldInInverseGeV(tsos.globalPosition());
81  os << endl;
82 
83  return os;
84 }
SurfaceSide surfaceSide() const
Position relative to material, defined relative to momentum vector.
const LocalTrajectoryError & localError() const
const GlobalTrajectoryParameters & globalParameters() const
const LocalTrajectoryParameters & localParameters() const
GlobalPoint globalPosition() const
ROOT::Math::SVector< double, 5 > AlgebraicVector5
GlobalVector magneticFieldInInverseGeV(const GlobalPoint &x) const
TrackCharge charge() const
Charge (-1, 0 or 1)
AlgebraicVector5 mixedFormatVector() const
const CurvilinearTrajectoryError & curvilinearError() const
const AlgebraicSymMatrix55 & matrix() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
const AlgebraicSymMatrix55 & matrix() const
ROOT::Math::SVector< double, 6 > AlgebraicVector6