Difference between revisions of "Hall C basic replay structure"

From HallCWiki
Jump to navigationJump to search
Line 37: Line 37:
 
  100
 
  100
 
  g_ctp_parm_filename ="DBASE/general_for_run_100.param"
 
  g_ctp_parm_filename ="DBASE/general_for_run_100.param"
 +
g_ctp_kinematics_filename ="DBASE/standard_for_run_100.kinematics"
 +
g_decode_map_filename ="MAPS/hmschambers_for_run_100.map"
  
 
=== standard.kinematics ===
 
=== standard.kinematics ===

Revision as of 18:19, 14 November 2016

This entry provides an overview of the basic replay structure for Hall C, which is available on github.

notation

Usually the first letter of a variable designates the spectrometer it belongs to. The usual notation is:

  • g: global
  • h or H: HMS
  • p or P: SHMS
  • s or S: SOS

DBASE

general.param

Collects all parameter files that are read-in before the replay.

; Define a real value:
#real raddeg
raddeg=3.14159265/180

; Include other files to be read:
#include "PARAM/hcana.param"
#include "PARAM/genflags.param"
...

standard.database

Sets the variables with file names which are to be read-in during the replay.

; Run number block:
0-99
g_ctp_parm_filename ="DBASE/general.param"
g_ctp_kinematics_filename ="DBASE/standard.kinematics"
g_decode_map_filename ="MAPS/hmschambers.map"

; Single run number:
100
g_ctp_parm_filename ="DBASE/general_for_run_100.param"
g_ctp_kinematics_filename ="DBASE/standard_for_run_100.kinematics"
g_decode_map_filename ="MAPS/hmschambers_for_run_100.map"

standard.kinematics

Sets the kinematics variables for each run number.

; Parameters for range of run numbers:
0-99
gpbeam=999
htheta_lab = 999
stheta_lab = 999

; Parameters for specific run number:
100
gpbeam=1000
htheta_lab = 1000
stheta_lab = 1000

DEF-files

replay.def

Defines which variables or blocks of variables are written to ROOT tree and defines the histograms that are saved in the ROOT file.

# Select a variable:
H.dc.1x1.wirenum

# Select a block of variables:
block H.dc.*

# Define a histogram:
TH1F hdc1x1_wm 'HDC 1X1 Wiremap' H.dc.1x1.wirenum 113 0.5 113.5

replay_cuts.def

Defines cuts for different stages of raw data analysis. Most common blocks are:

  • RawDecode
  • Decode
  • CoarseTracking
  • CoarseReconstruct
# Start of block:
Block: CoarseTracking

# Variable definition:
# Can use global variables
# or spectrometer specific variables
# or previously defined variables
all_trigs   g.evtyp==1 || g.evtyp==2 || g.evtyp==3
h1hit1      H.dc.1x1.nhit >= 1

# Can use calculations:
hmsDC1PlanesGT  (h1hit1 + h1hit2 + h1hit3 + h1hit4 + h1hit5 + h1hit6 )>=5

# Truthy value for passing an event to the next analysis stage:
# (can also be 1 or 0 for passing all or none)
CoarseTracking_master !Pedestal_event

MAPS

detector.map

Defines the map between detector module channels and replay variables.

! Description of the setup:
!HMS:
! HDC_ID=1      TDC
! HSCIN_ID=2    ADC+,ADC-,TDC+,TDC-

! Which crate:
ROC=2

! Which detector (must match with corresponding ID in the description):
detector=1    ! HMS drift chambers

! Caen 1190 modules
! Which slot:
SLOT=5
! chan   plane    wire
    96,      3,      1!    plane U, wire 1, TDC
...

ROC=1
detector=2    ! HMS hodoscope
! flash 250 modules
slot=8
! chan   plane     bar     sig
     0,      1,      1,      0!    plane x1, bar 1, ADC+
...

PARAM

detector.param

Sets the values for all the variables that are needed for the analysis of the data from a specific detector. It is usually broken into multiple files for better overview.

; Set a single value:
hscin_1x_size = 8.0

; Can also do calculation:
hscin_1x_zpos = (89.14-11.31)

; Set an array of values:
hhodo_vel_light = 14.0, 14.8, 15.5, 15.8
                  14.0, 14.8, 15.5, 15.8

raw

Here go the raw data files. This is usually just a symbolic link.

ROOTfiles

This is where the ROOT files with variable trees and histograms are saved after the replay.

SCRIPTS

Here are saved the macro files detailing the replay. These macros are run through hcana.

TEMPLATES

Here are located the template files for the replay reports.

db_cratemap.dat

Defines a map between crate slots and the detector modules.

  • Old DAQ style syntax:
==== Crate 2 type vme
# slot  model  clear      header        mask  nchan  ndata
     4   1190      1  0x40000004  0xff00001f    128   4096
     5   1190      1  0x40000005  0xff00001f    128   4096
  • Bank decoding DAQ style syntax:
==== Crate 1 type vme Bank Decoding
# slot  model  bank
     4   1190  1190
     5   1190  1190

db_run.dat

Sets the run specific variables for each run number.