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

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::Exceptions::Diagnostic
void Diagnostic(const boost::exception &e)
Definition: exceptions.h:131
Darwin::Tools::split
@ split
activate -k and -j to define slice
Definition: Options.h:26
Darwin::Tools::syst
@ syst
activate -s to systematic uncertainties
Definition: Options.h:29
Darwin::Tools::StandardInit
void StandardInit()
Definition: FileUtils.cc:29
Ntupliser_cfg.config
config
Definition: Ntupliser_cfg.py:264
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:210