DAS  3.0
Das Analysis System
applyZeroBiasNormalisation.cc File Reference
#include <cstdlib>
#include <cassert>
#include <iostream>
#include <vector>
#include <filesystem>
#include "Core/Objects/interface/Jet.h"
#include "Core/Objects/interface/Event.h"
#include "Core/CommonTools/interface/binnings.h"
#include "Core/CommonTools/interface/DASOptions.h"
#include "Core/CommonTools/interface/toolbox.h"
#include "Core/Normalisation/interface/PhaseSelection.h"
#include <TString.h>
#include <TFile.h>
#include <TH1.h>
#include "Math/VectorUtil.h"
#include <darwin.h>
+ Include dependency graph for applyZeroBiasNormalisation.cc:

Namespaces

 DAS
 

Functions

void applyZeroBiasNormalisation (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[] 
)
119 {
120  try {
122 
123  vector<fs::path> inputs;
124  fs::path output;
125 
126  auto options = DAS::Options(
127  "Normalise the ZeroBias samples to the luminosity.\n"
128  "Existing method:\n"
129  "- 'prescales': Reweight the events by its prescale per LS\n"
130  "Input lumi: Total lumi of whole Dataset\n"
131  "- 'lumi': Reweight the events by trigger luminosity\n"
132  "Input lumi: effictive lumi",
134  options.inputs("inputs", &inputs, "input ROOT file(s) or directory")
135  .output("output", &output, "output ROOT file")
136  .arg<float>("lumi", "corrections.normalisation.total_lumi", "lumi in /pb")
137  .arg<int>("maxpt", "corrections.normalisation.maxpt", "max pt to be covered by ZeroBias trigger")
138  .arg<string>("method" , "corrections.normalisation.method" , "'prescales' or 'lumi'");
139  const auto& config = options(argc, argv);
140  const auto& slice = options.slice();
141  const int steering = options.steering();
142 
143  DAS::applyZeroBiasNormalisation(inputs, output, config, steering, slice);
144  }
145  catch (boost::exception& e) {
146  DE::Diagnostic(e);
147  return EXIT_FAILURE;
148  }
149 
150  return EXIT_SUCCESS;
151 }
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::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
DAS::applyZeroBiasNormalisation
void applyZeroBiasNormalisation(const vector< fs::path > &inputs, const fs::path &output, const pt::ptree &config, const int steering, const DT::Slice slice={1, 0})
Definition: applyZeroBiasNormalisation.cc:41
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