OpTHyLiC

Online code documentation


Introduction

This page contains information about the OpTHyLiC code usage. For other information, please consult the home page.

Contents:

Instance creation and configuration

To create an instance of the OpTHyLiC class, the following code is needed: The first two arguments are mandatory while the last three are optional. The meaning of the arguments is explained in the documentation.
syst is the type of systematics interpolation/extrapolation function, within the following list: stat is the type of statistical PDF generator, within the following list: random is the type of pseudo-random generator engine, within the following list: seed is the generator seed to be used, comb is the type of systematics combination, within the following list: Example: where the generator seed will be 0 (i.e. setting a random seed) and the systematics combination will be automatic.

Confidence level setting

By default, the confidence level is set to 95%. The following method allows setting it to a different value: Example: to set the confidence level to 99%.
It is possible to retrieve the current value with the command

Single channel description and input file syntax

The following method allows adding a new single-bin channel: and returns an identifier for this new channel. The two arguments are strings, name is the internal name of the channel, file is the name of the file that contains the description of the channel. Example: The input file is a simple text file, complying to the following rules: Example of input file: where two different systematics have been defined (syst1 and syst2), one of which (syst1) affects both the background and the signal with 100% correlation, while the second (syst2) does not affect the background and has an effect of ±10% on the signal.

Single channel description without input file

The main method to add a single-bin channel is to use the input file method. However, it is also possible to use an alternative method, without any input file: and with similar methods for the signal: and for the data: Example:

Multiple channel description and input file syntax for discriminant variables distributions

When using distributions of discriminant variables as inputs, each bin of the distribution is considered as a single-bin channel. The following method allows adding a new channel, using histograms as input: and returns an identifier for the last bin of this new channel.
The first two arguments are strings and are mandatory, name is the internal name of the channel (each bin will correspond to a channel whose name is name followed by the bin index), file is the name of the file that contains the description of the channel.
The last argument is optional and is a boolean. When not specified, the default value (true) is taken and all the intermediate files will be removed, otherwise the files are kept and may be used for debugging or to run on a sub-set of the bins.
Example: The input file is a simple text file, complying to the following rules: Example of input file: Another example of input file:

Access to a single channel

Any channel can be accessed directly, using one of the two following commands: where idCh is the channel identifier returned by the addChannel method and name is the name of the channel. Example:

Yields and uncertainties printout

It is possible to print on the cout stream the list of the channels and samples together with their yields and uncertainties with the command There is also the possibility to print the yields and uncertainties for a single channel:

LaTeX table creation for the input yields

It is possible to create LaTeX tables containing the input yields as well as the total uncertainties with the command The first argument is mandatory while the second one is optional.
out is the output stream to which the tables will be written.
prec is the number of digits to be printed after the decimal point. If not specified the default value (-1) is taken, meaning that the precision will be automatically determined for each yield, using the magnitude of the uncertainties.

Example:


LaTeX table creation for the systematic uncertainties

It is possible to create LaTeX tables containing the details of the input systematic uncertainties with the command The first two arguments are mandatory, the last one is optional.
out is the output stream to which the tables will be written.
dict is the name of a file containing a dictionary for LaTeX names (see below for the syntax).
prec is the number of digits to be printed after the decimal point. If not specified the default value (2) is taken. The value -1 means that the precision will be automatically determined for each yield, using the magnitude of the uncertainties.

Example:

The dictionary file is a simple text file, complying to the following rules: Example of dictionary file:

LaTeX table creation for the generated yields

It is possible to generate distributions of yields from pseudo-experiments and then create LaTeX tables containing the median yields as well as the ±1σ ranges with the command The first argument is mandatory while the last two are optional.
out is the output stream to which the tables will be written.
prec is the number of digits to be printed after the decimal point. If not specified the default value (-1) is taken, meaning that the precision will be automatically determined for each yield, using the magnitude of the uncertainties.
nbexp is the number of pseudo-experiments generated to compute the values. If not specified the default value (106) is taken.

Example:


Generation of expected yields

It is possible to generate distributions of expected yields from pseudo-experiments, taking into account all variations due to statistical and systematic uncertainties but not applying Poisson variations, with the command nbexp is the number of pseudo-experiments generated to compute the distributions.
Example: There exists another command that automatically calls the generateDistrYield method for all channels and creates a LaTeX table from the result.

Scan of CLs as a function of the signal strength

It is possible to compute the CLs value for several signal strengths, with the commands min and max are the first and last values of the signal strength to be tested.
steps is the total number of signal strengths to be tested.
nbexp is the number of pseudo-experiments generated to compute each CLs.
type is the type of CLs to be computed, within the following list: Example: When using several channels, it is also possible to do the scan for a single one, not combining with the other channels, with the commands where the arguments are the same as above.

Computation of observed and expected limits

The computation of observed or expected limits is performed by the command that returns the signal strength for a given confidence level. The first three arguments are mandatory while the last two are optional.
type is the type of limit to be computed, within the following list: nbexp is the number of pseudo-experiments to be generated to compute each CLs.
cls is the value of the final CLs.
mu is a reasonable value for the result. It has no effect on the final computed value but may speed up the process. If not specified, the default value (1) is taken.
method is the type of method to be used for the computation, within the following list: If not specified, the default value (OTH::MethDichotomy) is taken.
Example: When using several channels, it is also possible to compute a limit for a single one, not combining with the other channels, with the command where the arguments are the same as in the combined limit computation above.

Alternative computation of expected limits

The alternative method described in the documentation to compute all expected limits (median, ±1σ, ±2σ) from the distribution of the expected signal strengths is performed by the command that returns the median expected limit for a given confidence level. The other quantiles (±1σ, ±2σ) are printed but not returned.
nbmu is the number of entries in the expected signal strengths distribution.
nbexp is the number of pseudo-experiments generated to compute each CLs.
Example: When using several channels, it is also possible to compute the limits for a single one, not combining with the other channels, with the command where the arguments are the same as in the combined limit computation above.

Significance computation

The computation of the significance of an observation can be performed by the command that returns the p-value (s.first) and the z-value (s.second) of the observation. The first two arguments are mandatory while the last one is optional.
type is the type of significance to be computed, within the following list: nbexp is the number of pseudo-experiments generated to compute each test-statistic distribution.
mu is the signal strength to be used for the computation. If not specified, the default value (1) is taken.
Example: When using several channels, it is also possible to compute the significance for a single one, not combining with the other channels, with the command where the arguments are the same as in the combined significance computation above.

Generation of test-statistic distributions

It is possible to generate the test-statistic distributions under the background only and signal plus background hypotheses with the commands mu is the given signal strength for the signal plus background hypothesis.
nbexp is the number of pseudo-experiments generated to compute each distribution.
Example: When using several channels, it is also possible to generate the distributions for a single one, not combining with the other channels, with the command

Computation of p-value, CLs and test-statistic value

It is possible to compute the p-value, the CLs value and the test-statistic value for the observed data and a given signal strength with the commands In order to compute these values, the test-statistic distributions must have been already generated, either by generating them explicitely or after a limit computation.
When using several channels, it is also possible to compute these values for a single one, not combining with the other channels, with the commands obs is the number of observed events in the data.

Computation of the excluded yield for a single channel

It is possible to compute the yield that is excluded for a given channel and a given signal strength with the command In order to compute this value, the test-statistic distributions must have been already generated, either by generating them explicitely or after a limit computation.

Test-statistic distributions

It is possible to access the generated test-statistic distribution for the background only or the signal plus background hypothesis with the commands In order to access these histograms, the test-statistic distributions must have been already generated, either by generating them explicitely or after a limit computation.
Example: When using several channels, it is also possible to access the test-statistic distribution for a single one with the commands

Distributions of observed number of events in pseudo-data

It is possible to access the generated distribution of the observed number of events in pseudo-data for a given channel, under the background only or the signal plus background hypothesis, with the command the type of distribution must be within the following list: In order to access these histograms, the test-statistic distributions must have been already generated, either by generating them explicitely or after a limit computation.
Example:

Distributions of systematic uncertainties

It is possible to access the generated distribution of a given systematic uncertainty for a given channel and the signal sample or a given background sample with the commands syst is the name of the systematic uncertainty, sample is the name of the background sample.
In order to access these histograms, the distributions must have been already generated, by generating a test-statistic distribution, after a limit computation or after a yield generation.
Example:

Distributions of expected yields

It is possible to access the generated distributions of the expected yields for a given channel and a given sample (not taking into account the Poisson fluctuations), for the signal, a given background and the total background with the commands name is the name of the requested background sample. In order to access these histograms, the distributions must have been already generated.
Example:

Distribution of signal strengths

It is possible to access the distribution of excluded signal strengths from which the alternative computation of expected limits is performed with the commands for a combined limit or a single-channel limit.

Excluded signal strength evolution

After an alternative computation of expected limits for a single channel, it is possible to access the evolution of the excluded signal strength as a function of the number of observed events with the command Example:

Last change: 2015-07-22

Valid HTML 4.01 Transitional CSS Valide !