Difference between revisions of "Japan options and maps"

From PREX Wiki
Jump to navigationJump to search
 
Line 1: Line 1:
 
[[JAPAN_Doc_Portal]]<<
 
[[JAPAN_Doc_Portal]]<<
 +
 +
An example of a working non-PREX setup that uses the same CRL and Japan analysis is the [https://github.com/JeffersonLab/japan/tree/tedf-test-stand/Parity/prminput TEDf test stand analysis] (which is somewhat stale, but works nonetheless on a different data set and channel maps).
  
 
== Minimal Working Configuration Files ==
 
== Minimal Working Configuration Files ==

Latest revision as of 17:29, 24 May 2019

JAPAN_Doc_Portal<<

An example of a working non-PREX setup that uses the same CRL and Japan analysis is the TEDf test stand analysis (which is somewhat stale, but works nonetheless on a different data set and channel maps).

Minimal Working Configuration Files

To get a minimal working version of a Japan config file you need to do the following steps in order

git clone git@github.com:JeffersonLab/japan (https://github.com/JeffersonLab/japan)
cd japan
mkdir build
cd build
cmake ../
make
cd ../Parity/prminput
  • The engine needs to know where to look for CODA files and where to put ROOT files, this can be done either with environment variables or command line options
setenv QW_DATA [path to CODA data files]
setenv QW_ROOTFILES [path to where you want to store output files]
  • or included when populating the [config_name].conf with the following options (a conf file stands in place of a long string of command line options, and Japan default assumes that a qwparity.conf file exists and fails if it is not overwritten with --config [config_name].conf instead).
vim [config_name].conf
  • fill the CODA and ROOT file options
data = /path/to/coda/files
rootfiles = /path/to/root/output/files
  • The engine will search for a default data file name "QwRun_#.log" and so you should overwrite the prefix and data extension with the following .conf options
codafile-stem = [CODA file stem (prex_ALL_)]
codafile-ext = [extension (dat)]
  • The engine will search for a default map file for the detector names and channel map in "detectors.map" and should be overwritten with
detectors = [map name (prex_detectors.map)]
  • Because the ROCs for the Parity DAQ are < 31 we need to add a flag (either in a separate conf file or by itself)
add-config = prexbankflag.conf
    • Where prexbankflag.conf contains
allow-low-subbank-ids = yes
  • The engine will automatically give the Rootfile prefix as "Qweak_#.trees.root" and can be overwritten with
rootfile-stem = [stem (prexALL_)]
  • To use the analyzer on the command line now you will need to pass your config file and the run number (or else it will use runnumber 0)
./build/qwparity --conf [config name.conf] -r [run number]

With all of these in place the analyzer will behave in a user defined and consistent way.

Additional configuration options

Other options that can be utilized are as follows:

  • To use the data handlers you should include them in their own map
datahandlers = [data handler map]
  • To define the event ring stability cut
ring.size = [event length] 
ring.stability_cut = 1
  • To enable storing differences (in addition to yields and asyms)
enable-differences = 1 
  • To turn off normalization (w.r.t. BCM charge)
QwDetectorArray.normalize = 0 
QwBlindDetectorArray.normalize = 0
  • To allow bursts (miniruns)
enable-burstsum = 1 
print-burstsum = 1 
burstlength = [length of patterns to burst over]
  • To enable running sums
enable-runningsum = 0 
print-runningsum = 0 

Online Japan

To run in online mode you will want to add the following features:

online      = yes 
ET.hostname = adaq3.jlab.org
ET.session  = par2
ET.station  = realtime
  • Set the interpreted run number to a very high value so we always pick up the most recent parameter files
online.RunNumber = 999999
mapfile-update-interval = 500 
  • Circular buffer: Default is 0, set it to 0 to save significant computation time not using the circular buffer
circular-buffer = 0 
  • ROOT compression to minimum to save time
compression-level = 0 
  • Trimming output can be done with the following
enable-tree-trim = yes 
chainfiles = no
single-output-file = TRUE
disable-slow-tree = yes
disable-mps-tree = yes
disable-histos = yes 
disable-burst-tree = yes 
enable-burstsum = no
enable-differences = no
enable-alternateasym  = no

Basic level map files

The basic map file should contain at least one subsystem array, with at least a channel map and a set of event cuts

[QwBlindDetectorArray]
name     = MainDets
map      = prex_maindet.map
param    = prex_maindet_pedestal.map
eventcut = prex_maindet_eventcuts.map

Where event cuts file should at least contain the following line:

EVENTCUTS = 3

and additional lines are used to give global level event cuts for various subsystem array elements. The basics of the subsystem array map are to decode the CODA data file and should look like this

ROC=25
Bank=0x5
vqwk_buffer_offset=1
sample_size=16564
!means we are in a commented out line
!Hardware name, module number, channel number, channel object type, channel name  blinding status
VQWK, 0, 0,  IntegrationPMT,  usl           not_blindable
VQWK, 0, 1,  IntegrationPMT,  dsl           not_blindable

The options for possible subsystem arrays include:

  • QwBeamLine
  • QwHelicity
  • QwDetectorArray
  • QwBlindDetectorArray
  • QwScaler

And any one of them can be called multiple times with unique map files for each instance.

If no helicity subsystem is defined then Japan will default to use quartet pattern with a non-random simple alternating pattern.