Git Product home page Git Product logo

dimuonspectrum2010's Introduction

DimuonSpectrum2010

This is a simple analysis example to compute the spectrum of two muon final state with CMS Open Data.

It is based on the Example code to produce the di-muon spectrum from a CMS 2010 primary dataset on the CERN Open Data portal (Geiser, Achim. Dutta, Irene. Hirvonsalo, Harri. Sheeran, Bridget. (2016). CERN Open Data Portal. DOI: 10.7483/OPENDATA.CMS.TF26.KG2D) and another github project DimuonSpectrum2011, and modified here for direct download from github.

The modifications with respect to the original code are the following:

  • the class name has been changed from DemoAnalyzer to DimuonSpectrum2010 in order to avoid conflict for any existing DemoAnalyzer plugins in the working area
  • the file paths have been modified to be relative in the configuration file, i.e. they point to the datasets directory, which is under the directory from where there program will be run.

You can run this code in CMS Open Data VM. If you have not installed the CMSSW area do the following:

cmsrel CMSSW_4_2_8

You can also run this code in a CMS Open Data Docker container if you are interested in that:

docker run --name dimu2010 -it cmsopendata/cmssw_4_2_8 bash

If you already have the CMSSW on your VM or run the docker container, start directly with:

cd CMSSW_4_2_8/src
cmsenv

For this example, you need to create an additional directory, you can call it WorkDir or choose another name. Go to this directory, and download the example code.

mkdir WorkDir
cd WorkDir
git clone git://github.com/PhyM73/DimuonSpectrum2010.git

Go to the example directory, and compile with scram b.

cd DimuonSpectrum2010
scram b

The input files are defined in the configuration file demoanalyzer_cfg.py and are already in the datasets directory. This example runs on 2010 data by default. In this case, download to the the datasets directory:

In order not to overwrite the existing DoubleMu.root, to which you can compare your output, rename it before you run.

Run the example as configured in the configuration file.

cmsRun demoanalyzer_cfg.py

The output of the example is a root file containing several histograms, by default DoubleMu.root with 10000 input events (small subset of data). These can be looked at using a Root Browser.

For more detailed information, read the comments in src/DimuonSpectrum2010.cc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.