CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/TrackingTools/TrajectoryState/src/TrajectoryStateOnSurface.cc

Go to the documentation of this file.
00001 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
00002 #include "TrackingTools/TrajectoryState/interface/BasicSingleTrajectoryState.h"
00003 
00004 typedef BasicSingleTrajectoryState              BTSOS;
00005 
00006 TrajectoryStateOnSurface::
00007 TrajectoryStateOnSurface(const FreeTrajectoryState& fts,
00008                          const Surface& aSurface, const SurfaceSide side) :
00009   Base( new BTSOS( fts, aSurface, side)) {}
00010 
00011 TrajectoryStateOnSurface::
00012 TrajectoryStateOnSurface(const GlobalTrajectoryParameters& gp,
00013                          const Surface& aSurface, const SurfaceSide side) :
00014   Base( new BTSOS( gp, aSurface, side)) {}
00015 
00016 TrajectoryStateOnSurface::
00017 TrajectoryStateOnSurface( const GlobalTrajectoryParameters& gp,
00018                           const CartesianTrajectoryError& err,
00019                           const Surface& aSurface, const SurfaceSide side) :
00020   Base( new BTSOS( gp, err, aSurface, side)) {}
00021 
00022 TrajectoryStateOnSurface::
00023 TrajectoryStateOnSurface( const GlobalTrajectoryParameters& gp,
00024                           const CurvilinearTrajectoryError& err,
00025                           const Surface& aSurface, const SurfaceSide side, double weight) :
00026   Base( new BTSOS( gp, err, aSurface, side, weight)) {}
00027 
00028 TrajectoryStateOnSurface::
00029 TrajectoryStateOnSurface( const GlobalTrajectoryParameters& gp,
00030                           const CurvilinearTrajectoryError& err,
00031                           const Surface& aSurface, double weight) :
00032   Base( new BTSOS( gp, err, aSurface, SurfaceSideDefinition::atCenterOfSurface, weight)) {}
00033 
00034 TrajectoryStateOnSurface::
00035 TrajectoryStateOnSurface( const LocalTrajectoryParameters& p,
00036                           const Surface& aSurface, 
00037                           const MagneticField* field, 
00038                           const SurfaceSide side) :
00039   Base( new BTSOS( p, aSurface, field, side)) {}
00040 
00041 TrajectoryStateOnSurface::
00042 TrajectoryStateOnSurface( const LocalTrajectoryParameters& p,
00043                           const LocalTrajectoryError& err,
00044                           const Surface& aSurface, 
00045                           const MagneticField* field, 
00046                           const SurfaceSide side, double weight) :
00047   Base( new BTSOS( p, err, aSurface, field, side, weight)) {}
00048 
00049 TrajectoryStateOnSurface::
00050 TrajectoryStateOnSurface( const LocalTrajectoryParameters& p,
00051                           const LocalTrajectoryError& err,
00052                           const Surface& aSurface, 
00053                           const MagneticField* field, 
00054                           double weight) :
00055   Base( new BTSOS( p, err, aSurface, field, SurfaceSideDefinition::atCenterOfSurface, weight)) {}
00056 
00057 
00058 void
00059 TrajectoryStateOnSurface::
00060 update( const LocalTrajectoryParameters& p,
00061         const Surface& aSurface,
00062         const MagneticField* field,
00063         const SurfaceSide side) 
00064 {
00065     if (data().canUpdateLocalParameters()) {
00066         unsharedData().update(p, aSurface, field, side);
00067     } else {
00068         *this = TrajectoryStateOnSurface(p, aSurface, field, side);
00069     }
00070 }
00071 
00072 void
00073 TrajectoryStateOnSurface::
00074 update( const LocalTrajectoryParameters& p,
00075         const LocalTrajectoryError& err,
00076         const Surface& aSurface,
00077         const MagneticField* field,
00078         const SurfaceSide side, 
00079         double weight) 
00080 {
00081    if (data().canUpdateLocalParameters()) {
00082         unsharedData().update(p, err, aSurface, field, side, weight);
00083     } else {
00084         *this = TrajectoryStateOnSurface(p, err, aSurface, field, side, weight);
00085     }
00086 }