Root code that will help me do the following analysis

Please i need your help all. I am using two detectors (in coincidence) linked to digital equipment that can give time stamped result to measure activity of Norm, I need a code that will be able to do the following;

  1. sort the data
  2. plot a histogram of count against channel number (bin)
  3. plot a histogram of count against energy (after energy calibration)
  4. plot histogram of count for each hour (count against time in hour)
  5. plot a histogram or spectrum of time gate between the two detector
  6. also be able to get count integral under each peak

Sure ROOT can do all this. May be you should start by having a look at the tutorials and reference guide on the web.

Hi Munirat,
welcome to the ROOT forum! I am sorry but I don’t think you will find someone in the forum with enough free time to write a full-blown analysis for you - writing these kind of programs amounts to a great part of the work of a scientist!

I can direct you to our getting started page which links to a “ROOT primer” (i.e. an introduction to programming in ROOT) as well as many tutorials that you can study and try out.

I suggest you also search this forum (and google) for each one of the six points you indicated, as these are common applications that have been discussed at length in the past.

Finally, I suggest you take it one step at a time and ask specific questions on this forum when you find yourself stuck on a ROOT-specific problem. For example, once you have some data collected from the detectors you might want to read it into ROOT. Is that going to be a text file or data in ROOT format? Do you want to write your analysis in C++ or python? What have you tried, and what did not work as expected? When you ask for help you might want to pre-emptively explain all of the above and more, so that people can give appropriate suggestions.

Good luck!

Do you want to write your analysis in C++ or python?

or Go ? :slight_smile:

The Solid experiment is using Go for its DAQ, and here in my lab, we are using it for the DAQ+analysis of a medical detector apparatus:

so it’s also a valid choice :slight_smile:

Thanks. I have a data in root format. my major problem is how to sort the data to a readable form. I can plot a simple histogram using root with a small amount of data i create.

I want to use c++. I want to atleast sort the data an plot histogram

I have a data file. I can plot a simple histogram with a set of given variables. but the data I have now is large and need to be sorted which i don’t know how to sort and plot histogram

it is quite unclear what you mean with “sorting the data and plotting an histogram”. You might want to elaborate more :slight_smile:

If you want to fill a histogram with some values, it does not matter in which order they are (i.e. you don’t need to sort them).
If you have tens of GB of data on disk it’s going to be a pain to sort everything according to any criterion.
If you have N entries (rows) and all you want is to sort one or two branches (columns) according, e.g. to the values of the first branch, I suggest you start by taking a look at existing answers.

ok thanks so much. I will try all your suggestion

Thanks. I will do as suggested.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.