Skip to content
analyze data from CMS HCAL electronics
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Quick Start

git clone
cd hcalraw
source env/
cd cpp; make -j 5; cd -

./ 284928
./ 289555 --nevents=1 --dump=8
./ 294542 --feds1=1115 --nevents=1000

More Examples

# analyze AMC13/DCC2 monitor buffer dumps
# HF (USC FEDs):
./ data/239713_*.dat
# from a single AMC13:
export FEDID=999
cat foo.dat | cpp/badcoffee ${FEDID}
./ --file1=badcoffee${FEDID}.root --feds1=${FEDID} --progress

# compare payloads of different sets of FEDs, within one file
./ 239480 --feds1=718,719 --feds2=HF --dump=0 --utca-bcn-delta=-131 --no-warn-quality --plugins=histogram,compare

# dump decoded data to stdout
./ 55 --feds1=702,931 --nevents=1 --dump=4

# compare payloads of different sets of FEDs, across two files
./ --file1=data/B904_Integration_000055.root --feds1=702 \
--file2=data/mol_run55.root --feds2=931 --dump=0 --any-emap \
--no-warn-quality --ignore-ce --utca-bcn-delta=-119

export EOS=root://; \
./ --nevents=51 --progress --utca-bcn-delta=-119 --any-emap --no-warn-quality --dump=0 \
--file1=${EOS}/USC_211154.root --feds1=714,722 \
--file2=${EOS}/USC_211155.root --feds2=989

# analyze FE pattern runs
# (before HO refibering) ./ 235576 --feds1=HO  --plugins=unpack,patterns --dump=0 | ./ data/ref_2014.txt
# (before move to uTCA ) ./ 236631 --feds1=7xy --plugins=unpack,patterns --dump=0 | ./ data/ref_vme_G.txt
# ./ --quiet --progress --plugins=unpack,patterns,bitwalk --nevents=8000 --feds1=1115 --last-n-amcs=2 300703
./ 260773 --feds1=HBEF --plugins=unpack,patterns --dump=0 | ./ data/ref_utca_G.txt
./ 270688 --feds1=HBEF --plugins=unpack,patterns --dump=0 | ./ data/ref_utca_G.txt
./ 288606

# read about usage
./ --help



Design Goals

  • unpack both VME and uTCA data
  • digest global, local, or monitor buffer data without configuration
  • compare payloads across two .root files containing unsorted events
  • enable evaluation of board performance in only one page of plots
  • provide flexibility in analysis
  • not require CMSSW


  • python (2.x, x>=6)
  • ROOT (>=5.32)


(use exactly one of these)

  • env/ sets up a ROOT 6 environment on cc7
  • env/ sets up CMSSW and EOS
  • env/ sets up pypyROOT (outside of CMSSW)


  • cpp/CDF*.h are copied from CMSSW (IORawData/HcalTBInputService/src)
  • cpp/FED* are copied from CMSSW (DataFormats/FEDRawData)
  • cpp/[cdf,cms].h define helper functions
  • cpp/[mol,deadbeef,badcoffee,rooter].cpp make .root files from binary event dumps
  • loops over .root file(s) for one run and produces output/Runxxx.root
  • is copied from
  • configuration/ holds some settings used by, plugins/, etc.
  • interprets a FED's bytes in an event (called by raw.unpacked)
  • compares the decoded output of a FiberID run to data/ref.txt
  • converts binary event dumps to .root files and analyzes them
  • reads in output/Runxxx.root, makes plots, and outputs a .pdf
  • will find a files in EOS (or locally) for given runs and loop over them
  • produces FiberID reference files from HCAL logical maps
  • is used to analyze one run (see examples above)
  • parses command line options for,, or
  • contains utility functions for printing messages
  • loops over available USC local runs and processes them
  • reads and unpacks raw data
  • tests configuration.hw.transformed* and utils.shortList
  • contains helper functions


  • compares the payloads within two .root files for a given event
  • books and fills many per-FED and per-event histograms
  • interprets the raw data as front-end patterns
  • dumps to stdout the payload(s) in an event
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.