CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/TrackingTools/PatternTools/interface/TrajectoryMeasurement.h

Go to the documentation of this file.
00001 #ifndef _TRACKER_TRAJECTORYMEASUREMENT_H_
00002 #define _TRACKER_TRAJECTORYMEASUREMENT_H_
00003 
00004 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
00005 #include "boost/intrusive_ptr.hpp" 
00006 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h"
00007 #include<algorithm>
00008 
00009 class DetLayer;
00010 
00025 class TrajectoryMeasurement {
00026 public:
00027 
00028   typedef TransientTrackingRecHit::RecHitPointer         RecHitPointer;
00029   typedef TransientTrackingRecHit::ConstRecHitPointer    ConstRecHitPointer;
00030 
00031   TrajectoryMeasurement() {}
00032 
00034   TrajectoryMeasurement(TrajectoryStateOnSurface fwdTrajectoryStateOnSurface,
00035                         ConstRecHitPointer aRecHit) :
00036     theFwdPredictedState(fwdTrajectoryStateOnSurface),
00037     theUpdatedState(fwdTrajectoryStateOnSurface),
00038     theRecHit(aRecHit),
00039     theEstimate(0), theLayer(0) {}
00040 
00042   TrajectoryMeasurement(TrajectoryStateOnSurface fwdTrajectoryStateOnSurface,
00043                         ConstRecHitPointer aRecHit, float aEstimate) :
00044     theFwdPredictedState(fwdTrajectoryStateOnSurface),
00045     theUpdatedState(fwdTrajectoryStateOnSurface),
00046     theRecHit(aRecHit),
00047     theEstimate(aEstimate), theLayer(0) {}
00048   TrajectoryMeasurement(TrajectoryStateOnSurface fwdTrajectoryStateOnSurface,
00049                         ConstRecHitPointer aRecHit, float aEstimate,
00050                         const DetLayer* layer) :
00051     theFwdPredictedState(fwdTrajectoryStateOnSurface),
00052     theUpdatedState(fwdTrajectoryStateOnSurface),
00053     theRecHit(aRecHit),
00054     theEstimate(aEstimate), theLayer(layer) {}
00055 
00057   TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface,
00058                         TrajectoryStateOnSurface uTrajectoryStateOnSurface,
00059                         ConstRecHitPointer aRecHit) :
00060     theFwdPredictedState(fwdPredTrajectoryStateOnSurface),
00061     theUpdatedState(uTrajectoryStateOnSurface),
00062     theRecHit(aRecHit),
00063     theEstimate(0), theLayer(0) {}
00064 
00066   TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface,
00067                         TrajectoryStateOnSurface uTrajectoryStateOnSurface,
00068                         ConstRecHitPointer aRecHit, float aEstimate) :
00069     theFwdPredictedState(fwdPredTrajectoryStateOnSurface),
00070     theUpdatedState(uTrajectoryStateOnSurface),
00071     theRecHit(aRecHit),
00072     theEstimate(aEstimate), theLayer(0) {}
00073   TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface,
00074                         TrajectoryStateOnSurface uTrajectoryStateOnSurface,
00075                         ConstRecHitPointer aRecHit, float aEstimate,
00076                         const DetLayer* layer) :
00077     theFwdPredictedState(fwdPredTrajectoryStateOnSurface),
00078     theUpdatedState(uTrajectoryStateOnSurface),
00079     theRecHit(aRecHit),
00080     theEstimate(aEstimate), theLayer(layer) {}
00081 
00085   TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface,
00086                         TrajectoryStateOnSurface bwdPredTrajectoryStateOnSurface,
00087                         TrajectoryStateOnSurface uTrajectoryStateOnSurface,
00088                         ConstRecHitPointer aRecHit) :
00089     theFwdPredictedState(fwdPredTrajectoryStateOnSurface),
00090     theBwdPredictedState(bwdPredTrajectoryStateOnSurface),
00091     theUpdatedState(uTrajectoryStateOnSurface),
00092     theRecHit(aRecHit),
00093     theEstimate(0), theLayer(0) {}
00094 
00098   TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface,
00099                         TrajectoryStateOnSurface bwdPredTrajectoryStateOnSurface,
00100                         TrajectoryStateOnSurface uTrajectoryStateOnSurface,
00101                         ConstRecHitPointer aRecHit, float aEstimate) :
00102     theFwdPredictedState(fwdPredTrajectoryStateOnSurface),
00103     theBwdPredictedState(bwdPredTrajectoryStateOnSurface),
00104     theUpdatedState(uTrajectoryStateOnSurface),
00105     theRecHit(aRecHit),
00106     theEstimate(aEstimate), theLayer(0) {}
00107   TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface,
00108                         TrajectoryStateOnSurface bwdPredTrajectoryStateOnSurface,
00109                         TrajectoryStateOnSurface uTrajectoryStateOnSurface,
00110                         ConstRecHitPointer aRecHit, float aEstimate,
00111                         const DetLayer* layer) :
00112     theFwdPredictedState(fwdPredTrajectoryStateOnSurface),
00113     theBwdPredictedState(bwdPredTrajectoryStateOnSurface),
00114     theUpdatedState(uTrajectoryStateOnSurface),
00115     theRecHit(aRecHit),
00116     theEstimate(aEstimate), theLayer(layer) {}
00117 
00118  
00119 #if defined( __GXX_EXPERIMENTAL_CXX0X__)
00120   TrajectoryMeasurement( TrajectoryMeasurement && rh) :
00121     theFwdPredictedState(std::move(rh.theFwdPredictedState)),
00122     theBwdPredictedState(std::move(rh.theBwdPredictedState)),
00123     theUpdatedState(std::move(rh.theUpdatedState)),
00124     theRecHit(std::move(rh.theRecHit)),
00125     theEstimate(rh.theEstimate), theLayer(rh.theLayer) {}
00126 
00127   TrajectoryMeasurement & operator=( TrajectoryMeasurement && rh) {
00128     using std::swap;
00129     swap(theFwdPredictedState,rh.theFwdPredictedState);
00130     swap(theBwdPredictedState,rh.theBwdPredictedState);
00131     swap(theUpdatedState,rh.theUpdatedState);
00132     swap(theRecHit,rh.theRecHit);
00133     theEstimate=rh.theEstimate;
00134     theLayer=rh.theLayer;
00135 
00136     return *this;
00137 
00138   }
00139  
00140 #endif
00141 
00142 
00146   TrajectoryStateOnSurface  predictedState() const {
00147     return theFwdPredictedState;
00148   }
00149 
00151   TrajectoryStateOnSurface forwardPredictedState() const {
00152     return theFwdPredictedState;
00153   }
00155   TrajectoryStateOnSurface backwardPredictedState() const {
00156     return theBwdPredictedState;
00157   }
00158 
00162   TrajectoryStateOnSurface updatedState() const {
00163     return theUpdatedState;
00164   }
00165 
00166   ConstRecHitPointer recHit() const {
00167     return theRecHit;
00168   }
00169 
00170   float estimate() const { return theEstimate;}
00171 
00172   const DetLayer* layer() const { return theLayer;}
00173 
00174   void setLayer( const DetLayer* il) { theLayer=il;}
00175 
00176 private:
00177   TrajectoryStateOnSurface theFwdPredictedState;
00178   TrajectoryStateOnSurface theBwdPredictedState;
00179   TrajectoryStateOnSurface theUpdatedState;
00180   ConstRecHitPointer       theRecHit;
00181   float theEstimate;
00182   const DetLayer* theLayer;
00183 };
00184 
00185 #endif