Difference between revisions of "Data Analysis"

From BESIII Ferrara Group Wiki
Jump to: navigation, search
Line 1: Line 1:
 
== '''Data creation:''' ==
 
== '''Data creation:''' ==
 
Data are created by Alberto's software -> GUFI with the following '''format''':
 
Data are created by Alberto's software -> GUFI with the following '''format''':
 
+
# A folder labelled "RUN_$runNumber"
a) A folder labelled "RUN_$runNumber"
+
# Inside there are three kind of file: logbook of the run, logbook of the acquisition and a file for each enabled ROC
 
 
b) 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
 
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:
 
In the '''data folder''' there are several sub-folders for each step:
 
+
# raw_dat -> output from ROC
1) raw_dat -> output from ROC
+
# raw_root -> decoded data in two steps: event.root and ana.root
 
 
2) raw_root -> decoded data in two steps: event.root and ana.root
 
 
[[File:Schema a blocchi GRATE.pdf|thumb]]
 
[[File:Schema a blocchi GRATE.pdf|thumb]]
 
<big>A diagram that shows the data-flow of the code: [[:File:Schema a blocchi GRATE.pdf]]</big>
 
<big>A diagram that shows the data-flow of the code: [[:File:Schema a blocchi GRATE.pdf]]</big>
  
The reconstruction of the run can be performed using the following command on srv-lab:<syntaxhighlight>
+
The reconstruction of the run can be performed using the following command on srv-lab from everywhere:<syntaxhighlight>
 
GRATE #RunID
 
GRATE #RunID
 
</syntaxhighlight>
 
</syntaxhighlight>
Line 45: Line 40:
 
   -g RUN              open the merged event root file for the run
 
   -g RUN              open the merged event root file for the run
  
</syntaxhighlight>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:<syntaxhighlight>
+
</syntaxhighlight>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:<syntaxhighlight>
 
TER -mDf 131 0 3
 
TER -mDf 131 0 3
 
</syntaxhighlight>
 
</syntaxhighlight>
Line 74: Line 69:
 
== '''TIGER Event Reconstruction''' ==
 
== '''TIGER Event Reconstruction''' ==
 
The creation of the root file follow several steps:
 
The creation of the root file follow several steps:
 
+
# [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 See at the following link the data format of the data: [[Data Format TER]] See the diagram block of the decode: XXX
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
+
# Unify the root files from each ROC
 
+
# Calibrate charge and time as a function of the FEB/channel See tne diagram block: [[:File:Schema a blocchi ana.pdf]]
See at the following link the data format of the data: [[Data Format TER]]
+
# Sort the entries as a function of the time, measure the trigger time and create the event See the diagram block: [[:File:Schema a blocchi event.pdf]]
 
+
# Refer the hit time to the TP time See the diagram block: [[:File:Schema a blocchi post event.pdf]]
See the diagram block of the decode: XXX
 
 
 
2) Unify the root files from each ROC
 
 
 
3) Calibrate charge and time as a function of the FEB/channel
 
 
 
See tne diagram block: [[:File:Schema a blocchi ana.pdf]]
 
 
 
4) Sort the entries as a function of the time, measure the trigger time and create the event  
 
 
 
See the diagram block: [[:File:Schema a blocchi event.pdf]]
 
 
 
5) Refer the hit time to the TP time  
 
 
 
See the diagram block: [[:File:Schema a blocchi post event.pdf]]  
 
  
 
== '''GRAAL''' ==
 
== '''GRAAL''' ==
 
The reconstruction and the analysis in GRAAL is divided in three steps:
 
The reconstruction and the analysis in GRAAL is divided in three steps:
 
+
# [$graal/src/rec] Prenalysis on the hits and clusterization
1- [$graal/src/rec] Prenalysis on the hits and clusterization
+
# [$graal/src/evt] Tracking and good cluster selection
 
+
# [$graal/src/ana] Generation of the PDF with the informations of charge, time and occupancy as a function of the FEB
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]]
 
Data format is defined here: [[Data Format GRAAL]]
  
 
See the diagram block: [[:File:Block diag.png]]
 
See the diagram block: [[:File:Block diag.png]]

Revision as of 21:34, 23 June 2019

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

File:Schema a blocchi GRATE.pdf 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)
   -D RUN SUBRUN ROC   Decoding -> run Decode.py
   -A RUN SUBRUN       Calibration  -> run ana.C
   -E RUN SUBRUN       Create event -> run event.C
   -P RUN SUBRUN       Associate the time of each TIGER to its TP -> run post_event.C
   -P RUN SUBRUN       RUN ana event post_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

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 See at the following link the data format of the data: Data Format TER See the diagram block of the decode: XXX
  2. Unify the root files from each ROC
  3. Calibrate charge and time as a function of the FEB/channel See tne diagram block: File:Schema a blocchi ana.pdf
  4. Sort the entries as a function of the time, measure the trigger time and create the event See the diagram block: File:Schema a blocchi event.pdf
  5. Refer the hit time to the TP time See the diagram block: File:Schema a blocchi post event.pdf

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: File:Block diag.png