working version, producing output root file with basic plots