Data Analysis

From BESIII Ferrara Group Wiki
Jump to: navigation, search

Data creation:[edit | edit source]

Data are created by Alberto's software -> GUFI with the following format:

  1. A folder labelled "RUN_$runNumber"
  2. Inside there are three kind of file: logbook of the run, logbook of the acquisition and a file for each enabled ROC

The data are saved on the acquisition computer. For each folder in /home/cgemlab2/data then a copy is created on srv-lab. In srv-lab the data are stored in /home/ihep_data/data

In the data folder there are several sub-folders for each step:

  1. raw_dat -> output from ROC
  2. raw_root -> decoded data in two steps: event.root and ana.root

A diagram that shows the data-flow of the code: File:Schema a blocchi GRATE.pdf

The reconstruction of the run can be performed using the following command on srv-lab from everywhere:

GRATE #RunID

Data analysis:[edit | edit source]

The data are threated in two step:

1) "TIGER Event Reconstruction" that convert the data collected by each ROC to a root file

The code can be run from srv-lab using the command "TER", here some examples:

[ihep_data@srv-lab ~]$ TER -h
Usage:

   -w                  to execute echo "hello world"
   -h                  help (this output)
   -F RUN SUBRUN ROC   Decoding one ROC  -> run Decode.py
   -D RUN SUBRUN       Decoding all ROCs -> run Decode.py
   -V RUN SUBRUN       Merge thr decoded files
   -A RUN SUBRUN       Calibration       -> run ana.C
   -E RUN SUBRUN       Create event      -> run event.C
   -P RUN SUBRUN       RUN ana event
   -M                  make clean all
   -m                  make
   -f RUN SUBRUN ROC   open the decoded      root file for the run and subrun and roc given
   -d RUN SUBRUN       open the decoded      root file for the run and subrun given
   -a RUN SUBRUN       open the ana          root file for the run and subrun given
   -e RUN SUBRUN       open the event        root file for the run and subrun given
   -p RUN SUBRUN       open the post_event   root file for the run and subrun given
   -g RUN              open the merged event root file for the run
   -C RUN              copy the run into thr GRAAL folder
   -Q RUN SUBRUN       data quality analysis and plot

For example if someone want to COMPILE the code, DECODE a sub run 0 of roc 3 and look a the file, then he can use a unique command from everywhere:

TER -mDf 131 0 3

2) GRAAL to digitize and clusterize the hit from each channel/strip and then performe the tracking

[ihep_data@srv-lab ~]$ graal -h
Usage:

   -e     to execute echo "hello world"
   -h     help (this output)
   -R     recSelector
   -E     evtSelector
   -A     anaSelector
   -a     recSelector, evtSelector and anaSelector
   -M     make clean all
   -m     make
   -G     get the run from the repository
   -r     open the root file
   -o     open the rec root file
   -O     open the evt root file
   -D     download the latest version of GRAAL
   -C     check if the run is in the collection
   -c     capSelector
   -w     open the raw root file

TIGER Event Reconstruction[edit | edit source]

The creation of the root file follow several steps:

  1. [Script in python] Deconding the data from the ROC and it extract the variables into a root file: ecoarse, efine, tcoarse, tfine, strip ID, chip ID, FEB ID, ROC ID, frameword
  2. Unify the root files from each ROC
  3. Calibrate charge and time as a function of the FEB/channel
  4. Sort the entries as a function of the time, measure the trigger time and create the event
  5. Refer the hit time to the TP time


See at the following link the data format of the data: Data Format TER

See the diagram block of the decode  : File:Mappa concettuale decode.pdf

See the diagram block of the ana.C  : File:Schema a blocchi ana.pdf

See the diagram block of the event.C  : File:Schema a blocchi event.pdf

See the diagram block of the post_event.C: File:Schema a blocchi post event.pdf --> NOT USED ANYMORE

GRAAL[edit | edit source]

The reconstruction and the analysis in GRAAL is divided in three steps:

  1. [$graal/src/rec] Prenalysis on the hits and clusterization
  2. [$graal/src/evt] Tracking and good cluster selection
  3. [$graal/src/ana] Generation of the PDF with the informations of charge, time and occupancy as a function of the FEB

Data format is defined here: Data Format GRAAL

See the diagram block of GRAAL: File:Block diag.png