how is it posible to add an array of TLorentzVector with variable lenght to an array? I’m thinking of the same stuff that works fine for e.g. int
t->Branch(“y”,&y,“y/I”);
t->Branch(“X”,X,“X[y]/I”);
But with X being a TLorentzVector-Array.
The leaflist method of branch creation (the one you are refering to) is to be used only for simple types. To have a variable number of TLorentzVector per event, you can create a branch holding a TClonesArray of TLorentzVector or a std::vector (for which you will need to generate the dictionary).
Cheers,
Philippe.
// Example for TClonesArray.
TClonesArray *tca = new TClonesArray("TLorentzVector");
t->Branch("vec",&tca);