This page contains instructions and examples of a way to extract information from a CMS root file type EDM. The root files contain collections of physical objects arranged within this structure, these objects can be: electrons, muons, photons, jets, tracks, etc. Scientific research requires specific information to obtain good results. This information can be extracted from an EDM file by creating an EDAnalyzer.
The instructions to write your own EDAnalyzer are here.
In the code there are several comments explaining the logic that follows, also, some twiki links were added to expand the knowledge on the subject.
-
Install CERN virtual machine or Docker container from the CMS open data website.
-
Set up your enviroment
- Create a project area:
cmsrel CMSSW_5_3_32
- Change to the CMSSW_5_3_32/src/ directory:
cd CMSSW_5_3_32/src/
- Then, run the following command to create the CMS runtime variables:
cmsenv
- Obtain the code from git:
git clone git://github.com/cms-legacydata-analyses/PhysObjectExtractorTool.git
cd PhysObjectExtractorTool
- Compile everything:
cd PhysObjectExtractor
scram b
- Make a soft link to the python configuration file
ln -s python/poet_cfg.py .
- Only if your are using the VM and not the Docker container, make symbolic links to the conditions database. In fact if you are not extracting information about corrections (e.g., jet corrections) or the trigger, you could actually comment out all the lines that have to do with the global tag (conditions database).
ln -sf /cvmfs/cms-opendata-conddb.cern.ch/FT_53_LV5_AN1_RUNA FT_53_LV5_AN1
ln -sf /cvmfs/cms-opendata-conddb.cern.ch/FT_53_LV5_AN1_RUNA.db FT_53_LV5_AN1_RUNA.db
- Run the CMSSW configuration file:
cmsRun poet_cfg.py
As a result you will get a myoutput.root
file with simple variables. This file has been divided by subdirectories, corresponding to each type of physics object (or kind of information). If needed, in the PhysObjectExtractor/test
directory, a ROOT
analysis example code can be found. It runs over the families of ROOT trees in the the myoutput.root
file.
Muons
Taus
Jets
-
JEC+JER main documentation: Includes jet pt resolution functions and scale factors (Fig 41) applied for JER
Photons
Electrons