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
Move jacobian calculation to DF #5753
Move jacobian calculation to DF #5753
Conversation
+1 |
A new Pull Request was created by @arizzi for CMSSW_7_3_X. Move jacobian calculation to DF It involves the following packages: DataFormats/GeometryVector @civanch, @nclopezo, @mdhildreth, @cmsbuild, @StoyanStoynev, @slava77 can you please review it and eventually sign? Thanks. |
If we move, we should move all of the Jacobians, not cherry-pick on one use-case basis. It makes sense to me to have this and similar other somewhat "basic" plain math available in FWLite (hence, the choice of using the DataFormats subsystem as a historical choice is OK). |
there is dependency on GeometryVector, so this is the lowest level place where they can enter. |
If it's done with XYZVectorF, the code can stay in DataFormats/Math |
following such line of though we can get rid of GeometryVector alltogether (not necessary a bad idea) |
of course it can be done replacing GlobalVector with math::GlobalVector, On Thu, Oct 9, 2014 at 1:00 PM, Slava Krutelyov notifications@github.com
|
in any case I will veto any use of Root vectors in Tracking, so please do not start such a discussion |
|
||
|
||
AlgebraicMatrix65 jacobianCurvilinearToCartesian(const GlobalVector & momentum, int q) { | ||
AlgebraicMatrix65 theJacobian; |
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.
Is the cost of an extra instance of a 6x5 matrix local + copy to return by value negligible enough?
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.
given the presence of R and of theJacobian * R;
most probably yes...
Of course we should remove the use of the old class and use the function in the few places where is used..
Cartesian errors are not used in Tracking... only in vertex fitting
https://cmssdt.cern.ch/SDT/lxr/source/RecoVertex/KinematicFitPrimitives/src/TrackKinematicStatePropagator.cc?v=CMSSW_7_2_0_pre7#0247
the only instance
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.
here is a complete list
https://cmssdt.cern.ch/SDT/lxr/ident?v=CMSSW_7_2_0_pre7&_i=cartesianError
and infact there are two places where cartesianError() is invoked in tracking just to get czz.
to be fixed...
+1 |
do we understand why the time increases? |
…_0_pre7 Utilities/ReleaseScripts -- Move jacobian calculation to DF
A few more details on the increase in CPU: There is an extra instance of a matrix (with a copy) in the code compared to the old implementation, but this appears to be a sub-dominant effect (at least this part is not showing up explicitly in the breakdown of calls in the igprof). Functions not using the jacobian have the same cost in my reference and "new" runs. So, I think this increase is more likely to be real. |
Hi Slava, |
This PR moves the simple jacobian matrix definition from TrackingTools to DataFormats.
With this change we can properly compute the uncertainty on sum of Candidates as needed by btag for VertexCompositePtrCandidate.
(The fix for VertexCompositePtrCandidate wrt original Dinko's implementation will be in a separate later PR)
@ferencek @VinInn