Analyzers¶
First, a few general words about analysis in the CMSSW framework. Physics analysis proceeds via a series of subsequent steps. Building blocks are identified and more complex objects are built on top of them. How to write a Framework Module and run the job with the cmsRun
can be found here.
When setting up code for the new EDM (such as creating a new EDProducer) there is a fair amount of 'boiler plate' code that you must write. To make writing such code easier CMS provides a series of scripts that will generate the necessary directory structure and files needed so that all you need to do is write your actual algorithms.
CMSSW distiguishes the following module types:
- EDAnalyzer: takes input from the event and processes the input without writing information back to the event
- EDProducer: takes input from the event and produces new output which is saved in the event
- EDFilter: decides if processing the event can be stopped and continued
- EventSetup: external service not bound to the event structure which provides information useable by all modules (e.g. Geometry, Magnetic Field, etc.)
In order to generate above modules:
- mkedanlzr : makes a skeleton of a package containing an EDAnalyzer
- mkedprod : makes a skeleton of a package containing an EDProducer
- mkedfltr : makes a skeleton of a package containing an EDFilter
- mkrecord : makes a complete implementation of a Record used by the EventSetup
More generators are available and you can find them here
The code examples provided with the CMS open data are mostly EDAnalyzers. A hands-on tutorial to learn more on CMSSW and EDAnalyzers is available in the CMS open data workshop material. For examples, this guide mainly refers to:
- Physics Objects Extractor Tool (POET): shows how to extract physics (objects) information and gives examples of methods or tools needed for processing them. For the sake of clarity, EDAnalyzer modules are provided separately for each object.
- AOD2NanoAODOutreachTool: reads events from CMS AOD files and convert them to a reduced data format. This example provides a single EdAnalyzer module handling all types of physics objects.
- Physics Objects Extractor Tool (POET): shows how to extract physics (objects) information and gives examples of methods or tools needed for processing them. For the sake of clarity, EDAnalyzer modules are provided separately for each object.