-
Notifications
You must be signed in to change notification settings - Fork 174
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
feat: introduce digitization #663
feat: introduce digitization #663
Conversation
Codecov Report
@@ Coverage Diff @@
## master #663 +/- ##
=======================================
Coverage 49.07% 49.07%
=======================================
Files 331 331
Lines 16568 16568
Branches 7722 7722
=======================================
Hits 8130 8130
Misses 3006 3006
Partials 5432 5432 Continue to review full report at Codecov.
|
Hi @XiaocongAi - sorry for the bit lengthy Pr, but it should be quite clear. There will be a bit more code to come for the covariance assignment and the smearing generation of charge and lorentz vector, but this can be done as an addon. |
@paulgessinger - I tried three times now with the |
Ok, CI finally runs through - @xai - this one is ready for review |
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.
Hi @asalzburger, I have not looked into the Json part in great detail, but in general, the PR looks very nice to me. I have only a few minor comments.
Examples/Algorithms/Digitization/include/ActsExamples/Digitization/DigitizationAlgorithm.hpp
Outdated
Show resolved
Hide resolved
Examples/Algorithms/Digitization/include/ActsExamples/Digitization/DigitizationAlgorithm.hpp
Outdated
Show resolved
Hide resolved
Examples/Algorithms/Digitization/include/ActsExamples/Digitization/DigitizationConfig.hpp
Outdated
Show resolved
Hide resolved
Examples/Algorithms/Digitization/include/ActsExamples/Digitization/DigitizationConfig.hpp
Outdated
Show resolved
Hide resolved
Examples/Algorithms/Digitization/include/ActsExamples/Digitization/DigitizationConfig.hpp
Outdated
Show resolved
Hide resolved
Examples/Algorithms/Digitization/include/ActsExamples/Digitization/DigitizationConfig.hpp
Outdated
Show resolved
Hide resolved
Examples/Algorithms/Digitization/include/ActsExamples/Digitization/DigitizationConfig.hpp
Show resolved
Hide resolved
struct DigitizedParameters { | ||
std::vector<Acts::BoundIndices> indices = {}; | ||
std::vector<Acts::ActsScalar> values = {}; | ||
std::vector<Acts::ActsScalar> covariances = {}; |
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 guess this vector is for just the errors of the parameters (not their correlation), right? Personally, I would expect a matrix from the name covariance
. Is it better to rename it to e.g. errors
or uncertainties
?
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.
Measurement directions are by all means independent for our purpose.
We could write 'variances' ?
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.
Sounds good!
@XiaocongAi - I think I have addressed everything & simplified the code by removing the 'Void...Generators' by just having void functions. |
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.
HI @asalzburger , thank you for the changes. I will approve.
One thing to confirm though, it looks to me we don't need the SmearingAlgorithm
since it's basically contained in this DigitizationAlgorithm
when we use the smearing
instead of geometric
in the Json input. But you mentioned the HitSmearing
. Which one are we going to remove, the SmearingAlgorithm
or the HitSmearing
?
/// @return a charge to which the threshold can be applied | ||
using ChargeGenerator = std::function<Acts::ActsScalar( | ||
Acts::ActsScalar, Acts::ActsScalar, RandomEngine&)>; | ||
/// Takes as an argument the clsuter size and an random engine |
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.
/// Takes as an argument the clsuter size and an random engine | |
/// Takes as an argument the cluster size and an random engine |
BOOST_AUTO_TEST_CASE(DigitizationConfigRoundTrip) { | ||
std::ofstream out; | ||
|
||
// As all SurfaceBounds have the same streaming API only a one is |
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.
// As all SurfaceBounds have the same streaming API only a one is | |
// As all SurfaceBounds have the same streaming API only one is |
Ideally, both, 'HitSmearing' and 'SmearingAlgorithm' could go, but I would like to keep the latter as we can configure it through command options. |
@asalzburger I think this was a small copy paste error in #663 otherwise the branch would be unreachable.
This PR superseded #652 and introduces the geometric digitization + the possibility to configure it with json.
In detail:
Examples/JsonDigitizationConfigTests.cpp
RootDigitizationWriter
for SmearingAlgorithm and DigitizationAlgorithmWhen deployed, the
HitSmearing
andPlanarSteppingAlgorithm
can become osbolete, and finally thePlugins/Digitization
andPlugins/Identification
can vanish.Here are two example files snippes for the Pixel detector of the TrackML detector
(only showing the change)
The results can be seen in the following plot: