Documentation: CSCTF Mode and Basic Cut Track Analysis Package

Kristin Beck, Summer Student 2008


Zipped files for CSCTF MBC Track Analysis Pack


Contents

  1. Introduction
  2. Quick Start
    1. Installation from the *.zip file
    2. Compiling and Running the Code
    3. Output Overview
  3. Code Recipes
  4. Pre-Compiling Options
  5. Understanding the Output
  6. Outstanding Issues
  7. Code Notes
  8. Conclusions

Introduction

The CSCTF Mode and Basic Cut Track Analysis Package (CSCTF MBCTAP) is an analysis package designed to check the contents of tracks made by the CSC Track Finder as found in CSC data. In particular, it compares the assigned track modes with their contents and examines cuts Δη and Δφ. The package automatically outputs a few basic statistics for these analyses. The package also comes with a root script, showMBCTPlots, that displays the histograms of the data.

CSCTF MBCTAP was written during summer 2008 by Summer Student Kristin Beck using CMSSW_2_0_7.

[top of page]


Quick Start

Instalation from the *.zip file

The CSCTF MBCTAP is provided here as a *.zip file: [Zipped files for CSCTF MBC Track Analysis Pack]. This zipped package contains the following files:

After unzipping csctf-mcbcap.zip, you must move the files into the appropriate directories prior to compiling as follows (recipe for moving is in section 3: Code Recipes):

[top of page]

Compiling and Running the Code

To compile the code, first make sure you have the appropriate files (see section 2a: Instalation from the *.zip file) and have set up your operating environment within CMSSW. This may be done by running the command eval `scramv1 runtime -csh` in the directory .../EventFilter/CSCTFRawToDigi/. Then, follow the following steps to compile:

  1. Compile CSCTFAnalyzer.cc and related files by running the command scramv1 b -r from within the directory .../EventFilter/CSCTFRawToDigi/.
  2. Compile MBCTAnalyzer.C by running the command ./compile.sh within the directory .../EventFilter/CSCTFRawToDigi/test/

To run the code, you will first need to choose the files to run over. You can either run over a *.root file saved locally or use one stored on CASTOR. As of the writing of this document, the easiest way to obtain the proper path for data file(s) is to use the DBS data discovery page. These path(s) need to be put into the file analyzer_dch.cfg, which should be in the .../EventFilter/CSCTFRawToDigi/test/ directory. They should be inserted on line 12 within the brackets following untracked vstring fileNames = { as follows:

You can run over multiple files. However, be forewarned: large jobs have been known to crash. Since this first step of running over data files is the most time consuming step, I advise to run over no more than three files (depending on source file size, of course) at this stage. In order to run over multiple files, follow the following template:

Now that you have edited analyzer_dch.cfg, it's time to run the code.

  1. From the directory .../EventFilter/CSCTFRawToDigi/test/ run the command cmsRun analyzer_dch.cfg.
    1. There is a lot of output at this stage, which you may want to save for cross checks at a later stage by piping it to a file, for example, cmsRun analyzer_dch.cfg > ! myOutFile.txt.
    2. Because it takes so long to run this bit of code, you may want to run this in the background by ending the line with an ampersand (&).
  2. Once this code has finished executing, you will have two additional output files, mbctaCodeError.txt and mbcta.root. For information on the output files, see section 2c: Understanding the Output.
    1. N.B. If you have broken a single run into multiple jobs, you should rename the output root files so that they have the same base name followed by an increming arabic number starting from 0 (i.e. mbcta.root, mbcta0.root, mbcta1.root, mbcta2.root, mbcta3.root, etc.). Multiple files are not yet supported in the *.C second stage analysis.
  3. Run the command ./runAnalysis.exe
  4. After this executes, you will have two additional output files, mbctaTextOut_#####.txt and mbctaPlots_#####.root where ##### is the run number for the input data.
  5. To display the graphs, run the ROOT script showMBCTPlots by running the command root showMBCTPlots -l. You will be prompted for 3 numbers, which you should enter separated by spaces followed by a carridge return: For example, to show (and not save) the mode error plots for run 51047, you would type 0 0 51047 after the prompt.

[top of page]

Output Overview

If you run the complete code, there will be several output files and command line outputs. These outputs include (1) information about the program's operation, including error messages pertaining to the program itself, (2) slimmed down data (*.root) files, (3) information about the data processed, including statistics, (4) *.root histograms and (5) graphs.

Of these, the files you will use for checking data are mbctaTextOut_#####.txt, which is output from the second stage of analysis (./runAnalysis.exe), and the graphics files that come out of the final root script (root showMBCTPlots -l).

mbctaTextOut_#####.txt is divided into 3 sections.

There are three graphs that showMBCTPlots automatically outputs (all of these graphs are output when you use option 42 for the choice of graphs):

[*.ppt overview of the graphs]

[top of page]


Code Recipes

The following is what I type into my command line window to run the code. I assume you already have the unzipped files in a directory named csctf-MBCTAP located in .../EventFilter/CSCTFRawToDigi/ and are operating within the directory .../EventFilter/CSCTFRawToDigi/.

Installation
cp csctf-mbctap/CSCTFAnalyzer.cc plugins/.
cp csctf-mbctap/CSCTFAnalyzer.h interface/.
cp csctf-mbctap/analyzer_dch.cfg test/.
cp csctf-mbctap/MBCTAnalyzer.C test/.
cp csctf-mbctap/MBCTAnalyzer.h test/.
cp csctf-mbctap/compile.sh test/.
cp csctf-mbctap/runAnalysis.cpp test/.
cp csctf-mbctap/showMBCTPlots test/.

Compiling
eval `scramv1 runtime -csh`
scramv1 b -r
cd test
cmsRun analyzer_dch.cfg > ! myOutFile.txt &

...when that is done running...
./compile.sh
./runAnalysis.exe

Showing and Saving Graphs
root showMBCTPlots -l
42 1 #####
[return] (where ##### is the run number).

[top of page]


Pre-Compiling Options

This package has been written so that commonly changed parameters are easily accessible before compiling the package. The following options can be set:

[top of page]


Understanding the Output

For an overview of the analysis output files, see section 2c: Output Overview.

The complete code outputs several output files and command line outputs. These outputs include (1) information about the program's operation, including error messages pertaining to the program itself, (2) slimmed down data (*.root) files, (3) information about the data processed, including statistics, (4) *.root histograms and (5) graphs. We will go through the outputs file-by-file.

[top of page]


Outstanding Issues

[top of page]


Code Notes

CSCTFAnalyzer.cc and CSCTFAnalyzer.h

This code is the basic analyzer that interacts with CMSSW to extract data from the massive *.root data files. This code extracts data from both the global event LCTs and the track LCTs. The areas where this extraction takes place are clearly marked.

If any errors show up in mbctaCodeError.txt that say that an upper limit needs to be updated, this means that the corresponding arrays for variables in either the global LCTs ("...an LCT with an ID more than...", corresponds to gbl_station_lct) or track LCTs ("...a track LCT...", gbl_phi_t and gbl_eta_t)

analyzer_dch.cfg

This is the configuration file for CMSSW's cmsRun. The source path to the original *.root data file for analysis is entered here.

showMBCTPlots

This root script is responsible for the display of the histograms. It is responsible for the way the histograms are displayed and graphics output.

MBCTAnalyzer.C and MBCTAnalyzer.h

These *.C and *.h files are responsible for the majority of the analysis work that the analysis package does. They build histograms, calculate Δη and Δφ and compare track content to assigned mode.

compile.sh

Instructions for compiling runAnalysis.cpp and thus how to access the functionality of MBCTAnalyzer.C

runAnalysis.cpp

Instructions for how to use the codebits from MBCTAnalyzer.C; this is what is actually compiled and run.

[top of page]


Conclusions

Best of luck using this analysis package; if you have any questions, please do not hesitate to contact me [Kristin Beck's email].

[top of page]


Last updated: 15 August, 2008