Scripts for computing limits, to be run inside a CMSSW area
First, make a CMSSSW area and install combine.
- See instructions: http://cms-analysis.github.io/HiggsAnalysis-CombinedLimit/latest/#within-cmssw-recommended-for-cms-users
Next, git clone
this package.
Finally, install the ruamel package (dependency from other scripts in rootNtupleMacrosV2 package):
pip3 install --user ruamel.yaml
- Estimate r-value scan range. This is done by running the AsymptoticLimits. Currently, this is done via batch jobs on condor.
Example: python3 scripts/runLimits.py -d combCardFile.txt -n myLimitDir -e
- Read the estimation results into a json file.
Example: python3 scripts/runLimits.py -d combCardFile.txt -n myLimitDir -e -r
- Use the estimation results to submit grid generation jobs. Note that the r-value scan range estimations can be used from earlier results, as the scan ranges probably won't change much.
Example: python3 scripts/runLimits.py -d combCardFile.txt -n myLimitDir -f myLimitDir/asymptoticLimits/rValues.json -g
- Once the grid generation jobs are done, you can submit the jobs to calculate the limits using them:
Example: python3 scripts/runLimits.py -d combCardFile.txt -n myLimitDir -f myLimitDir/asymptoticLimits/rValues.json -l
- Once the limit-setting jobs are done, extract the limits, make plots and tables:
Example: python3 scripts/runLimits.py -d combCardFile.txt -n myLimitDir -f myLimitDir/asymptoticLimits/rValues.json -r | tee myLimitDir/limitsNominal.log
Similar to the above, but specifying the -b
flag to indicate that a scan over beta values should be done.
By default, this will also calculate the nominal limits.
One can include the flag -s
to skip the nomimal limit calculation.