Skip to content

This repository has working code examples (snippets) on how to access different physics objects in the context of CMSSW software.

Notifications You must be signed in to change notification settings

apetkovi1/PhysObjectExtractorTool

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Objects Information Extractor Tool

Description

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.

Usage instrucctions

  1. Install CERN virtual machine or Docker container from the CMS open data website.

  2. 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
  1. Obtain the code from git:
git clone git://github.com/cms-legacydata-analyses/PhysObjectExtractorTool.git
cd PhysObjectExtractorTool
  1. Compile everything:
cd PhysObjectExtractor
scram b
  1. Make a soft link to the python configuration file
ln -s python/poet_cfg.py .
  1. 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
  1. 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.

References:

Muons

Taus

Jets

Photons

Electrons

About

This repository has working code examples (snippets) on how to access different physics objects in the context of CMSSW software.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 88.2%
  • Python 10.4%
  • C 1.2%
  • Shell 0.2%