Hi all,
I want to analyze data stored in TTrees by my group’s design, I want to use a class inheriting from TSelector that makes use of of a TTreeReader. This works fine for Lorentz vectors stored in std::vectors, but I also need to read a single Lorentz vector stored as a separate branch. Executing these few lines:
void test() {
TChain* chain = new TChain("writeNTuple/NTuple");
chain->Add("/afs/desy.de/user/k/knollejo/public/test.root");
TTreeReader fReader;
TTreeReaderValue<ROOT::Math::LorentzVector<ROOT::Math::PtEtaPhiM4D<Double32_t> > > fMet = {fReader, "met"};
fReader.SetTree(chain);
fReader.SetEntry(0);
}
results in the following error message:
Error in TTreeReaderValueBase::CreateProxy(): The branch met contains data of type ROOT::Math::LorentzVector<ROOT::Math::PtEtaPhiM4D<Double32_t> >. It cannot be accessed by a TTreeReaderValue<ROOT::Math::LorentzVector<ROOT::Math::PtEtaPhiM4D >>
The only thing I learn from it is that I am not using Double32_t although I specified it in the declaration of the TTreeReaderValue. If that’s the source of the problem, how can I fix it, or what else might be wrong? Thanks for your help!
Cheers,
Joscha