Changes

Jump to navigation Jump to search
Line 69: Line 69:     
The analyzer, written in C++, opens the CODA file, and is currently configured to read from an fADC and F1TDC (see above for descriptions). The CODA file consists of events from a data run with these two components in operation. The analyzer was initially configured to read from two fADC's and one F1TDC, so this necessitated some reconfiguration. Once the analyzer opens the data file, it creates a .root file with the same name, loops over each channel included in the data file, and extracts events from these. From these events, the analyzer constructs an event tree (an n-tuple in ROOT), which is a file object that can be read by ROOT. The number of components of the n-tuple/tree is based on the number of active channels in the data run. 1D and profile histograms are then constructed from the n-tuples obtained from the fADC (which is essentially the primary readout controller in this particular setup, and thus the parsing/processing of of the data from the fADC makes up a sizable portion of the analyzer).
 
The analyzer, written in C++, opens the CODA file, and is currently configured to read from an fADC and F1TDC (see above for descriptions). The CODA file consists of events from a data run with these two components in operation. The analyzer was initially configured to read from two fADC's and one F1TDC, so this necessitated some reconfiguration. Once the analyzer opens the data file, it creates a .root file with the same name, loops over each channel included in the data file, and extracts events from these. From these events, the analyzer constructs an event tree (an n-tuple in ROOT), which is a file object that can be read by ROOT. The number of components of the n-tuple/tree is based on the number of active channels in the data run. 1D and profile histograms are then constructed from the n-tuples obtained from the fADC (which is essentially the primary readout controller in this particular setup, and thus the parsing/processing of of the data from the fADC makes up a sizable portion of the analyzer).
      
Since, as mentinoned before, I was relatively inexperienced with programming at the beginning of the semester, there was a relatively steep learning curve, as there are few comments and no documentation for the Event Analyzer file that was included with Halldtrg5, and this file was only intended to serve as an example. With the help of Alexander Somov from Jefferson Lab, I was able to make some sense of the analyzer, and use it to create .root files from my test set-up with the function generator.
 
Since, as mentinoned before, I was relatively inexperienced with programming at the beginning of the semester, there was a relatively steep learning curve, as there are few comments and no documentation for the Event Analyzer file that was included with Halldtrg5, and this file was only intended to serve as an example. With the help of Alexander Somov from Jefferson Lab, I was able to make some sense of the analyzer, and use it to create .root files from my test set-up with the function generator.
Line 76: Line 75:     
==ROOT==
 
==ROOT==
 +
ROOT is a C/C++ based, object-oriented computing framework designed by CERN to efficiently process and analyze large amounts of data, e.g. from high-energy physics experiments. ROOT has an incorporated C/C++ intepreter, CINT, which is written in C++ itself.
 +
 +
The work I did learning C++ was most useful for ROOT. Trying to follow the construction of the Event Analyzer was one thing, creating new macros/scripts for use in ROOT, to facilitate data analysis, was a different matter entirely. My first successful endeavor was a relatively short macro, found on gluey at \home\acarta\ROOT\simplegraph.C, which allows for plotting measurements from a simple .txt file. I spent a good deal of time plotting and fitting measurements taken by Fridah Mokaya. It took me quite a while to get used to the objects and classes in ROOT, which differ from standard C++, as well as the various options and procedures for creating plots in ROOT. Especially troublesome was the use of the TCanvas objects, in particular trying to add multiple plots to the same canvas.
 +
 +
<gallery>
 +
file:Test_spectrum.png | A sample plot from ROOT, created from some calibration measurments.
 +
</gallery>
 +
 +
I initially thought that this macro would serve only as an exercise for my own benefit, but it turns out that my colleague John Bartolotta was able to use the simplegraph.C macro for his own work on the active collimator. The Labview program he is using apparently outputs .txt files, so this macro is well suited to his purposes. Since he was completely new to ROOT and programming at a later point in the semester, I spent some time working with him to help him get started on plots and fitting, which help give me a better grasp of ROOT as well.
 +
 +
Being able to construct and analyze histograms is more important for my own purposes, however. The analyzer is already equipped to construct histograms, but the data-files that I have been applying it to thus far are not suitable, as they contain no events. I was able to create some histograms using data from past lab classes, so once I resolve this particular issue, I should be able to get useful histograms from our DAQ station.
 +
 +
My immediate goal is to work towards resolving this issue during the winter intersession, after the Christmas holiday.
73

edits

Navigation menu