Category Archives: ROOT chat

ROOT discussions

something wrong…?

Hi everyone,,

So, I am trying to do the trigger part. And the way I did is to select the useful elements in the leaves needed (e.g. from the leaf mu_py, I want a list of elements that satisfies the trigger threshold (?)) And the num_entries drop from 30839 to 2988… Attached is the 3 plots, the top one in the right is the raw mu_py, the top left one is selected mu_py…The bottom one is the fitted hinvm (hist of inv mass)…I don’t know if it makes sense… the top right one is kinda suspicious, especially everything is in one bin..(but maybe it was my code.) And I don’t think the bottom one is right either… I would expect a guassian curve (bec we are asked to fit with gaus and it would make sense to be a gaussian with a mean value of particle’s mass…) but i can’t tell where is wrong…

Elim =D

About the variables in muons.root

Hi Edgar,

I am confused by the structure of the tree. Is it that each instance has an array of pt or that each instance has 1 value for mu_pt?
If it is an array, why would it be? Is it because pt is changing with time? But then, what does its histogram represent? is it representing what is the highest pt of the muon had?
If it is a single value, what is the point of drawing a histogram? (from the formula of inv_m, I will only get a single value)

Also, what is runno (the run number) in the muons.root?

Thanks, Elim =D

About AnalyzeRootuple.C

Hi Edgar,

I am studying the program AnalyzeRootuple.C, and I remember that we were playing with the code during class. One thing that you did is to plot a histogram for mu_charge, and you declared the float variable mu_charge by the statement: float mu_charge[200]. But I don’t understand why it’s 200…

And what happens when the statement “mytree->AddBranchAddress(“mu_charge”,μ_charge)” is executed? I originally thought that it is to turn the pointer to the branch called “mu_charge” existed in mytree. But when I check the Function Members in TTree, it says the function AddBranchAddress() returns an integer. What does that integer means? Is it a temperary label for the computer to point to where mu_charge is stored?

Thanks, Elim =)

Somewhat helpful tutorial….

Hey all!

When I started using ROOT over the summer, there was this Tutorial I found… online (not the CERN one, it’s actually by Professor Bose) which I thought was very helpful for basic histogram stuff. I know some of you have been asking how to use ROOT besides just opening files and this may be beneath what some of you know already, but just in case….

(This is also me testing to see if posting things works…)

Hope this helps! 🙂