New analysis code being developed for 2014 data format

New code is being developed by Daniel Arcaro with help from Eric Hazen and Dan Gastler to analyze the new/final data format documented here: AMC13CommonFirmwareProposal. Also Ted Laird has written a tool to convert to root format:

P.S. If you end up dumping the AMC13 monitor buffers, but would like
to convert the dumps to .root files with TTrees of
std::vector, so that you can use "ordinary" analysis
programs to analyze them, feel free to use this program:
badcoffee.cpp

Bug reports are quite welcome.  (to Ted Laird)

Finding the Data

See EricFindingCMSData for some help.

Unpacker:

Unpacker consists of three classes to parse AMC13 data format: FedEvent, FedBlock, and FedAMC. Various tools have also been created to utilize these classes and analyze the data. All code can be found here: http://edf.bu.edu/svn/edf/arcaro/

Class documentation: http://ohm.bu.edu/~djarcaro/Documentation/unpacker.pdf

Build and Run Instructions:

Check out and build: List of tools and their uses:
  • dump64: Prints the raw data to screen in hex with 64bits per line. Used to sort through data by hand.
    • use: $ ./dump64 file.dat (usually followed by | less)
  • dump: Main dump tool to parse events and check for errors.
    • use: $ ./dump file.dat -v 1 -e 1 -c
    • -v flag for amount of information about the event printed to screen
    • -c flag to turn CRC checking on or off
    • -e flag to print specific errors to screen

Root and Histogram Options:

If root is installed dumptmp.cc can be made by $make root=1. dumptmp is identical to dump but also creates a root file with a histogram of the error array for easier visualization with large files.

CMSSW:

The dump software has also been implemented in a cmssw analyzer to extract raw data from global/local root files and unpack it. This requires a cmssw environment (most likely lxplus). The code can be found here http://edf.bu.edu/svn/edf/arcaro/cms/trunk/analyzer/. General instructions to make an analyzer can be found here: https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookWriteFrameworkModule.

Recipe to build the analyzer code:

$ cmsrel CMSSW_#_#_# ($scram list if you want to see the version choices)

$ cd CMSSW_#_#_#/src

$ cmsenv (equivalent: eval `scramv1 runtime -csh`)

$ svn co http://edf.bu.edu/svn/edf/arcaro/cms/trunk/analyzer/

$ cd analyzer/parse/plugins

$ pushd somewhere else

$ svn co http://edf.bu.edu/svn/edf/arcaro/cms/trunk/unpacker/ (You can put this anywhere you would like, just make sure the contents of unpacker end up in the plugins folder)

$ popd

$ mv _somewhere_else_/unpacker/* ./

You should now have all the FedEvent source code in the plugins folder alongside BuildFile.xml and parse.cc

$ cd .. (to parse folder)

$ scram b

To run the analyzer on a root file use $ cmsRun python/ConfFile_cfg.py.

Some modifications must be made to the analyzer code depending on the root file type. The only two files that would need to be changed are plugings/parse.cc and python/ConfFile_cfg.py. The ConfFile_cfg.py has the Fed ID input and the root file name. If the root file is local the line process.source = cms.Source("HcalTBSource", should not be commented out, but the one with PoolSource should be. Also, in parse.cc the lines Handle rawdata; iEvent.getByLabel("source",rawdata); should not be commented out, but the one with rawDataCollector should be. If the root file is a global run, the opposite should be done for both files.

All of this should be done using the same version of CMSSW as what the root file was produced with. To determine this use $ edmProvDump rootfile.root to see the CMSSW version number and other attributes of the file. There are also other edm functions that are quite useful (of course only on lxplus).

To Do List

Bugs

  • Add a doxygen configuration file and "doc" target to makefile so one can do 'make doc' and get the doxygen output.

New Features

DONE:

  • In FedEvent::PreParse the expression if(GetNAMC() > 0 || GetNAMC() < 13) is always true. I think you mean to use && instead of ||.
  • In FedEvent::PreParse there are two possibilities for size: a) 2 and b) 4...14. It should throw an exception if any other value is passed. The comments should reflect this.

  • Check for consistency of LMSEPVC bits through an entire event
    • MS should be "10" for first block, "11" for intermediate blocks, "01" for final blocks.
    • C should be 1 when MS="01".
    • EP should always be "11" I think
  • Check Blk_No, AmcNo, BoardID in block headers for consistency throughout event
  • Add option to dump entire AMC payloads

-- EricHazen - 04 Aug 2014

Topic attachments
I Attachment History Action SizeSorted ascending Date Who Comment
PDFpdf unpacker.pdf r1 manage 125.4 K 14 Aug 2015 - 16:00 DanielArcaro Documentation for classes in unpacker

This topic: BUCMSPublic > WebHome > HcalDTC > AMC13RawDataAnalysis
Topic revision: r12 - 15 Oct 2015 - DanielArcaro
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback