CSCTFRawToDigi package performs unpacking
of raw CSC Track-Finder data. It is unlikely that you need it,
unless you are explicitly working with CSC TF data (for Data Quality
Monitoring or hardware validation purposes). So far no High Level Trigger
algorithms are known to use this kind of information.
The package is built around a set of core unpacking classes. Those are
accessors:
CSCSP_MEBlock, CSCSP_MBBlock, CSCSP_SPBlock,
CSCSPHeader, and CSCSPTrailer
and containers:
CSCSPRecord(also accessor), CSCSPEvent, and CSCTFEvent.
Accessors are essentially bit field classes, which directly map corresponding
raw data blocks. Containers hold clones of accessors and other containers
in a certain hierarchy. For references see
hardware specification.
The core unpacking classes can be easily compiled in a stand-alone executable.
An example can be found in
test/test.cc. If you want to use it you need to install CSC file reading
package in your local CMSSW installation (you don't need to compile it):
cvs checkout -P IORawData/CSCCommissioning
Go to EventFilter/CSCTFRawToDigi/test and comlipe the package:
cd EventFilter/CSCTFRawToDigi/test
g++ -o test test.cc -I../../../
After that you can run it on any CSCTF .raw data file:
./test YOUR_RAW_FILE.raw
The package is interfaced to CMSSW with help of 2 modules: CSCTFUnpacker and CSCTFPacker.
With parameter producer of edm::InputTag type the unpacking module can
be instructed to query edm::Event
for data buffers from particular producer (by default this is source:).
If you are analyzing 2008 data, you may skip the reset of this paragraph
and go to next one.
Every Sector Processor board (SP) of the CSC Track-Finder crate is connected to
1 of 12 sectors. The firmware on every board should be configured so, that board
reports which sector it is connected to. Unfortunately, this was not a routine
configuration procedure during CSC SliceTest,
and most of our data, taken earlier than August of 2007, lack this information.
Nevertheless, this can be fixed off-line with help of
integral array-parameter slot2sector. In general it has 22 entries (same as
number of slots in CSC Track-Finder crate) which can be set to either 0 or sector number (112).
0 instructs module to use original sector number from data, while numbers from
1 to 12 override it with corresponding value.
If you work with the CSC SliceTest,
data you probably need default settings of
data/csctfunpacker.cfi or you may want to change the first value of slot2sector
array which assigns data from any "unconfigured" SP to sector number, which you set there.
For raw data obtained in simulation (see below) you need to set all values to 0.
Supplementary CSCTFPacker module helps to generate "fake" raw data file
from CSC TF digi. It can be instructed to use digi from certain producers by setting
lctProducer and trackProducer edm::InputTags accordingly.
It is likely, that you don't need to change other parameters from their default
values (zeroSuppression=true and nTBINs=7 are hardware defaults).
One additional parameter, activeSectors, allows to "skim" data from some
particular sector(s). Any of its 12 bit may be set to 1 or 0 allowing
of denying data from corresponding sectors to be converted to raw buffers.
If you are validating some of SP boards you are likely to set only one of these bits.
Output is controlled by two parameters: outputFile, which sets file name
for storing data in local_DAQ-like format (make it an empty string "" if yo don't
need these files), and putBufferToEvent, which specifies if
edm::Event will be populated with raw data buffers. See
test/writedigi.cfg for example of usage.