DAS  3.0
Das Analysis System
unfold.cc File Reference
#include <cstdlib>
#include <cassert>
#include <iostream>
#include <vector>
#include <map>
#include <limits>
#include <TString.h>
#include <TFile.h>
#include <TH1.h>
#include <TLegend.h>
#include <TKey.h>
#include <TMatrixD.h>
#include <TVectorD.h>
#include <TDecompSVD.h>
#include "Core/CommonTools/interface/DASOptions.h"
#include "Core/Objects/interface/Format.h"
#include "Core/Unfolding/interface/MyTUnfoldDensity.h"
#include "Core/Unfolding/interface/toolbox.h"
#include "Math/VectorUtil.h"
#include <darwin.h>
+ Include dependency graph for unfold.cc:
+ This graph shows which files directly or indirectly include this file:

Namespaces

 DAS
 
 DAS::Unfolding
 
 DAS::Unfolding::Migrations
 
 DAS::Unfolding::Checks
 
 DAS::Unfolding::Tikhonov
 

Functions

void CorrectInefficiencies (unique_ptr< TH1 > &unf, const map< TString, unique_ptr< TH1 >> &miss)
 
double Condition (const unique_ptr< TH2 > &RM)
 
void NegativeBins (const unique_ptr< TH1 > &unf)
 
unique_ptr< TH2 > GetPM (const unique_ptr< TH2 > &RM)
 
void folding (const unique_ptr< TH1 > &genIn, const unique_ptr< TH1 > &recIn, const unique_ptr< TH2 > &PMin, const map< TString, unique_ptr< TH1 >> &miss, const map< TString, unique_ptr< TH1 >> &fake)
 
void BLT (const unique_ptr< TH1 > &dataDist, const unique_ptr< TH2 > &dataCov, const unique_ptr< TH1 > &MC, int rebin=1)
 
void CovMargin (unique_ptr< TH1 > &h, unique_ptr< TH2 > &cov, TString name, int ibin)
 
void PrepareRegularisation (TString MCvar, const char *fname, unique_ptr< MyTUnfoldDensity > &density)
 
void RedoUnfold (unique_ptr< MyTUnfoldDensity > &density, double newtau, TString name, TString subtitle, unique_ptr< TFile > &fOut, const map< TString, unique_ptr< TH1 >> &miss)
 
double ScanLcurve (unique_ptr< MyTUnfoldDensity > &density, TDirectory *dOut, const pt::ptree &config)
 
void unfold (const fs::path &inputData, const fs::path &inputMC, const fs::path &output, const pt::ptree &config, const int steering, const DT::Slice slice={1, 0})
 
int main (int argc, char *argv[])
 

Variables

static const auto deps = numeric_limits<double>::epsilon()
 

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)
983 {
984  try {
986  DT::MetaInfo::versions["TUnfold"] = TUnfold::GetTUnfoldVersion();
987 
988  fs::path inputData, inputMC, output;
989 
990  auto options = DAS::Options(
991  "Run the unfolding with the TUnfold package. The default approach "
992  "is to run least-square minimisation or pure matrix inversion. "
993  "Unlike all other executables, the options (including those for the "
994  "Tikhonov regularisation, if one wishes to try it) may only be "
995  "provided via a configuration file (note: unlike all other commands, "
996  "the `-e` option does not work here). In case no config file "
997  "is provided, the code will run with the default settings. "
998  "Finally, the parallelisation works slightly differently: instead "
999  "of splitting by ranges of events (since we have no events), "
1000  "the running is split by the variations, which may be necessary for "
1001  "the unfolding of distributions with a large number of bins (> 100).",
1003  options.input("inputData", &inputData, "input Data ROOT file (from `getUnfHist*`)")
1004  .input("inputMC" , &inputMC , "input MC ROOT file (from `getUnfHist*`)")
1005  .output("output", &output, "output ROOT file with unfolded cross section ");
1006 
1007  const auto& config = options(argc, argv);
1008  const auto& slice = options.slice();
1009  const int steering = options.steering();
1010 
1011  DAS::Unfolding::unfold(inputData, inputMC, output, config, steering, slice);
1012  }
1013  catch (boost::exception& e) {
1014  DE::Diagnostic(e);
1015  return EXIT_FAILURE;
1016  }
1017 
1018  return EXIT_SUCCESS;
1019 }

Variable Documentation

◆ deps

const auto deps = numeric_limits<double>::epsilon()
static
DAS::Unfolding::unfold
void unfold(const fs::path &inputData, const fs::path &inputMC, const fs::path &output, const pt::ptree &config, const int steering, const DT::Slice slice={1, 0})
Definition: unfold.cc:437
DYToLL_M-50_13TeV_pythia8_cff_GEN_SIM_RECOBEFMIX_DIGI_L1_DIGI2RAW_L1Reco_RECO.options
options
Definition: DYToLL_M-50_13TeV_pythia8_cff_GEN_SIM_RECOBEFMIX_DIGI_L1_DIGI2RAW_L1Reco_RECO.py:41
Darwin::Tools::syst
@ syst
activate -s to systematic uncertainties
Definition: Options.h:30
Darwin::Exceptions::Diagnostic
void Diagnostic(const boost::exception &e)
Definition: exceptions.h:116
Darwin::Tools::StandardInit
void StandardInit()
Definition: FileUtils.cc:25
Darwin::Tools::split
@ split
activate -k and -j to define slice
Definition: Options.h:27
Ntupliser_cfg.config
config
Definition: Ntupliser_cfg.py:263
DAS::Options
Darwin::Tools::Options Options(const char *, int=Darwin::Tools::none)
Constructs Darwin options with the correct commit information.
Definition: DASOptions.cc:14
Darwin::Tools::MetaInfo::versions
static std::map< std::string, std::string > versions
software version
Definition: MetaInfo.h:207