Giter Site home page Giter Site logo

fakeratemeasurement's Introduction

Small standalone script to calculate both the fake and prompt rates using the tight-to-loose method. The script is divided into different steps.

Important note

The code that can be found in the directory called "Fake-rates-code" is an alternative option to compute the fake rates. Both options have been completely synchronized in June 2019.

Step 1

It is possible to run by hand the script runNanoFakes.C on one particular file,

root -l -b -q 'runNanoFakes.C("2017", "nanoLatino_DYJetsToLL_M-50__part0")'

The normal thing to do is to batch submit several samples at once. The batch submission can be done reading the samples directly from a directory.

python submitJobs.py -d <full path of the directory> -y <year>

To change the year to produce the fake rates, the argument -y has to be given and the following changes have to be made. First, the electron/muon has to be changed at the bottom of the nanoFakes.h file, and then the triggers might need to be changed (to move from ele12 to ele8, for example). The prescale weigth should be updated automatically though.

Check job status

It is possible to check the status of the jobs by using the command

condor_q      
watch -n10 condor_q

Step 2

An hadd is necessary once all the jobs are done.

cd results
hadd hadd_data.root  nanoLatino_*_Run201*.root
hadd hadd_wjets.root nanoLatino_WJetsToLNu*.root
hadd hadd_zjets.root nanoLatino_DYJetsToLL*.root

Two different options are then available.

getFakeRate.C

This is a small script allowing the user to compute both the fake and prompt rates, for both muons and electrons. The output is a set of png histograms.

getLumiEff.C

This script uses the ZRegion defined in nanoFakes.C in order to calculate a basic data/MC ratio within the peak of the Z, to make sure that the results given by getFakeRate.C make sense.

fakeratemeasurement's People

Contributors

amassiro avatar cedricpri avatar adrianalvarezf avatar

Watchers

James Cloos avatar Yutaro Iiyama avatar Davide Valsecchi avatar  avatar Janssen Xavier avatar Po-Hsun Chen avatar Arun Kumar avatar  avatar  avatar Rocio avatar Nicolo Trevisani avatar Siewyan Hoh avatar  avatar Davide Di Croce avatar J Ferrero avatar  avatar Dmitry Kondratyev avatar jhchoi avatar  avatar  avatar  avatar

Forkers

friccita

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.