DAS  3.0
Das Analysis System
getUnfPhysDist.cc File Reference
#include <cstdlib>
#include <cassert>
#include <iostream>
#include <vector>
#include <array>
#include <filesystem>
#include <functional>
#include <algorithm>
#include <type_traits>
#include <TString.h>
#include <TFile.h>
#include <TH1.h>
#include <TKey.h>
#include <TVectorT.h>
#include "Math/VectorUtil.h"
#include "Core/CommonTools/interface/DASOptions.h"
#include "Core/CommonTools/interface/toolbox.h"
#include "Core/Unfolding/interface/Observable.h"
#include <darwin.h>
+ Include dependency graph for getUnfPhysDist.cc:

Classes

struct  Dist
 
struct  Matrix
 

Namespaces

 DAS
 
 DAS::Unfolding
 
 DAS::Unfolding::ExtractHistogram
 

Functions

template<typename T >
void nodeLoop (TDirectory *dOut, TUnfoldBinning *binning, T t, ostream &cout, TString name, int depth)
 
template<typename T >
void axisLoop (TDirectory *dOut, TUnfoldBinning *node, T t, ostream &cout, vector< int > ibins, int shift, TString name="", TString title="")
 
void getUnfPhysDist (const fs::path &input, const fs::path &output, const pt::ptree &config, const int steering, const DT::Slice slice={1, 0})
 
int main (int argc, char *argv[])
 

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)
Todo:
automate this by looking up the metainfo
331 {
332  try {
334  DT::MetaInfo::versions["TUnfold"] = TUnfold::GetTUnfoldVersion();
335 
336  fs::path input, output;
337 
338  auto options = DAS::Options(
339  "Extract distributions with physical binning. The structure "
340  "of the input file is preserved, with one directory per "
341  "systematic variation and further subdirectories. For TH1s: "
342  "`variation/distribution/observable/histograms`. For TH2s:"
343  "`variation/distribution/observable/observable/histograms`.",
345  options.input ("input" , &input , "input ROOT file")
346  .output("output", &output, "output ROOT file")
347  .args("observables", "unfolding.observables", "list of observables "
348  "(consistent with input of `getUnfHist`)");
349  const auto& config = options(argc, argv);
350  const auto& slice = options.slice();
351  const int steering = options.steering();
352 
353  DAS::Unfolding::getUnfPhysDist(input, output, config, steering, slice);
354  }
355  catch (boost::exception& e) {
356  DE::Diagnostic(e);
357  return EXIT_FAILURE;
358  }
359 
360  return EXIT_SUCCESS;
361 }
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:116
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
DAS::Unfolding::getUnfPhysDist
void getUnfPhysDist(const fs::path &input, const fs::path &output, const pt::ptree &config, const int steering, const DT::Slice slice={1, 0})
Definition: getUnfPhysDist.cc:236
Darwin::Tools::StandardInit
void StandardInit()
Definition: FileUtils.cc:25
Ntupliser_cfg.config
config
Definition: Ntupliser_cfg.py:260
DYToLL_M-50_13TeV_pythia8_cff_GEN_SIM_RECOBEFMIX_DIGI_L1_DIGI2RAW_L1Reco_RECO.input
input
Definition: DYToLL_M-50_13TeV_pythia8_cff_GEN_SIM_RECOBEFMIX_DIGI_L1_DIGI2RAW_L1Reco_RECO.py:35
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