-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/3D Kalman Filter #122
Conversation
src/TMS_Kalman.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trusting you on this one
src/TMS_Kalman.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trusting you on this one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good from my side
I'm testing this branch to compare with main. I ran these three tests (with a limit of 5k files):
They all process in main (tagged
I tried changing |
@AsaNehm good chance the above issue is related to the changes you made recently |
It might very well be. |
I'm not sure what you mean. Would you please submit the change? |
Did that. Please try it out |
This works now. I was able to test all 3 files and there was no infinite loop. Test files in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, just some minor comments about verbosity and branch names
src/TMS_Geom.h
Outdated
TVector3 vec = TVector3(x,y,z); | ||
//if (!IsInsideNearDetectorVolume(vec)) | ||
//std::cout << "Not in a detector?? " << x << ", " << y << ", " << z << std::endl; | ||
//return NULL; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is doing nothing
src/TMS_Geom.h
Outdated
// std::cout << "[TMS_Geom.h] Getting materials between the points:" << std::endl | ||
// << " point1: " << point1.X() << ", "<< point1.Y() << ", "<< point1.Z() << std::endl | ||
// << " point2: " << point2.X() << ", "<< point2.Y() << ", "<< point2.Z() << std::endl; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can remove this
src/TMS_Reco.cpp
Outdated
size_t nHits = xz_hits.size(); | ||
if (nHits < 1) continue; | ||
KalmanFitter = TMS_Kalman(xz_hits); | ||
std::cout << "Kalman filter start pos : " << KalmanFilter.Start[0] << ", " << KalmanFilter.Start[1] << ", " << KalmanFilter.Start[2] << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want it this verbose?
src/TMS_TreeWriter.cpp
Outdated
Reco_Tree->Branch("KalmanPos", RecoTrackKalmanPos, "TrackHitPos[nTracks][200][3]/F"); | ||
Reco_Tree->Branch("KalmanTruePos", RecoTrackKalmanTruePos, "TrackHitTruePos[nTracks][200][3]/F"); | ||
Reco_Tree->Branch("StartPos", RecoTrackStartPos, "StartPos[nTracks][3]/F"); | ||
Reco_Tree->Branch("StartDirection",RecoTrackStartDirection,"StartDirection[nTracks][3]/F"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future, we need to be careful about changing branch names. Downstream code uses Direction for StartDirection so it'll break scripts
src/TMS_TreeWriter.cpp
Outdated
Reco_Tree->Branch("nHits", nHitsIn3DTrack, "nHits[nTracks]/I"); | ||
Reco_Tree->Branch("TrackHitPos", RecoTrackHitPos, "TrackHitPos[nTracks][200][3]/F"); | ||
Reco_Tree->Branch("nKalmanNodes", nKalmanNodes, "nKalmanNodes[nTracks]/I"); | ||
Reco_Tree->Branch("KalmanPos", RecoTrackKalmanPos, "TrackHitPos[nTracks][200][3]/F"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed TrackHitPos
is repeated. Should it be
Reco_Tree->Branch("KalmanPos", RecoTrackKalmanPos, "KalmanPos[nTracks][200][3]/F");
Looks like tracks start with unusual hit positions. Here are all hits on a track as an example. The first hit should be close to the second hit but the first hit has x outside the detector, and y = 0.
The code is setting x is z_tms_end and y defaults to zero for the first hit of each track |
I also noticed the ends of tracks can be strange sometimes too
|
I made this comparison between PR 122 and PR 134: comparison.pdf. It's looking at plots from Tracking_Validation.cpp for this PR and what is currently main basically. Both have their pros and cons that need to be worked out. I'm still concerned about hits that aren't on the track. I think that explains why we get this behavior: |
…n-clusters 125 potential problem with tracks in clusters
Looking through the code on main there shouldn't be a problem with the shift to a PlaneByZ with coordinates instead of the plane number |
Closing as this branch has become stale and isn't worth recovering. Not sure what happened and when, couldn't figure it out. |
Have merged current main into this branch just now.
Current behaviour:
Please give a scan over the Reco and TreeWriter files to make sure I haven't destroyed anything unintentionally.