Giter VIP home page Giter VIP logo

monoznanoaod's Introduction

MonoZNanoAOD

MonoZ analysis using NanoAOD

Quick start

cmsrel CMSSW_10_6_4
cd CMSSW_10_6_4/src
cmsenv


mkdir PhysicsTools/
git clone https://github.com/yhaddad/nanoAOD-tools.git PhysicsTools/NanoAODTools
git clone [email protected]:yhaddad/MonoZNanoAOD.git PhysicsTools/MonoZ

cd $CMSSW_BASE/src/PhysicsTools/NanoAODTools
git checkout remotes/origin/topic-Run2-Lepton-SF
cd $CMSSW_BASE/src
scram b -j 10

cd $CMSSW_BASE/src/PhysicsTools/MonoZ/scripts/
python postproc_test.py

submitting crab jobs

voms-proxy-init -voms cms --valid 168:00
source /cvmfs/cms.cern.ch/crab3/crab.sh

cd $CMSSW_BASE/src/PhysicsTools/MonoZ/crab/

echo "/TTTo2L2Nu_TuneCP5_13TeV-powheg-pythia8/RunIIFall17NanoAOD-PU2017_12Apr2018_94X_mc2017_realistic_v14-v1/NANOAODSIM" > simple_test.dat

python submit_all.py -i simple_test.dat --isMC=1

Running combine

Before generating datacard and running the final fit, we need to fetch combine tools.

export SCRAM_ARCH=slc7_amd64_gcc700
cmsrel CMSSW_10_2_13
cd CMSSW_10_2_13/src
cmsenv
git clone https://github.com/cms-analysis/HiggsAnalysis-CombinedLimit.git HiggsAnalysis/CombinedLimit
cd $CMSSW_BASE/src/HiggsAnalysis/CombinedLimit
git fetch origin
git checkout v8.0.1

# fetch CombineTool
cd $CMSSW_BASE/src
bash <(curl -s https://raw.githubusercontent.com/cms-analysis/CombineHarvester/master/CombineTools/scripts/sparse-checkout-https.sh)

cd $CMSSW_BASE/src/
scramv1 b clean; scramv1 b -j 10

To run some of the plotting tools, you need third party pakages such as uproot. You can install by

pip install uproot --user
pip install thermcolor --user

Then you need to checkout the packages to run the datacrad producer, you need to create a directory where to put the merged root files.

cd $CMSSW_BASE/src/
git clone https://github.com/yhaddad/MonoZFinalFit.git
cd $CMSSW_BASE/src/MonoZFinalFit/
cd data/
python filemerger.py --dir=/eos/cms/store/group/phys_exotica/monoZ/DarkNight/

DarkNight is the latest production to be replaced with the tag that you run with.

Please make sure to edit config/merged_inputs.yaml and make appropriate changes about how the group merging should be done (dont change the group name, only the file names)

to make datacards for all the different control regions you can run:

./run.sh

please edit this file and make approperiate changes, such as "python3 to python". to run the limits, you hit the follwing command

combineCards.py -S DMY1000Xd200/card_* > combined_DMY1000Xd200.dat
text2workspace.py combined_DMY1000Xd200.dat
combine -M AsymptoticLimits combined_DMY1000Xd200.dat.root  --run blind

Sometimes it complains about "0.000" please changes it to "0.100" if it does.

the output of such command is :

 -- AsymptoticLimits ( CLs ) --
Expected  2.5%: r < 5.1239
Expected 16.0%: r < 7.3816
Expected 50.0%: r < 11.4062
Expected 84.0%: r < 18.0897
Expected 97.5%: r < 27.4244

Where 5.1239 is the expected limit using the input signal.

To run the impact parameters tools check the documentation here

combineTool.py -M Impacts -d combined_DMY2000Xd1.dat.root -m 125 --doInitialFit --robustFit 1
combineTool.py -M Impacts -d combined_DMY2000Xd1.dat.root -m 125 --robustFit 1 --doFits
combineTool.py -M Impacts -d combined_DMY2000Xd1.dat.root -m 125 --o impacts.json
plotImpacts.py -i impacts.json -o impacts

monoznanoaod's People

Contributors

yhaddad avatar chadfreer avatar bingranw avatar

Stargazers

 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.