CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrajectoryMeasurement.h
Go to the documentation of this file.
1 #ifndef _TRACKER_TRAJECTORYMEASUREMENT_H_
2 #define _TRACKER_TRAJECTORYMEASUREMENT_H_
3 
5 #include "boost/intrusive_ptr.hpp"
7 #include<algorithm>
9 
10 class DetLayer;
11 
27 public:
28 
29 #if defined( __GXX_EXPERIMENTAL_CXX0X__)
32 #else
35 #endif
36 
38 
40  TrajectoryMeasurement(TrajectoryStateOnSurface fwdTrajectoryStateOnSurface,
41  ConstRecHitPointer aRecHit) :
42  theFwdPredictedState(fwdTrajectoryStateOnSurface),
43  theUpdatedState(fwdTrajectoryStateOnSurface),
44  theRecHit(aRecHit),
45  theLayer(0), theEstimate(0) {}
46 
48  TrajectoryMeasurement(TrajectoryStateOnSurface fwdTrajectoryStateOnSurface,
49  ConstRecHitPointer aRecHit, float aEstimate) :
50  theFwdPredictedState(fwdTrajectoryStateOnSurface),
51  theUpdatedState(fwdTrajectoryStateOnSurface),
52  theRecHit(aRecHit),
53  theLayer(0),
54  theEstimate(aEstimate) {}
55 #if defined( __GXX_EXPERIMENTAL_CXX0X__)
56  TrajectoryMeasurement(TrajectoryStateOnSurface fwdTrajectoryStateOnSurface,
57  ConstRecHitPointer aRecHit, float aEstimate,
58  const DetLayer* layer) :
59  theFwdPredictedState(std::move(fwdTrajectoryStateOnSurface)),
61  theRecHit(std::move(aRecHit)), theLayer(layer) ,
62  theEstimate(aEstimate){}
63 
65  TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface,
66  TrajectoryStateOnSurface uTrajectoryStateOnSurface,
67  ConstRecHitPointer aRecHit) :
68  theFwdPredictedState(std::move(fwdPredTrajectoryStateOnSurface)),
69  theUpdatedState(std::move(uTrajectoryStateOnSurface)),
70  theRecHit(std::move(aRecHit)), theLayer(0),
71  theEstimate(0) {}
72 
74  TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface,
75  TrajectoryStateOnSurface uTrajectoryStateOnSurface,
76  ConstRecHitPointer aRecHit, float aEstimate) :
77  theFwdPredictedState(std::move(fwdPredTrajectoryStateOnSurface)),
78  theUpdatedState(std::move(uTrajectoryStateOnSurface)),
79  theRecHit(std::move(aRecHit)), theLayer(0),
80  theEstimate(aEstimate) {}
81  TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface,
82  TrajectoryStateOnSurface uTrajectoryStateOnSurface,
83  ConstRecHitPointer aRecHit, float aEstimate,
84  const DetLayer* layer) :
85  theFwdPredictedState(std::move(fwdPredTrajectoryStateOnSurface)),
86  theUpdatedState(std::move(uTrajectoryStateOnSurface)),
87  theRecHit(std::move(aRecHit)), theLayer(layer),
88  theEstimate(aEstimate) {}
89 #endif
90 
93  TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface,
94  TrajectoryStateOnSurface bwdPredTrajectoryStateOnSurface,
95  TrajectoryStateOnSurface uTrajectoryStateOnSurface,
96  ConstRecHitPointer aRecHit) :
97  theFwdPredictedState(fwdPredTrajectoryStateOnSurface),
98  theBwdPredictedState(bwdPredTrajectoryStateOnSurface),
99  theUpdatedState(uTrajectoryStateOnSurface),
100  theRecHit(aRecHit),
101  theLayer(0), theEstimate(0) {}
102 
106  TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface,
107  TrajectoryStateOnSurface bwdPredTrajectoryStateOnSurface,
108  TrajectoryStateOnSurface uTrajectoryStateOnSurface,
109  ConstRecHitPointer aRecHit, float aEstimate) :
110  theFwdPredictedState(fwdPredTrajectoryStateOnSurface),
111  theBwdPredictedState(bwdPredTrajectoryStateOnSurface),
112  theUpdatedState(uTrajectoryStateOnSurface),
113  theRecHit(aRecHit),
114  theLayer(0), theEstimate(aEstimate) {}
115 
116  TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface,
117  TrajectoryStateOnSurface bwdPredTrajectoryStateOnSurface,
118  TrajectoryStateOnSurface uTrajectoryStateOnSurface,
119  ConstRecHitPointer aRecHit, float aEstimate,
120  const DetLayer* layer) :
121  theFwdPredictedState(fwdPredTrajectoryStateOnSurface),
122  theBwdPredictedState(bwdPredTrajectoryStateOnSurface),
123  theUpdatedState(uTrajectoryStateOnSurface),
124  theRecHit(aRecHit),
125  theLayer(layer), theEstimate(aEstimate) {}
126 
127 
133  theEstimate(rh.theEstimate) {}
134 
139  theRecHit = rh.theRecHit;
141  theLayer=rh.theLayer;
142 
143  return *this;
144 
145  }
146 
147 #if defined( __GXX_EXPERIMENTAL_CXX0X__)
148 
152  theUpdatedState(std::move(rh.theUpdatedState)),
153  theRecHit(std::move(rh.theRecHit)), theLayer(rh.theLayer),
154  theEstimate(rh.theEstimate) {}
155 
157  using std::swap;
158  swap(theFwdPredictedState,rh.theFwdPredictedState);
159  swap(theBwdPredictedState,rh.theBwdPredictedState);
160  swap(theUpdatedState,rh.theUpdatedState);
161  swap(theRecHit,rh.theRecHit);
162  theEstimate=rh.theEstimate;
163  theLayer=rh.theLayer;
164 
165  return *this;
166 
167  }
168 
169 #endif
170 
175  return theFwdPredictedState;
176  }
177 
180  return theFwdPredictedState;
181  }
184  return theBwdPredictedState;
185  }
186 
191  return theUpdatedState;
192  }
193 
194 #if defined( __GXX_EXPERIMENTAL_CXX0X__)
195  ConstRecHitPointer::element_type const & recHitR() const {
196  return *theRecHit;
197  }
198 #else
199  TrackingRecHit const & recHitR() const {
200  return *theRecHit;
201  }
202 
203 #endif
204 
205  ConstRecHitPointer const & recHitP() const {
206  return theRecHit;
207  }
208 
209  ConstRecHitPointer const & recHit() const {
210  return recHitP();
211  }
212 
213  float estimate() const { return theEstimate;}
214 
215  const DetLayer* layer() const { return theLayer;}
216 
217  // void setLayer( DetLayer const * il) const { theLayer=il;}
218 
219 private:
224  mutable DetLayer const * theLayer;
225  float theEstimate;
226 };
227 
228 #endif
void swap(ora::Record &rh, ora::Record &lh)
Definition: Record.h:70
TrajectoryStateOnSurface const & predictedState() const
TrackingRecHit::RecHitPointer RecHitPointer
ConstRecHitPointer const & recHit() const
TrajectoryStateOnSurface theUpdatedState
TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface, TrajectoryStateOnSurface bwdPredTrajectoryStateOnSurface, TrajectoryStateOnSurface uTrajectoryStateOnSurface, ConstRecHitPointer aRecHit)
TrajectoryMeasurement(TrajectoryMeasurement const &rh)
#define noexcept
TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface, TrajectoryStateOnSurface bwdPredTrajectoryStateOnSurface, TrajectoryStateOnSurface uTrajectoryStateOnSurface, ConstRecHitPointer aRecHit, float aEstimate, const DetLayer *layer)
TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface, TrajectoryStateOnSurface bwdPredTrajectoryStateOnSurface, TrajectoryStateOnSurface uTrajectoryStateOnSurface, ConstRecHitPointer aRecHit, float aEstimate)
TrajectoryMeasurement(TrajectoryStateOnSurface fwdTrajectoryStateOnSurface, ConstRecHitPointer aRecHit, float aEstimate)
Constructor with forward predicted state, RecHit, estimate.
TransientTrackingRecHit::ConstRecHitPointer ConstRecHitPointer
TrajectoryMeasurement & operator=(TrajectoryMeasurement const &rh)
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
TrajectoryMeasurement(TrajectoryStateOnSurface fwdTrajectoryStateOnSurface, ConstRecHitPointer aRecHit)
Constructor with forward predicted state, const TrackingRecHit*.
TrackingRecHit::ConstRecHitPointer ConstRecHitPointer
const DetLayer * layer() const
ConstRecHitPointer const & recHitP() const
std::shared_ptr< TrackingRecHit const > RecHitPointer
TrajectoryStateOnSurface const & forwardPredictedState() const
Access to forward predicted state (from fitter or builder)
TrackingRecHit const & recHitR() const
TrajectoryStateOnSurface const & updatedState() const
TrajectoryStateOnSurface theFwdPredictedState
TrajectoryStateOnSurface theBwdPredictedState
ConstRecHitPointer theRecHit
TrajectoryStateOnSurface const & backwardPredictedState() const
Access to backward predicted state (from smoother)