Difference between revisions of "FSRoot"
From GlueXWiki
Line 2: | Line 2: | ||
− | There are two steps: | + | ==There are two steps:== |
− | + | 1. Use FlattenForFSRoot ([https://github.com/JeffersonLab/hd_utilities/tree/master/FlattenForFSRoot/flatten.cc hd_utilities/FlattenForFSRoot/flatten]) to generate flat trees from the standard analysis trees. | |
− | > flatten -in [ | + | > flatten -in [input file with analysis tree] -out [output file with flat tree] |
− | Run flatten with no flags to see further run options. | + | * Run flatten with no flags to see further run options. |
+ | * This should work for data, reconstructed MC, and thrown MC. | ||
+ | * See the [https://github.com/JeffersonLab/hd_utilities/tree/master/FlattenForFSRoot/Documentation FlattenForFSRoot/Documentation] directory for more information. | ||
− | |||
+ | 2. Use FSRoot (available at [https://github.com/remitche66/FSRoot https://github.com/remitche66/FSRoot]) to make histograms from the flat trees. | ||
− | + | * See the [https://github.com/remitche66/FSRoot/tree/master/Documentation FSRoot/Documentation] directory for documentation. | |
− | |||
− | + | == Here is a working example: == | |
− | Here is a working example: | + | |
(1) Flatten an analysis tree: | (1) Flatten an analysis tree: | ||
− | > flatten -in /u/home/remitche/FSRootExample/analysis.root -out flat.root | + | > flatten -in /u/home/remitche/FSRootExample/analysis.root -out flat.root |
(2) Make a plot of the eta' mass: | (2) Make a plot of the eta' mass: | ||
− | root> FSHistogram::getTH1F("flat.root","ntFSGlueX_100_221","MASS(2,3,4,5,6)","(80,0.8,1.2)","")->Draw() | + | root> FSHistogram::getTH1F("flat.root","ntFSGlueX_100_221","MASS(2,3,4,5,6)","(80,0.8,1.2)","")->Draw() |
Revision as of 11:37, 10 December 2021
FSRoot is an alternative to DSelectors that uses flat trees.
There are two steps:
1. Use FlattenForFSRoot (hd_utilities/FlattenForFSRoot/flatten) to generate flat trees from the standard analysis trees.
> flatten -in [input file with analysis tree] -out [output file with flat tree]
- Run flatten with no flags to see further run options.
- This should work for data, reconstructed MC, and thrown MC.
- See the FlattenForFSRoot/Documentation directory for more information.
2. Use FSRoot (available at https://github.com/remitche66/FSRoot) to make histograms from the flat trees.
- See the FSRoot/Documentation directory for documentation.
Here is a working example:
(1) Flatten an analysis tree:
> flatten -in /u/home/remitche/FSRootExample/analysis.root -out flat.root
(2) Make a plot of the eta' mass:
root> FSHistogram::getTH1F("flat.root","ntFSGlueX_100_221","MASS(2,3,4,5,6)","(80,0.8,1.2)","")->Draw()