#include <CalibrationDataInterfaceROOT.h>
Classes | |
class | HadronisationReferenceHelper |
Public Member Functions | |
CalibrationDataInterfaceROOT (const std::string &taggerName, std::string configname="BTagCalibration.env", std::string pathname="") | |
CalibrationDataInterfaceROOT (const std::string &taggerName, const char *fileSF, const char *fileEff, const std::vector< std::string > &jetAliases, const std::map< std::string, std::string > &SFNames, const std::map< std::string, std::vector< std::string > > &EffNames, const std::vector< std::string > &excludeFromEV, const std::map< std::string, Analysis::EVReductionStrategy > EVReductions, bool useEV=true, bool useMCMCSF=true, bool useTopologyRescaling=false) | |
CalibrationDataInterfaceROOT () | |
CalibrationDataInterfaceROOT (const CalibrationDataInterfaceROOT &other) | |
virtual | ~CalibrationDataInterfaceROOT () |
CalibResult | getScaleFactor (const CalibrationDataVariables &variables, const std::string &label, const std::string &OP, Uncertainty unc, unsigned int numVariation=0, unsigned int mapIndex=0) const |
CalibResult | getEfficiency (const CalibrationDataVariables &variables, const std::string &label, const std::string &OP, Uncertainty unc, unsigned int numVariation=0, unsigned int mapIndex=0) const |
CalibResult | getInefficiencyScaleFactor (const CalibrationDataVariables &variables, const std::string &label, const std::string &OP, Uncertainty unc, unsigned int numVariation=0, unsigned int mapIndex=0) const |
CalibResult | getInefficiency (const CalibrationDataVariables &variables, const std::string &label, const std::string &OP, Uncertainty unc, unsigned int numVariation=0, unsigned int mapIndex=0) const |
CalibResult | getMCEfficiency (const CalibrationDataVariables &variables, const std::string &label, const std::string &OP, Uncertainty unc=None, unsigned int mapIndex=0) const |
CalibResult | getMCInefficiency (const CalibrationDataVariables &variables, const std::string &label, const std::string &OP, Uncertainty unc=None, unsigned int mapIndex=0) const |
std::vector< std::string > | listScaleFactorUncertainties (const std::string &author, const std::string &label, const std::string &OP, bool named=false) const |
retrieve the list of "uncertainties" relevant to the calibration object. A few uncertainty names are predetermined: "result", "comment", "statistics", "systematics". Other sources of systematic uncertainty may be added. Note that the "systematics" source does not give access to correlations between bins. If the 'named' argument is true, the list does not include all uncertainties but only those excluded from the eigenvector construction (this option is only relevant if eigenvector use has been switched on to begin with). In this case the order of the uncertainties listed is important since it indicates the index by which the given named uncertainty is identified. | |
unsigned int | getNumVariations (const std::string &author, const std::string &label, const std::string &OP, Uncertainty unc) const |
retrieve the number of variations relevant to the calibration object. The Uncertainty enum is used to specify the category. | |
bool | retrieveCalibrationIndex (const std::string &label, const std::string &OP, const std::string &author, bool isSF, unsigned int &index, unsigned int mapIndex=0) const |
std::string | nameFromIndex (unsigned int index) const |
CalibResult | getScaleFactor (const CalibrationDataVariables &variables, unsigned int indexSF, unsigned int indexEff, Uncertainty unc, unsigned int numVariation=0) const |
CalibResult | getEfficiency (const CalibrationDataVariables &variables, unsigned int indexSF, unsigned int indexEff, Uncertainty unc, unsigned int numVariation=0) const |
CalibResult | getInefficiencyScaleFactor (const CalibrationDataVariables &variables, unsigned int indexSF, unsigned int indexEff, Uncertainty unc, unsigned int numVariation=0) const |
CalibResult | getInefficiency (const CalibrationDataVariables &variables, unsigned int indexSF, unsigned int indexEff, Uncertainty unc, unsigned int numVariation=0) const |
CalibResult | getMCEfficiency (const CalibrationDataVariables &variables, unsigned int index, Uncertainty unc=None) const |
CalibResult | getMCInefficiency (const CalibrationDataVariables &variables, unsigned int index, Uncertainty unc=None) const |
double | getMCMCScaleFactor (const CalibrationDataVariables &variables, unsigned indexSF, unsigned int indexEff) const |
std::vector< std::string > | listScaleFactorUncertainties (unsigned int index, bool named=false) const |
retrieve the list of "uncertainties" relevant to the calibration object. A few uncertainty names are predetermined: "result", "comment", "statistics", "systematics". Other sources of systematic uncertainty may be added. Note that the "systematics" source does not give access to correlations between bins. If the 'named' argument is true, the list does not include all uncertainties but only those excluded from the eigenvector construction (this option is only relevant if eigenvector use has been switched on to begin with). In this case the order of the uncertainties listed is important since it indicates the index by which the given named uncertainty is identified. | |
unsigned int | getNumVariations (unsigned int index, Uncertainty unc) const |
retrieve the number of variations relevant to the calibration object. The Uncertainty enum is used to specify the category. | |
std::string | fullName (const std::string &author, const std::string &OP, const std::string &label, bool isSF, unsigned mapIndex=0) const |
CalibrationStatus | getScaleFactor (const CalibrationDataVariables &variables, unsigned int indexSF, unsigned int indexEff, Uncertainty unc, unsigned int numVariation, CalibResult &result) const |
CalibrationStatus | getEfficiency (const CalibrationDataVariables &variables, unsigned int indexSF, unsigned int indexEff, Uncertainty unc, unsigned int numVariation, CalibResult &result) const |
CalibrationStatus | getInefficiencyScaleFactor (const CalibrationDataVariables &variables, unsigned int indexSF, unsigned int indexEff, Uncertainty unc, unsigned int numVariation, CalibResult &result) const |
CalibrationStatus | getInefficiency (const CalibrationDataVariables &variables, unsigned int indexSF, unsigned int indexEff, Uncertainty unc, unsigned int numVariation, CalibResult &result) const |
CalibrationStatus | getMCEfficiency (const CalibrationDataVariables &variables, unsigned int index, Uncertainty unc, CalibResult &result) const |
CalibResult | getWeightScaleFactor (const CalibrationDataVariables &variables, const std::string &label, Uncertainty unc, unsigned int numVariation=0, unsigned int mapIndex=0) const |
CalibResult | getWeightScaleFactor (const CalibrationDataVariables &variables, unsigned int indexSF, unsigned int indexEff, Uncertainty unc, unsigned int numVariation=0) const |
CalibrationStatus | getWeightScaleFactor (const CalibrationDataVariables &variables, unsigned int indexSF, unsigned int indexEff, Uncertainty unc, unsigned int numVariation, CalibResult &result) const |
const TObject * | getMCEfficiencyObject (const std::string &author, const std::string &label, const std::string &OP, unsigned int mapIndex=0) const |
const TH1 * | getBinnedScaleFactors (const std::string &author, const std::string &label, const std::string &OP) const |
const TH1 * | getShiftedScaleFactors (const std::string &author, const std::string &label, const std::string &OP, const std::string &unc, double sigmas) const |
TMatrixDSym | getScaleFactorCovarianceMatrix (const std::string &author, const std::string &label, const std::string &OP, const std::string &unc="all") const |
void | initialize (const std::string &jetauthor, const std::string &OP, Uncertainty unc) |
This tool provides an interface to flavour tagging performance estimates.
A separate instance should be used for each different tagging algorithm. For each instance, all appropriate jet collections and tagger operating points need to be specified.
The model:
The idea is to use the same physical ROOT file that is also accessed through COOL, but to do so in a stand-alone fashion, so that there is no COOL or Athena dependence. Apart from this, the same infrastructure and limitations as with COOL access (
Analysis::CalibrationDataInterfaceROOT::CalibrationDataInterfaceROOT | ( | const std::string & | taggerName, | |
std::string | configname = "BTagCalibration.env" , |
|||
std::string | pathname = "" | |||
) |
main constructor for "stand-alone" use (with information fed in from a .env configuration file read by TEnv)
Analysis::CalibrationDataInterfaceROOT::CalibrationDataInterfaceROOT | ( | const std::string & | taggerName, | |
const char * | fileSF, | |||
const char * | fileEff, | |||
const std::vector< std::string > & | jetAliases, | |||
const std::map< std::string, std::string > & | SFNames, | |||
const std::map< std::string, std::vector< std::string > > & | EffNames, | |||
const std::vector< std::string > & | excludeFromEV, | |||
const std::map< std::string, Analysis::EVReductionStrategy > | EVReductions, | |||
bool | useEV = true , |
|||
bool | useMCMCSF = true , |
|||
bool | useTopologyRescaling = false | |||
) |
alternative constructor passing configuration information explicitly (so that no .env file is needed)
Analysis::CalibrationDataInterfaceROOT::CalibrationDataInterfaceROOT | ( | ) |
default constructor for PROOF object retrieval
Analysis::CalibrationDataInterfaceROOT::CalibrationDataInterfaceROOT | ( | const CalibrationDataInterfaceROOT & | other | ) |
copy constructor
Analysis::CalibrationDataInterfaceROOT::~CalibrationDataInterfaceROOT | ( | ) | [virtual] |
default destructor
std::string Analysis::CalibrationDataInterfaceROOT::fullName | ( | const std::string & | author, | |
const std::string & | OP, | |||
const std::string & | label, | |||
bool | isSF, | |||
unsigned | mapIndex = 0 | |||
) | const |
@ brief construct the full object pathname from its individual components
const TH1 * Analysis::CalibrationDataInterfaceROOT::getBinnedScaleFactors | ( | const std::string & | author, | |
const std::string & | label, | |||
const std::string & | OP | |||
) | const |
retrieve the binned calibration object for the given flavour label and operating point. A null result will be returned in case of error (e.g. if the calibration object isn't binned to begin with).
Analysis::CalibrationStatus Analysis::CalibrationDataInterfaceROOT::getEfficiency | ( | const CalibrationDataVariables & | variables, | |
unsigned int | indexSF, | |||
unsigned int | indexEff, | |||
Uncertainty | unc, | |||
unsigned int | numVariation, | |||
Analysis::CalibResult & | result | |||
) | const |
efficiency retrieval by index
Analysis::CalibResult Analysis::CalibrationDataInterfaceROOT::getEfficiency | ( | const CalibrationDataVariables & | variables, | |
unsigned int | indexSF, | |||
unsigned int | indexEff, | |||
Uncertainty | unc, | |||
unsigned int | numVariation = 0 | |||
) | const |
efficiency retrieval by index
CalibResult Analysis::CalibrationDataInterfaceROOT::getEfficiency | ( | const CalibrationDataVariables & | variables, | |
const std::string & | label, | |||
const std::string & | OP, | |||
Uncertainty | unc, | |||
unsigned int | numVariation = 0 , |
|||
unsigned int | mapIndex = 0 | |||
) | const |
efficiency retrieval by name
Analysis::CalibrationStatus Analysis::CalibrationDataInterfaceROOT::getInefficiency | ( | const CalibrationDataVariables & | variables, | |
unsigned int | indexSF, | |||
unsigned int | indexEff, | |||
Uncertainty | unc, | |||
unsigned int | numVariation, | |||
Analysis::CalibResult & | result | |||
) | const |
inefficiency retrieval by index
Analysis::CalibResult Analysis::CalibrationDataInterfaceROOT::getInefficiency | ( | const CalibrationDataVariables & | variables, | |
unsigned int | indexSF, | |||
unsigned int | indexEff, | |||
Uncertainty | unc, | |||
unsigned int | numVariation = 0 | |||
) | const |
inefficiency retrieval by index
CalibResult Analysis::CalibrationDataInterfaceROOT::getInefficiency | ( | const CalibrationDataVariables & | variables, | |
const std::string & | label, | |||
const std::string & | OP, | |||
Uncertainty | unc, | |||
unsigned int | numVariation = 0 , |
|||
unsigned int | mapIndex = 0 | |||
) | const |
inefficiency retrieval by name
Analysis::CalibrationStatus Analysis::CalibrationDataInterfaceROOT::getInefficiencyScaleFactor | ( | const CalibrationDataVariables & | variables, | |
unsigned int | indexSF, | |||
unsigned int | indexEff, | |||
Uncertainty | unc, | |||
unsigned int | numVariation, | |||
Analysis::CalibResult & | result | |||
) | const |
"MC" inefficiency scale factor retrieval by index
Analysis::CalibResult Analysis::CalibrationDataInterfaceROOT::getInefficiencyScaleFactor | ( | const CalibrationDataVariables & | variables, | |
unsigned int | indexSF, | |||
unsigned int | indexEff, | |||
Uncertainty | unc, | |||
unsigned int | numVariation = 0 | |||
) | const |
"MC" inefficiency scale factor retrieval by index
CalibResult Analysis::CalibrationDataInterfaceROOT::getInefficiencyScaleFactor | ( | const CalibrationDataVariables & | variables, | |
const std::string & | label, | |||
const std::string & | OP, | |||
Uncertainty | unc, | |||
unsigned int | numVariation = 0 , |
|||
unsigned int | mapIndex = 0 | |||
) | const |
"MC" inefficiency scale factor retrieval by name
Analysis::CalibrationStatus Analysis::CalibrationDataInterfaceROOT::getMCEfficiency | ( | const CalibrationDataVariables & | variables, | |
unsigned int | index, | |||
Uncertainty | unc, | |||
Analysis::CalibResult & | result | |||
) | const |
"MC" efficiency retrieval by index
Analysis::CalibResult Analysis::CalibrationDataInterfaceROOT::getMCEfficiency | ( | const CalibrationDataVariables & | variables, | |
unsigned int | index, | |||
Uncertainty | unc = None | |||
) | const |
"MC" efficiency retrieval by index
CalibResult Analysis::CalibrationDataInterfaceROOT::getMCEfficiency | ( | const CalibrationDataVariables & | variables, | |
const std::string & | label, | |||
const std::string & | OP, | |||
Uncertainty | unc = None , |
|||
unsigned int | mapIndex = 0 | |||
) | const |
"MC" efficiency retrieval by name
const TObject * Analysis::CalibrationDataInterfaceROOT::getMCEfficiencyObject | ( | const std::string & | author, | |
const std::string & | label, | |||
const std::string & | OP, | |||
unsigned int | mapIndex = 0 | |||
) | const |
retrieve the MC efficiency (central values) object for the given flavour label and operating point. A null result will be returned in case of error (e.g. if the calibration object isn't binned to begin with). It is the user's responsibility to verify whether the object derives from a TH1 or a TF1.
Analysis::CalibResult Analysis::CalibrationDataInterfaceROOT::getMCInefficiency | ( | const CalibrationDataVariables & | variables, | |
unsigned int | index, | |||
Uncertainty | unc = None | |||
) | const |
"MC" inefficiency retrieval by index
CalibResult Analysis::CalibrationDataInterfaceROOT::getMCInefficiency | ( | const CalibrationDataVariables & | variables, | |
const std::string & | label, | |||
const std::string & | OP, | |||
Uncertainty | unc = None , |
|||
unsigned int | mapIndex = 0 | |||
) | const |
"MC" inefficiency retrieval by name
double Analysis::CalibrationDataInterfaceROOT::getMCMCScaleFactor | ( | const CalibrationDataVariables & | variables, | |
unsigned | indexSF, | |||
unsigned int | indexEff | |||
) | const |
MC/MC scale factor retrieval. Normally this is to be used only internally; however, since this information may be of interest it is made public anyway.
Analysis::CalibrationStatus Analysis::CalibrationDataInterfaceROOT::getScaleFactor | ( | const CalibrationDataVariables & | variables, | |
unsigned int | indexSF, | |||
unsigned int | indexEff, | |||
Uncertainty | unc, | |||
unsigned int | numVariation, | |||
Analysis::CalibResult & | result | |||
) | const |
efficiency scale factor retrieval by index
Analysis::CalibResult Analysis::CalibrationDataInterfaceROOT::getScaleFactor | ( | const CalibrationDataVariables & | variables, | |
unsigned int | indexSF, | |||
unsigned int | indexEff, | |||
Uncertainty | unc, | |||
unsigned int | numVariation = 0 | |||
) | const |
efficiency scale factor retrieval by index
CalibResult Analysis::CalibrationDataInterfaceROOT::getScaleFactor | ( | const CalibrationDataVariables & | variables, | |
const std::string & | label, | |||
const std::string & | OP, | |||
Uncertainty | unc, | |||
unsigned int | numVariation = 0 , |
|||
unsigned int | mapIndex = 0 | |||
) | const |
efficiency scale factor retrieval by name.
TMatrixDSym Analysis::CalibrationDataInterfaceROOT::getScaleFactorCovarianceMatrix | ( | const std::string & | author, | |
const std::string & | label, | |||
const std::string & | OP, | |||
const std::string & | unc = "all" | |||
) | const |
retrieve the named covariance matrix element corresponding to the binned calibration object. The unc argument should correspond to a given source of statistical or systematic uncertainty, or "all" (in case the full covariance matrix is required) For 2D and 3D histograms, the bin numbering follows the "global" bin number as defined by class TH1.
const TH1 * Analysis::CalibrationDataInterfaceROOT::getShiftedScaleFactors | ( | const std::string & | author, | |
const std::string & | label, | |||
const std::string & | OP, | |||
const std::string & | unc, | |||
double | sigmas | |||
) | const |
retrieve the binned calibration object for the given flavour label and operating point, with the result shifted by the given number of standard deviations for the given systematic uncertainty. A null result will be returned in case of error (e.g. if the calibration object isn't binned to begin with, or if the uncertainty asked for isn't fully correlated from bin to bin).
Analysis::CalibrationStatus Analysis::CalibrationDataInterfaceROOT::getWeightScaleFactor | ( | const CalibrationDataVariables & | variables, | |
unsigned int | indexSF, | |||
unsigned int | indexEff, | |||
Uncertainty | unc, | |||
unsigned int | numVariation, | |||
Analysis::CalibResult & | result | |||
) | const |
efficiency scale factor retrieval by index, with different signature
Analysis::CalibResult Analysis::CalibrationDataInterfaceROOT::getWeightScaleFactor | ( | const CalibrationDataVariables & | variables, | |
unsigned int | indexSF, | |||
unsigned int | indexEff, | |||
Uncertainty | unc, | |||
unsigned int | numVariation = 0 | |||
) | const |
efficiency scale factor retrieval by index
CalibResult Analysis::CalibrationDataInterfaceROOT::getWeightScaleFactor | ( | const CalibrationDataVariables & | variables, | |
const std::string & | label, | |||
Uncertainty | unc, | |||
unsigned int | numVariation = 0 , |
|||
unsigned int | mapIndex = 0 | |||
) | const |
efficiency scale factor retrieval by name
void Analysis::CalibrationDataInterfaceROOT::initialize | ( | const std::string & | jetauthor, | |
const std::string & | OP, | |||
Uncertainty | unc | |||
) |
initialization for PROOF usage
std::string Analysis::CalibrationDataInterfaceROOT::nameFromIndex | ( | unsigned int | index | ) | const |
Retrieve the name of the calibration object (container) given its index
bool Analysis::CalibrationDataInterfaceROOT::retrieveCalibrationIndex | ( | const std::string & | label, | |
const std::string & | OP, | |||
const std::string & | author, | |||
bool | isSF, | |||
unsigned int & | index, | |||
unsigned int | mapIndex = 0 | |||
) | const |
Retrieve the index of the calibration object (container) starting from the label and operating point. The return value will be false if the requested object cannot be found.