InitFilesNOT UPDATED to bookCRY Book95: NA43 data reduction and translation program Book95's .ini files IntroductionInit (.ini) files are meant to provide the Book95 program with all the needed constants. Almost none of the constants is defined in the fortran code (book95.F); instead the whole definition of the geometry and positioning of the drift chambers, and all the calibration constants are stored in these .ini files. This allows you to change things without having to recompile the program, and to make book95 use different calibration constants with different file sets. Furthermore, a reasonably simple method is provided to allow you to use the same method for the calculations that you may define in book95.F ProcedureHere i just describe the order in which .ini files are read, and why. The content of the sections is detailed later. Book95 - actually, dumread.c and book95.F - needs at least one initialization file. It will look for them in the following places: 1. init directory, if any
( from --ini switch; no default)
2. output directory
( from --out switch; default is ./ )
3. input directory, if any
(from input filename; no default )
4. current directory
5. default init directory, if any
( from [verbosity] inidir entry in an ini file; no default)
6. book95's home directory
( from Makefile; defaults to the directory where it has been compiled)
7. user's home directory
Book95 will search a file with the name specified by the --ini switch or for the default one, called book95.ini. From this, before doing (almost) anything else, the section [verbosity] is read, by dumread.c; these values will not be changed anymore (most of these settings can be overridden by command-line switches) The other sections are read by d2n.c: [geometry] first, then [const] and [var]. NOTE that processing of any further .ini file can be disabled using the --noextraini option on book95 invocation. Before starting to read the first dumle file, d2n.c looks for two ini files named after the "basename" of the dumle file(s), like aname.auto.ini and aname.ini for aname###.dml files. The aname.auto.ini file (that becomes .aut on a plain DOS partition) is created by the PAW macro calib.kumac. If any is found, d2n.c reads [geometry], [const] and [var] and from it. In case you want to put your run-specific constants, it's suggested that you don't modify the .auto.ini file but instead you create/modify the aname.ini, that is read after the .auto.ini , and so overrides its constants. At this point, a check is made on the definition of Geometry constants, and a warning is issued if no Drift Chamber has been defined. Usually, the No Drift Chambers defined - get ready for a crash... is a correct guess... Then, right before each dumle file is read, a file with its name, but .ini extension (like aname013.ini) is searched and, if existing, read, even if the corresponding .dml file is missing. Note, anyway, that only [const] is read from it - no changes in geometry, no changes in ntuple format. Sections of an ini fileNow that comments (lines starting with #) are allowed in the ini files, there aren't anymore special reasons to comment the sections here. I'll only discuss things that are somewhat particular or long to explain. [verbosity]The lines here just describe how much printout you get when you run book95. You can override these settings using the command line options. [var]Contains things related to the content of the output ntuple, like pattern bits names, the selection of the raw and calculated variables to store, the flags for the special calculations.
[const]This section contains values that are retrieved by the "user" code in book95.F Consequently, they are very much "free"; I'll only document those that are, by now, "standard":
A missing constant in the first ini file is considered equal to zero; this, if no check is present in user code, can lead to a crash of book95, p.e. for division-by-zero error. A missing constant in a non-first ini file just leaves the previous value. If you need to use/add/modify variables inside Book95.F, go to the Modifying Book95 chapter. [Cuts]Actually meant only to decrease file size of ntuples, not for the physics
[geometry]All the constants that regard the positioning and calibration of Drift Chambers are here. The reference system is :
Global parameters:
Drift Chamber parameters:
Wire parameters:
|