Hld analysis workflow


Unpacking/decoding hld file:

  hldtools -j10 -d file.hld               -> it creates file.hld.root with "T" root tree

Creating calibration files:


Calibrating fine time:

  tdisplay "\*hld.root"                   -> press "Export curves" button to create calib1.root

Note: better to use as more data-files (events ) as possible for a good calibration.

Creating offsets from the laser runs:

  tcalibration -c calib1.root -r1952 laserfile.hld.root   -> creates laserfileC0.root
  cdisplay -a1 laserfileC0.root           -> press "Export offsets" button to create calib2.root

Applying calibration:

  tcalibration -j10 -r2561 -c calib1.root -t calib2.root beamfile.hld.root -> creates beamfileC.root

Viewing results:

  cdisplay fileC.root  


Useful root commands for T-tree (file.hld.root):

Plotting with custom binning/range:

  T->Draw("Hits.nFineTime>>hh(500,0,1000)") 

Applying cuts:

  T->Draw("Hits.fTime","Hits.nTdcChannel==0")

Custom binning + cuts for "data" tree:

  data->Draw("PrtEvent.fHitArray.fLeadTime>>hh(500,-200,0)","PrtEvent.fHitArray.fChannel%2==0") 

Time difference + custom binning for "K" tree:

 K->Draw("fLeadingEdge[Iteration$]-fLeadingEdge[1776]>>hh(500,-200,200)") 
 K->Draw("fLeadingEdge[1780]-fLeadingEdge[1782]>>h1(100,30,50)","bValid[1780] && bValid[1782]","",100000)

Channel occupancy for "K" tree:

  K->Draw("Iteration$>>h1(2000,0,2000)","bValid==1","",10000) 

2D plot of TOT vs. LE for "K" tree:

  K->Draw("fTot[640]:fLeadingEdge[640]-fLeadingEdge[1776]>>h2(100,-150,-90,100,50,80)","bValid[640]","colz",100000) 

The names of the variables can be looked up with "new TBrowser" command.