Skip to content

Commit

Permalink
add example file for input and config file and moification of the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
oponcet committed Oct 13, 2023
1 parent 878cd31 commit 9e76948
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 16 deletions.
40 changes: 28 additions & 12 deletions Fitter/TauES_ID/config/Default_FitSetupTES_mutau_DM.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
## Config file for default TES and tid SF fit in mutau channel by DM
## contact: [email protected] and [email protected]
#
## Config file for default TES fit in mutau channel
## contact: [email protected]
##

# NOTE: In general, the main information (channel, baselineCuts, etc.) should be given.
# More specific sub-options (like weight replacement for systematic uncertainties) are optional
# More specific sub-options (like weight replacement for systematic uncertainties) are optional


# Typically, each channel have its own config file; combination can be done at datacard level
# Typically, each channel will have its own config file; combination can be done at datacard level

channel: mutau

# Tag can be used to differentiate between scenarios

tag: "_mutau_mt65_DM_Dt2p5_default"
tag: "_mutau_mt65_DM_Dt2p5_DAS23_VSJetMedium"


baselineCuts: "q_1*q_2<0 && iso_1<0.15 && idDecayModeNewDMs_2 && idDeepTau2018v2p5VSjet_2>=5 && idDeepTau2018v2p5VSe_2>=2 && idDeepTau2018v2p5VSmu_2>=4 && !lepton_vetoes_notau && metfilter "
Expand Down Expand Up @@ -44,6 +45,8 @@ regions:
title: "h^{#pm}h^{#mp}h^{#pm}#pi^{0}"

plottingOrder: ["DM11", "DM10","DM1", "DM0"]
#plottingOrder: ["DM11"]


tesRegions:
DM0:
Expand Down Expand Up @@ -77,12 +80,16 @@ observables:
cut: "50<m_vis && m_vis<150"
fitRegions: [DM0, DM1, DM10, DM11]
scanRegions: ["DM0", "DM1", "DM10", "DM11"]

# fitRegions: ["DM11"]
# scanRegions: ["DM11"]

# Assume that this code is meant to fit TES variations; more options could be added when adding other POIs

TESvariations:
values: [0.970, 0.971, 0.972, 0.973, 0.974, 0.975, 0.976, 0.977, 0.978, 0.979, 0.980, 0.981, 0.982, 0.983, 0.984, 0.985, 0.986, 0.987, 0.988, 0.989, 0.990, 0.991, 0.992, 0.993, 0.994, 0.995, 0.996, 0.997, 0.998, 0.999, 1.000, 1.001, 1.002, 1.003, 1.004, 1.005, 1.006, 1.007, 1.008, 1.009, 1.010, 1.011, 1.012, 1.013, 1.014, 1.015, 1.016, 1.017, 1.018, 1.019, 1.020, 1.021, 1.022, 1.023, 1.024, 1.025, 1.026, 1.027, 1.028, 1.029, 1.030]
#values: [0.970, 0.971, 0.972, 0.973, 0.974, 0.975, 0.976, 0.977, 0.978, 0.979, 0.980, 0.981, 0.982, 0.983, 0.984, 0.985, 0.986, 0.987, 0.988, 0.989, 0.990, 0.991, 0.992, 0.993, 0.994, 0.995, 0.996, 0.997, 0.998, 0.999, 1.000, 1.001, 1.002, 1.003, 1.004, 1.005, 1.006, 1.007, 1.008, 1.009, 1.010, 1.011, 1.012, 1.013, 1.014, 1.015, 1.016, 1.017, 1.018, 1.019, 1.020, 1.021, 1.022, 1.023, 1.024, 1.025, 1.026, 1.027, 1.028, 1.029, 1.030]
#values: [0.970, 0.972, 0.974, 0.976, 0.978, 0.980, 0.982, 0.984, 0.986, 0.988, 0.990, 0.992, 0.994, 0.996, 0.998, 1.000, 1.002, 1.004, 1.006, 1.008, 1.010, 1.012, 1.014, 1.016, 1.018, 1.020, 1.022,1.024, 1.026, 1.028, 1.030] #1.024
values: [0.970, 0.980, 0.990, 1.000, 1.010, 1.020, 1.030]

processes: ["ZTT"]

# Should add bin-by-bin variations (stat. uncertainties) for signal and backgrounds?
Expand All @@ -102,10 +109,12 @@ samples:
split:
DY: [ ["ZTT","genmatch_2==5"], ["ZL","genmatch_2>0 && genmatch_2<5"], ["ZJ","genmatch_2==0"] ]
TT: [["TTT","genmatch_2==5"], ["TTL","genmatch_2>0 && genmatch_2<5"], ["TTJ","genmatch_2==0"] ]
#ST: [("STT","genmatch_2==5"),("STJ","genmatch_2<5")]
rename:
WJ: "W"
data: "data_obs"
removeSFs: ["idweight_2"]
#addSFs: []


# # Processes taken into account in analysis
Expand Down Expand Up @@ -153,10 +162,10 @@ systematics:
effect: "lnN"
processes: ["ZTT", "ZL", "ZJ", "TTT", "TTL", "TTJ", "W", "ST", "VV"]
scaleFactor: 1.02
# xsec_dy:
# effect: "lnN"
# processes: ["ZTT", "ZL", "ZJ"]
# scaleFactor: 1.02
xsec_dy:
effect: "lnN"
processes: ["ZTT", "ZL", "ZJ"]
scaleFactor: 1.02
xsec_tt:
effect: "lnN"
processes: ["TTT", "TTL", "TTJ"]
Expand Down Expand Up @@ -185,7 +194,14 @@ systematics:
# Additional scale factors per year for specific processes (correction of xsec, reco SFs, etc.)

# scaleFactors:
# WNFs:
# processes: ["W"]
# values:
# 'UL2016_preVFP': { 'dm_2==0': 0.939, 'dm_2==1': 1.031, 'dm_2==10': 1.065, 'dm_2==11': 1.021 }
# 'UL2016_postVFP': { 'dm_2==0': 0.919, 'dm_2==1': 0.972, 'dm_2==10': 1.112, 'dm_2==11': 1.074 }
# 'UL2017': { 'dm_2==0': 0.971, 'dm_2==1': 0.995, 'dm_2==10': 1.109, 'dm_2==11': 1.075 }
# 'UL2018': { 'dm_2==0': 1.007, 'dm_2==1': 0.968, 'dm_2==10': 1.079, 'dm_2==11': 1.044 }
# idFs:
# processes: ["ZTT"]
# values:
# 'UL2018': { 'dm_2==0 && genmatch_2==5': 1, 'dm_2==1 && genmatch_2==5': 1 , 'dm_2==10 && genmatch_2==5': 1, ' dm_2==11 && genmatch_2==5': 1 }
# 'UL2018': { 'dm_2==0 && genmatch_2==5': 0.8667, 'dm_2==1 && genmatch_2==5': 0.8333 , 'dm_2==10 && genmatch_2==5': 0.8000, ' dm_2==11 && genmatch_2==5': 0.7667 }
Binary file not shown.
11 changes: 7 additions & 4 deletions docs/CMSPODAS23/main.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,14 @@ Change the selection to observe the effect of the different DeepTau working poin
Inputs are root file used for the creation of the datacards is `Fitter/TauES/createinputsTES.py`.
These root files are saved in `Fitter/input` folder and named `ztt*.input*tag*.root`. They contain one TDirectory for each `"regions"` defined in the config file (.yml). For each region, there is a list of TH1D corresponding to each `"process"` defined in the config file (ex: ZTT). For each shape systematics, there is also two additionnal TH1D corresponding to the Up and Down variation of the process (ex: ZTT_shapedy_Up). For the TES there is a list of additional TH1D corresponding to the variations (defined by `"TESvariations"` in the config file) of the process by TES correction.

You can create your own inputs by adding some cuts on several varaibles in the config files.
As an example, the config files in `Fitter/TauES_ID/config/` provided the inputs in `Fitter/inputs`. You can use them directly to run combine.
You can create your own inputs by adding some cuts on several varaibles in the config files.

As an example, the config file in `Fitter/TauES_ID/config/Default_FitSetupTES_mutau_DM.yml` provided the inputs in `Fitter/inputs/ztt_mt_tes_m_vis.inputs-UL2018_v10-13TeV_mutau_mt65_DM_Dt2p5_DAS23_VSJetMedium.root`. You can use them directly to run combine.

Exemple of command :
:warning: Don't modify this file, create another one based on this example and change the tag to not overwrite the exisiting file.


:computer: Example of command :

```sh
python TauES/createinputsTES.py -y UL2018_v10 -c TauES_ID/config/Default_FitSetupTES_mutau_DM.yml
Expand Down Expand Up @@ -138,7 +141,7 @@ It defines the following information :

The results of the fit are saved in a root file (ex: `higgsCombine*root` in output folder) that can be used to produced several plots. Especially, NLL pararabola and summary plots can be produced via `plotScan(setup, era=era, config=config)` that called `plotParabola_POI_region.py`.

Exemple of command to run the TES scans by DM :
:computer: Example of command to run the TES scans by DM :
```sh
python TauES_ID/makefit_PODAS23.py -y UL2018_v10 -c TauES_ID/config/Default_FitSetupTES_mutau_DM.yml
```
Expand Down

0 comments on commit 9e76948

Please sign in to comment.