Hi,
I am trying to fill a branch of a root tree with an array of TLorentzVectors, but I do not know how to do this correctly. I have tried the following code, wich seemed like the obvious way to do it to me:
TFile hfile = (TFile)gROOT->FindObject(“MCdata.root”);
if (hfile)
hfile->Close();
hfile = new TFile(“MCData.root”,“RECREATE”);
Int_t split = 0;
Int_t bsize = 64000;
TTree *MCTree = new TTree(“MCTree”,"");
but i get a segmentation violation. I would like to use a TClonesArray, but I dont think they work with TLorentzVectors. Is this the case, and do you have any other ideas for how to do this?
Thanks,
Clare