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 
31 
33 
35  TrajectoryMeasurement(TrajectoryStateOnSurface fwdTrajectoryStateOnSurface,
36  ConstRecHitPointer aRecHit) :
37  theFwdPredictedState(fwdTrajectoryStateOnSurface),
38  theUpdatedState(fwdTrajectoryStateOnSurface),
39  theRecHit(aRecHit),
40  theLayer(0), theEstimate(0) {}
41 
43  TrajectoryMeasurement(TrajectoryStateOnSurface fwdTrajectoryStateOnSurface,
44  ConstRecHitPointer aRecHit, float aEstimate) :
45  theFwdPredictedState(fwdTrajectoryStateOnSurface),
46  theUpdatedState(fwdTrajectoryStateOnSurface),
47  theRecHit(aRecHit),
48  theLayer(0),
49  theEstimate(aEstimate) {}
50 
51  TrajectoryMeasurement(TrajectoryStateOnSurface fwdTrajectoryStateOnSurface,
52  ConstRecHitPointer aRecHit, float aEstimate,
53  const DetLayer* layer) :
54  theFwdPredictedState(std::move(fwdTrajectoryStateOnSurface)),
56  theRecHit(std::move(aRecHit)), theLayer(layer) ,
57  theEstimate(aEstimate){}
58 
60  TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface,
61  TrajectoryStateOnSurface uTrajectoryStateOnSurface,
62  ConstRecHitPointer aRecHit) :
63  theFwdPredictedState(std::move(fwdPredTrajectoryStateOnSurface)),
64  theUpdatedState(std::move(uTrajectoryStateOnSurface)),
65  theRecHit(std::move(aRecHit)), theLayer(0),
66  theEstimate(0) {}
67 
69  TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface,
70  TrajectoryStateOnSurface uTrajectoryStateOnSurface,
71  ConstRecHitPointer aRecHit, float aEstimate) :
72  theFwdPredictedState(std::move(fwdPredTrajectoryStateOnSurface)),
73  theUpdatedState(std::move(uTrajectoryStateOnSurface)),
74  theRecHit(std::move(aRecHit)), theLayer(0),
75  theEstimate(aEstimate) {}
76  TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface,
77  TrajectoryStateOnSurface uTrajectoryStateOnSurface,
78  ConstRecHitPointer aRecHit, float aEstimate,
79  const DetLayer* layer) :
80  theFwdPredictedState(std::move(fwdPredTrajectoryStateOnSurface)),
81  theUpdatedState(std::move(uTrajectoryStateOnSurface)),
82  theRecHit(std::move(aRecHit)), theLayer(layer),
83  theEstimate(aEstimate) {}
87  TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface,
88  TrajectoryStateOnSurface bwdPredTrajectoryStateOnSurface,
89  TrajectoryStateOnSurface uTrajectoryStateOnSurface,
90  ConstRecHitPointer aRecHit) :
91  theFwdPredictedState(fwdPredTrajectoryStateOnSurface),
92  theBwdPredictedState(bwdPredTrajectoryStateOnSurface),
93  theUpdatedState(uTrajectoryStateOnSurface),
94  theRecHit(aRecHit),
95  theLayer(0), theEstimate(0) {}
96 
100  TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface,
101  TrajectoryStateOnSurface bwdPredTrajectoryStateOnSurface,
102  TrajectoryStateOnSurface uTrajectoryStateOnSurface,
103  ConstRecHitPointer aRecHit, float aEstimate) :
104  theFwdPredictedState(fwdPredTrajectoryStateOnSurface),
105  theBwdPredictedState(bwdPredTrajectoryStateOnSurface),
106  theUpdatedState(uTrajectoryStateOnSurface),
107  theRecHit(aRecHit),
108  theLayer(0), theEstimate(aEstimate) {}
109 
110  TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface,
111  TrajectoryStateOnSurface bwdPredTrajectoryStateOnSurface,
112  TrajectoryStateOnSurface uTrajectoryStateOnSurface,
113  ConstRecHitPointer aRecHit, float aEstimate,
114  const DetLayer* layer) :
115  theFwdPredictedState(fwdPredTrajectoryStateOnSurface),
116  theBwdPredictedState(bwdPredTrajectoryStateOnSurface),
117  theUpdatedState(uTrajectoryStateOnSurface),
118  theRecHit(aRecHit),
119  theLayer(layer), theEstimate(aEstimate) {}
120 
121 
127  theEstimate(rh.theEstimate) {}
128 
133  theRecHit = rh.theRecHit;
135  theLayer=rh.theLayer;
136 
137  return *this;
138 
139  }
140 
145  theRecHit(std::move(rh.theRecHit)), theLayer(rh.theLayer),
146  theEstimate(rh.theEstimate) {}
147 
149  using std::swap;
150  swap(theFwdPredictedState,rh.theFwdPredictedState);
151  swap(theBwdPredictedState,rh.theBwdPredictedState);
152  swap(theUpdatedState,rh.theUpdatedState);
153  swap(theRecHit,rh.theRecHit);
154  theEstimate=rh.theEstimate;
155  theLayer=rh.theLayer;
156 
157  return *this;
158 
159  }
160 
165  return theFwdPredictedState;
166  }
167 
170  return theFwdPredictedState;
171  }
174  return theBwdPredictedState;
175  }
176 
181  return theUpdatedState;
182  }
183 
184  ConstRecHitPointer::element_type const & recHitR() const {
185  return *theRecHit;
186  }
187 
188  ConstRecHitPointer const & recHitP() const {
189  return theRecHit;
190  }
191 
192  ConstRecHitPointer const & recHit() const {
193  return recHitP();
194  }
195 
196  float estimate() const { return theEstimate;}
197 
198  const DetLayer* layer() const { return theLayer;}
199 
200  // void setLayer( DetLayer const * il) const { theLayer=il;}
201 
202 private:
207  mutable DetLayer const * theLayer;
208  float theEstimate;
209 };
210 
211 #endif
void swap(ora::Record &rh, ora::Record &lh)
Definition: Record.h:70
TrajectoryStateOnSurface const & predictedState() const
ConstRecHitPointer const & recHit() const
TrajectoryMeasurement & operator=(TrajectoryMeasurement &&rh)
TrajectoryStateOnSurface theUpdatedState
TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface, TrajectoryStateOnSurface bwdPredTrajectoryStateOnSurface, TrajectoryStateOnSurface uTrajectoryStateOnSurface, ConstRecHitPointer aRecHit)
TrajectoryMeasurement(TrajectoryMeasurement const &rh)
#define noexcept
TrackingRecHit::RecHitPointer RecHitPointer
TrajectoryMeasurement(TrajectoryStateOnSurface fwdTrajectoryStateOnSurface, ConstRecHitPointer aRecHit, float aEstimate, const DetLayer *layer)
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.
TrajectoryMeasurement(TrajectoryMeasurement &&rh)
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*.
def move
Definition: eostools.py:510
const DetLayer * layer() const
TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface, TrajectoryStateOnSurface uTrajectoryStateOnSurface, ConstRecHitPointer aRecHit)
Constructor with forward predicted &amp; updated state, RecHit.
ConstRecHitPointer const & recHitP() const
std::shared_ptr< TrackingRecHit const > RecHitPointer
TrajectoryStateOnSurface const & forwardPredictedState() const
Access to forward predicted state (from fitter or builder)
TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface, TrajectoryStateOnSurface uTrajectoryStateOnSurface, ConstRecHitPointer aRecHit, float aEstimate)
Constructor with forward predicted &amp; updated state, RecHit, estimate.
TrackingRecHit::ConstRecHitPointer ConstRecHitPointer
ConstRecHitPointer::element_type const & recHitR() const
TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface, TrajectoryStateOnSurface uTrajectoryStateOnSurface, ConstRecHitPointer aRecHit, float aEstimate, const DetLayer *layer)
TrajectoryStateOnSurface const & updatedState() const
TrajectoryStateOnSurface theFwdPredictedState
TrajectoryStateOnSurface theBwdPredictedState
ConstRecHitPointer theRecHit
TrajectoryStateOnSurface const & backwardPredictedState() const
Access to backward predicted state (from smoother)