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.

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 }

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(), TrajectoryStateOnSurface::surfaceSide(), findQualityFiles::v, and GlobalTrajectoryParameters::vector().

mps_fire.i
i
Definition: mps_fire.py:428
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition: TrajectoryStateOnSurface.h:65
SurfaceSideDefinition::afterSurface
Definition: SurfaceSideDefinition.h:8
LocalTrajectoryError::matrix
const AlgebraicSymMatrix55 & matrix() const
Definition: LocalTrajectoryError.h:60
findQualityFiles.v
v
Definition: findQualityFiles.py:179
TrajectoryStateOnSurface::hasError
bool hasError() const
Definition: TrajectoryStateOnSurface.h:56
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
SurfaceSideDefinition::beforeSurface
Definition: SurfaceSideDefinition.h:8
GlobalTrajectoryParameters::vector
AlgebraicVector6 vector() const
Definition: GlobalTrajectoryParameters.h:97
LocalTrajectoryParameters::charge
TrackCharge charge() const
Charge (-1, 0 or 1)
Definition: LocalTrajectoryParameters.h:110
TrajectoryStateOnSurface::localParameters
const LocalTrajectoryParameters & localParameters() const
Definition: TrajectoryStateOnSurface.h:73
LocalTrajectoryParameters::mixedFormatVector
AlgebraicVector5 mixedFormatVector() const
Definition: LocalTrajectoryParameters.h:135
AlgebraicVector5
ROOT::Math::SVector< double, 5 > AlgebraicVector5
Definition: AlgebraicROOTObjects.h:14
AlgebraicVector6
ROOT::Math::SVector< double, 6 > AlgebraicVector6
Definition: AlgebraicROOTObjects.h:15
TrajectoryStateOnSurface::curvilinearError
const CurvilinearTrajectoryError & curvilinearError() const
Definition: TrajectoryStateOnSurface.h:72
GlobalTrajectoryParameters::magneticFieldInInverseGeV
GlobalVector magneticFieldInInverseGeV(const GlobalPoint &x) const
Definition: GlobalTrajectoryParameters.cc:35
TrajectoryStateOnSurface::globalParameters
const GlobalTrajectoryParameters & globalParameters() const
Definition: TrajectoryStateOnSurface.h:64
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
TrajectoryStateOnSurface::localError
const LocalTrajectoryError & localError() const
Definition: TrajectoryStateOnSurface.h:77
AlgebraicSymMatrix55
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
Definition: AlgebraicROOTObjects.h:23
TrajectoryStateOnSurface::surfaceSide
SurfaceSide surfaceSide() const
Position relative to material, defined relative to momentum vector.
Definition: TrajectoryStateOnSurface.h:89
CurvilinearTrajectoryError::matrix
const AlgebraicSymMatrix55 & matrix() const
Definition: CurvilinearTrajectoryError.h:61