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
  
-Format of the logbook ??
+
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
  
-Format of the data ??
+
In the '''data folder''' there are several sub-folders for each step:
  
The data are saved on the acquisition computer.
+
1) raw_dat -> output from ROC
  
For each folder in /home/cgemlab2/data then a copy is created on srv-lab
+
2) raw_root -> decoded data in two steps: event.root and ana.root
 +
[[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>
  
In srv-lab the data are stored in /home/ihep_data/data
+
The reconstruction of the run can be performed using the following command on srv-lab:<syntaxhighlight>
 +
GRATE #RunID
 +
</syntaxhighlight>
  
In the data folder there are several sub-folders for each step:
+
== '''Data analysis:''' ==
 +
The data are threated in two step:
 +
 
 +
<big>1)  "TIGER Event Reconstruction" that convert the data collected by each ROC to a root file</big>
  
raw_dat -> output from ROC
+
The code can be run from srv-lab using the command "TER", here some examples:<syntaxhighlight>
 +
[ihep_data@srv-lab ~]$ TER -h
 +
Usage:
  
raw_root -> decoded data in two steps: event.root and ana.root
+
  -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
  
== '''Data analysis:''' ==
+
</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>
The data are threated in two step:
+
TER -mDf 131 0 3
 +
</syntaxhighlight>
 +
 
 +
<big>2) GRAAL to digitize and clusterize the hit from each channel/strip and then performe the tracking</big><syntaxhighlight>
 +
[ihep_data@srv-lab ~]$ graal -h
 +
Usage:
  
1- Wenlong code, renamed "TIGER Event Reconstruction" that convert the data collected by each ROC to a root file
+
  -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
  
2- GRAAL to digitize and clusterize the hit from each channel/strip and then performe the tracking
+
</syntaxhighlight>
  
 
== '''TIGER Event Reconstruction''' ==
 
== '''TIGER Event Reconstruction''' ==
 
The creation of the root file follow several steps:
 
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, altro?
+
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
  
2- Unify the root files from each ROC
+
See tne diagram block: [[:File:Schema a blocchi ana.pdf]]
  
3- [ana.C] 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
  
4- [event.C] 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''' ==
Line 48: Line 103:
  
 
3- [$graal/src/ana] Generation of the PDF with the informations of charge, time and occupancy as a function of the FEB
 
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]]

Revision as of 21:32, 23 June 2019

Data creation:[edit | edit source]

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

a) A folder labelled "RUN_$runNumber"

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

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:

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:

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