CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/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     theLayer(0), theEstimate(0) {}
00040 
00042   TrajectoryMeasurement(TrajectoryStateOnSurface fwdTrajectoryStateOnSurface,
00043                         ConstRecHitPointer aRecHit, float aEstimate) :
00044     theFwdPredictedState(fwdTrajectoryStateOnSurface),
00045     theUpdatedState(fwdTrajectoryStateOnSurface),
00046     theRecHit(aRecHit), 
00047     theLayer(0),
00048     theEstimate(aEstimate) {}
00049   TrajectoryMeasurement(TrajectoryStateOnSurface fwdTrajectoryStateOnSurface,
00050                         ConstRecHitPointer aRecHit, float aEstimate,
00051                         const DetLayer* layer) :
00052     theFwdPredictedState(fwdTrajectoryStateOnSurface),
00053     theUpdatedState(fwdTrajectoryStateOnSurface),
00054     theRecHit(aRecHit), theLayer(layer) ,
00055     theEstimate(aEstimate){}
00056 
00058   TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface,
00059                         TrajectoryStateOnSurface uTrajectoryStateOnSurface,
00060                         ConstRecHitPointer aRecHit) :
00061     theFwdPredictedState(fwdPredTrajectoryStateOnSurface),
00062     theUpdatedState(uTrajectoryStateOnSurface),
00063     theRecHit(aRecHit), theLayer(0),
00064     theEstimate(0) {}
00065 
00067   TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface,
00068                         TrajectoryStateOnSurface uTrajectoryStateOnSurface,
00069                         ConstRecHitPointer aRecHit, float aEstimate) :
00070     theFwdPredictedState(fwdPredTrajectoryStateOnSurface),
00071     theUpdatedState(uTrajectoryStateOnSurface),
00072     theRecHit(aRecHit), theLayer(0),
00073     theEstimate(aEstimate) {}
00074   TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface,
00075                         TrajectoryStateOnSurface uTrajectoryStateOnSurface,
00076                         ConstRecHitPointer aRecHit, float aEstimate,
00077                         const DetLayer* layer) :
00078     theFwdPredictedState(fwdPredTrajectoryStateOnSurface),
00079     theUpdatedState(uTrajectoryStateOnSurface),
00080     theRecHit(aRecHit), theLayer(layer),
00081     theEstimate(aEstimate) {}
00082 
00086   TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface,
00087                         TrajectoryStateOnSurface bwdPredTrajectoryStateOnSurface,
00088                         TrajectoryStateOnSurface uTrajectoryStateOnSurface,
00089                         ConstRecHitPointer aRecHit) :
00090     theFwdPredictedState(fwdPredTrajectoryStateOnSurface),
00091     theBwdPredictedState(bwdPredTrajectoryStateOnSurface),
00092     theUpdatedState(uTrajectoryStateOnSurface),
00093     theRecHit(aRecHit),
00094     theLayer(0), theEstimate(0) {}
00095 
00099   TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface,
00100                         TrajectoryStateOnSurface bwdPredTrajectoryStateOnSurface,
00101                         TrajectoryStateOnSurface uTrajectoryStateOnSurface,
00102                         ConstRecHitPointer aRecHit, float aEstimate) :
00103     theFwdPredictedState(fwdPredTrajectoryStateOnSurface),
00104     theBwdPredictedState(bwdPredTrajectoryStateOnSurface),
00105     theUpdatedState(uTrajectoryStateOnSurface),
00106     theRecHit(aRecHit),
00107     theLayer(0), theEstimate(aEstimate) {}
00108   TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface,
00109                         TrajectoryStateOnSurface bwdPredTrajectoryStateOnSurface,
00110                         TrajectoryStateOnSurface uTrajectoryStateOnSurface,
00111                         ConstRecHitPointer aRecHit, float aEstimate,
00112                         const DetLayer* layer) :
00113     theFwdPredictedState(fwdPredTrajectoryStateOnSurface),
00114     theBwdPredictedState(bwdPredTrajectoryStateOnSurface),
00115     theUpdatedState(uTrajectoryStateOnSurface),
00116     theRecHit(aRecHit),
00117     theLayer(layer), theEstimate(aEstimate) {}
00118 
00119  
00120 #if defined( __GXX_EXPERIMENTAL_CXX0X__)
00121   TrajectoryMeasurement( TrajectoryMeasurement const & rh) :
00122     theFwdPredictedState(rh.theFwdPredictedState),
00123     theBwdPredictedState(rh.theBwdPredictedState),
00124     theUpdatedState(rh.theUpdatedState),
00125     theRecHit(rh.theRecHit), theLayer(rh.theLayer),
00126     theEstimate(rh.theEstimate) {}
00127                         
00128   TrajectoryMeasurement & operator=( TrajectoryMeasurement const & rh) {   
00129     theFwdPredictedState = rh.theFwdPredictedState;   
00130     theBwdPredictedState = rh.theBwdPredictedState;
00131     theUpdatedState = rh.theUpdatedState;
00132     theRecHit = rh.theRecHit;
00133     theEstimate=rh.theEstimate;
00134     theLayer=rh.theLayer;
00135 
00136     return *this;
00137 
00138   }
00139 
00140 
00141   TrajectoryMeasurement( TrajectoryMeasurement && rh) :
00142     theFwdPredictedState(std::move(rh.theFwdPredictedState)),
00143     theBwdPredictedState(std::move(rh.theBwdPredictedState)),
00144     theUpdatedState(std::move(rh.theUpdatedState)),
00145     theRecHit(std::move(rh.theRecHit)), theLayer(rh.theLayer),
00146     theEstimate(rh.theEstimate) {}
00147 
00148   TrajectoryMeasurement & operator=( TrajectoryMeasurement && rh) {
00149     using std::swap;
00150     swap(theFwdPredictedState,rh.theFwdPredictedState);
00151     swap(theBwdPredictedState,rh.theBwdPredictedState);
00152     swap(theUpdatedState,rh.theUpdatedState);
00153     swap(theRecHit,rh.theRecHit);
00154     theEstimate=rh.theEstimate;
00155     theLayer=rh.theLayer;
00156 
00157     return *this;
00158 
00159   }
00160  
00161 #endif
00162 
00163 
00164   
00165 
00166 
00170   TrajectoryStateOnSurface  predictedState() const {
00171     return theFwdPredictedState;
00172   }
00173 
00175   TrajectoryStateOnSurface forwardPredictedState() const {
00176     return theFwdPredictedState;
00177   }
00179   TrajectoryStateOnSurface backwardPredictedState() const {
00180     return theBwdPredictedState;
00181   }
00182 
00186   TrajectoryStateOnSurface updatedState() const {
00187     return theUpdatedState;
00188   }
00189 
00190   ConstRecHitPointer recHit() const {
00191     return theRecHit;
00192   }
00193 
00194   float estimate() const { return theEstimate;}
00195 
00196   const DetLayer* layer() const { return theLayer;}
00197 
00198   void setLayer( const DetLayer* il) { theLayer=il;}
00199 
00200 private:
00201   TrajectoryStateOnSurface theFwdPredictedState;
00202   TrajectoryStateOnSurface theBwdPredictedState;
00203   TrajectoryStateOnSurface theUpdatedState;
00204   ConstRecHitPointer       theRecHit;
00205   const DetLayer* theLayer;
00206   float theEstimate;
00207 };
00208 
00209 #endif