How to run HcalPedestalAnalyzer - a concise guide

Michal Szleper. Last update: Oct 20, 2006.


1. Recommended CMSSW releases

1.1. As of today, CMSSW_0_9_2 and CMSSW_0_9_0_pre3 are the most extensively tested and working releases (see also 3.1 below). CMSSW_0_9_0 and CMSSW_1_0_* work with some (external) restrictions (see 3.2 - 3.4 for details). CMSSW_1_1_* ought to work, but have not been tested against all possible data formats.

2. The cfg file and what it must contain

2.1. Download the template cfg file to your CMSSW area:

 cvs co -A CalibCalorimetry/HcalStandardModules/test/writeTextPedestals.cfg

This file contains examples of how to run the PedestalAnalyzer on different kinds of data. You may have to edit several things in this file. What you must know to run any job:

  • the location and way of accessing the data files,
  • the format that data have been written in - note that some data formats require at least certain CMSSW versions (e.g. MTCC2 *.dat files require at least CMSSW_1_1_0_pre1),
  • the list of FEDs/data streams to unpack, unless you are using CMSSW_1_1_0 or later,
  • what is the correct electronic map file for the data you want to process - as of today, the ultimate e-maps are tb2006_mapgm100806.txt for TB06 and emap_hbheho_with_triggertowers_noR1_s3_nowarnings.txt for MTCC.

    2.2. The default configuration is supposed to produce a text pedestal file. To learn more options and know the meaning of each of PedestalAnalyzer user parameters, see presentation.

    2.3. Once you have done the necessary cfg editting, place your e-map in the [CMSSW_release]/src directory (or elsewhere in the CMSSW_SEARCH_PATH) and type:

     cmsRun -p writeTextPedestals.cfg

    3. Known problems and troubleshooting

    3.1. For all CMSSW releases earlier than 1_1_0_pre2, you may experience a core dump at the end of the job (after all outputs have been produced). It comes from a mistake in cvs tags and is practically harmless, but annoying. To eliminate this problem, check out from cvs the corrected version of the code:

     cvs co -r V00-02-01 CalibCalorimetry/HcalStandardModules

    and recompile.

    3.2. If you are using a CMSSW release earlier than 0_9_0_pre3, you are certain to have problems with HO, as different parts of CMSSW used inconsistent channel IDs: you may produce a pedestal file, but HO entries will not be interpreted correctly when you read the file back. This is not a problem with PedestalAnalyzer. You may try to use the HO_NAMING_PATCH_0_8_1 for CalibCalorimetry/HcalAlgos (no warranty). The job should still run unaffected for HB, HE and HF.

    3.3. PedestalAnalyzer will not work with release 0_9_1, which is broken for raw data reconstruction.

    3.4. With CMSSW_0_9_0 and 1_0_0, problems have been observed at the level of reading raw data in the *.dat format. Everything works fine with *.root files.

    3.5. For other problems you experience, the following simple exercise may be useful to begin with: remove PedestalAnalyzer from your execution path and rerun the job without it. If the problem persists, it must come from elsewhere (you are still welcome to ask me about it, but not guaranteed to get the right answer).

    3.6. If you notice any problem that does not fall into any of the categories 3.1 thru 3.5, contact Michal Szleper, michals@northwestern.edu.

    4. PedestalAnalyzer outputs

    4.1. Pedestal file - mean pedestal values per capID for every active channel. By default, PedestalAnalyzer will not print out the channels that were off. If you select

    bool FilterData Quality = false

    for digitization, all channels listed in your map file will be printed out (not recommended for data quality). The printout format is meant to be compatible with DB software and is defined in HcalDbASCIIO.cc, maintained by Fedor Ratnikov.

    4.2. Widths file - the cap-ID correlation matrix consisting of elements:

      sigma_i_j = Mean (p_i * p_j) - Mean p_i * Mean p_j,

    where p_i, p_j are the pedestals for CapIDs i, j (counted 0 thru 3, and always the nearest neighbors are taken). Printed out for each channel are 10 matrix elements, including 4 diagonal ones and 6 off-diagonal combinations (=4*3/2). Therefore:

      Width_i = sqrt (sigma_i_i),
      Width_(i+j) = sqrt (sigma_i_i + sigma_j_j + 2*sigma_i_j)

    4.3. Histogram (root) file. By default this will contain only a few summary histograms. To get pedestal distributions from all individual channels/capIDs, select in your cfg:

     untracked int32 hiSaveflag = 1