I am working with root 6.24/06 on lxplus in eventloop.
I declare a 4 vector and initialize it:
ROOT::Math::LorentzVector<ROOT::Math::PtEtaPhiM4D<double>> myVector; ... myVector = cluster->p4(xAOD::CaloCluster_v1::State::UNCALIBRATED);
This returns a confusing error to me:
/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.