I am trying to write a branch in a root tree following how a vector is to be written.
The snippet of the code I use is like this.
TFileDirectory spikeStudyDir = fs->mkdir(“SpikeStudy”);
myEvent = spikeStudyDir.make(“myEvent”,“a tree with histograms”);
Photon4Momentum = new std::vector();
But the rootfile doesn’t have this branch written in the tree. Though other branches with vectors of int are easily written. Could somebody please help me with this? I tried to look up a bit for this. Could not find someone doing it this way but saw people using TClonesArray for this but I am not really sure then why can’t one define a simple array of TLorentzVector? How are these 2 different? I am a bit confused.
Thanks for any help.