Skip to content

Lab5015/btl-utils

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contents

Database tunnel

./scripts/start_db_tunnel.sh <lxplus username>

Get module and part information from database

  • Create the script for your BAC (under scripts/<BAC>) if not already there. For e.g.

    • ./scripts/CIT/get_sipm_info.py
    • ./scripts/CIT/get_sm_info.py
    • ./scripts/CIT/get_dm_info.py
  • Make BAC specific changes, for example:

    utils.save_all_part_info(
      parttype = constants.SM.KIND_OF_PART,
      outyamlfile = "info/CIT/sm_info.yaml",
      inyamlfile = "info/CIT/sm_info.yaml",
      location_id = constants.LOCATION.CIT,
      ret = False
    )
  • <BAC> = CIT, UVA, MIB, PKU

  • Run the scripts to get the information from the database

Module summaries

  • Recommended: get the module and parts information from the databse first
  • Create your module configuration yaml under configs/<BAC>
  • Examples can be found under configs/CIT
  • For summary plots with barcodes (for e.g. light output vs. SM barcode), you may have to change the barcode prefix in the configuration
  • Run /python/summarize_modules.py --help to see explanations for the arguments

SM summary examples

Plot

./python/summarize_modules.py \
--srcs "/path/to/dir/with/runs/**:run(?P<run>\d+)/module_(?P<barcode>\d+)_analysis.root" \
--moduletype SensorModule \
--plotcfg configs/CIT/config_sm_summary.yaml \
--catcfg configs/CIT/config_sm_categorization_na.yaml \
--outdir results/sm_summary \
--skipmodules info/CIT/skip_sms.txt \
--sminfo info/CIT/sm_info.yaml \
--location <BAC>

Pair SMs

./python/summarize_modules.py \
--srcs "/path/to/dir/with/runs/**:run(?P<run>\d+)/module_(?P<barcode>\d+)_analysis.root" \
--moduletype SensorModule \
--catcfg configs/CIT/config_sm_categorization_na.yaml \
--outdir results/sm_pairing \
--sminfo info/CIT/sm_info.yaml \
--dminfo info/CIT/dm_info.yaml \
--pairsms \
--mixsmcats \
--location <BAC>

DM summary examples

Plot

./python/summarize_modules.py \
--srcs "/path/to/dir/with/runs/**:run-(?P<run>\d+)_DM-(?P<barcode>\d+).root" \
--moduletype DetectorModule \
--plotcfg configs/CIT/config_dm_summary.yaml \
--catcfg configs/CIT/config_dm_categorization.yaml \
--outdir results/dm_summary \
--sipminfo info/CIT/sipm_info.yaml \
--sminfo info/CIT/sm_info.yaml \
--dminfo info/CIT/dm_info.yaml \
--smresults <path/to/your/sm_summary/module_categorization.yaml> \
--location <BAC>

Group DMs

--srcs "/path/to/dir/with/runs/**:run-(?P<run>\d+)_DM-(?P<barcode>\d+).root" \
--moduletype DetectorModule \
--catcfg configs/CIT/config_dm_categorization.yaml \
--outdir results/CIT/dm_grouping \
--sipminfo info/CIT/sipm_info.yaml \
--sminfo info/CIT/sm_info.yaml \
--dminfo info/CIT/dm_info.yaml \
--ruinfo info/CIT/ru_info.yaml \
--smresults <path/to/your/sm_summary/module_categorization.yaml> \
--groupdms \
--location <BAC>

Module progress

./python/plot_module_progress.py \
--moduletypes SensorModule DetectorModule \
--locations CIT MIB PKU UVA \
--outdir results/module_progress

Create tar file with results

Update tar file with new results in directory:
./scripts/archive_dir.sh <directory>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 95.6%
  • Shell 2.7%
  • C 1.7%