9#ifndef ANALYSISCALIBRATIONDATAINTERFACEEVVARIATIONS_H
10#define ANALYSISCALIBRATIONDATAINTERFACEEVVARIATIONS_H
18#include "TMatrixDSym.h"
40 virtual void initialize(
double min_variance = 1.0E-20);
94 std::map<std::string, std::map<std::string, float>> &coefficientMap);
153 void initialize(
double min_variance = 1.0E-6) ;
161 bool getNamedVariation(
const std::string& flavour,
const std::string& name, TH1*& up, TH1*& down);
162 bool getNamedVariation(
unsigned int nameIndex,
const std::string& flavour, TH1*& up, TH1*& down);
189 std::map<std::string, std::vector<std::pair<TH1*, TH1*>>>
m_flav_eigen;
Define macros for attributes used to control the static checker.
This is the interface for the objects to be stored in the calibration ROOT file.
CalibrationDataHistogramContainer * m_cnt
container object containing the basic information
bool m_initialized
flag whether the initialization has been carried out
unsigned int getNumberOfNamedVariations() const
retrieve the number of named variations
void removeVariations(const IndexSet &set)
remove all variations in the given set
std::map< std::string, unsigned int > m_namedIndices
named variations
std::vector< std::pair< TH1 *, TH1 * > > m_eigen
eigenvector variations
TMatrixD getJacobianReductionMatrix()
matrix to remove unecessary rows and columns from covariance
bool getEigenvectorVariation(unsigned int variation, TH1 *&up, TH1 *&down)
obtain the "up" and "down" variations for the given eigenvector number.
double m_capturedvariance
int m_namedExtrapolation
named variation index for the special case of extrapolation uncertainties
void mergeVariationsFrom(const size_t &index)
merge all variations starting from the given index
TMatrixDSym getEigenCovarianceMatrixFromVariations()
covariance matrix corresponding to eigenvector variations constructed from the eigen-variation
std::set< IndexSet > IndexSuperSet
bool isExtrapolationVariation(unsigned int nameIndex) const
flag whether the given index corresponds to an extrapolation variation
unsigned int getNumberOfEigenVariations()
retrieve the number of eigenvector variations
void excludeNamedUncertainty(const std::string &name, CalibrationDataContainer *cnt)
exclude the source of uncertainty indicated by name from eigenvector calculations
bool m_statVariations
indicate whether statistical uncertainties are stored as variations
std::set< size_t > IndexSet
bool getNamedVariation(const std::string &name, TH1 *&up, TH1 *&down)
obtain the "up" and "down" variations for the named uncertainty.
virtual TMatrixDSym getEigenCovarianceMatrix()
also provide (some) access to the underlying information: covariance matrix corresponding to eigenvec...
std::string m_cdipath
@ data members needed for eigenvector method
unsigned int getNamedVariationIndex(const std::string &name) const
retrieve the integer index corresponding to the named variation.
virtual ~CalibrationDataEigenVariations()
std::vector< std::pair< TH1 *, TH1 * > > m_named
void mergeVariations(const IndexSet &set)
merge all variations in the given set
std::vector< std::string > listNamedVariations() const
list the named variations
CalibrationDataEigenVariations(const std::string &cdipath, const std::string &tagger, const std::string &wp, const std::string &jetcollection, CalibrationDataHistogramContainer *cnt, bool excludeRecommendedUncertaintySet=false, bool base=true)
normal constructor.
bool EigenVectorRecomposition(const std::string &label, std::map< std::string, std::map< std::string, float > > &coefficientMap)
Eigenvector recomposition method.
std::map< std::string, std::vector< std::pair< TH1 *, TH1 * > > > m_flav_named
void removeVariations(const IndexSet &set, std::string &flav)
void excludeNamedUncertainty(const std::string &name, const std::string &flavour)
bool getEigenvectorVariation(const std::string &flavour, unsigned int variation, TH1 *&up, TH1 *&down)
std::map< std::string, Analysis::CalibrationDataHistogramContainer * > m_histcontainers
CalibrationDataGlobalEigenVariations(const std::string &cdipath, const std::string &tagger, const std::string &wp, const std::string &jetcollection, const std::vector< std::string > &flavours, CalibrationDataHistogramContainer *cnt, bool excludeRecommendedUncertaintySet=false)
std::set< std::string > m_all_shared_systematics
TMatrixDSym getEigenCovarianceMatrix()
also provide (some) access to the underlying information: covariance matrix corresponding to eigenvec...
std::vector< std::string > m_flavours
std::set< std::string > m_only_shared_systematics
std::map< std::string, std::map< std::string, unsigned int > > m_flav_namedIndices
unsigned int getNamedVariationIndex(const std::string &name, const std::string &flavour) const
bool isExtrapolationVariation(unsigned int nameIndex, const std::string &flavour) const
std::map< std::string, int > m_flav_namedExtrapolation
std::map< std::string, std::vector< std::pair< TH1 *, TH1 * > > > m_flav_eigen
std::map< std::string, std::vector< int > > m_flavour_combinations
void mergeVariations(const IndexSet &set, std::string &flav)
void mergeVariationsFrom(const size_t &index, std::string &flav)
~CalibrationDataGlobalEigenVariations()
bool getNamedVariation(const std::string &flavour, const std::string &name, TH1 *&up, TH1 *&down)
This is the class holding information for histogram-based calibration results.
std::string label(const std::string &format, int i)
The namespace of all packages in PhysicsAnalysis/JetTagging.