CMS 3D CMS Logo

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