Getting RMS for nevents

ignore this entry…

I assume you solved the original problem?


Actually, not yet.

I tried to delete my previous entry but I couldnt. Nowadays I improved it and asking again…

I have an ntuple. Rec[hit] is an array which hit is integer from 0 to 2000. I would like to get rms and mean values for these Rec[hit].

I am able to get the rms and mean values by writing


from root prompt.

since I have 2001 channels I would like to make a loop to pick up the values.

I am trying to make a loop like that;

[color=green]for (Int hit=0;hit<2001;hit++){

I mean, my question is how I can get the rms values of a one dimensiol array ?? Is there any that kind of tutorial or script ?

(I will get the rms values channel by channel and put all of them into a plot)


Use TString fordraw; for (Int hit=0;hit<2001;hit++){ fordraw.Form("Rec[%d]",hit); t->Draw(fordraw); }


That’s what I need! Thanks a lot…

One of my friend told me that I needed a string to do it. And I was trying on it.

I will combine this part with my code.

Best Regards,