ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/IPHCalignment2/TrackingTools/PatternTools/interface/TrajectoryMeasurement.h
Revision: 1.1
Committed: Fri Nov 25 16:38:24 2011 UTC (13 years, 5 months ago) by econte
Content type: text/plain
Branch: MAIN
CVS Tags: TBD2011, TBD_2011, HEAD
Log Message:
new IPHC alignment

File Contents

# Content
1 #ifndef _TRACKER_TRAJECTORYMEASUREMENT_H_
2 #define _TRACKER_TRAJECTORYMEASUREMENT_H_
3
4 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
5 #include "boost/intrusive_ptr.hpp"
6 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h"
7 #include<algorithm>
8
9 class DetLayer;
10
11 /** The TrajectoryMeasurement contains the full information about the
12 * measurement of a trajectory by a Det, namely <BR>
13 * - the TrackingRecHit <BR>
14 * - the predicted TrajectoryStateOnSurface from forward propagation (fitter)<BR>
15 * - the predicted TrajectoryStateOnSurface from backward propagation (smoother)<BR>
16 * - the (combination of the) predicted TrajectoryStateOnSurfaces updated with the TrackingRecHit information <BR>
17 * - the compatibility estimate between the TrackingRecHit and the predicted state. <BR>
18 *
19 * A container of TrajectoryMeasurements is the result of querying a Det for
20 * measurements compatible with a TrajectoryState.
21 * A reconstructed track also consists of an ordered collection of
22 * TrajectoryMeasurements.
23 */
24
25 class TrajectoryMeasurement {
26 public:
27
28 typedef TransientTrackingRecHit::RecHitPointer RecHitPointer;
29 typedef TransientTrackingRecHit::ConstRecHitPointer ConstRecHitPointer;
30
31 TrajectoryMeasurement() {}
32
33 /// Constructor with forward predicted state, const TrackingRecHit*
34 TrajectoryMeasurement(TrajectoryStateOnSurface fwdTrajectoryStateOnSurface,
35 ConstRecHitPointer aRecHit) :
36 theFwdPredictedState(fwdTrajectoryStateOnSurface),
37 theUpdatedState(fwdTrajectoryStateOnSurface),
38 theRecHit(aRecHit),
39 theLayer(0), theEstimate(0) {}
40
41 /// Constructor with forward predicted state, RecHit, estimate
42 TrajectoryMeasurement(TrajectoryStateOnSurface fwdTrajectoryStateOnSurface,
43 ConstRecHitPointer aRecHit, float aEstimate) :
44 theFwdPredictedState(fwdTrajectoryStateOnSurface),
45 theUpdatedState(fwdTrajectoryStateOnSurface),
46 theRecHit(aRecHit),
47 theLayer(0),
48 theEstimate(aEstimate) {}
49 TrajectoryMeasurement(TrajectoryStateOnSurface fwdTrajectoryStateOnSurface,
50 ConstRecHitPointer aRecHit, float aEstimate,
51 const DetLayer* layer) :
52 theFwdPredictedState(fwdTrajectoryStateOnSurface),
53 theUpdatedState(fwdTrajectoryStateOnSurface),
54 theRecHit(aRecHit), theLayer(layer) ,
55 theEstimate(aEstimate){}
56
57 /// Constructor with forward predicted & updated state, RecHit
58 TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface,
59 TrajectoryStateOnSurface uTrajectoryStateOnSurface,
60 ConstRecHitPointer aRecHit) :
61 theFwdPredictedState(fwdPredTrajectoryStateOnSurface),
62 theUpdatedState(uTrajectoryStateOnSurface),
63 theRecHit(aRecHit), theLayer(0),
64 theEstimate(0) {}
65
66 /// Constructor with forward predicted & updated state, RecHit, estimate
67 TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface,
68 TrajectoryStateOnSurface uTrajectoryStateOnSurface,
69 ConstRecHitPointer aRecHit, float aEstimate) :
70 theFwdPredictedState(fwdPredTrajectoryStateOnSurface),
71 theUpdatedState(uTrajectoryStateOnSurface),
72 theRecHit(aRecHit), theLayer(0),
73 theEstimate(aEstimate) {}
74 TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface,
75 TrajectoryStateOnSurface uTrajectoryStateOnSurface,
76 ConstRecHitPointer aRecHit, float aEstimate,
77 const DetLayer* layer) :
78 theFwdPredictedState(fwdPredTrajectoryStateOnSurface),
79 theUpdatedState(uTrajectoryStateOnSurface),
80 theRecHit(aRecHit), theLayer(layer),
81 theEstimate(aEstimate) {}
82
83 /** Constructor with forward predicted, backward predicted & updated state,
84 * RecHit
85 */
86 TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface,
87 TrajectoryStateOnSurface bwdPredTrajectoryStateOnSurface,
88 TrajectoryStateOnSurface uTrajectoryStateOnSurface,
89 ConstRecHitPointer aRecHit) :
90 theFwdPredictedState(fwdPredTrajectoryStateOnSurface),
91 theBwdPredictedState(bwdPredTrajectoryStateOnSurface),
92 theUpdatedState(uTrajectoryStateOnSurface),
93 theRecHit(aRecHit),
94 theLayer(0), theEstimate(0) {}
95
96 /** Constructor with forward predicted, backward predicted & updated state,
97 * RecHit, estimate
98 */
99 TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface,
100 TrajectoryStateOnSurface bwdPredTrajectoryStateOnSurface,
101 TrajectoryStateOnSurface uTrajectoryStateOnSurface,
102 ConstRecHitPointer aRecHit, float aEstimate) :
103 theFwdPredictedState(fwdPredTrajectoryStateOnSurface),
104 theBwdPredictedState(bwdPredTrajectoryStateOnSurface),
105 theUpdatedState(uTrajectoryStateOnSurface),
106 theRecHit(aRecHit),
107 theLayer(0), theEstimate(aEstimate) {}
108 TrajectoryMeasurement(TrajectoryStateOnSurface fwdPredTrajectoryStateOnSurface,
109 TrajectoryStateOnSurface bwdPredTrajectoryStateOnSurface,
110 TrajectoryStateOnSurface uTrajectoryStateOnSurface,
111 ConstRecHitPointer aRecHit, float aEstimate,
112 const DetLayer* layer) :
113 theFwdPredictedState(fwdPredTrajectoryStateOnSurface),
114 theBwdPredictedState(bwdPredTrajectoryStateOnSurface),
115 theUpdatedState(uTrajectoryStateOnSurface),
116 theRecHit(aRecHit),
117 theLayer(layer), theEstimate(aEstimate) {}
118
119
120 #if defined( __GXX_EXPERIMENTAL_CXX0X__)
121 TrajectoryMeasurement( TrajectoryMeasurement const & rh) :
122 theFwdPredictedState(rh.theFwdPredictedState),
123 theBwdPredictedState(rh.theBwdPredictedState),
124 theUpdatedState(rh.theUpdatedState),
125 theRecHit(rh.theRecHit), theLayer(rh.theLayer),
126 theEstimate(rh.theEstimate) {}
127
128 TrajectoryMeasurement & operator=( TrajectoryMeasurement const & rh) {
129 theFwdPredictedState = rh.theFwdPredictedState;
130 theBwdPredictedState = rh.theBwdPredictedState;
131 theUpdatedState = rh.theUpdatedState;
132 theRecHit = rh.theRecHit;
133 theEstimate=rh.theEstimate;
134 theLayer=rh.theLayer;
135
136 return *this;
137
138 }
139
140
141 TrajectoryMeasurement( TrajectoryMeasurement && rh) :
142 theFwdPredictedState(std::move(rh.theFwdPredictedState)),
143 theBwdPredictedState(std::move(rh.theBwdPredictedState)),
144 theUpdatedState(std::move(rh.theUpdatedState)),
145 theRecHit(std::move(rh.theRecHit)), theLayer(rh.theLayer),
146 theEstimate(rh.theEstimate) {}
147
148 TrajectoryMeasurement & operator=( TrajectoryMeasurement && rh) {
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
161 #endif
162
163
164
165
166
167 /** Access to forward predicted state (from fitter or builder).
168 * To be replaced by forwardPredictedState.
169 */
170 TrajectoryStateOnSurface predictedState() const {
171 return theFwdPredictedState;
172 }
173
174 /// Access to forward predicted state (from fitter or builder)
175 TrajectoryStateOnSurface forwardPredictedState() const {
176 return theFwdPredictedState;
177 }
178 /// Access to backward predicted state (from smoother)
179 TrajectoryStateOnSurface backwardPredictedState() const {
180 return theBwdPredictedState;
181 }
182
183 /** Access to updated state (combination of forward predicted state
184 * and hit for fitter, + backward predicted state for smoother)
185 */
186 TrajectoryStateOnSurface updatedState() const {
187 return theUpdatedState;
188 }
189
190 ConstRecHitPointer recHit() const {
191 return theRecHit;
192 }
193
194 float estimate() const { return theEstimate;}
195
196 const DetLayer* layer() const { return theLayer;}
197
198 void setLayer( const DetLayer* il) { theLayer=il;}
199
200 private:
201 TrajectoryStateOnSurface theFwdPredictedState;
202 TrajectoryStateOnSurface theBwdPredictedState;
203 TrajectoryStateOnSurface theUpdatedState;
204 ConstRecHitPointer theRecHit;
205 const DetLayer* theLayer;
206 float theEstimate;
207 };
208
209 #endif