Skip to content

CaltechPrecisionTiming/H4Analysis

Repository files navigation

t1065 tuplizer

set up

git clone --recursive [email protected]:CaltechPrecisionTiming/H4Analysis.git

cd H4Analysis

source scripts/setup.sh

make

(CMSSW not necessary)

make the template

bin/TemplatesMaker cfg/TemplatesMaker.cfg 5166

run the tuplizer interactively

bin/H4Reco cfg/H4_t1065_test.cfg 5166

where 5166 is the run number and cfg/H4_t1065_test.cfg is the cfg file you use. you might need to edit the cfg file properly such as the path2data (the input file directory)

submit batch jobs to run a list of input files

cd scripts

python submitBatch.py -r=list_HGC_Nov.list -s=root://eoscms//eos/cms/store/group/phys_susy/razor/Timing/Nov2016CERN/ntuples_v7/jobs/ -v=v7_Jan10 -c=../cfg/H4_t1065_test_batch.cfg -q=1nd –nf=1

where:

“-r=list_HGC_Nov.list”: you put the list of runs in list_HGC_Nov.list (inside the file, each line is just a run number),;

“-s=” is the output directory for the job;

“-v=” is just a version tag you put randomly (will be appended to the job script directory name);

“-c=” is the config file you use (note that the cfg file is slightly different as the one used when run interactively, the difference is the path2data);

“–nf=” is the number of input root file per job (for example, there might be hundreds of files to be processed in one run, and with this script you are able to process one file per job and after you get the output you can just hadd different files). You can also add a parameter “–inputDir=” for the directory of the input files (the default one is set in the script submitB

*************************************************************

Some Notes:

  • This repository aims to provide a fast reconstruction of data acquired with the H4DAQ mainly with the CAEN V1742 Digitizer
  • The main program is the H4Reco ntuples producer which can be easily configured through the input cfg file (examples in cfg/).

The cfg file

  • Comment lines start with a ‘#’ followed by a space
  • blocks are defined within <block>...</block>
  • each key (line inside a block) can take an unlimited number of options
  • The importCfg key allows one to express an unlimited number of other cfg files that are read sequentially before the current one so that blocks/keys that are present in more that one file are overwritten.

The H4Reco dumper

  • The main executable.
  • The idea is to run multiple plugins, each dedicated to a specific task, i.e. reconstructing hodoscope hits, digitizer waveform.
  • H4Reco takes two arguments: a cfg file and the run number that overrides the one specified in the cfg file
  • Each Plugin has three methods that are called by the main program:
    • Begin(): is called once after the plugin instance is created and before the first event is processed. Takes two arguments: a CfgManeger with all the option loaded in H4Reco and a index dedicated to synchronize the plunging trees with the main one.
    • ProcessEvent(..): called once for each entry of the H4Tree under analysis. It takes three arguments: the CfgManager with all the options, a reference to the analyzed H4Tree and the list of plugins loaded in the H4Reco plugin sequence. The last arguments allow to share data between plugins through the plugin methods RegisterSharedData and GetSharedData.
    • End(): called at the end of the H4Reco processing, after all the events have been processed.
  • A single output file is produced, it contains the main tree “h4” to which all the trees registered by the plugins as “permanent” are linked (using TTree::AddFriend()).
  • More information can be found in plugin/Readme.org

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published