CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Functions
TrajectoryStateOnSurface.h File Reference
#include "TrackingTools/TrajectoryState/interface/BasicTrajectoryState.h"
#include "TrackingTools/TrajectoryState/interface/SurfaceSideDefinition.h"
#include "TrackingTools/TrajectoryState/interface/BasicSingleTrajectoryState.h"
#include <iosfwd>

Go to the source code of this file.

Classes

class  TrajectoryStateOnSurface
 

Functions

std::ostream & operator<< (std::ostream &os, const TrajectoryStateOnSurface &tsos)
 
void swap (TrajectoryStateOnSurface &rh, TrajectoryStateOnSurface &lh)
 

Function Documentation

std::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(), 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 }
const LocalTrajectoryParameters & localParameters() const
const CurvilinearTrajectoryError & curvilinearError() const
GlobalPoint globalPosition() const
GlobalVector magneticFieldInInverseGeV(const GlobalPoint &x) const
SurfaceSide surfaceSide() const
Position relative to material, defined relative to momentum vector.
ROOT::Math::SVector< double, 5 > AlgebraicVector5
const AlgebraicSymMatrix55 & matrix() const
const LocalTrajectoryError & localError() const
const GlobalTrajectoryParameters & globalParameters() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
AlgebraicVector5 mixedFormatVector() const
TrackCharge charge() const
Charge (-1, 0 or 1)
const AlgebraicSymMatrix55 & matrix() const
ROOT::Math::SVector< double, 6 > AlgebraicVector6
AlgebraicVector6 vector() const
void swap ( TrajectoryStateOnSurface rh,
TrajectoryStateOnSurface lh 
)
inline

Definition at line 122 of file TrajectoryStateOnSurface.h.

References TrajectoryStateOnSurface::swap().

122  {
123  // use base swap
124  rh.swap(lh);
125 }
void swap(TrajectoryStateOnSurface &rh) noexcept