== [https://cds.cern.ch/record/1456844/files/CERN-OPEN-2012-016.pdf HistFactory] Input to calculate Combined SR exclusion limits ==
[https://cds.cern.ch/record/2684863/files/ATL-PHYS-PUB-2019-029.pdf HistFactory] JSON files can be attached to the analysis to be able to estimate exclusion limits of combined likelihood profiles and even global profile likelihoods. JSON files need to be under the same folder with info file and required information has to be added into the info file as shown below.
{{{
139.0
FILE_NAME.json
SRX
SRY
}}}
where "" is the identifier of the profile and will be printed in the output file to show the exclusion estimates calculated using this specific likelihood profile. FILE_NAME.json is the name of the JSON file. "" is the name of the channel as specified in the JSON file, please note that in case of the wrong declaration the profile will be ignored. In the example above, channel 1 has two signal regions declared as SRX and SRY. '''These names are needed to be taken from the PAD analysis and have to be ordered as given in JSON file. In case of wrong ordering, the calculation will be wrong. To make sure, please refer to the analysis description.''' If further help needed, one can use [http://madanalysis.irmp.ucl.ac.be/attachment/wiki/SRCombinations/write_histfactory_info.py write_pyhf_info.py]
{{{
python write_histfactory_info.py -i FILE1.json FILE2.json FILE3.json
}}}
where -i refers to the interactive mode, which writes the file by giving you directions. The JSON files has to be named as in info file and placed in the same folder wiith the info file (''~/madanalysis5/tools//Build/SampleAnalyzer/User/Analysis/atlas_xyz_00_00.info'')
In order to use HistFactory, one needs to install [https://cds.cern.ch/record/2684863/files/ATL-PHYS-PUB-2019-029.pdf pyhf] package which is automatically installed via following command
{{{
install pyhf
}}}
After these steps all given signal region combinations are automatically calculated and additionally MadAnalysis constructs a global likelihood profile to combine all given HistFactory files with the same parameter of interest.