/cvmfs/atlas.cern.ch/repo/sw/software/21.2/AnalysisBaseExternals/21.2.186/InstallArea/x86_64-centos7-gcc8-opt/include/Math/GenVector/LorentzVector.h: In instantiation of 'ROOT::Math::LorentzVector<CoordSystem>& ROOT::Math::LorentzVector<CoordSystem>::operator=(const ForeignLorentzVector&) [with ForeignLorentzVector = TLorentzVector; CoordSystem = ROOT::Math::PtEtaPhiM4D<double>]':
/afs/cern.ch/work/a/abunka/private/dijetStudies/source/dijetVariables/Root/variableAnalysis.cxx:1089:94: required from here
/cvmfs/atlas.cern.ch/repo/sw/software/21.2/AnalysisBaseExternals/21.2.186/InstallArea/x86_64-centos7-gcc8-opt/include/Math/GenVector/LorentzVector.h:137:22: error: 'const class TLorentzVector' has no member named 'x'
SetXYZT( v.x(), v.y(), v.z(), v.t() );
~~^
The “no member named” part is repeated for the y, z, t…
As far as I can tell, my vector is being treated as a TLorentzVector, which then does not have the ability to be initialized to the cluster p4() I am using? But I am really not sure. I do know that when I tried working with TLorentzVectors I had many issues, so i switched to the newer ROOT::Math::LorentzVector. So I am surprised to see TLorentzVector appear in the error.
@Axel I really expect that it is the ROOT Team responsibility to provide the corresponding assignment operators (between a TLorentzVector and a ROOT::Math::LorentzVector). Plenty of the existing source code uses the “old” class and it’s a pain to switch to the new one in new macros (which use “old” libraries).
Not sure what you mean by the “wrong” direction.
I think it should work both ways.
Assume you have an “old” library (which knows the “old” classes only), and you need to pass your “new” object to it and then retrieve some “old” result (which you then want to process in the “new” way).