DAS  3.0
Das Analysis System
applyDataNormalisation.cc File Reference
#include <cstdlib>
#include <cassert>
#include <iostream>
#include <vector>
#include <map>
#include <filesystem>
#include "Core/Objects/interface/Jet.h"
#include "Core/Objects/interface/Event.h"
#include "Core/CommonTools/interface/ControlPlots.h"
#include "Core/CommonTools/interface/DASOptions.h"
#include "Core/CommonTools/interface/toolbox.h"
#include <TFile.h>
#include <TChain.h>
#include <TH2.h>
#include "Core/Normalisation/interface/LumiUnc.h"
#include "applyDataNormalisation.h"
#include <darwin.h>
+ Include dependency graph for applyDataNormalisation.cc:

Namespaces

 DAS
 
 DAS::Normalisation
 

Functions

void applyDataNormalisation (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:
make optional with /dev/null
161 {
162  try {
164 
165  vector<fs::path> inputs;
166  fs::path output;
167 
168  auto options = DAS::Options(
169  "Normalise the data samples to the luminosity. Prescaled events may either "
170  "be normalised to the respective trigger luminosities or using trigger precales.\n"
171  "Existing strategies:\n"
172  " - 'pt': assume that the jets are sorted in pt and try to match the leading jet"
173  " - 'eta': sort the jets in eta and try to match the most fwd and second most fwd",
175  options.inputs("inputs", &inputs, "input ROOT file(s) or directory")
176  .output("output", &output, "output ROOT file")
177  .arg<fs::path>("luminosities" , "corrections.normalisation.luminosities" , "2-column file with luminosity per trigger" )
178  .arg<fs::path>("uncertainties", "corrections.normalisation.uncertainties", "luminosity uncertaintiy (including correlations)")
179  .arg<fs::path>("turnons" , "corrections.normalisation.turnons" , "2-column file with turn-on per trigger" )
180  .arg<fs::path>("efficiencies" , "corrections.normalisation.efficiencies" , "output ROOT file of `getTriggerTurnons`" )
181  .arg<string>("strategy", "corrections.normalisation.strategy", "'eta' or 'pt'" )
182  .arg<string>("method" , "corrections.normalisation.method" , "'prescales' or 'lumi'");
183 
184  const auto& config = options(argc, argv);
185  const auto& slice = options.slice();
186  const int steering = options.steering();
187 
188  DAS::Normalisation::applyDataNormalisation(inputs, output, config, steering, slice);
189  }
190  catch (boost::exception& e) {
191  DE::Diagnostic(e);
192  return EXIT_FAILURE;
193  }
194 
195  return EXIT_SUCCESS;
196 }
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
DAS::Normalisation::applyDataNormalisation
void applyDataNormalisation(const vector< fs::path > &inputs, const fs::path &output, const pt::ptree &config, const int steering, const DT::Slice slice={1, 0})
Definition: applyDataNormalisation.cc:44
Darwin::Exceptions::Diagnostic
void Diagnostic(const boost::exception &e)
Definition: exceptions.h:131
Darwin::Tools::Friend
@ Friend
activate -F to only fill the new branches
Definition: Options.h:28
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
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