Idea #17307

Idea #17279: Create an example about how to produce a custom ROOT tree out of LArSoft data

create a gallery example

Added by Lynn Garren over 3 years ago. Updated over 3 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
12.00 h


#1 Updated by Lynn Garren over 3 years ago

  • Status changed from New to Assigned
  • Assignee set to Gianluca Petrillo

#2 Updated by Gianluca Petrillo over 3 years ago

  • Estimated time set to 12.00 h

#3 Updated by Katherine Lato over 3 years ago

  • Assignee changed from Gianluca Petrillo to Saba Sehrish

#4 Updated by Thomas Junk over 3 years ago

Some gallery examples are available in dunetpc/dune/GalleryScripts. There's a 3D spacepoint display, a raw::RawDigit display, FFT and channel correlation tools. Nothing DUNE-specific in fact.

#5 Updated by Thomas Junk over 3 years ago

Oh, I didn't see the requirement here -- to make a custom ROOT tree, though
they do make graphs, and changing them to make trees would be easy.

#6 Updated by Thomas Junk over 3 years ago

Here's a gallery macro that writes a custom ROOT tree:


#7 Updated by Gianluca Petrillo over 3 years ago

My ambition would be an example of a tree which is not so flat.
It should not be so hard with ROOT 6, and I think it's good value for people trying to do a real analysis.
I am thinking of something as complex as having a branch with a STL vector of Track objects where:
struct Hit {
  geo::WireID wire;
  double      time;
  float       charge;
}; // struct Hit

struct Track {
  TVector3 startPoint;
  TVector3 endPoint;
  double   length;

  std::vector<Hit> hits;
}; // class Track

(using the horrible TVector3 may have some sense in such a tree)
  • the data structure is nested as opposed to flat (Track objects contain Hit objects)
  • the data structures depend on LArSoft data types
  • the example must also include how to read that tree
  • there is no association between objects in different branches (i.e. no TRef): hits are contained. Creating that type of references is not going to be LArSoft- not gallery-specific.

Also available in: Atom PDF