Skip to content

LorentzVector vs. TLorentzVector #21

Discussion options

You must be logged in to vote

TLorentzVector is slow and cumbersome and not optimally suited to large volume data analysis. LorentzVectors are lighter and significantly faster. They are two completely different classes, so there is no inheritance or casting between them. You can usually get the same information from LorentzVectors using their utility functions

https://root.cern/doc/v612/Vector.html for overview

https://root.cern/doc/v612/namespaceROOT_1_1Math_1_1VectorUtil.html for helper functions.

So you might want to add (in the function where you use angle)

using ROOT::Math::VectorUtil::Angle;

using ROOT::Math::VectorUtil::Perp;

then

auto angleDiff= Angle(p1,p2);

auto perpComp= Perp(p1,p2);

You can also look at ht…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@naidoo88
Comment options

@dglazier
Comment options

@naidoo88
Comment options

Answer selected by naidoo88
Comment options

You must be logged in to vote
1 reply
@naidoo88
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants