Back to home page

sPhenix code displayed by LXR

 
 

    


Warning, /coresoftware/calibrations/tpc/fillDigitalCurrentMaps/README.md is written in an unsupported language. File is not indexed.

0001 # SetUp
0002 Start here for setting up environment: [Example_of_using_DST_nodes (Wiki)](https://wiki.bnl.gov/sPHENIX/index.php/Example_of_using_DST_nodes#Building%20a%20package)
0003 - Setup local compilation for bash shel:
0004 
0005 ```
0006 source /opt/sphenix/core/bin/sphenix_setup.sh -n
0007 export MYINSTALL=/sphenix/user/shulga/tpc2019_install
0008 source /opt/sphenix/core/bin/setup_local.sh $MYINSTALL
0009 ```
0010 **Do not forget to change the line:** ```export MYINSTALL=/sphenix/user/shulga/tpc2019_install```
0011 
0012 <!---
0013 - Creating package files:
0014 ```
0015 CreateSubsysRecoModule.pl --all --overwrite fillSpaceChargeMaps
0016 ``` 
0017 (*very useful script providing all files needed for new package*, `be carefull with options`)
0018 --->
0019 
0020 - Compilation of the package:
0021 ```
0022 mkdir build
0023 cd build
0024 ../autogen.sh --prefix=$MYINSTALL
0025 make -j 4
0026 make install
0027 ```
0028 - reading first file:
0029 
0030 
0031 
0032 
0033 # Workflow:
0034 - DST files with TrkrHitSet containing ADCs from Hijing events used for the analysis: 
0035     - DST_TRKR_HIT_sHijing_0_20fm-0000000006--*
0036 
0037 - To get list of the files:
0038 ```
0039 CreateFileList.pl --run 6 --type 4 --nopileup DST_TRKR_HIT G4Hits
0040 ```
0041 
0042 - File with  bunchcrossing id and time (ns) assuming 106ns between bunches and 50kHz collision rate: __timestamps_50kHz.txt__. The file is used to mimic the bunchcrossing;
0043 
0044 - Running over containers in the files is performed with Fun4All environment. Main code is Fun4All_FillDCMap.C, it is run with run_files_AA.sh, which takes as an input the first and last file number:
0045 ```
0046 #This will run first 5 files with G4Hits (100 events per file in the MDC2) and create files 
0047 #with histograms:
0048 source macros/run_files_AA.sh 1 2 1508071.0
0049 ```
0050 
0051 -  As soon as files are available the histograms are inside;
0052 - To create bunch of bash files and condor job files to start condor jobs scripts are available:
0053 ```
0054 #Creating folders to store all the files:
0055 
0056 mkdir Out
0057 mkdir Files
0058 mkdir condor_macros
0059 
0060 #Creating 1000s job files to run over G4Hits:
0061 scripts/generate_files_AA.py
0062 ```
0063 **Do not forget to change the path to your repositories:** 
0064 
0065 ```export MYINSTALL=/sphenix/user/shulga/tpc2019_install```
0066 
0067 ```/sphenix/user/shulga/Work/...```
0068 
0069 - Scripts above will also generate bash files to submit all jobs, *_all bash scripts created above should be provided executable rights before that_*:
0070 ```
0071 ../run_all_jobs*  
0072 ```
0073 
0074 # Adding histograms from all files:
0075 The files contain histograms for 100 events each. Full map is ~10000 events. Thus, maps have to be integrated. 
0076 To make files smaller the Sumw2 arrays/matrices for histograms should not be stored.
0077 The tool to provide this functionality:
0078 ```
0079 add_histos.py
0080 ```