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 00110 TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface, 00111 TrajectoryStateOnSurface bwdPredTrajectoryStateOnSurface, 00112 TrajectoryStateOnSurface uTrajectoryStateOnSurface, 00113 ConstRecHitPointer aRecHit, float aEstimate, 00114 const DetLayer* layer) : 00115 theFwdPredictedState(fwdPredTrajectoryStateOnSurface), 00116 theBwdPredictedState(bwdPredTrajectoryStateOnSurface), 00117 theUpdatedState(uTrajectoryStateOnSurface), 00118 theRecHit(aRecHit), 00119 theLayer(layer), theEstimate(aEstimate) {} 00120 00121 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 #if defined( __GXX_EXPERIMENTAL_CXX0X__) 00142 00143 TrajectoryMeasurement( TrajectoryMeasurement && rh) noexcept: 00144 theFwdPredictedState(std::move(rh.theFwdPredictedState)), 00145 theBwdPredictedState(std::move(rh.theBwdPredictedState)), 00146 theUpdatedState(std::move(rh.theUpdatedState)), 00147 theRecHit(std::move(rh.theRecHit)), theLayer(rh.theLayer), 00148 theEstimate(rh.theEstimate) {} 00149 00150 TrajectoryMeasurement & operator=( TrajectoryMeasurement && rh) noexcept{ 00151 using std::swap; 00152 swap(theFwdPredictedState,rh.theFwdPredictedState); 00153 swap(theBwdPredictedState,rh.theBwdPredictedState); 00154 swap(theUpdatedState,rh.theUpdatedState); 00155 swap(theRecHit,rh.theRecHit); 00156 theEstimate=rh.theEstimate; 00157 theLayer=rh.theLayer; 00158 00159 return *this; 00160 00161 } 00162 00163 #endif 00164 00168 TrajectoryStateOnSurface const & predictedState() const { 00169 return theFwdPredictedState; 00170 } 00171 00173 TrajectoryStateOnSurface const & forwardPredictedState() const { 00174 return theFwdPredictedState; 00175 } 00177 TrajectoryStateOnSurface const & backwardPredictedState() const { 00178 return theBwdPredictedState; 00179 } 00180 00184 TrajectoryStateOnSurface const & updatedState() const { 00185 return theUpdatedState; 00186 } 00187 00188 ConstRecHitPointer::element_type const & recHitR() const { 00189 return *theRecHit.get(); 00190 } 00191 00192 ConstRecHitPointer const & recHitP() const { 00193 return theRecHit; 00194 } 00195 00196 ConstRecHitPointer const & recHit() const { 00197 return recHitP(); 00198 } 00199 00200 float estimate() const { return theEstimate;} 00201 00202 const DetLayer* layer() const { return theLayer;} 00203 00204 void setLayer( DetLayer const * il) const { theLayer=il;} 00205 00206 private: 00207 TrajectoryStateOnSurface theFwdPredictedState; 00208 TrajectoryStateOnSurface theBwdPredictedState; 00209 TrajectoryStateOnSurface theUpdatedState; 00210 ConstRecHitPointer theRecHit; 00211 mutable DetLayer const * theLayer; 00212 float theEstimate; 00213 }; 00214 00215 #endif