Guest User

Untitled

a guest
Mar 23rd, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.11 KB | None | 0 0
  1. ---------------------------------
  2. CDMSBATS
  3. ===========
  4. ### Table of Contents
  5. 1. [Overview]("overview")
  6. 2. [Getting Started]("getstart")
  7. A. [Compiling CDMSBats]("getstart")
  8. B. [Setting Environment Variables]("env")
  9. 3. Installation
  10. A. [BatFaker]("faker")
  11. B. [BatRoot]("batroot")
  12. C. [BatCalib]("calib")
  13. i. [Setup]("calibsetup")
  14. ii. [Executing BatCalib]("calibexe")
  15. iii. [BatCalib Settings](""calibsettings")
  16. iv. [Calibration Constants]("calibconst")
  17. v. [Additional Notes]("calibnotes")
  18. D. [BatNoise]("noise")
  19. i.
  20. E. BatViewer
  21.  
  22. ### I. Overview <a name="overview"> </a>
  23. This file is intended to serve as a general instructional for using the various components of
  24. CDMSBATS. CDMSBATS is a set of packages used to process and analyze data, designed
  25. with the ability to be used independently; though many configurations will be shared by all,
  26. some will be unique to the program being used. More detailed setup instructions will be
  27. outlined below. First, let's take a brief look at CDMSBATS in general and its functions.
  28. Depending on your desired results, you may wish to utilize:
  29.  
  30. **BatFaker**: Contains tools designed to produce fake raw data files, primarily for use in data
  31. salting.
  32.  
  33. **BatRoot**: The first tier of data processing.Takes raw quantities like voltage, current, time,
  34. charge, raw pulse traces and outputs real physics quantities. Uses ROOT rq files for both input
  35. and output (a raw, compressed binary format).
  36.  
  37. **BatCalib**: The second tier of data processing. Applies calibration constants to generate
  38. rrq's from RQ root files (recall that these are "Refined Reduced Quantities" such as time delay,
  39. or energy and yield).
  40.  
  41. **BatNoise**: The third tier of data processing. Applies various filtering algorithms to raw data
  42. in order to produce histograms such as Power Spectrum Density (PSD) from selected noise
  43. traces as well as other quantities.
  44.  
  45. **BatViewer**: A utility which calls on ROOT to display an interactive TCanvas to view a single
  46. raw data file, or series raw data folder.
  47.  
  48. #### Setting Up Paths and Environment Variables <a name="env"> </a>
  49. CDMSBats requires access number of libraries that are likely to be located in a few places.
  50. It's important to make sure each of these are set appropriately, as little useful information will be given if there is an issue.
  51.  
  52. CDMSBATSDIR - this is the directory where you checked out "cdmsbats"
  53. i.e. /somedirectory/cdmsbats
  54.  
  55. BATROOT_NOISEFILES - path to the noise files generated by BatNoise
  56.  
  57. BATROOT_RAWDATA - where the raw data files (.gz file types) are located.
  58.  
  59. BATROOT_RQDATA - path to where the output files (end in .root) will be placed. Will be used by BatCalib later
  60.  
  61. BATROOT_GPIBFILES - path to where the GPIB files are (these files are used for Soudan data only. If not using Soudan data set with a dummy path (i.e. /tom/example))
  62. BATROOT_AUXFILES - path to where the AUX files are (these files are used for Soudan data only. If not using Soudan data set with a dummy path (i.e. /tom/example))
  63.  
  64. **************
  65. ### II. A simplified makefile system for CDMSBATS <a name="getstart"> </a>
  66. This section describes an *optional* way to compile the packages that reside
  67. within cdmsbats.From this directory, users may build any or all of the job
  68. stages for raw data processing: BatNoise, BatRoot, or BatCalib, along with the BatCommon library of shared facilities for all three job stages. If you are
  69. looking to install and run the individual packages, please refer to the
  70. documentation specific to BatNoise, BatRoot or BatCalib for full installation
  71. instructions that will get you started. Each stage of the processing (BatNoise,
  72. BatRoot, and BatCalib) may also be built from within the the package
  73. directory.
  74.  
  75. *Note that currently, ROOT v5.xx.xx (including FFTW) and the BLAS libraries
  76. installed to compile the above executables.*
  77.  
  78. For users who work with all the stages of processing, or who aren't sure
  79. what they might need to run, everything can be built in one step:
  80. >$make all
  81.  
  82. If you just need one of the executables, you can simply "make" the directory
  83. for the component you wish to install, for example:
  84. >$make BatRoot
  85.  
  86. The executables will be put into the directory BUILD/bin. In your PATH, you
  87. should add the complete directory path to that directory, which you can do
  88. with one of the following commands, depending on your shell:
  89.  
  90. TCSH: ```setenv PATH ${PATH}:`pwd`/BUILD/bin```
  91. BASH: ```export PATH=${PATH}:`pwd`/BUILD/bin```
  92.  
  93. ------------------------------------------------------------------------------------------------
  94.  
  95. ## BatCalib <a name="calib"></a>
  96.  
  97. #### SETUP <a name="calibsetup"></a>
  98. BatCalib is the second tier of data processing. To run it, you must have ROOT
  99. (v5.20 or later) properly installed. See the ROOT webpages for install
  100. instruction
  101.  
  102. Once you have done this, build BatCalib from this directory (or the one above
  103. it) by typing:
  104. >make BatCalib
  105.  
  106. After successful compilation, you will need to set the following paths so that
  107. BatCalib knows where to find the RQ data and where to put the output:
  108.  
  109. BATCALIB_PROC (optional)
  110. an alternate directory where the job-setting files are located,
  111. without specifying this, BatCalib will pick up the default file from:
  112. /somedirectory/cdmsbats/UserSettings/BatCalibSettings/processing
  113.  
  114. BATCALIB_CONST (optional)
  115. an alternate directory where the calibration constants files are located,
  116. without specifying this, BatCalib will pick up the default file from:
  117. /somedirectory/cdmsbats/UserSettings/BatCalibSettings/calibration
  118.  
  119. BATCALIB_RQDATA
  120. this is the directory where the rq data files are (these end in .root)
  121.  
  122. BATCALIB_RRQDATA
  123. this is the directory where you want to put the output root files.
  124.  
  125. The make command places the executable into the BUILD/bin directory
  126. (see cdmsbats/README). To run without having to specify the full path
  127. to this directory, you may set your path to point to this directory:
  128.  
  129. TCSH: ```setenv PATH ${PATH}:$CDMSBATSDIR/BUILD/bin```
  130. BASH: ```export PATH=${PATH}:$CDMSBATSDIR/BUILD/bin```
  131.  
  132. In addition to the environmental variables, set the file prefixes in the
  133. UserSettings/BatCalibSettings/processing/optionsXXXXData.Default file (where XXXX corresponds to the location of your experiment). You must set both RQ_DATA_PREFIX and
  134. RRQ_DATA_PREFIX. These will look for and write out files with the prefixes
  135. that you specified. Don't use the same prefix for both! Otherwise BatCalib
  136. will try to write output data to the input file.
  137.  
  138. -----------------------------------------
  139. #### EXECUTING BATCALIB
  140. <a name="calibexe"></a>
  141. Once you have properly set the above, run BatCalib (in BUILD/bin) by typing:
  142.  
  143. BatCalib series# dump# maxEvents(optional) processingFile(optional) calibrationFile(optional)
  144.  
  145. For example, if you want to process 10 events from an RQ file myfile_170319_1616_F0002.root type:
  146.  
  147. BatCalib 170319_1616 2 10
  148.  
  149. (inside your options file, RQ_DATA_PREFIX should be set to "myfile")
  150.  
  151. * Note that this command is intended to process one file per raw data file.
  152. If you want to run on a merged rq file as we did for production in 2010,
  153. then you can specify this by changing the flag "USE_MERGED_RQ = 1" in the
  154. options configuration file. For this, then subsitute the word "merged" in
  155. place of the dump#. This change was made to facilite automated processing
  156. of files at Soudan and also at the test facilities.
  157. ----
  158. #### SETTINGS
  159. <a name="calibsettings"></a>
  160. In the directory $CDMSBATSDIR/UserSettings/BatCalibSettings/processing, there are various files that begin
  161. with the prefix "options" and end with ".Default". These are text files
  162. that tell BatCalib what processing configuration to run in. Most of the
  163. setting are fairly self explanatory. Examples of things you can control
  164. include which pulse analyzing algorithms are run (for example Optimal Filter
  165. and PipeFitter). You can also turn the processing on and off for specific
  166. detectors or components of the experiment. For example, you can turn off
  167. calibration of all zips except zip17. Look in the file and follow the
  168. examples. If is fairly self explanatory and the format is flexible. You DO
  169. NOT need to RECOMPILE BatCalib for these settings to be picked up! BatCalib
  170. will automatically detect which experimental location your data comes from
  171. (i.e Soudan, or UCB or SUF) and it will load the relevant processing
  172. configuration for that dataset.
  173.  
  174. Alternately, you can force BatCalib to read a different processing
  175. configuration file then the one that has the .Default extension by passing
  176. it in the full pathname as a third argument to the BatCalib command (see
  177. above).
  178.  
  179. NOTE: The calibration algorithms should match the RQ's that exist in your
  180. file. If you did not run Pipefitter in BatRoot when you generated your RQ
  181. file, then do not run PipeFitter in BatCalib when processing that file. If
  182. you forget this step, then BatCalib will not allow you to process the data
  183. until you fix your configuration file.
  184.  
  185. *****
  186.  
  187. #### CALIBRATION CONSTANTS <a name="calibconst"></a>
  188. In the directory $CDMSBATSDIR/UserSettings/BatCalibSettings/calibration, is
  189. another set of configuration files. These contain all the parameters and
  190. calibration constants that are used by the various calibration algorithms.
  191. You can modify these parameters by changing the values in these files.
  192. Again you do no need to recompile for BatCalib to pick up a new value and
  193. you can also force BatCalib to read a different file by passing in the full
  194. directory path as a fourth argument to the BatCalib command.
  195.  
  196. *****
  197.  
  198. #### NOTES:
  199. <a name="calibnotes"></a>
  200. Feb. 2011: Significant reorganization was done to accommodate the growing
  201. number of detector types and degenerate number of calculations for similar
  202. quantities. Each detector type now has its own "GenRRQDataXXX" class. The
  203. original version of BatCalib is preserved in the GenRRQDataCDMSII class,
  204. which works up through Soudan R131 data. At the same time we streamlined
  205. the naming convention for rq's and rrq's, so some long-standing names become
  206. obsolte. In particular, we renamed phonon optimal filter rq's from P*eV to
  207. P*amps. The ConstFreqRTFTWalk quantities were renamed from P*CFr% to P*WKr%
  208. and correspondingly the VarFreqRTFTwalk was renamed from P*r% to P*VWKr%.
  209. At the same time we standarized all phonon rrq quantities to begin with "p"
  210. and all charge rrq quantities to begin with "q". [LLH]
  211.  
  212. ----
Add Comment
Please, Sign In to add comment