Skip to content

wonpoint4/egm_tnp_analysis

 
 

Repository files navigation

Muon TnP using egm_tnp_analysis

Quick Start

source setup.sh

python tnpEGM_fitter.py etc/config/MuonTnP_reproduce_POG.py --createBins
python tnpEGM_fitter.py etc/config/MuonTnP_reproduce_POG.py --createHists --condor -n 10
python tnpEGM_fitter.py etc/config/MuonTnP_reproduce_POG.py --doFit --condor
python tnpEGM_fitter.py etc/config/MuonTnP_reproduce_POG.py --doPlot --condor
python tnpEGM_fitter.py etc/config/MuonTnP_reproduce_POG.py --sumUp --condor

or more simply,

python tnpEGM_fitter.py etc/config/MuonTnP_reproduce_POG.py --createBins --createHists --doFit --doPlot --sumUp --condor -n 10

If you want Cut&Count instead of GenConv (default one, fitting with Gen MC shape as signal, exponential as bkg), Add --doCnC

python tnpEGM_fitter.py etc/config/MuonTnP_reproduce_POG.py --createBins --createHists --doCnC --doPlot --sumUp --condor -n 10

How to check output results

  • Efficiency Summary - ex) vi UL2018_POG_Reproduce/IsoMu24_pteta/muonEffi_data.txt , muonEffi_mc.txt
  • FitCanvases - ex) eog UL2018_POG_Reproduce/IsoMu24_pteta/data/plots/* , Move using <-, ->
  • Root files - ex) root -l UL2018_POG_Reproduce/IsoMu24_pteta/result.root , result_stat.root

Edit Configuration files

  • edit etc/config/@@@@@@@.py (examples) muonTnP_AFB.py -> This has many information about UL (ex.TnP ntuple locations, typical selections, etc)
  • You can change muonTnP_AFB's settings. (Period, Measure, Charge)
sed -i "s/Measure = 'ID'/Measure = 'IsoMu24'/g" etc/config/muonTnP_AFB.py
  • Or, you can make your own configuration file

Refit

For example, if you want to refit 2,3,5,10 bins in flag data_altbkd or 2,3,5,10 bins in every flags.

python tnpEGM_fitter.py etc/config/muonTnP_AFB.py --doFit --doPlot --flag data_altbkd --iBin 2 3 5 10

python tnpEGM_fitter.py etc/config/muonTnP_AFB.py --doFit --doPlot --iBin 2 3 5 10 --condor
  • You can change initial values of fit parameters in etc/config/muonTnP_AFB.py
  • Also, you can change the height of peak by changing values in libCpp/histFitter.C (103~106 lines)

Plotting codes

You may need to edit these if you want.

  • canvas_margin.h
  • plotter.C (targeted outputs from muonTnP_AFB.py)

About

package to analyse egm tnp trees

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 62.2%
  • C 27.2%
  • C++ 5.0%
  • Cython 4.7%
  • Other 0.9%