Commit e20330f
New features for ALERT Kalman filter+optimized parameters (#445)
* Optimization of Kalman Filter:
* adjusted number of filtering iterations from 10 to 5;
* adjusted step size dx for calculation of ddoca/dx from 10^8 to 10^5;
* Added AHDC hits residuals (post-fit and pre-fit) in the output:
* residuals in the AHDC::Hits list in the alert.json file;
* filling the hits residuals in the RecoBankWriter;
* added residual and residual_prefit in ahdc/Hit/Hit.java
* added a identification flag to match ahdc/KalmanFilter/Hit.java to ahdc/Hit/Hit.java
* Successfully affected the calculated hit residual to the correct AHDC::Hit.
* Fixed and improved the calculation of the post-fit residuals:
* affecting the track parameters to the KFTrack right after the fit;
* redo a forward indicators pass without correction;
* * Cleaning the Kalman filter code:
- removed all "cylindrical coordinates" vector and measurement functions;
- renamed all preexisting vector and measurement function with their original name.
- removed many commented printouts.
* Attempt to include hit "sign" / left-right disambiguation:
* added "virtual wires" located at the distance-of-closest-approach of the actual wire, on each side of the wire;
* added hit sign parameter in KalmanFilter/Hit class;
* added a new distance function to KalmanFilter/Hit class calculate the distance of a point to the correct virtual wire depending on the sign;
* attempt to modify the "h" function to call new distance function
* Fix of a parameter modified by mistake.
* Added a second definition of BackwardIndicators in AHDC/KalmanFilter to
be able to initialize a vertex.
* Added a flag setDefinedVertex to AHDC/KalmanFilter and KFitter to define
"hit_beam" vertex.
* Reset Niter and ddoca step size parameters to 10, 1.e-8 respectively.
* Added reading of wire ADC from the AHDC HitReader, and functions to
access ADC for AHDC/Hit/Hit and AHDC/KalmanFilter/Hit.
Added filtering of two hits on same superlayer/layer based on ADC
(largest ADC is kept) and use info to determine the hit sign.
* Added an option to build the initial track with just the hits combination and preset fixed parameters in AHDCEngine.
Added a function in AHDC/KalmanFilter/Hit.java to calculate the measurement vector if we have a sign.
* Substituted call of default hit vector and hit measurement functions with hit vector and measurement functions that handle hit left/right disambiguation.
* Started to reintroduce the hit sign.
* Save state: back to status quo before revising sign.
* Added variable measurement error for hits with sign defined, with tracks on the wrong side.
* Implemented varaible measurement error for signed hits:
* if track on right side of wire, normal error;
* if track on wrong side of wire, inflated error;
Ensured reordering of hits by increasing phi; added exception for
"rollover" around phi = pi;
* fixed once and for all the convention for hit sign:
sign >0 if phi_expected state > phi_wire
* Tried to introduce a "pull" to the track on the correct sign of a wire by setting the measurement on the correct "virtual wire" with a larger error.
* Revert "Tried to introduce a "pull" to the track on the correct sign of a wire by setting the measurement on the correct "virtual wire" with a larger error."
This reverts commit 9bf4715.
* Fixed the convention for the "virtual wires": wire "minus" ("plus") at +deltaphi (-deltaphi)
since wire x, y position depend on -R*sin(phi), -R cos(phi)
respectively.
* Improved the functions to calculate hit vector: returns doca if sign is 0 or if sign is good.
* Added a hit distance function with goodsign as input, and H (measurement matrix) function with goodsign as an input.
* Added (commented) calls of functions with sign.
* Added a simple handle to disable reading of MC variables.
* Rerolled to fitting with no double hit.
* Harmonized simulation flag:
- one simulation flag is declared in AHDCengine and defined as false;
- it is now propagated into KalmanFilter.
* Added a check to read MC hits in AHDC_engine.
---------
Co-authored-by: Mathieu Ouillon <[email protected]>1 parent 3f00dfa commit e20330f
File tree
10 files changed
+333
-250
lines changed- etc/bankdefs/hipo4
- reconstruction/alert/src/main/java/org/jlab/rec
- ahdc
- Banks
- Hit
- KalmanFilter
- Track
- service
10 files changed
+333
-250
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
184 | 192 | | |
185 | 193 | | |
186 | 194 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
Lines changed: 26 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
| 21 | + | |
19 | 22 | | |
20 | | - | |
| 23 | + | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
| 30 | + | |
26 | 31 | | |
| 32 | + | |
| 33 | + | |
27 | 34 | | |
28 | 35 | | |
29 | 36 | | |
| |||
130 | 137 | | |
131 | 138 | | |
132 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
133 | 158 | | |
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | | - | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
78 | | - | |
| 79 | + | |
Lines changed: 93 additions & 39 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
| |||
34 | 38 | | |
35 | 39 | | |
36 | 40 | | |
| 41 | + | |
| 42 | + | |
37 | 43 | | |
38 | 44 | | |
39 | 45 | | |
| |||
104 | 110 | | |
105 | 111 | | |
106 | 112 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
116 | 146 | | |
117 | 147 | | |
118 | | - | |
119 | | - | |
| 148 | + | |
| 149 | + | |
120 | 150 | | |
121 | 151 | | |
122 | 152 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
127 | 160 | | |
128 | 161 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
| 162 | + | |
| 163 | + | |
139 | 164 | | |
140 | | - | |
141 | | - | |
142 | | - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
143 | 172 | | |
144 | 173 | | |
145 | 174 | | |
| |||
151 | 180 | | |
152 | 181 | | |
153 | 182 | | |
154 | | - | |
155 | | - | |
156 | 183 | | |
157 | 184 | | |
158 | 185 | | |
| |||
161 | 188 | | |
162 | 189 | | |
163 | 190 | | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
168 | 201 | | |
169 | 202 | | |
170 | 203 | | |
| |||
211 | 244 | | |
212 | 245 | | |
213 | 246 | | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
214 | 251 | | |
215 | 252 | | |
216 | 253 | | |
217 | 254 | | |
218 | 255 | | |
219 | 256 | | |
220 | 257 | | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
221 | 275 | | |
222 | 276 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
0 commit comments