Giter Site home page Giter Site logo

tauid's Introduction

TauId

Measurement of the Tau ID (MC to Data) scale factors.

#########################################################################

Instruction to run the Tau ID analysis

You can run runFullTauIDmeasurement.sh

This file includes the execution of a collection of RooT macros used to perform measurements of the tau Id efficiency scale factors with W*->tau+v events.

PlotTrigger.C - Macro to compute trigger turn on curves for MET trigger. The macro produces as an output RooT file output/trigger_eff.root with functions describing efficiency of the MET trigger in dependence of offline MET and MHT variable. The newly created file should be placed in the directory $CMSSW_BASE/src/src/DesyTauAnalyses/NTupleMaker/data and specified in the configuration file. The MET sample should be redone with this trigger efficiency file where then the calculated trigger weight is added to the overall weight.

ComputeFakeRate.C - Computes fake factor as a function of tau jet Pt (pt of the corresponding jet) and tau Pt/ tau jet Pt. The fake factor is determined in data for the analysis. The script calculates also fake factors on MC to make a closure test. The macro produces as an output the RooT file output/${dataset}_fakeRate.root where ${dataset} is either SingleMuon_Run2016 or JetHT_Run2016, or MC sample names.

CalculateEWKfraction.C - Calculates the EWK fraction (n_EWK^MC/n_Data in the anti-isolated signal region) and combines the SingleMu and JetHT fake rates Output: Root file output/fakerates.root

WToTauNuMeasurement.C - Creates root file with final histogram and all relevant systematic uncertainties. Is used as input for Combine.

DatacardProducer_WToTauNu.C - Creates datacard for Combine

WToMuNuMeasurement.C - Creates root file with final histogram for W*->mu nu analysis and all relevant systematic uncertainties. Is used as input for Combine.

DatacardProducer_WToMuNu.C - Creates root file with final histogram and all relevant systematic uncertainties. Is used as input for Combine.

MakePostFitPlots.C - Makes post fit plots.

Instructions to make NTuples

All ntuples are located in /nfs/dust/cms/user/mameyer/TauIdAndES_2017Data/TauId/NTuples

Instructions for running NTuple producer AnalysisNTupleProducer_TauID.cpp macro.

The macro AnalysisNTupleProducer_TauID.cpp is located in DesyTauAnalysesRun2/NTupleMaker/bin/ and is executed with two arguments: configuration file and filelist. An instruction to setup a CMSSW area including the DesyTauAnalysesRun2 package can be found here

Examples of configuration files are

  • NTuples/analysisNTupleProducer_tauid_Data.conf (to run on data)

  • NTuples/analysisNTupleProducer_tauid_MC_DY2Jets.conf (to run on MC)

Example of filelist :

  • NTuples/

Examples of running the macro

AnalysisNTupleProducer_TauID analysisNTupleProducer_tauid_Data.conf MET_Run2016G

AnalysisNTupleProducer_TauID analysisNTupleProducer_tauid_MC_DY2Jets.conf WToMuNu_M-200_13TeV-pythia8

Useful scripts :

qsub.sh - submits job to batch system. This script requires three arguments :

  1. code name

  2. config file

  3. filelist

Example :

qsub.sh AnalysisNTupleProducer_TauID analysisNTupleProducer_tauid_Data.conf MET_Run2016G

qsub_seq.sh - submits several jobs per filelist. The script requires four arguments :

  1. code name

  2. config file

  3. filelist

  4. files per job

The script creates a directory named $filelist_files. The directory will contain all RooT and output files created by separate jobs. Once all jobs are finished, all RooT files can be merged by executing script hadd.sh

hadd.sh $filelist.

Instruction to run fits

The directory datacards contains all datacards for statistical inference and results of the fits.

The datacards from two regions - signal (W*->tau+v) and control region (W*->mu+v) are combined using script CombineCards.sh. This will produce datacards for various tau ID working points

tauId_LooseMvaIso.txt

tauId_MediumMvaIso.txt

tauId_TightMvaIso.txt

tauId_LooseIso.txt

tauId_MediumIso.txt

tauId_TightIso.txt

To run computation of the tauId, one needs to execute script

Fitting.csh

and pass as an argument tau isolation working point (LooseMvaIso, MediumMvaIso, TightMvaIso, LooseIso, MediumIso or TightIso)

Example :

./Fitting.sh MediumIso

This will create mlfit_tauId_MediumIso.root. This file is then used to plot posfit distributions of fitted variables (mT(mu,MET) in the W*->mu+v control region and mT(tau,MET) in the W*->tau+v signal region).

tauid's People

Contributors

marmeyer avatar prabhatsolanki avatar

Watchers

 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.