Giter VIP home page Giter VIP logo

cms-l1t-analysis's Introduction

cms-l1t-analysis

Software package to analyse L1TNtuples

  • Build Status
  • DOI
  • Code Health

DEV

  1. Read CONTRIBUTING.md
  2. Follow the instructions below

On Scientific Linux 6 with CVMFS available

This includes nodes lxplus.cern.ch & private clusters

git clone https://github.com/<your github user name>/cms-l1t-analysis.git
cd cms-l1t-analysis
git remote add upstream https://github.com/cms-l1t-offline/cms-l1t-analysis.git
source bin/env.sh
# you will need your grid cert
voms-proxy-init --voms cms
make setup

On OS X/other Linux/Windows

  1. Install Virtualbox
  2. Install Vagrant
  • You might need to also install vagrant-libvirt on some systems if you see "The provider 'libvirt' could not be found, but was requested to back the machine 'default'. Please use a provider that exists."
  1. Follow instructions below
git clone https://github.com/<your github user name>/cms-l1t-analysis.git
cd cms-l1t-analysis
git remote add upstream https://github.com/cms-l1t-offline/cms-l1t-analysis.git
# only on non Scientific Linux machines (e.g. OS X, Windows, Ubuntu, etc)
vagrant up
vagrant ssh
cd /vagrant
source bin/env.sh
# you will need your grid cert
voms-proxy-init --voms cms
make setup

running benchmark

# install python requirements
pip install -r requirements.txt --user
make benchmark

Generating changelog

make changelog

Prerequisites

gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable --ruby
source ~/.rvm/scripts/rvmsource ~/.rvm/scripts/rvm
gem install github_changelog_generator

Implementing and running an analysis script

"Analyzers" are the parts of the code that receive events from the input tuples, extracts the relevant data and puts this into the histograms.

You can see an example of an analyzer at: cmsl1t/analyzers/demo_analyzer.py.
To implement your own analyzer, all you need to do is make a new class in a file under cmsl1t/analyzers/ which inherits from cmsl1t.analyzers.BaseAnalyzer.BaseAnalyzer. You then need to implement two or three methods: prepare_for_event, fill_histograms, write_histograms, and make_plots. See the BaseAnalyzer class and the demo_analyzer for examples and documentation of these methods.

Once you have implemented an analyzer, you can run it with bin/analyze command:

python bin/analyze -a demo_analyzer -i 'data/L1Ntuple_*.root' -n 1000

Get help on the command line options by doing:

python bin/analyze -h

cms-l1t-analysis's People

Contributors

benkrikler avatar kreczko avatar

Watchers

 avatar  avatar  avatar

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.