File indexing completed on 2024-04-06 12:10:28
0001 <html>
0002 <body>
0003 <font size=+2><tt>CSCTFRawToDigi</tt></font> package performs unpacking
0004 of raw CSC Track-Finder data. It is unlikely that you need it,
0005 unless you are explicitly working with CSC TF data (for Data Quality
0006 Monitoring or hardware validation purposes). So far no High Level Trigger
0007 algorithms are known to use this kind of information.
0008 <br>
0009 <br>
0010 The package is built around a set of core unpacking classes. Those are
0011 accessors:
0012 <tt>CSCSP_MEBlock</tt>, <tt>CSCSP_MBBlock</tt>, <tt>CSCSP_SPBlock</tt>,
0013 <tt>CSCSPHeader</tt>, and <tt>CSCSPTrailer</tt>
0014 and containers:
0015 <tt>CSCSPRecord</tt>(also accessor), <tt>CSCSPEvent</tt>, and <tt>CSCTFEvent</tt>.
0016 Accessors are essentially bit field classes, which directly map corresponding
0017 raw data blocks. Containers hold clones of accessors and other containers
0018 in a certain hierarchy. For references see
0019 <a href="http://grid.ihepa.ufl.edu/~kkotov/LU-SP2DDU_Event_Record_Structure_4d1.pdf">hardware specification</a>.
0020 <br>
0021 <br>
0022 The core unpacking classes can be easily compiled in a stand-alone executable.
0023 An example can be found in
0024 <a href="http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/EventFilter/CSCTFRawToDigi/test/test.cc?rev=1.1&cvsroot=CMSSW&content-type=text/vnd.viewcvs-markup">
0025 test/test.cc</a>. If you want to use it you need to install CSC file reading
0026 package in your local CMSSW installation (you don't need to compile it):
0027
0028 <br>
0029 <b>cvs checkout -P IORawData/CSCCommissioning</b>
0030 <br>
0031 Go to EventFilter/CSCTFRawToDigi/test and comlipe the package:
0032 <br>
0033 <b>cd EventFilter/CSCTFRawToDigi/test</b>
0034 <br>
0035 <b>g++ -o test test.cc -I../../../</b>
0036 <br>
0037 After that you can run it on any CSCTF .raw data file:
0038 <br>
0039 <b>./test YOUR_RAW_FILE.raw</b>
0040 <br>
0041 <br>
0042 The package is interfaced to CMSSW with help of 2 modules: <tt>CSCTFUnpacker</tt> and <tt>CSCTFPacker</tt>.
0043 <br>
0044 <br>
0045 With parameter <i>producer</i> of <tt>edm::InputTag</tt> type the unpacking module can
0046 be instructed to query <tt><a href="https://twiki.cern.ch/twiki/bin/view/CMS/WorkBookCMSSWFramework#ProcModel">edm::Event</a></tt>
0047 for data buffers from particular producer (by default this is <tt>source:</tt>).
0048 <br><br>
0049
0050 <font color=red>If you are analyzing 2008 data, you may skip the reset of this paragraph
0051 and go to next one.</font><br>
0052 Every Sector Processor board (SP) of the CSC Track-Finder crate is connected to
0053 1 of 12 sectors. The firmware on every board should be configured so, that board
0054 reports which sector it is connected to. Unfortunately, this was not a routine
0055 configuration procedure during <a href="http://cms-emu-slicetest.web.cern.ch/cms-emu-slicetest/">CSC SliceTest</a>,
0056 and most of our data, taken earlier than August of 2007, lack this information.
0057 Nevertheless, this can be fixed off-line with help of
0058 integral array-parameter <i>slot2sector</i>. In general it has 22 entries (same as
0059 number of slots in CSC Track-Finder crate) which can be set to either 0 or sector number (1—12).
0060 0 instructs module to use original sector number from data, while numbers from
0061 1 to 12 override it with corresponding value.
0062 If you work with the <a href="http://cms-emu-slicetest.web.cern.ch/cms-emu-slicetest/">CSC SliceTest</a>,
0063 data you probably need default settings of
0064 <a href="http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/EventFilter/CSCTFRawToDigi/data/csctfunpacker.cfi?revision=1.4&view=markup">
0065 data/csctfunpacker.cfi</a> or you may want to change the first value of <i>slot2sector</i>
0066 array which assigns data from any "unconfigured" SP to sector number, which you set there.
0067 For raw data obtained in simulation (see below) you need to set all values to 0.
0068 <br>
0069 <br>
0070 Supplementary <tt>CSCTFPacker</tt> module helps to generate "fake" raw data file
0071 from CSC TF digi. It can be instructed to use digi from certain producers by setting
0072 <i>lctProducer</i> and <i>trackProducer</i> <tt>edm::InputTag</tt>s accordingly.
0073 It is likely, that you don't need to change other parameters from their default
0074 values (<i>zeroSuppression=true</i> and <i>nTBINs=7</i> are hardware defaults).
0075 One additional parameter, <i>activeSectors</i>, allows to "skim" data from some
0076 particular sector(s). Any of its 12 bit may be set to 1 or 0 allowing
0077 of denying data from corresponding sectors to be converted to raw buffers.
0078 If you are validating some of SP boards you are likely to set only one of these bits.
0079 Output is controlled by two parameters: <tt>outputFile</tt>, which sets file name
0080 for storing data in local_DAQ-like format (make it an empty string "" if yo don't
0081 need these files), and <tt>putBufferToEvent</tt>, which specifies if
0082 <tt><a href="https://twiki.cern.ch/twiki/bin/view/CMS/WorkBookCMSSWFramework#ProcModel">edm::Event</a></tt> will be populated with raw data buffers. See
0083 <a href="http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/EventFilter/CSCTFRawToDigi/test/writedigis.cfg?view=markup">
0084 test/writedigi.cfg</a> for example of usage.
0085
0086 </body>
0087 </html>