Difference between revisions of "JAPAN Doc Portal"

From PREX Wiki
Jump to: navigation, search
(Recently Asked Questions)
Line 72: Line 72:
 
== Recently Asked Questions ==
 
== Recently Asked Questions ==
  
How to establish pedestals for a channel:
+
'''How to establish pedestals for a channel'''
 
* For beam-off pedestals  
 
* For beam-off pedestals  
** Plot values like "cav4bx.hw_sum_raw/cav4bx.num_samples" during a known period of beam off, and find the mean
+
** Plot values like "cav4bx.hw_sum_raw/cav4bx.num_samples" during a known period of beam off, and find the mean.
 
** Then you will add lines to the prexCH_beamline_pedestal.1199-.map and prexCH_beamline_pedestal.1230-.map for your channels
 
** Then you will add lines to the prexCH_beamline_pedestal.1199-.map and prexCH_beamline_pedestal.1230-.map for your channels
 
** In each line, the channel name is first, then the pedestal, then the gain
 
** In each line, the channel name is first, then the pedestal, then the gain
  
I need to do cuts on non-zero ErrorFlags while working on evt tree. Do I need to do the same thing while working on mul tree too or the mul tree itself makes cuts on non-zero ErrorFlag?
+
'''I need to do cuts on non-zero ErrorFlags while working on evt tree. Do I need to do the same thing while working on mul tree too or the mul tree itself makes cuts on non-zero ErrorFlag?'''
 
* You would also need to do the cuts in the mul tree
 
* You would also need to do the cuts in the mul tree
  
When I applied ErrorFlag==0 cut, I am left with only a few entries out of the run. Is there something wrong or it is normal.
+
'''When I applied ErrorFlag==0 cut, I am left with only a few entries out of the run. Is there something wrong or it is normal.'''
 
* For a high-beam-off run, it is likely normal
 
* For a high-beam-off run, it is likely normal
 
** Take a look at "yield_bcm_an_ds10" with and without the cut
 
** Take a look at "yield_bcm_an_ds10" with and without the cut
 
** You'll see how many events have non-zero beam current
 
** You'll see how many events have non-zero beam current
  
ErrorFlag ==0 events are those with non-zero beam current, right?
+
'''ErrorFlag ==0 events are those with non-zero beam current, right?'''
 
* prexCH_beamline_eventcuts.map contains the condition of ErrorFlag
 
* prexCH_beamline_eventcuts.map contains the condition of ErrorFlag
 
* At the moment the ErrorFlag is set by the one "global" cut (a line marked with a "g" in the event cuts file) and that is on bcm_an_ds3
 
* At the moment the ErrorFlag is set by the one "global" cut (a line marked with a "g" in the event cuts file) and that is on bcm_an_ds3

Revision as of 09:28, 27 February 2019

Documentation for new Prex/Crex analysis is curated here

Important Resources

Resources

Using JAPAN on adaq cluster

In the apar account, execute "gojapan" to setup the environment variables and change to the "official" copy of JAPAN (~apar/PREX/japan).

Some typical calls to the analyzer:

  • ./build/qwparity --config prexCH.conf --detectors prexCH_detectors_no_hel.map -r 1107
    This does the analysis for parity_CH mode data files (run 1107 in this particular case), where the helicity patterns are treated as always being quartets with polarities "+ - - +".
  • ./build/qwparity --config prex.conf -r 1036
    This analyzes the parity_ALL mode data files, using the injector helicity data to build quartets. The current default analysis mode is in quartets, if the DAQ is changed to octets or other patterns, we will need to update the injector helicity configuration used by the analyzer.
  • ./build/qwparity --config prexinj.conf -r ####
    This analyzes the parity_INJ mode data files. The current default analysis mode is in quartets, if the DAQ is changed to octets or other patterns, we will need to update the injector helicity configuration used by the analyzer.

Using Japan on ifarm to analyze TEDf test stand data

To analyze any CODA DAQ .dat file with JAPAN, do the following

source /site/12gev_phys/softenv.csh 2.3
cd /directory/to/store/japan/
git clone https://github.com/JeffersonLab/japan
cd japan
git checkout tedf-test-stand
source setup_japan.tcsh
mkdir build; cd build; cmake ..; make; cd ..
./build/qwparity --config tedf_testing.conf -r [number]
    • The config file (contained within the Parity/prminput folder) should contain all of the necessary information for JAPAN to decode the data
    • Care must be taken to ensure that the maps correspond to what configuration the DAQ channels were in during the data collection for that run
    • Run numbers can be used automatically to do this, but the user must define the map files appropriately so it works
    • It is important to turn off the beam current normalization for channel readouts
  • The ROOT output should go into your (setup_japan.tcsh initialized environment variable location) ${QW_ROOTFILES}, for analysis done on the corresponding .dat file in ${QW_DATA}
  • After analyzing your run, be sure to look at the JAPAN outputs and read the Error Summary list

Compilation

The code as is compiles fine on ifarm machines (1401 or 1402). For local installation you need to have:

  • mysql++
  • root with minuit2 library
  • boost libraries

Verified compilation with:

-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /bin/cc
-- Check for working C compiler: /bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /bin/c++
-- Check for working CXX compiler: /bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- System name Linux
-- Found ROOT 6.12/04 in /home/ciprian/root/root6/root/build
-- Boost version: 1.53.0
-- Found the following Boost libraries:
--   program_options
--   filesystem
--   system
--   regex
No QwAnalysis dictionaries needed for ROOT 6.12/04.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ciprian/prex/japan/build

Recently Asked Questions

How to establish pedestals for a channel

  • For beam-off pedestals
    • Plot values like "cav4bx.hw_sum_raw/cav4bx.num_samples" during a known period of beam off, and find the mean.
    • Then you will add lines to the prexCH_beamline_pedestal.1199-.map and prexCH_beamline_pedestal.1230-.map for your channels
    • In each line, the channel name is first, then the pedestal, then the gain

I need to do cuts on non-zero ErrorFlags while working on evt tree. Do I need to do the same thing while working on mul tree too or the mul tree itself makes cuts on non-zero ErrorFlag?

  • You would also need to do the cuts in the mul tree

When I applied ErrorFlag==0 cut, I am left with only a few entries out of the run. Is there something wrong or it is normal.

  • For a high-beam-off run, it is likely normal
    • Take a look at "yield_bcm_an_ds10" with and without the cut
    • You'll see how many events have non-zero beam current

ErrorFlag ==0 events are those with non-zero beam current, right?

  • prexCH_beamline_eventcuts.map contains the condition of ErrorFlag
  • At the moment the ErrorFlag is set by the one "global" cut (a line marked with a "g" in the event cuts file) and that is on bcm_an_ds3
    • Its value must be above 1 uA and below 1e6 uA, and there is an eye-balled stability cut as well