|
ATLAS Offline Software
|
Go to the documentation of this file.
9 #ifndef ANALYSISCALIBRATIONDATAINTERFACEROOT_H
10 #define ANALYSISCALIBRATIONDATAINTERFACEROOT_H
17 #include "TMatrixDSym.h"
28 class CalibrationDataContainer;
30 class CalibrationDataEigenVariations;
91 CalibrationDataInterfaceROOT(
const std::string& taggerName,
const std::string& configname =
"BTagCalibration.env",
const std::string& pathname =
"");
95 const char* fileSF,
const char* fileEff,
96 const std::vector<std::string>& jetAliases,
97 const std::map<std::string, std::string>& SFNames,
98 const std::map<std::string, std::vector<std::string> >& EffNames,
99 const std::map<std::string, std::vector<std::string> >& excludeFromEV,
100 const std::map<std::string, Analysis::EVReductionStrategy>& EVReductions,
102 bool useTopologyRescaling =
false,
bool useRecommendedEVExclusions =
false,
103 bool verbose =
true, std::vector<std::string> flavours = {
"B",
"C",
"Light",
"T"}
124 const std::string&
label,
const std::string& OP,
126 unsigned int mapIndex = 0);
130 const std::string&
label,
const std::string& OP,
131 Uncertainty unc,
const std::string& flavour,
unsigned int numVariation = 0,
132 unsigned int mapIndex = 0);
136 const std::string&
label,
const std::string& OP,
138 unsigned int mapIndex = 0);
142 const std::string&
label,
const std::string& OP,
144 unsigned int mapIndex = 0);
148 const std::string& OP,
Uncertainty unc =
None,
unsigned int mapIndex = 0);
152 const std::string& OP,
Uncertainty unc =
None,
unsigned int mapIndex = 0);
165 const std::string&
label,
166 const std::string& OP,
186 const std::string&
author,
bool isSF,
unsigned int&
index,
187 unsigned int mapIndex = 0);
194 unsigned int indexSF,
unsigned int indexEff,
195 Uncertainty unc,
const std::string& flavour,
unsigned int numVariation = 0);
199 unsigned int indexSF,
unsigned int indexEff,
200 Uncertainty unc,
const std::string& flavour,
unsigned int numVariation = 0);
204 unsigned int indexSF,
unsigned int indexEff,
205 Uncertainty unc,
const std::string& flavour,
unsigned int numVariation = 0);
209 unsigned int indexSF,
unsigned int indexEff,
210 Uncertainty unc,
const std::string& flavour,
unsigned int numVariation = 0);
223 unsigned indexSF,
unsigned int indexEff)
const;
235 const std::string& flavour,
bool named =
false);
243 std::string
fullName(
const std::string&
author,
const std::string& OP,
244 const std::string&
label,
bool isSF,
unsigned mapIndex = 0)
const;
256 unsigned int indexSF,
unsigned int indexEff,
262 unsigned int indexSF,
unsigned int indexEff,
268 unsigned int indexSF,
unsigned int indexEff,
274 unsigned int indexSF,
unsigned int indexEff,
293 Uncertainty unc,
unsigned int numVariation = 0,
unsigned int mapIndex = 0);
297 unsigned int indexSF,
unsigned int indexEff,
302 unsigned int indexSF,
unsigned int indexEff,
310 const std::string&
label,
311 const std::string& OP,
312 unsigned int mapindex = 0);
315 unsigned int mapindex = 0);
330 const std::string& OP,
unsigned int mapIndex = 0);
337 const std::string& OP);
347 const std::string& OP,
const std::string& unc,
356 const std::string& OP,
const std::string& unc =
"all");
376 std::map<std::string, std::string>
m_refs;
426 std::map<const CalibrationDataContainer*, std::shared_ptr<CalibrationDataEigenVariations> >
m_eigenVariationsMap;
459 std::map<std::string, HadronisationReferenceHelper*>
m_refMap;
497 #endif // ANALYSISCALIBRATIONDATAINTERFACEROOT_H
std::pair< double, double > CalibResult
double m_maxAbsEta
|eta| bounds and strategy for dealing with out-of-bounds conditions
std::map< std::string, Analysis::EVReductionStrategy > m_EVReductions
Eigenvector reduction strategy (per flavour)
std::string nameFromIndex(unsigned int index) const
Retrieve the name of the calibration object (container) given its index.
bool m_useRecommendedEVExclusions
if true, exclude pre-recommended lists of uncertainties from the covariance matrix building,...
CalibrationDataInterfaceROOT()
default constructor for PROOF object retrieval
std::string 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
std::vector< unsigned int > m_etaCounters
counters for flagging out-of-bound cases
std::vector< int > m_hadronisationReference
store the 'hadronisation' reference for each object (-1 means no reference found)
CalibrationStatus runEigenVectorRecomposition(const std::string &author, const std::string &label, const std::string &OP, unsigned int mapindex=0)
run EigenVector Recomposition method
CalibResult getWeightScaleFactor(const CalibrationDataVariables &variables, const std::string &label, Uncertainty unc, unsigned int numVariation=0, unsigned int mapIndex=0)
efficiency scale factor retrieval by name
const TH1 * getShiftedScaleFactors(const std::string &author, const std::string &label, const std::string &OP, const std::string &unc, double sigmas)
retrieve the binned calibration object for the given flavour label and operating point,...
void initialize(const std::string &jetauthor, const std::string &OP, Uncertainty unc)
initialization for PROOF usage
OutOfBoundsStrategy
strategies for dealing with specified kinematic variables being outside their range of validity: igno...
HadronisationReferenceHelper()
std::vector< std::pair< unsigned int, unsigned int > > m_checkedWeightScaleFactors
unsigned int getNumVariations(const std::string &author, const std::string &label, const std::string &OP, Uncertainty unc)
retrieve the number of variations relevant to the calibration object.
EVReductionStrategy
specification of Eigenvector variations reduction strategy.
std::map< const CalibrationDataContainer *, std::shared_ptr< CalibrationDataEigenVariations > > m_eigenVariationsMap
store the eigenvector class and associate to its CalibrationDataContainer
std::map< std::string, std::vector< std::string > > m_excludeFromCovMatrix
store the uncertainties which should be excluded from building the full covariance matrix
OutOfBoundsStrategy m_absEtaStrategy
CalibrationDataContainer * retrieveContainer(const std::string &label, const std::string &OP, const std::string &author, const std::string &cntname, bool isSF, bool doPrint=true)
utility function taking care of object retrieval
CalibResult getEfficiency(const CalibrationDataVariables &variables, const std::string &label, const std::string &OP, Uncertainty unc, const std::string &flavour, unsigned int numVariation=0, unsigned int mapIndex=0)
efficiency retrieval by name
bool m_verbose
if true, allow also for some informational (and not only error/warning) messages
OutOfBoundsStrategy m_otherStrategy
Uncertainty
specification of type information requested by the user
std::string m_filenameSF
in addition, store also the filenames themselves (needed for the copy constructor)
virtual ~CalibrationDataInterfaceROOT()
default destructor
std::map< std::string, HadronisationReferenceHelper * > m_refMap
the following maps (one for each directory) specify the name of the container serving as the 'hadroni...
std::vector< std::string > m_flavours
bool m_useTopologyRescaling
specify whether or not to use MC/MC (topology) scale factors (also this steering option may be remove...
CalibrationDataInterfaceROOT(const std::string &taggerName, const std::string &configname="BTagCalibration.env", const std::string &pathname="")
main constructor for "stand-alone" use (with information fed in from a .env configuration file read b...
double getMCMCScaleFactor(const CalibrationDataVariables &variables, unsigned indexSF, unsigned int indexEff) const
MC/MC scale factor retrieval.
std::vector< std::string > listScaleFactorUncertainties(const std::string &author, const std::string &label, const std::string &OP, bool named=false)
retrieve the list of "uncertainties" relevant to the calibration object.
CalibResult getMCEfficiency(const CalibrationDataVariables &variables, const std::string &label, const std::string &OP, Uncertainty unc=None, unsigned int mapIndex=0)
"MC" efficiency retrieval by name
std::map< std::string, std::string > m_aliases
Do not attempt to persistify (PROOF)
bool retrieveCalibrationIndex(const std::string &label, const std::string &OP, const std::string &author, bool isSF, unsigned int &index, unsigned int mapIndex=0)
Retrieve the index of the calibration object (container) starting from the label and operating point.
std::map< std::string, std::string > m_refs
map from hadronisation specification to container name
CalibResult getMCInefficiency(const CalibrationDataVariables &variables, const std::string &label, const std::string &OP, Uncertainty unc=None, unsigned int mapIndex=0)
"MC" inefficiency retrieval by name
std::string m_filenameEff
std::map< std::string, std::map< std::string, float > > m_coefficientMap
void increaseCounter(unsigned int index, OutOfBoundsType oob=Main)
The namespace of all packages in PhysicsAnalysis/JetTagging.
OutOfBoundsType
counter types (to be used when flagging out-of-bounds cases)
bool m_useMCMCSF
specify whether or not to use MC/MC (hadronisation) scale factors (the fact that this is steerable is...
bool getReference(const std::string &spec, std::string &ref) const
Retrieve the (full) name of the reference histogram, given the hadronisation specification.
bool checkAbsEta(const CalibrationDataVariables &variables, unsigned int index)
CalibResult getInefficiency(const CalibrationDataVariables &variables, const std::string &label, const std::string &OP, Uncertainty unc, unsigned int numVariation=0, unsigned int mapIndex=0)
inefficiency retrieval by name
const boost::regex ref(r_ef)
std::map< std::string, unsigned int > m_objectIndices
bool m_runEigenVectorMethod
decide whether to run the eigenvector method or not
CalibResult getScaleFactor(const CalibrationDataVariables &variables, const std::string &label, const std::string &OP, Uncertainty unc, unsigned int numVariation=0, unsigned int mapIndex=0)
efficiency scale factor retrieval by name.
void checkWeightScaleFactors(unsigned int indexSF, unsigned int indexEff)
CalibResult getInefficiencyScaleFactor(const CalibrationDataVariables &variables, const std::string &label, const std::string &OP, Uncertainty unc, unsigned int numVariation=0, unsigned int mapIndex=0)
"MC" inefficiency scale factor retrieval by name
TFile * m_fileSF
Do not attempt to persistify (PROOF)
std::string getAlias(const std::string &author) const
associated alias retrieval method
const TObject * getMCEfficiencyObject(const std::string &author, const std::string &label, const std::string &OP, unsigned int mapIndex=0)
retrieve the MC efficiency (central values) object for the given flavour label and operating point.
std::vector< CalibrationDataContainer * > m_objects
cache the objects themselves (so that the user will not have to delete them after each call etc....
std::vector< unsigned int > m_extrapolatedCounters
TMatrixDSym getScaleFactorCovarianceMatrix(const std::string &author, const std::string &label, const std::string &OP, const std::string &unc="all")
retrieve the named covariance matrix element corresponding to the binned calibration object.
std::vector< unsigned int > m_mainCounters
TFile * m_fileEff
pointer to the TFile object providing access to the calibrations
const TH1 * getBinnedScaleFactors(const std::string &author, const std::string &label, const std::string &OP)
retrieve the binned calibration object for the given flavour label and operating point.
std::map< std::string, std::map< std::string, float > > getEigenVectorRecompositionCoefficientMap()
Get Eigenvector recomposition map after running runEigenVectorRecomposition()