---++ *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: <pre> 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<uint64_t>, so that you can use "ordinary" analysis programs to analyze them, feel free to use this program: <a href="https://github.com/elaird/hcalraw/blob/master/cpp/badcoffee.cpp">badcoffee.cpp</a> Bug reports are quite welcome. (to Ted Laird) </pre> ---+++ *Finding the Data* See [[https://twiki.cern.ch/twiki/bin/view/Main/EricFindingCMSData][EricFindingCMSData]] for some help. ---+++ *Converting Data* The two options for file types processed by this code are binary and root files. The code to switch from one to another or vice versa is here: Binary to Root: https://github.com/elaird/hcalraw (From Ted Laird) * First run make in the cpp folder * The main tool for making badcoffee binary files is hcalraw/cpp/badcoffee.cpp. Usage is cat a.dat | ./badcoffee fed#. Root to Binary: http://edf.bu.edu/svn/edf/arcaro/cms/trunk/pythontools/%GREEN%rootdumper/%ENDCOLOR% or http://edf.bu.edu/svn/edf/arcaro/cms/trunk/analyzer/%PURPLE%dumpraw/%ENDCOLOR% * The %PURPLE%dumpraw%ENDCOLOR% code is a cmssw analyzer and requires a cmssw environment. The %GREEN%rootdumper%ENDCOLOR% only requires root. * The %GREEN%rootdumper%ENDCOLOR% is built by running the Makefile in rootdumper/cpp. * Run the code using ./oneRun.py --rootFile=HTB_007850.root --feds=928 --nEvents=101 --outputFile=data1.dat * The %PURPLE%dumpraw%ENDCOLOR% analyzer can be built with the same directions as the CMSSW section [[#CmsswAnchor][below]]. * Run the code using cmsRun .../python/ConfFile_cfg.py #UnpackerAnchor ---+++ *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/cms/trunk/ Class documentation: http://ohm.bu.edu/~djarcaro/Documentation/unpacker.pdf ---++++ %BLUE% Unpacker Build and Run Instructions %ENDCOLOR% Check out and build: <verbatim> $svn co http://edf.bu.edu/svn/edf/arcaro/cms/trunk/unpacker and http://edf.bu.edu/svn/edf/arcaro/cms/trunk/tools $cd tools $make </verbatim> 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 ---++++ %BLUE% Unpacker histogram option %ENDCOLOR% 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. #CmsswAnchor ---+++ *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/ and .../trunk/cmsswtools. 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: <verbatim> $ cmsrel CMSSW_#_#_# ($ scram list if you want to see the version choices) (The version should match the one that created the root file. Use edmProvDump name.root to check the version.) $ cd CMSSW_#_#_#/src $ cmsenv (equivalent: eval `scramv1 runtime -csh`) $ svn co http://edf.bu.edu/svn/edf/arcaro/cms/trunk/analyzer/ $ svn co http://edf.bu.edu/svn/edf/arcaro/cms/trunk/cmsswtools $ scram b </verbatim> To run the analyzer first set the parameters in the python file analyzer/parse/python/ConfFile_cfg.py. The most important parameters (besides the file name) are the !HcalTBSource vs !PoolSource and the rootType string input. Change these to correspond to either a local or global root file. The python script is set to run over multiple files in a directory. To then run the analyzer: <verbatim> $ cmsRun analyzer/parse/python/ConfFile_cfg.py. </verbatim> 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). ---+++ *Bugs* ---+++ *To Do List* ---+++ New Features
Attachments
Attachments
Topic attachments
I
Attachment
History
Action
Size
Date
Who
Comment
pdf
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: r22 - 28 Oct 2015 - DanielArcaro
Copyright © 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback