-
Notifications
You must be signed in to change notification settings - Fork 62
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
New FWD tracking mode based on FST-track finding #571
base: main
Are you sure you want to change the base?
Conversation
Note, this PR includes the changes from PR #569 but the only changes relevant here are those in StRoot/StFwdTrackMaker and StRoot/StFwdUtils/ |
Also the CI jobs seem to be failing on code unrelated to my changes (things in StEvent) |
These errors should be fixed first:
|
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.
Few initial comments made. Will review in more detail tomorrow.
@klendathu2k I will remove everything StFtt related from this PR. Everything you suggest is valid - but it I've addressed it in PR #569 instead of here |
68cb393
to
7786bd9
Compare
I finally updated this PR to include only the needed changes for this feature (FST based tracking) |
commit e65362f made changes to verify everything works for the ideal simulation cases:
I added: to make running the code in this way easy. It can be tested with:
|
…Finder node present
…listic + fst/ftt seeds)
…Genfit tracks not deleted (use shared_ptr where possible)
OK with 99752c4
|
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.
Just a few minor observations. I didn't dig through all the sim
and Tracker
changes, so I can't comment on those.
@@ -19,6 +19,9 @@ void StMuFwdTrack::set( StFwdTrack * evTrack) { | |||
mCharge = evTrack->charge(); | |||
mPrimaryMomentum = TVector3( evTrack->momentum().x(), evTrack->momentum().y(), evTrack->momentum().z() ); | |||
|
|||
mIdTruth = evTrack->idTruth(); | |||
mQATruth = evTrack->qaTruth(); | |||
|
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.
From what I can tell, you rely on the default behavior of C++ to initialize the value of StEvent/StFwdTrack.cxx::mIdTruth to zero (for all real tracks), as it isn't explicitly initialized to have a default value neither there nor here. Is this the desired approach?
// needed since I use the StMuTrack | ||
gSystem->Load("StarClassLibrary"); | ||
gSystem->Load("StStrangeMuDstMaker"); | ||
gSystem->Load("StMuDSTMaker"); |
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.
loadSharedLibraries()
already loads StarClassLibrary
, StStrangeMuDstMaker
, StMuDSTMaker
, so not needed here. Not sure if I missed others, but this isn't critical.
cout << "LL1" << endl; | ||
gROOT->LoadMacro("$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C"); | ||
loadSharedLibraries(); | ||
cout << "LL2" << 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.
These three LL0/1/2 cout lines can probably be dropped off now?
Thank you, Daniel, for addressing the comments! Everything looks good as far as I can tell. As a last request we discussed, could you point me to a recent data file with raw FST data from this run? I would like to extend our CI tests at https://github.com/star-bnl/star-sw/blob/main/tests/joblist.json#L1126, which already include data from 2023. |
- Improve memory management of FwdHits - Add FST and FTT detection methods to FwdHit class and update FwdGeomUtils - cleanup track fitter logic - Add additional track seed modes - use enums where possible for clearer intentions - remove histogram and ttree output from FwdTrackMaker and TrackFitter - Tests against data and simulation
Sorry for not answering so long. I am not ignoring your PR. I just have been super busy and this seems to be a substantial one, with the discussion that I have not really followed. I this it is better if I defer this to others, but I will go over this once I am back to the office if it is not done till then. |
The last time all checks passed was with this commit: @jdbrice However, the next commit failed: @jdbrice Let's try to revert it to see if it really introduced a bug. |
This reverts commit 0241f63.
The test job 125 completed successfully after reverting the changes in @jdbrice's commit. Use FST z locations from geom to identify hit plane index This is the only test that uses the
From this, I conclude that something in that commit causes the test to fail. |
Thank you @plexoos - I will investigate and try to resolve. |
…ult config handeling
…k projections with zero points with measurements
…ro. add LOG_INFO to identify test 125 failure
@plexoos, @klendathu2k - I have finally identified the seg fault, it occurs when I try to find from various possible sources an event primary vertex. This is the code that fails: if(mMuDstMaker && mMuDstMaker->muDst() && mMuDstMaker->muDst()->primaryVertex() ) {
mEventVertex.SetX(mMuDstMaker->muDst()->primaryVertex()->position().x());
mEventVertex.SetY(mMuDstMaker->muDst()->primaryVertex()->position().y());
mEventVertex.SetZ(mMuDstMaker->muDst()->primaryVertex()->position().z());
mFwdVertexSource = kFwdVertexSourceTpc;
return mEventVertex;
} as you can see I am testing for nullptrs, and in the most recent code I print out each pointer:
The So I will temporarily remove this code to fix this PR so we can move forward with the next library, but this is likely indicative of some deeper issues with the MuDst Primary Vertex. Let me know if you have any thoughts |
Good catch, @jdbrice! Yeah, dereferencing an invalid pointer is a classic case of undefined behavior in C++, where it might work on one machine but crash on another. |
…f pointer being null
@plexoos - thanks for the suggestions that helped me find it. OK I 'd like to close this PR without adding anything else to it (except anything identified necessary by further review). I prefer to make any final changes needed for a new library in smaller more scoped PRs. So if you and @klendathu2k or @genevb etc can take a look, I will leave this alone for now. But it is ready from my side |
These updates provide a new FWD tracking mode in which the track finding is one with FST information.
Tracks are then fit to valid Seeds and then (optionally) any FTT hits are added to the track if found along the trajectory.
This mode is needed for any analysis of real data at this point. That would include fast offline for ongoing data taking.