ATLAS Offline Software
Loading...
Searching...
No Matches
CalibrationDataEigenVariations.cxx File Reference
#include "CalibrationDataInterface/CalibrationDataContainer.h"
#include "CalibrationDataInterface/CalibrationDataEigenVariations.h"
#include "CalibrationDataInterface/CalibrationDataInternals.h"
#include <iomanip>
#include <iostream>
#include <limits>
#include <set>
#include <algorithm>
#include <string>
#include <cmath>
#include <vector>
#include "TH1.h"
#include "TH2.h"
#include "TVectorT.h"
#include "TDecompSVD.h"
#include "TMatrixDSymEigen.h"
#include "TMatrixT.h"
#include "TROOT.h"
#include "TFile.h"
#include <memory.h>

Go to the source code of this file.

Classes

class  CalibrationDataEigenVariations
class  CalibrationDataGlobalEigenVariations

Functions

 ClassImp (CalibrationDataEigenVariations) CalibrationDataEigenVariations
std::vector< std::string > split (const std::string &str, const char token=';')
 local utility function: split string into a vector of substrings separated by a specified separator, and with whitespace in the results trimmed

Function Documentation

◆ ClassImp()

Definition at line 328 of file CalibrationDataEigenVariations.cxx.

331 :
332m_cnt(cnt), m_initialized(false), m_validate(false), m_namedExtrapolation(-1), m_statVariations(false), m_cdipath(cdipath), m_taggername(tagger), m_wp(wp), m_jetauthor(jetcollection), m_totalvariance(0), m_capturedvariance(0), m_verbose(false)
333{
334
335 if (m_verbose) std::cout << " CDEV Constructor : info " << cdipath << " " << tagger << " " << wp << " " << jetcollection << std::endl;
336 // if specified, add items recommended for exclusion from EV decomposition by the calibration group to the 'named uncertainties' list
337 if (excludeRecommendedUncertaintySet && base) {
338 std::vector<std::string> to_exclude = split(m_cnt->getExcludedUncertainties());
339 for (const auto& name : to_exclude) {
340 excludeNamedUncertainty(name, const_cast<CalibrationDataHistogramContainer*>(cnt));
341 }
342 if (to_exclude.size() == 0) {
343 std::cerr << "CalibrationDataEigenVariations warning: exclusion of pre-set uncertainties list requested but no (or empty) list found" <<std::endl;
344 }
345 }
346 // also flag if statistical uncertainties stored as variations (this typically happens as a result of smoothing / pruning of SF results)
347 vector<string> uncs = m_cnt->listUncertainties(); // <-------- The "listUncertainties" method retrieves the list of "information" in the CDIHistogramContainer, basically the "list" output from "showCalibration"
348 for (const auto& name : uncs) {
349 if (name.find("stat_np") != string::npos) m_statVariations = true;
350 }
351
352}
std::vector< std::string > split(const std::string &str, const char token=';')
local utility function: split string into a vector of substrings separated by a specified separator,...
This is the class holding information for histogram-based calibration results.
std::string base
Definition hcg.cxx:81
const std::string tagger

◆ split()

std::vector< std::string > Analysis::CalibrationDataInterface::split ( const std::string & str,
const char token = ';' )

local utility function: split string into a vector of substrings separated by a specified separator, and with whitespace in the results trimmed

Definition at line 9 of file CalibrationDataInternals.cxx.

9 {
10 std::vector<std::string> result;
11 boost::split(result, str, [&token] (char c) { return c == token ;});
12 for (std::string& element : result) {
13 boost::trim(element);
14 }
15 return result;
16 }