Add isolations to TrackData object for Kalman tracks#1159
Conversation
mgignac
left a comment
There was a problem hiding this comment.
Thanks @bloodyyugo !
Looks good to me. In the hpstr level code, there is a timing cut to ensure the close by hit is in time (<30ns). Do we want to introduce a similar cut? You retrieve the time of the closest hit, but as far as I understand this information get dropped when written to the TrackData? There is also the possibility that there are >1 hits with slightly more spatial separation but closer in time, I suppose. It's probably a small effect. Perhaps a close approximation would be to write isot0 hit times as well?
| List<Integer> layers = new ArrayList<Integer>(); | ||
| List<Double> residuals = new ArrayList<Double>(); | ||
| List<Float> sigmas = new ArrayList<Float>(); | ||
| List<Integer> layersInt = new ArrayList<Integer>(); |
There was a problem hiding this comment.
Is there a reason why this chunk of code is moved down a few lines? It is hard to parse what is going on with the different loops and if statements.
There was a problem hiding this comment.
The first loop is of hits on track (so, only layers with a HOT are included) and the second one is over all layers. I separated the intersections list instantiations down to just before the loop over all layers because that's where it's filled.
tracking/src/main/java/org/hps/recon/tracking/kalman/KalTrack.java
Outdated
Show resolved
Hide resolved
tracking/src/main/java/org/hps/recon/tracking/kalman/KalTrack.java
Outdated
Show resolved
Hide resolved
| // use the sign of the global plane position (vertical = z) | ||
| // times the local-->global v-->z element | ||
| // to determine if sensor is aligned (+ive v --> away from beam) | ||
| // or anti-aligned (+ive v is towards beam) |
There was a problem hiding this comment.
I don't fully understand this comment. What do you mean by local-->global v-->z element and what is +ive v
There was a problem hiding this comment.
The local-->global refers to the rotation matrix R (local i.e. sensor frame to the "global" frame for kalman tracking) and v-->z element is the element in that matrix (the z component of the v direction). +ive == positive.
tracking/src/main/java/org/hps/recon/tracking/kalman/KalTrack.java
Outdated
Show resolved
Hide resolved
Remove unused variable hpsSensorPos in KalTrack.java
|
I think this looks good now. @bloodyyugo could you address my two questions above? happy to approve the PR after you have answered them! |
Isolations were never calculated/added to the TrackData for Kalman tracking. This PR does that.
-- For each layer, find the closest Si cluster, in the direction away from the beam, to the cluster-on-track and calculate the distance between the two.
-- if there is no cluster found or no hit-on-track for that layer, returns -999.
-- include this list of layer-isolations in the TrackData (which is a GenericObject) as the double array (which is it's intended purpose already).
The hpstr code already uses this array, in utils::buildTrack, to store the isolations in the Track object so no need to modify that code.
Closes #1158