DAS  3.0
Das Analysis System
applyNormFactor.cc File Reference
#include <cstdlib>
#include <thread>
#include <iostream>
#include <filesystem>
#include <utility>
#include <optional>
#include <TChain.h>
#include <TFile.h>
#include <TROOT.h>
#include <TH1D.h>
#include <TRegexp.h>
#include "Core/CommonTools/interface/ControlPlots.h"
#include "Core/CommonTools/interface/DASOptions.h"
#include "Core/CommonTools/interface/toolbox.h"
#include "Core/Objects/interface/Event.h"
#include <darwin.h>
+ Include dependency graph for applyNormFactor.cc:

Namespaces

 DAS
 
 DAS::Normalisation
 

Functions

void applyNormFactor (const vector< fs::path > &inputs, 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:
take uncertainties (and be careful with correlations)
90 {
91  try {
93 
94  vector<fs::path> inputs;
95  fs::path output;
96 
97  auto options = DAS::Options(
98  "Normalise the MC samples to the cross section.",
101  options.inputs("inputs", &inputs, "input ROOT file(s) or directory")
102  .output("output", &output, "output ROOT file")
103  .arg<float>("normFactor", "corrections.normFactor", "normalisation factor");
104 
105  const auto& config = options(argc, argv);
106  const auto& slice = options.slice();
107  const int steering = options.steering();
108 
109  DAS::Normalisation::applyNormFactor(inputs, output, config, steering, slice);
110  }
111  catch (boost::exception& e) {
112  DE::Diagnostic(e);
113  return EXIT_FAILURE;
114  }
115 
116  return EXIT_SUCCESS;
117 }
Darwin::Tools::fill
@ fill
activate -f to fill the tree
Definition: Options.h:27
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::StandardInit
void StandardInit()
Definition: FileUtils.cc:25
Ntupliser_cfg.config
config
Definition: Ntupliser_cfg.py:260
jercExample.inputs
def inputs
Definition: jercExample.py:118
DAS::Options
Darwin::Tools::Options Options(const char *, int=Darwin::Tools::none)
Constructs Darwin options with the correct commit information.
Definition: DASOptions.cc:14
DAS::Normalisation::applyNormFactor
void applyNormFactor(const vector< fs::path > &inputs, const fs::path &output, const pt::ptree &config, const int steering, const DT::Slice slice={1, 0})
Definition: applyNormFactor.cc:37