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

Fix bug in CKF and add script for KF timing test #126

Merged
merged 6 commits into from
Apr 28, 2020

Conversation

XiaocongAi
Copy link
Contributor

@XiaocongAi XiaocongAi commented Apr 24, 2020

  • Fix bug in CKF: before adding the track state, the last tip should be removed from the active tips. But when creating multiple states on ONE surface, the update of active tips should be done only ONCE so that states have the same previous state. In the current master branch, each call to addSourcelinkState will remove the last tip, which is not correct.
  • Fix a bug in Pythia8 option: include the pileup generators as well instead of including the hard configurations twice.
  • Clean the KF smoothing
  • Add script for KF timing test (To produce plot as below)
    image

@XiaocongAi XiaocongAi self-assigned this Apr 24, 2020
@XiaocongAi XiaocongAi added the Bug Something isn't working label Apr 24, 2020
@acts-issue-bot acts-issue-bot bot removed the Triage label Apr 24, 2020
@XiaocongAi XiaocongAi added the Improvement Changes to an existing feature label Apr 24, 2020
@XiaocongAi XiaocongAi changed the title WIP: Add script for KF timing test Add script for KF timing test Apr 24, 2020
@codecov
Copy link

codecov bot commented Apr 24, 2020

Codecov Report

Merging #126 into master will increase coverage by 0.00%.
The diff coverage is 47.36%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #126   +/-   ##
=======================================
  Coverage   45.82%   45.82%           
=======================================
  Files         351      351           
  Lines       17446    17447    +1     
  Branches     8095     8095           
=======================================
+ Hits         7994     7995    +1     
- Misses       4335     4338    +3     
+ Partials     5117     5114    -3     
Impacted Files Coverage Δ
Core/include/Acts/Fitter/KalmanFitter.hpp 37.80% <30.00%> (ø)
...ude/Acts/TrackFinder/CombinatorialKalmanFilter.hpp 27.94% <66.66%> (+0.21%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update be3d87b...3038d5f. Read the comment docs.

@XiaocongAi XiaocongAi changed the title Add script for KF timing test Fix bug in CKF and add script for KF timing test Apr 25, 2020
@XiaocongAi
Copy link
Contributor Author

@paulgessinger @asalzburger , could you help take a look and get it in?

@paulgessinger
Copy link
Member

Can you comment what the bugs were? I'm not sure I understand just from the code.

@XiaocongAi
Copy link
Contributor Author

@paulgessinger , sorry. The bugs are explained in the first comment.

@asalzburger
Copy link
Contributor

@XiaocongAi can you rebase, please - this should remove the build error with macOS as well.

Copy link
Contributor

@asalzburger asalzburger left a comment

Choose a reason for hiding this comment

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

There's one comment change I would do, otherwise I am happy with the PR.

@@ -1100,6 +1099,7 @@ class KalmanFitter {
}

if (!kalmanResult.result.ok()) {
ACTS_ERROR("KalmanFilter failed: " << kalmanResult.result.error());
return kalmanResult.result.error();
}

Copy link
Contributor

Choose a reason for hiding this comment

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

I like the meaningful error output messages.

@@ -0,0 +1,55 @@
import ROOT
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we will have to do a cleanup of the scripts, probably as preparation for the Tutorial/Workshop.
This is unrelated to this PR though, it should go into an issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good idea!

@@ -72,7 +72,7 @@ FW::EventGenerator::Config FW::Options::readPythia8Options(
Pythia8Generator::makeFunction(hard, lvl)},
{PoissonMultiplicityGenerator{mu},
GaussianVertexGenerator{{vtxStdXY, vtxStdXY, vtxStdZ, vtxStdT}},
Pythia8Generator::makeFunction(hard, lvl)},
Pythia8Generator::makeFunction(pileup, lvl)},
Copy link
Contributor

Choose a reason for hiding this comment

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

Well spotted!

/// The navigator has DirectNavigator type or not
static constexpr bool isDirectNavigator =
std::is_same<KalmanNavigator, DirectNavigator>::value;

Copy link
Contributor

Choose a reason for hiding this comment

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

Just shifting lines, hence ok.

if (isMeasurement) {
measurementIndices.emplace_back(st.index());
} else if (measurementIndices.empty()) {
// No smoothed parameter if the last measurment state has not been
Copy link
Contributor

Choose a reason for hiding this comment

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

"No smoothed parameters if the last measurement stat has not been found yet."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Copy link
Contributor

@asalzburger asalzburger left a comment

Choose a reason for hiding this comment

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

Ok, the changes are integrated. I approve.

@asalzburger asalzburger merged commit 8a05bdb into acts-project:master Apr 28, 2020
@asalzburger asalzburger added this to the v0.23.00 milestone Apr 28, 2020
osbornjd pushed a commit to sPHENIX-Collaboration/acts that referenced this pull request Apr 29, 2020
* Clean-up the KalmanFitter

* Fix the pythia8 option

* Add the script for KF timing test

* Add the python script for plotting KF timing test result

* Fix a bug in CKF

* Fix the comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Improvement Changes to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants