CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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(), i, j, TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localParameters(), contentValuesFiles::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); os.width(13); os<<v[i];
14  }
15  }
16  os << endl;
17  os << "p = ";
18  {
19  for (int i = 3; i < 6; i++) {
20  os.precision(6); os.width(13); os<<v[i];
21  }
22  }
23  os << endl;
24  }
25  if ( tsos.hasError()) {
26  os << "global error" << endl;
27  {
29  for (int i = 0; i < 5; i++) {
30  for (int j = 0; j < 5; j++) {
31  os.precision(6); os.width(13); os<<m(i,j);
32  }
33  os << endl;
34  }
35  }
36  }
37  if ( tsos.localParameters().charge()!=0 )
38  os << "local parameters (q/p,v',w',v,w)" << endl;
39  else
40  os << "local parameters for neutral (1/p,v',w',v,w)" << endl;
41  {
43  for (int i = 0; i < 5; i++) {
44  os.precision(6); os.width(13); os<<v[i];
45  }
46  os << endl;
47  }
48  if ( tsos.hasError()) {
49  os << "local error" << endl;
50  {
51  const AlgebraicSymMatrix55 &m = tsos.localError().matrix();
52  for (int i = 0; i < 5; i++) {
53  for (int j = 0; j < 5; j++) {
54  os.precision(6); os.width(13); os<<m(i,j);
55  }
56  os << endl;
57  }
58  }
59  }
60  os << "Defined at ";
61  if ( tsos.surfaceSide()==SurfaceSideDefinition::beforeSurface ) os << "beforeSurface";
62  else if ( tsos.surfaceSide()==SurfaceSideDefinition::afterSurface ) os << "afterSurface";
63  else os << "atCenterOfSurface";
64  os << endl;
65 
66  // magnetic field
67  os << "Magnetic field in inverse GeV: " << tsos.globalParameters().magneticFieldInInverseGeV(tsos.globalPosition());
68  os <<endl;
69 
70  return os;
71 }
int i
Definition: DBlmapReader.cc:9
const LocalTrajectoryParameters & localParameters() const
const CurvilinearTrajectoryError & curvilinearError() const
GlobalPoint globalPosition() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
GlobalVector magneticFieldInInverseGeV(const GlobalPoint &x) const
ROOT::Math::SVector< double, 6 > AlgebraicVector6
SurfaceSide surfaceSide() const
Position relative to material, defined relative to momentum vector.
int j
Definition: DBlmapReader.cc:9
const AlgebraicSymMatrix55 & matrix() const
const LocalTrajectoryError & localError() const
ROOT::Math::SVector< double, 5 > AlgebraicVector5
const GlobalTrajectoryParameters & globalParameters() const
AlgebraicVector5 mixedFormatVector() const
TrackCharge charge() const
Charge (-1, 0 or 1)
const AlgebraicSymMatrix55 & matrix() const
AlgebraicVector6 vector() const
void swap ( TrajectoryStateOnSurface rh,
TrajectoryStateOnSurface lh 
)
inline

Definition at line 217 of file TrajectoryStateOnSurface.h.

References TrajectoryStateOnSurface::swap().

217  {
218  // use base swap
219  rh.swap(lh);
220 }
void swap(TrajectoryStateOnSurface &rh)