6.4 The Standard Reconstruction procedure

Complete: 3
Detailed Review status

To be updated with the material in http://indico.cern.ch/getFile.py/access?contribId=3&resId=0&materialId=slides&confId=65275.

Goals of this page

This page explains how to run the standard reconstruction procedure after having generated and simulated the events as explained in the previous chapters.

Note that if you just want to access the already available samples, there is no need to run the reconstruction process again. It will only be necessary if you generate a sample of your own, or if you want to make modifications to the standard reconstruction.


To run the standard CMS reconstruction, it's best to use the cmsDriver.py tool to generate a configuration file, which you can modify at will afterwards. You can use dasgoclient to find suitable samples to run upon.


dasgoclient --query='dataset=/DY*/*10*/*GEN-SIM-DIGI-RAW*' --format=plain

Back/Forward Compatibility

Raw data is compatible with a large range of CMSSW versions. Therefore, in principle, you don't have to know what CMSSW version was used during data-taking to perform reconstruction from raw data. However, reconstruction from data is not supported in every CMSSW release.

Forward compatibility is not necessarily promised.

Global Tag

One important input to reconstruction is the global tag, which contains calibration, alignment, constants needed for reconstruction. The global tags are softly tied to the release version (there might be compatibility problems due to the change of formats of the database content), so, one has to know what is the global tag certified for data reconstruction: check on SWGuideFrontierConditions.

cmsDriver Command


cmsDriver.py reco -s RAW2DIGI,RECO --filein anInputRawFile.root --fileout anOutputFileName.root --globalTag GT::All 


Collision data

cmsDriver.py reco -s RAW2DIGI,RECO --filein anInputRawFile.root --fileout anOutputFileName.root --globalTag GT::All 
Cosmic data

cmsDriver.py reco -s RAW2DIGI,RECO --data --scenario cosmics --filein anInputRawFile.root --fileout anOutputFileName.root --globalTag GT::All 

The generated configuration file can then be tailored for other purposes or for a crab job.

More... Close



The algorithms that make up the CMS event reconstruction software build physics objects (e.g., muons, electrons, jets) from the raw data recorded by the detector. All events collected by the CMS trigger system are reconstructed by the CMS prompt reconstruction system soon after being collected.

Description of the packages and configuration files

Reconstructing events to the level of candidates

There is a dedicated setup that provides a configuration file that contains standard definitions of the common and checked reconstructed objects, as supplied by the authors and PRS groups. Obviously, there are many different settings in this file, so it is very advisable to take some time to study the settings for the objects you intend to use. Again, this file can be included like this:

include "Configuration/StandardSequences/data/Reconstruction.cff"

The output file

The Reconstruction.cff does all reconstruction, but most users probably only want high-level reconstruction objects. This can be done by including

include "Configuration/EventContent/data/EventContent.cff"
Finally, to produce the output you need to tell CMSSW to write everything to a file. This is done in the PoolOutput module. This is also where you control what is written to file, it is very advisable to include only the information you need, this can be done with the drop and keep commands, see the documentation here.

Run the example

First, set up the CMS environment. The following works on lxplus.cern.ch, but should work on any computer that has CVS and the CMS software installed.

cmsrel CMSSW_10_2_Y
cd CMSSW_10_2_Y/src
Now check out the page in Generation in this document to see the previous steps needed to be completed before the step RECO.

cmsDriver.py step2 --filein file:BPH-RunIIAutumn18DR_step1.root --fileout file:BPH-RunIIAutumn18DR_step2.root --mc --eventcontent AODSIM --runUnscheduled --datatier AODSIM --conditions 102X_upgrade2018_realistic_v15 --step RAW2DIGI,L1Reco,RECO,RECOSIM,EI --nThreads 8 --geometry DB:Extended --era Run2_2018 --python_filename BPH-RunIIAutumn18DR_2_cfg.py --no_exec --customise Configuration/DataProcessing/Utils.addMonitoring -n 100

Conclusion and Outlook

This page explains how to run a very simple analysis, all the way from event generation to the analysis of reconstructed objects

Review status

Reviewer/Editor and Date (copy from screen) Comments
ElizaMelo - Sept 2019 Included instructions for CMSSW_10_2_Y
ElizaMelo - Sept 2017 Included instructions for CMSSW_9_X_Y
FreyaBlekman - 10 Oct 2007 Update to more general tutorial using default .cfg files and CMSSW_1_6_0
FreyaBlekman - 25 Jan 2007 Included instructions for CMSSW_1_2_0
JennyWilliams - 05 Dec 2006 Put all links explicit for PRINT variable
FreyaBlekman - 14 Nov 2006 Upgraded to CMSSW_1_0_6
FreyaBlekman - 21 Sep 2006 Upgraded to CMSSW_1_0_0
FreyaBlekman - 24 Jun 2006 created tutorial for CMSSW 0_7_0

Responsible: JeanRochVlimant
Last reviewed by: AndreaRizzi - 27 Feb 2008

Edit | Attach | Watch | Print version | History: r59 < r58 < r57 < r56 < r55 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r59 - 2021-12-18 - ItanaBubanja



    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMSPublic All webs login

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.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback