Back to home page

sPhenix code displayed by LXR

 
 

    


Warning, /analysis/dNdEta_Run2023/production/README.md is written in an unsupported language. File is not indexed.

0001 # dNdEta production chain
0002 
0003 This directory contains the python script `InttMbdCombineChain.py` and configuration `config_combinechain.py` to run the dNdEta production chain in an automatic, "push-button" way, per requested by the sPHENIX Collaboration.  
0004 Run the the python script `InttMbdCombineChain.py` with the `--help` option to see the usage.
0005 ```
0006 Usage: InttMbdCombineChain.py ver [options -h]
0007 
0008 Options:
0009   -h, --help          show this help message and exit
0010   -i, --inttdst       Run INTT DST production
0011   -n, --inttntuple    Run INTT ntuple production
0012   -m, --centmbntuple  Run Centrality&MB ntuple production
0013   -c, --runcombiner   Run INTT event combiner
0014 ```
0015 
0016 The configuration `config_combinechain.py` contains the parameters for the INTT DST production, INTT ntuple production, and the INTT-MBD event combiner. To show the parameters, run `InttMbdCombineChain.py` with the `--printparam` option.
0017 ```python
0018 username = pwd.getpwuid(os.getuid())[0]
0019 softwarebasedir = '/sphenix/user/{}/software'.format(username)
0020 productiondir = os.path.dirname(os.path.abspath(__file__))
0021 dndetamacrodir = '{}/macros'.format(os.path.abspath(os.path.join(productiondir, os.path.pardir)))
0022 macrodir = '{}/macros'.format(softwarebasedir,username)
0023 macrorepo = 'https://github.com/sPHENIX-Collaboration/macros.git'
0024 
0025 runnumber = 20869
0026 
0027 inttdstproduction_InttUnpacker_nEvt = -1
0028 inttdstproduction_runTrkrHits = True
0029 inttdstproduction_runTkrkClus = True
0030 inttdstproduction_stripRawHit = True
0031 
0032 inttntupleproduction_productionTag = '2023p011'
0033 inttntupleproduction_InttNtupleDir = 'Data_NtupleIntt_Run{}'.format(runnumber)
0034 inttntupleproduction_eventPerJob = 1000
0035 inttntupleproduction_nJob = 551
0036 inttntupleproduction_softwareversion = 'ana.405'
0037 inttntupleproduction_submitcondor = False
0038 
0039 centntupleproduction_softwareversion = 'ana.403'
0040 centntupleproduction_productionTag = '2023p011'
0041 centntupleproduction_CentralityNtupleDir = 'Data_NtupleCentrality_Run{}'.format(runnumber)
0042 centntupleproduction_eventPerJob = -1
0043 centntupleproduction_nJob = 1
0044 centntupleproduction_submitcondor = True
0045 
0046 inttmbdcombine_combinedNtupleName = 'Data_CombinedNtuple_Run{}.root'.format(runnumber)
0047 ```
0048 
0049 ## INTT DST production
0050 To run the INTT DST production, do
0051 ```
0052 python InttMbdCombineChain.py --inttdst
0053 ```
0054 The script will do the following steps:
0055 1. Check whether the [sPHENIX macro repository](https://github.com/sPHENIX-Collaboration/macros/tree/master) exists under the `[softwarebasedir]` directory (`[softwarebasedir]` is specified in the configuration `config_combinechain.py`). If yes, it will pull the latest version of the repository. If not, it will clone the repository.  
0056 2. Change the directory to `[softwarebasedir]/macros/InttProduction`, and modify the `runTrkrHits`, `runTkrkClus`, `stripRawHit` flags in `Fun4All_Intt_Combiner.C` according to the flags `[inttdstproduction_runTrkrHits]`, `[inttdstproduction_runTkrkClus]`, and `[inttdstproduction_stripRawHit]` in `config_combinechain.py`.
0057 3. Execute the `intt_makelist.sh` under `[softwarebasedir]/macros/InttProduction` to produce INTT raw data lists of the given run number `[runnumber]`.
0058 4. Run the macro `Fun4All_Intt_Combiner.C` to produce the INTT DST. You could change `inttdstproduction_InttUnpacker_nEvt` to a number other than -1 for testing purpose. If it is set to -1, the macro will process all events.
0059 4. After the INTT DST production is done, the script will clean up the INTT raw data lists and move the INTT DST to the `[productiondir]` directory (`[productiondir]` is specified in `InttMbdCombineChain.py`).
0060 
0061 ## INTT ntuple production
0062 To run the INTT ntuple production, do
0063 ```
0064 python InttMbdCombineChain.py --inttntuple
0065 ```
0066 The script will do the following steps:
0067 1. Check whether the INTT DST `[productiondir]/intt-[runnumber].root` exists. If not, it will try to copy the pre-generated DST under `/gpfs/mnt/gpfs02/sphenix/user/cdean/software/macros/InttProduction/`. If there is no pre-generated DST, the script will exit.
0068 2. Change the directory to `[dndetamacrodir]/condor/` (`[dndetamacrodir]` is specified in `config_combinechain.py`). 
0069 3. Run the `runCondor.py` to submit condor jobs to produce the INTT ntuples. (See [runCondor.py](https://github.com/sPHENIX-Collaboration/analysis/blob/master/dNdEta_Run2023/macros/condor/runCondor.py) for more details).
0070 4. The INTT ntuples will be stored under `[productiondir]/[inttntupleproduction_InttNtupleDir]`.
0071 
0072 ## Centrality and minimum-bias ntuple production
0073 To run the centrality and minimum-bias ntuple production, do
0074 ```
0075 python InttMbdCombineChain.py --centmbntuple
0076 ```
0077 The scripts will do the following steps:
0078 1. Change the directory to `[dndetamacrodir]`. 
0079 2. Execute the sPHENIX pre-built script `CreateDstList.pl` to produce the calorimeter DST lists with the given `[runnumber]`, the sPHENIX software version `[centntupleproduction_softwareversion]`,  and the production tag `[centntupleproduction_productionTag]`.
0080 3. Change the directory to `[dndetamacrodir]/condor/`.
0081 4. Run the `runCondor.py` to submit condor jobs to produce the centrality and minimum-bias ntuple. (Note: You should run a single condor job for the centrality and minimum-bias ntuple production, as the centrality and minimum-bias ntuple production is not parallelizable)
0082 5. The centrality and minimum-bias ntuples will be stored under `[productiondir]/[centntupleproduction_CentralityNtupleDir]`.
0083 
0084 ## INTT-MBD event combiner
0085 To run the INTT-MBD event combiner, do
0086 ```
0087 python InttMbdCombineChain.py --runcombiner
0088 ```
0089 The script will do the following steps:
0090 1. Merge the INTT ntuples. The merged INTT ntuples will be stored under `[productiondir]/[inttntupleproduction_InttNtupleDir]`. 
0091 2. Run the INTT-MBD event combiner `intt_mbd_evt_combiner_v1.py`. See [INTT_MBD_evt_combiner repository](https://github.com/sPHENIX-Collaboration/analysis/tree/master/INTT_MBD_evt_combiner) for more details.