• Help
    Discussion forum
    Search tips
  • About
    CERN Open Data
    ALICE
    ATLAS
    CMS
    DELPHI
    JADE
    LHCb
    OPERA
    TOTEM
    Glossary

Important notice: opendata-qa.cern.ch is a quality-assurance server. Please use it for testing purposes only. The content may be erased from time to time. Please use opendata.cern.ch for production.

Example code to produce the di-muon spectrum from a CMS 2011 or 2012 primary dataset

Geiser, Achim ; Dutta, Irene ; Hirvonsalo, Harri ; Sheeran, Bridget

Cite as: Geiser, Achim; Dutta, Irene; Hirvonsalo, Harri; Sheeran, Bridget; (2017). Example code to produce the di-muon spectrum from a CMS 2011 or 2012 primary dataset. CERN Open Data Portal. DOI:10.7483/OPENDATA.CMS.D00J.UVB1

Software Analysis CMS CERN-LHC


Description

This simple analysis example is set up at Research level, i.e. it requires university-student-level programming experience. Minimal acquaintance with Linux and the ROOT analysis package (https://root.cern.ch/) as well as a basic text editor is needed.

Use with

Use this with 2011 or 2012 primary datasets containing muons.

/DoubleMu/Run2011A-12Oct2013-v1/AOD

/SingleMu/Run2011A-12Oct2013-v1/AOD

/DoubleMuParked/Run2012B-22Jan2013-v1/AOD

/DoubleMuParked/Run2012C-22Jan2013-v1/AOD

/SingleMu/Run2012B-22Jan2013-v1/AOD

/SingleMu/Run2012C-22Jan2013-v1/AOD

Characteristics

4 files. 34.5 KiB in total.

System details

Use this code with the CMS Open Data VM environment
CMSSW_5_3_32

CMS VM Image, for 2011, 2012 and 2015 CMS open data

Validation

Only the list of validated runs are accepted:

CMS list of validated runs Cert_160404-180252_7TeV_ReRecoNov08_Collisions11_JSON.txt

CMS list of validated runs Cert_190456-208686_8TeV_22Jan2013ReReco_Collisions12_JSON.txt

How can you use this?

If you do not have the CERN Virtual Machine for 2011 CMS data installed, follow the instructions in step 1 at How to install a CERN Virtual Machine.

You can setup the example with the detailed instructions below, if you want to get insight on how to build your own analysis and what are the files needed. Install and run the Demo (demo analyzer) program as instructed in step 2 at 'How to install a CERN Virtual Machine'. Then

  1. Create directory datasets under Demo/DemoAnalyzer
  2. Download the index files for the /DoubleMu/Run2011A-12Oct2013-v1/AOD primary dataset (default) to the Demo/DemoAnalyzer/datasets directory. Only the first index file is actually needed for initial running. You can also use other primary datasets containing muons from 2011 or 2012 as listed under "Use With" above.
  3. Download the 2011 JSON validation file (default) or the 2012 JSON validation file (if needed) to the Demo/DemoAnalyzer/datasets directory
  4. .
  5. Replace the three files BuildFile.xml, demoanalyzer_cfg.py, src/DemoAnalyzer.cc with the ones from this record and read the comments in DemoAnalyzer.cc for more details.
  6. Recompile (scram b) and run (cmsRun ...).

You should get an output file DoubleMu.root, which contains histograms for 10000 input events (a small subset of the data). These can be looked at using a ROOT Browser. The most interesting histogram is GM_mass_log. In order to compare it with the invariant-mass spectrum of di-muons in MUO-10-004, it should be viewed with the logy option. With 10000 events the comparison is poor, but the J/ψ (at log10(mass)=0.5), Υ (at log10(mass=0.98)) and Z (at log10(mass)=1.95, one event only) peaks should be visible. Furthermore, since the triggers for 2010 and 2011, as well as SingleMu and DoubleMu are different, the general shape of the distributions will differ somewhat depending on input.

To run over more or even the full statistics, edit the relevant parts of the Python file demoanalyzer_cfg.py (see comments therein, change max. number of events and/or insert the proper index and JSON files for 2011/2012 single/dimuon) and rerun. Add up the output histograms from different (nonoverlapping, i.e. use either DoubleMu or SingleMu, not both) input index files using Root tools.

In addition to these instructions, which guide you through the example in detail, a github repository (https://github.com/cms-opendata-analyses/DimuonSpectrum2011) based on this original code with minor modifications for direct download is available.


      

Disclaimer

These open data are released under the GNU General Public License v3.0.

Logo GPL-3.0-only

Neither the experiment(s) ( CMS ) nor CERN endorse any works, scientific or otherwise, produced using these data.

This release has a unique DOI that you are requested to cite in any applications or publications.

ALICE experiment
ATLAS experiment
CMS experiment
DELPHI experiment
JADE experiment
LHCb experiment
OPERA experiment
PHENIX experiment
TOTEM experiment
© CERN, 2014–2025 ·
Terms of Use ·
Privacy Policy ·
Help ·
GitHub ·
Twitter ·
Email
Powered by Invenio
Open Data Portal v0.3.0
CERN