Tools for Event Filter Physics Studies
I wrote a set of scripts for running the combined ATRIG/ATRECON efficiently with different parameter settings. The main ideas were:
The scripts and other files are found in this tar.gz file (excluding atrecon.exe). Unpack this file in a subdirectory, for example called atrecon, and set an environment variable ATRECON_DIR to this directory. You get the following directory structure including some files. More details can be found below, or by clicking on the file name.
Additionally, you need to include $ATRECON_DIR/bin in your
PATH. atrecon.runUsage: atrecon.run tapename.fileseq[-fileseq]|mnemonic [options] atrecon.run calls startjob for tapename.fileseq. If a range of file sequences is specified, ATRECON runs over all files in one go. The options are passed to startjob and are documented there. Instead of the tapename.fileseq[-fileseq] it is also possible to use mnemonics as defined in mnemonic.dat. In this case, it is possible to start jobs for several mnemonics at once if the following naming scheme is used: a mnemonic, for example dijet, stands for y00341.1-44, the next tape y00384.1-16 has the mnemonic dijet_2, i.e. the same base name dijet then an underscore and then a number. In this case it is possible to call atrecon.run dijet-2 to run over both tapes. It is further possible to say atrecon.run dijet_4-11 for running on all mnemonics dijet_4, dijet_5, ..., dijet_11. startjobUsage: startjob tapename.fileseq[-fileseq]|mnemonic [options] startjob prepares the environment for running ATRIG/ATRECON, assigns a run number, takes care of the bookkeeping, and starts the execution for a single run. The job to be run can either be specified by tapename.fileseq[-fileseq] or by mnemonics as defined in mnemonic.dat. The options have to be given as keyword=value. The sequence can be arbitrary. If a keyword is omitted, the default value is used.
Beside these keywords, all settings for makedatacard have to be specified here. The ATRIG parameter card and jetfinder steering card are copied to the temporary execution directory. It is therefore possible to modify the original files as soon as startjob has finished, i.e. before the job actually starts running. This it not true for atreconexe, because there is only a symlink from the temporary execution directory to the executable. This is done to preserve disk space. makedatacardUsage: makedatacard runID [options] makedatacard generates the datacard for ATRECON. The runID serves as identifier when run within startjob. In general makedatacard is not called from the command line. makedatacard uses default settings for electron identification with xKalman, which can be modify with keyword=value. There are also some options for other settings, for example to run with iPatRec instead of xKalman, but it needs additional modifications in the code to use it correctly. The options have to be given as keyword=value. The sequence can be arbitrary. If a keyword is omitted, the default value is used. In general these options are given together with those described for startjob. They can be interchanged arbitrarily.
All these options are written to the bookkeeping file and enables to select runs with a given parameter setting (see getinfo). getinfoUsage: getinfo tapename.fileseq[-fileseq]|mnemonic [run_number] getinfo prints all available run settings for a given tapename.fileseq[-fileseq] or mnemonic. If a run number is specified, only the setting for this run is printed. getlogUsage: getlog tapename.fileseq[-fileseq]|mnemonic run_number getlog prints the log file produced during the run for a given tapename.fileseq[-fileseq] or mnemonic and the run number. The log files are stored in the subdirectory stdout. With the first call of getlog the corresponding log file is gzippt to save disk space. atrecon.delUsage: atrecon.del tapename.fileseq[-fileseq]|mnemonic run_number|all [force] atrecon.del calls deldata for one or several runs. The data set can be specified with tapename.fileseq[-fileseq] or the mnemonic. The same syntax can be used as for atrecon.run. The second argument specifies the run number to be deleted or to delete all runs of the given data set. Normally the user is asked for each run if it should be deleted. This can be omitted with the word force as third argument. Obviously, this option has to be used with great care. deldataUsage: deldata tapename.fileseq[-fileseq]|mnemonic run_number [force] deldata deletes all data produces by a run, i.e. log files, staged ntuples, entry in the bookkeeping file, bank outputs, etc. The run to be deleted can either be specified by tapename.fileseq[-fileseq] or by mnemonics. The user is asked if the selected run should be deleted. This can be omitted by giving the word force as third argument. getnameUsage: getname mnemonic [size] getname parses the flat file mnemonic.dat for the mnemonic and returns the corresponding tapename.fileseq[-fileseq]. In case that there is no matching mnemonic found, the first argument is return unchanged. If as second argument the word size is given, the stage size of the corresponding data file(s) is returned. If there is no size defined, a default of 500MB is returned. mnemonic.datThis flat file defines the mapping of the mnemonic to the tapename.fileseq[-fileseq] and defines the stage size for the data files. The file has three columns: the first specifies the mnemonic, the second the tapename.fileseq[-fileseq], and the third the size for each data file in MB. The following naming convention for the mnemonics is used:
All scripts us internally the unambiguous tapename.fileseq[-fileseq]. Therefore the mnemonic can be changed or deleted while the run data is still addressable using the corresponding tapename.fileseq[-fileseq] scheme. getdata.kumacUsage: getdata file runno [[file runno] [file runno] ...] file : tapename.fileseq[-fileseq]|mnemonic runno: run number getdata generates a chain of ntuples in PAW. Each ntuple is specified by its tapename.fileseq[-fileseq] or mnemonic and its run number. If multiple combinations of file runno are given, all ntuples are chained and the chain is named after the name of the first file. getcounterUsage: getcounter tapename.fileseq[-fileseq]|mnemonic getcounter returns the next free run number for a data set given by tapename.fileseq[-fileseq] or its mnemonic. It is used by startjob and is normally not called from the command line. atrecon.exeThe combined ATRIG/ATRECON executables can be found under /afs/cern.ch/user/m/mommsen/public/atrecon_tools/bin or can be down loaded by clicking on the corresponding filename (size about 10MB).
|