EnglishJapanese Reload Front page List of pages Search Recent changes RSS of recent changes

There are several ways to analyze the data in ANAROOT.
How to analyze the data depends on the preference of user, and following ways are supported by ANAROOT.

  1. Use only decoding/reconstruction library. Writing up your own macro for analysis.
  2. Make a analoop analysis routine for analysis with anafile.
  3. Make a analoop analysis routine where histograms are defined in analysis routine (anafile is not used).

Analysis with original ROOT macros. Reading data from tree output.

The macros in "example/Macros" directory is useful for the simple usage.

When you open the raw data source with TArtEventStore, it will be kind of offline RIDF data mode when the file name is given with character, on the other hand, it will be online memory mode when the data type is give with integer.

Just making object tree

You can simply dump the ROOT TTree file into a file with "example/Macros/RIDF2Tree.C".

Following is one of the example.

> cd run

> cp ../example/Macros/RIDF2Tree.C .

Edit the line of ridf file location in the macro. Then,

> root -b -l RIDF2Tree.C

Then, you can get the file (ridf.pool.root) which contains TTree data object.

Online monitor

You can see the up-to-date histograms with scanning the cache in the analysis server during taking the data. ANAROOT has the functionality of receiving data from Babirl DAQ, and you can process the independent online analysis which will not affect the data acquisition performance. ANAROOT provide three ways to fetch the data: data file, local shared memory, and data streaming from server. When you want to execute the online program which use cpu resources heavily, I recommend you to fetch the data from event cache server. For the online mode, you have to prepare event cache server where you analysis client pull the part of data.

Following is one of the example.

> cd run

> cp ../example/Macros/Online/ShowModule.C .

> root -b -l ShowModule.C

You can see the multiplicity of each module numbers in taken data. No files will be produced.
ANAROOT library can be used in Go4 framework, which is powerful tool for online/offline analysis with Qt GUI.
The detail description of Go4 by using ANAROOT is give at Tools/Analysis/ANAROOT/Go4.

How to interrupt online data analysis.

You can interrupt the event processing with Ctrl-C, then can move to root GUI. Please refer:

> example/Macros/Online/ShowAdc.C

PID reconstruction

Current main macro for PID reconstruction is example/Macros/BigRIPS/1pass/RecoPID.C

If you load the map file before you start the run, the ID information which are used in anapaw is also put in the data object. Some xml files which are necessary for reconstruction are located under "run" directory, you are expected to run the macros under "run" directory. Of course, the xml file you need depends on the detector setup around ZeroDegree/BigRIPS. It means you have to prepare the xml file for your PID reconstruction by yourself. If you want the help to make the xml file, please contact RIBFDAQ team.

Following is one of the example.

> cd run

> cp ../example/Macros/BigRIPS/RecoPID.C .

Edit the line of ridf file location in the macro. Then,

> root -b -l RecoPID.C

You can get a root file which contains some histograms regarding the PID subsystems and a ntuple of PID values.

Analysis with Analoop, Anafile.

Analysis with anafile is available if you use analoop class. Analoop is a simple framework to process the online/offline analysis. Anafile is a text file which describes the definition of histograms cuts and trees. These are mainly for online data analysis. New thread to fill the histograms and trees will be made before starting analysis so that you can draw the histograms during the analysis. You do not have to use anafile for the analysis with analoop. Some of the Start up guides and references of the analysis with analoop/anafile are given at: http://be.nucl.ap.titech.ac.jp/~kondo/moin/moin.cgi/ANAROOT/Manual

It is easy to start from playing with Raw data analysis routine:

- > . setup.sh
- > root
- root [0] gSystem->Load("libXMLParser");
- root [1] gSystem->Load("libanaroot");
- root [2] book(new TAlRawDataExample,"rawdata.ana")
  (or root [2] book(new TAlRawDataExample) if you do not use anafile)
- root [3] push("0007.ridf")
  (or root [3] push(0) to see data on shared memory)
- root [2] start()
  Then, you can look through the made historgrams, such as
- root [3] hn()

TAlRawDataExample also makes TNtuple contains raw data information. You can try:

- root [4] ntp->Draw("val","det==3&&fpl==11")
- root [4] ntp->Scan() // scan the variables in Ntuples
- root [4] ntp->Print() // show the variables in Ntuples
- root [4] ntp->Draw("det") // draw the 1d histogram of detector id
- root [4] ntp->Draw("val","det==21") // draw the 1d histogram of adc/tdc where det==21
- root [4] ntp->Draw("ch","det==21") // draw the 1d histogram of channel distribution where det==21
- root [4] ntp->Draw("val","det==21&&ch==1") // draw the 1d histogram of adc/tdc distribution where det==21&&ch==1
- root [4] ntp->Draw("val>>h1(100,0,200)","det==21&&ch==1") // draw the 1d histogram of adc/tdc distribution where det==21&&ch==1, num of bin:100, min:0, max:200

most of the anapaw commands are supported.

GUI for Analoop/Anafile

Two gui programs are under development.



Analysis with modified Analoop.

You can modify the Analoop for your usage:

- > . setup.sh
- > ./getAnaLoop.sh # you can get the list
- > ./getAnaLoop.sh TAlRawDataExample # Analoop is copied to TAlRawData.cc and TAlRawData.hh

modify the TAlRawData.cc and TAlRawData.hh. Then,

- > root
- root [0] gSystem->Load("libXMLParser");
- root [1] gSystem->Load("libanaroot");
- root [2] .L TAlRawData.cc+
- root [3] book(new TAlRawData)

After this line, same commands can be used. Note that this function is not available for TAlEnc* Analoop.

Last-modified: Wed, 11 Jun 2014 14:26:05 HADT (3685d)