# References

There are several ways to figure out how to do something in ROOT:

• The ROOT web site. As of 2021, these are the areas of the ROOT manual on that site which are supposed to act as documentation:

• The ROOT Reference. You’ve already visited this area. It contains the detailed description of the ROOT classes.

• ROOT Basics. The web pages here outline a basic approach to ROOT. They assume you’re already familiar with C++ or Python. It’s especially useful if you don’t need the step-by-step hand-holding approach I took in this tutorial.

• ROOT Functional Parts. While this describes the ROOT classes, it does so from a technical perspective rather than act as a teaching guide. For example, take a look at their introduction to histograms to see if its approach works for you.

• The ROOT User’s Guide. As I’ve mentioned before, this is a bit out-of-date; it has not been revised since 2018 (and it appears it never will be). For example, there’s nothing in that guide about RDataFrames). But I feel it’s a much better tutorial for new users than any of the other items on this list.1

• Create something “by hand,” save it as a .C file, then examine the file to see how ROOT does it.

There’s one other resource: the example ROOT programs that come with the package. You’ll find them in $ROOTSYS/tutorials. When I ask myself the question “How do I do something complicated in ROOT?” I often find the answer in one of the examples they provide. I’ve found it handy to make my own copy:2 > cp -arv$ROOTSYS/tutorials $PWD  Then I go into the “tutorials” sub-directory, run their examples, and look at their code: > cd tutorials > root demos.C > cd graphics > root first.C > less first.C  You can also find the tutorials on the ROOT web site, but I find it harder to search for specific examples. Note If the distributed nature of the information is annoying to you, welcome to the club! I often have to go hunting to find the answers I want when using ROOT, even after years of working with the package. Occasionally I’ve had no other choice but to examine the C++ source code of the ROOT program itself to find out the answer to a question. 1 So what ROOT resources are out there that are both up-to-date and suitable for students who are not familiar with programming or data-analysis concepts? Unfortunately, the only one I know of is the tutorial you’re reading now! 2 If the command doesn’t work: Did you remember to type module load root in your UNIX command window? That’s what sets the value of$ROOTSYS, at least on Nevis particle-physics systems.