Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
CorrelationProvider Class Reference

Provides access to statistical, systematic, or combined correlations between parameters or observables. More...

#include <CorrelationProvider.h>

Inheritance diagram for CorrelationProvider:
Collaboration diagram for CorrelationProvider:

Public Types

enum class  CorrelationType { STAT , SYST , COMBINED }
 Type of correlation component requested. More...
 

Public Member Functions

double operator() (const ParamId &pid_1, const ParamId &pid_2, CorrelationType type)
 Retrieves a correlation between two parameters.
 
double operator() (const ExperimentObs &oid_1, const ExperimentObs &oid_2, CorrelationType type)
 Retrieves a correlation between two fully explicit experiment-scoped observables.
 
double operator() (const std::string &experiment, const Observables &oid_1, const Observables &oid_2, CorrelationType type)
 Retrieves a correlation between two observables specified by enum, within the same experiment.
 
double operator() (const std::string &experiment, const ObservableId &oid_1, const ObservableId &oid_2, CorrelationType type)
 Retrieves a correlation between two observables specified by ObservableId, within the same experiment.
 
double operator() (const std::string &experiment, const BinnedObservableId &oid_1, const BinnedObservableId &oid_2, CorrelationType type)
 Retrieves a correlation between two observables specified by BinnedObservableId, within the same experiment.
 
double operator() (const std::string &exp_1, const BinnedObservableId &oid_1, const std::string &exp_2, const BinnedObservableId &oid_2, CorrelationType type)
 Retrieves a correlation between two binned observables coming from possibly different experiments.
 
bool exists (const ParamId &pid_1, const ParamId &pid_2, CorrelationType type)
 Checks if a correlation between two parameters is non-zero.
 
bool exists (const ExperimentObs &oid_1, const ExperimentObs &oid_2, CorrelationType type)
 Checks if a correlation between two experiment-scoped observables is non-zero.
 
bool exists (const std::string &experiment, const Observables &oid_1, const Observables &oid_2, CorrelationType type)
 Checks if a correlation between two observables (enum) in the same experiment is non-zero.
 
bool exists (const std::string &experiment, const ObservableId &oid_1, const ObservableId &oid_2, CorrelationType type)
 Checks if a correlation between two observables (ObservableId) in the same experiment is non-zero.
 
bool exists (const std::string &experiment, const BinnedObservableId &oid_1, const BinnedObservableId &oid_2, CorrelationType type)
 Checks if a correlation between two observables (BinnedObservableId) in the same experiment is non-zero.
 
bool exists (const std::string &exp_1, const BinnedObservableId &oid_1, const std::string &exp_2, const BinnedObservableId &oid_2, CorrelationType type)
 Checks if a correlation between two binned observables coming from possibly different experiments is non-zero.
 
- Public Member Functions inherited from IDataProvider< CorrelationProvider >
virtual ~IDataProvider ()=default
 
double operator() (Args &&... args)
 
bool exists (Args &&... args) const
 

Detailed Description

Provides access to statistical, systematic, or combined correlations between parameters or observables.

CorrelationProvider implements a callable interface:

  • operator()(ParamId, ParamId, CorrelationType) for parameters,
  • operator()(ExperimentObs, ExperimentObs, CorrelationType) for fully explicit experiment-scoped observables,
  • operator()(experiment, Observables, Observables, CorrelationType) for enum-based observables,
  • operator()(experiment, ObservableId, ObservableId, CorrelationType) for explicit observable IDs,
  • operator()(experiment, BinnedObservableId, BinnedObservableId, CorrelationType) for binned observables,
  • operator()(exp1, BinnedObservableId, exp2, BinnedObservableId, CorrelationType) for cross-experiment queries.

It delegates the actual lookup and combination to the global CorrelationRepository exposed by MemoryManager.

Example:

double rho_stat_param = corr(p1, p2, CorrelationProvider::CorrelationType::STAT);
double rho_stat_obs = corr("LHCb", o1, o2, CorrelationProvider::CorrelationType::STAT);
Provides access to statistical, systematic, or combined correlations between parameters or observable...
Identifies an observable together with a numerical bin.
Represents an identifier of a LHA element, possibly containing several sub-ids.
Definition LhaID.h:56
Composite identifier for a single parameter.
Definition ParamID.h:57
Examples
data_provider_example.cpp.

Definition at line 58 of file CorrelationProvider.h.

Member Enumeration Documentation

◆ CorrelationType

Type of correlation component requested.

Enumerator
STAT 
SYST 
COMBINED 

Definition at line 61 of file CorrelationProvider.h.

Member Function Documentation

◆ exists() [1/6]

bool CorrelationProvider::exists ( const ExperimentObs oid_1,
const ExperimentObs oid_2,
CorrelationType  type 
)

Checks if a correlation between two experiment-scoped observables is non-zero.

Parameters
oid_1First experiment-scoped observable.
oid_2Second experiment-scoped observable.
typeType of correlation requested (stat, syst, combined).
Returns
True if the correlation is non-zero, false otherwise.

Definition at line 54 of file CorrelationProvider.cpp.

◆ exists() [2/6]

bool CorrelationProvider::exists ( const ParamId pid_1,
const ParamId pid_2,
CorrelationType  type 
)

Checks if a correlation between two parameters is non-zero.

Internally calls the corresponding operator() and tests whether the returned value is non-zero.

Parameters
pid_1First parameter ID.
pid_2Second parameter ID.
typeType of correlation requested (stat, syst, combined).
Returns
True if the correlation is non-zero, false otherwise.

Definition at line 48 of file CorrelationProvider.cpp.

◆ exists() [3/6]

bool CorrelationProvider::exists ( const std::string &  exp_1,
const BinnedObservableId oid_1,
const std::string &  exp_2,
const BinnedObservableId oid_2,
CorrelationType  type 
)

Checks if a correlation between two binned observables coming from possibly different experiments is non-zero.

Parameters
exp_1Experiment associated with the first observable.
oid_1First binned observable ID.
exp_2Experiment associated with the second observable.
oid_2Second binned observable ID.
typeType of correlation requested (stat, syst, combined).
Returns
True if the correlation is non-zero, false otherwise.

Definition at line 81 of file CorrelationProvider.cpp.

◆ exists() [4/6]

bool CorrelationProvider::exists ( const std::string &  experiment,
const BinnedObservableId oid_1,
const BinnedObservableId oid_2,
CorrelationType  type 
)

Checks if a correlation between two observables (BinnedObservableId) in the same experiment is non-zero.

Parameters
experimentExperiment name used to scope both observables.
oid_1First binned observable ID.
oid_2Second binned observable ID.
typeType of correlation requested (stat, syst, combined).
Returns
True if the correlation is non-zero, false otherwise.

Definition at line 74 of file CorrelationProvider.cpp.

◆ exists() [5/6]

bool CorrelationProvider::exists ( const std::string &  experiment,
const ObservableId oid_1,
const ObservableId oid_2,
CorrelationType  type 
)

Checks if a correlation between two observables (ObservableId) in the same experiment is non-zero.

Parameters
experimentExperiment name used to scope both observables.
oid_1First observable ID.
oid_2Second observable ID.
typeType of correlation requested (stat, syst, combined).
Returns
True if the correlation is non-zero, false otherwise.

Definition at line 67 of file CorrelationProvider.cpp.

◆ exists() [6/6]

bool CorrelationProvider::exists ( const std::string &  experiment,
const Observables oid_1,
const Observables oid_2,
CorrelationType  type 
)

Checks if a correlation between two observables (enum) in the same experiment is non-zero.

Parameters
experimentExperiment name used to scope both observables.
oid_1First observable (enum).
oid_2Second observable (enum).
typeType of correlation requested (stat, syst, combined).
Returns
True if the correlation is non-zero, false otherwise.

Definition at line 60 of file CorrelationProvider.cpp.

◆ operator()() [1/6]

double CorrelationProvider::operator() ( const ExperimentObs oid_1,
const ExperimentObs oid_2,
CorrelationType  type 
)

Retrieves a correlation between two fully explicit experiment-scoped observables.

Parameters
oid_1First experiment-scoped observable.
oid_2Second experiment-scoped observable.
typeType of correlation requested (stat, syst, combined).
Returns
The requested correlation value.

Definition at line 9 of file CorrelationProvider.cpp.

◆ operator()() [2/6]

double CorrelationProvider::operator() ( const ParamId pid_1,
const ParamId pid_2,
CorrelationType  type 
)

Retrieves a correlation between two parameters.

Parameters
pid_1First parameter ID.
pid_2Second parameter ID.
typeType of correlation requested (stat, syst, combined).
Returns
The requested correlation value.

Definition at line 3 of file CorrelationProvider.cpp.

◆ operator()() [3/6]

double CorrelationProvider::operator() ( const std::string &  exp_1,
const BinnedObservableId oid_1,
const std::string &  exp_2,
const BinnedObservableId oid_2,
CorrelationType  type 
)

Retrieves a correlation between two binned observables coming from possibly different experiments.

Parameters
exp_1Experiment associated with the first observable.
oid_1First binned observable ID.
exp_2Experiment associated with the second observable.
oid_2Second binned observable ID.
typeType of correlation requested (stat, syst, combined).
Returns
The requested correlation value.

Definition at line 40 of file CorrelationProvider.cpp.

◆ operator()() [4/6]

double CorrelationProvider::operator() ( const std::string &  experiment,
const BinnedObservableId oid_1,
const BinnedObservableId oid_2,
CorrelationType  type 
)

Retrieves a correlation between two observables specified by BinnedObservableId, within the same experiment.

Parameters
experimentExperiment name used to scope both observables.
oid_1First binned observable ID.
oid_2Second binned observable ID.
typeType of correlation requested (stat, syst, combined).
Returns
The requested correlation value.

Definition at line 33 of file CorrelationProvider.cpp.

◆ operator()() [5/6]

double CorrelationProvider::operator() ( const std::string &  experiment,
const ObservableId oid_1,
const ObservableId oid_2,
CorrelationType  type 
)

Retrieves a correlation between two observables specified by ObservableId, within the same experiment.

Parameters
experimentExperiment name used to scope both observables.
oid_1First observable ID.
oid_2Second observable ID.
typeType of correlation requested (stat, syst, combined).
Returns
The requested correlation value.

Definition at line 24 of file CorrelationProvider.cpp.

◆ operator()() [6/6]

double CorrelationProvider::operator() ( const std::string &  experiment,
const Observables oid_1,
const Observables oid_2,
CorrelationType  type 
)

Retrieves a correlation between two observables specified by enum, within the same experiment.

This overload accepts the high-level Observables enum and internally maps it to ObservableId via ObservableMapper.

Parameters
experimentExperiment name used to scope both observables.
oid_1First observable (enum).
oid_2Second observable (enum).
typeType of correlation requested (stat, syst, combined).
Returns
The requested correlation value.

Definition at line 15 of file CorrelationProvider.cpp.


The documentation for this class was generated from the following files: