Skip to content
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

Major upgrade of TofEstimators with new track length calculation and bug fixes #96

Merged
merged 22 commits into from
Nov 5, 2021

Conversation

dudarboh
Copy link
Member

@dudarboh dudarboh commented Aug 27, 2021

BEGINRELEASENOTES

  • Major upgrade of TOFEstimators with bug fixes and updates that are not backward compatible
    • Track length calculation is significantly improved by refitting the track and iterating over the track states on each tracker hit
    • Fixed bugs with phi coordinate flip and wrong abs() instead of std::abs()
    • Output in the PIDHandler is changed to the minimal set of required three parameters for the PID (momentum, track length, TOF)
    • Input steering parameters adjusted
    • Removed TOFPlots processor. General clean up of the files and the code
    • Detailed documentation is added

ENDRELEASENOTES

Additional notes

Removed TOFPlots processor which was producing ROOT file with TOF related histograms.
In the near future, higher quality histograms should be produced by the newer dEdxAndToFAnalyzer processor

Removed all files which seemed like personal analysis scripts unrelated to the processor's main purpose

Performance

~ x13 times slower than version used for the IDR production

Check list

  • Update / cleanup TOFEstimator code

  • Optimize / check for mem. leaks

  • Write documentation

@dudarboh dudarboh changed the title Fix flip of the phi coordinate and abs() bugs [WIP] Major upgrade of TofEstimators with new track length calculation and bug fixes Aug 31, 2021
@dudarboh
Copy link
Member Author

dudarboh commented Sep 24, 2021

I fixed memory leak by deleting marlinTrk
But is this nice, as I don't allocate it myself with new. Isn't is a good practice to delete it in the same code where it is allocated.
I assume it is something not easy to do in this context without breaking a lot of things

@dudarboh dudarboh changed the title [WIP] Major upgrade of TofEstimators with new track length calculation and bug fixes Major upgrade of TofEstimators with new track length calculation and bug fixes Sep 25, 2021
@dudarboh dudarboh requested a review from tmadlener September 25, 2021 23:39
@tmadlener
Copy link
Contributor

~ x13 times slower than version used for the IDR production

Is this still here, or has this been resolved by fixing the memory leak?

@dudarboh
Copy link
Member Author

@tmadlener

~ x13 time slow compared to IDR is there.
Mem. leaks are fixed now and they didn't affect much avg. time per event.

I think this is something expected, no? As in the IDR, there was one simple formula using only track information.
And now we go deeper to the hit level and refitting the tracks. So it must take more time. I just decided to note it quantitatively.

@tmadlener
Copy link
Contributor

That makes sense. Thanks for the clarification.

@airqui
Copy link
Contributor

airqui commented Sep 27, 2021

That makes sense. Thanks for the clarification.

Hi, I think that this also motivates to consider the possibility to include this information (track length, etc) in the reconstructed MarlinTrks produced during the "standard" reconstruction. However, I believe that this is a topic for the future.

Copy link
Contributor

@tmadlener tmadlener left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a few smaller comments / questions inline.

Regarding the questions on how to better handle things in getSubTrack, I have no clear better solution either. From the overall looks of it, it seems like the goal is to collect all hits from a track and then get all TrackStates associated to these hits. However, it looks like the different subtracks are still necessary for the fitting that is done in getTrackStatesPerHit. I assume this is due to the presence of curlers and the fit not being able to handle that(?).

TimeOfFlight/include/TOFEstimators.h Outdated Show resolved Hide resolved
TimeOfFlight/src/TOFEstimators.cc Outdated Show resolved Hide resolved
TimeOfFlight/src/TOFEstimators.cc Outdated Show resolved Hide resolved
TimeOfFlight/src/TOFEstimators.cc Outdated Show resolved Hide resolved
TimeOfFlight/src/TOFEstimators.cc Outdated Show resolved Hide resolved
TimeOfFlight/src/TOFUtils.cc Outdated Show resolved Hide resolved
TimeOfFlight/src/TOFUtils.cc Outdated Show resolved Hide resolved
TimeOfFlight/src/TOFUtils.cc Outdated Show resolved Hide resolved
TimeOfFlight/src/TOFUtils.cc Outdated Show resolved Hide resolved
TimeOfFlight/include/TOFUtils.h Outdated Show resolved Hide resolved
@dudarboh dudarboh requested a review from tmadlener October 6, 2021 09:58
@dudarboh
Copy link
Member Author

dudarboh commented Oct 6, 2021

Hi @tmadlener,

I made some optimization/style corrections as you proposed.
I wrote some more comments on your comments, please see inline and mark resolved what is resolved...

@dudarboh
Copy link
Member Author

Here are some final test plots that show that distributions look reasonable (but not identical) compared to the previous default TOFEstimators version.

I also checked non-default methods with different smearings, to see if everything looks as expected and it does:

Copy link
Contributor

@tmadlener tmadlener left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this. To me this looks good.

Pinging @gaede for another set of eyes.

@tmadlener tmadlener merged commit fdac073 into iLCSoft:master Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants