DAS  3.0
Das Analysis System
applyJEScorrections.cc File Reference
#include <cstdlib>
#include <iostream>
#include <memory>
#include <string>
#include <TChain.h>
#include <TFile.h>
#include <TH2.h>
#include "Core/Objects/interface/Event.h"
#include "Core/Objects/interface/Format.h"
#include "Core/Objects/interface/Jet.h"
#include "Core/CommonTools/interface/ControlPlots.h"
#include "Core/CommonTools/interface/DASOptions.h"
#include "Core/CommonTools/interface/toolbox.h"
#include <correction.h>
#include <darwin.h>
#include "common.h"
+ Include dependency graph for applyJEScorrections.cc:

Namespaces

 DAS
 
 DAS::JetEnergy
 

Functions

void applyJEScorrections (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[] 
)
164 {
165  try {
167 
168  vector<fs::path> inputs;
169  fs::path output;
170 
171  auto options = DAS::Options(
172  "Apply jet energy scale corrections. The correction factors "
173  "are stored in a dedicated vector in the reconstructed jets. "
174  "Note: systematic uncertainties should be applied either "
175  "to the data samples or to the MC samples, but not to both.",
177  options.inputs("inputs", &inputs, "input ROOT file(s) or directory")
178  .output("output", &output, "output ROOT file")
179  .arg<fs::path>("tables", "corrections.JES.tables",
180  "JSON file containing the corrections")
181  .arg<string>("campaign", "corrections.JES.campaign",
182  "campaign (e.g. `Summer19UL18_RunA`)");
183 
184  const auto& config = options(argc, argv);
185  const auto& slice = options.slice();
186  const int steering = options.steering();
187 
188  DAS::JetEnergy::applyJEScorrections(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
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::JetEnergy::applyJEScorrections
void applyJEScorrections(const vector< fs::path > inputs, const fs::path output, const pt::ptree &config, const int steering, const DT::Slice slice={1, 0})
Definition: applyJEScorrections.cc:37
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