I’m trying to create empty LorentzVector with consequent filling it with some values:
LorentzVector empty ;
however I get error
error: no viable constructor or deduction guide for deduction of template arguments of 'LorentzVector'
Could you please suggest, where I can find any examples of declaring and filling LorentzVector objects?
ROOT Version: 6.24/07
Platform: linuxx8664gcc (lxplus7)
Compiler: With g++ (GCC) 10.3.0
You can’t construct a Lorenz vector just with the
LorentzVector type, because this is a templated type. You need to pass the coordinate system as a template parameter:
I suggested here the
PxPyPzE coordinate system, because this is also what you use to set the vector in your snippet.
There are also some aliases for these types defined in the
Using these aliases, you can instantiate the vector like this, for example:
Thanks a lot! This helped.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.