CMS 3D CMS Logo

TrajectoryStateOnSurface.h File Reference

#include "TrackingTools/TrajectoryState/interface/BasicTrajectoryState.h"
#include "TrackingTools/TrajectoryState/interface/SurfaceSideDefinition.h"
#include <iosfwd>

Go to the source code of this file.

Classes

class  TrajectoryStateOnSurface
 As the class name suggests, this class encapsulates the state of a trajectory on a surface. More...

Functions

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


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(), lat::endl(), TrajectoryStateOnSurface::globalParameters(), TrajectoryStateOnSurface::hasError(), i, j, TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localParameters(), m, CurvilinearTrajectoryError::matrix(), LocalTrajectoryError::matrix(), LocalTrajectoryParameters::mixedFormatVector(), TrajectoryStateOnSurface::surfaceSide(), v, and GlobalTrajectoryParameters::vector().

00006                                                                           {
00007   os << "global parameters" << endl;
00008   {
00009     const AlgebraicVector6 &v = tsos.globalParameters().vector();
00010     os << "x = ";
00011     {
00012       for (int i = 0; i < 3; i++) {
00013         os.precision(6); os.width(13); os<<v[i];
00014       }
00015     }
00016     os << endl;
00017     os << "p = ";
00018     {
00019       for (int i = 3; i < 6; i++) {
00020         os.precision(6); os.width(13); os<<v[i];
00021       }
00022     }
00023     os << endl;
00024   }
00025   if ( tsos.hasError()) {
00026     os << "global error" << endl;
00027     {
00028       const AlgebraicSymMatrix55 &m = tsos.curvilinearError().matrix();
00029       for (int i = 0; i < 5; i++) {
00030         for (int j = 0; j < 5; j++) {
00031           os.precision(6); os.width(13); os<<m(i,j);
00032         }
00033         os << endl;
00034       }
00035     }
00036   }
00037   if ( tsos.localParameters().charge()!=0 )
00038     os << "local parameters (q/p,v',w',v,w)" << endl;
00039   else
00040     os << "local parameters for neutral (1/p,v',w',v,w)" << endl;
00041   {
00042     const AlgebraicVector5 &v = tsos.localParameters().mixedFormatVector();
00043     for (int i = 0; i < 5; i++) {
00044       os.precision(6); os.width(13); os<<v[i];
00045     }
00046     os << endl;
00047   }
00048   if ( tsos.hasError()) {
00049     os << "local error" << endl;
00050     {
00051       const AlgebraicSymMatrix55 &m = tsos.localError().matrix();
00052       for (int i = 0; i < 5; i++) {
00053         for (int j = 0; j < 5; j++) {
00054           os.precision(6); os.width(13); os<<m(i,j);
00055         }
00056         os << endl;
00057       }
00058     }
00059   }
00060   os << "Defined at ";
00061   if ( tsos.surfaceSide()==beforeSurface )  os << "beforeSurface";
00062   else if ( tsos.surfaceSide()==afterSurface )  os << "afterSurface";
00063   else  os << "atCenterOfSurface";
00064   os << endl;
00065   return os;
00066 }


Generated on Tue Jun 9 17:56:01 2009 for CMSSW by  doxygen 1.5.4