DAS  3.0
Das Analysis System
applyJERsmearing.cc File Reference
#include <cassert>
#include <cstdlib>
#include <algorithm>
#include <functional>
#include <filesystem>
#include <iostream>
#include <limits>
#include <random>
#include <vector>
#include <TChain.h>
#include <TDirectory.h>
#include <TH2.h>
#include <TFile.h>
#include "Core/CommonTools/interface/DASOptions.h"
#include "Core/CommonTools/interface/toolbox.h"
#include "Core/CommonTools/interface/ControlPlots.h"
#include "Core/Objects/interface/Event.h"
#include "Core/Objects/interface/Format.h"
#include "Core/Objects/interface/Jet.h"
#include "Core/JEC/interface/JMEmatching.h"
#include <correction.h>
#include <darwin.h>
#include "common.h"
+ Include dependency graph for applyJERsmearing.cc:

Namespaces

 DAS
 
 DAS::JetEnergy
 

Functions

void applyJERsmearing (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[] 
)
236 {
237  try {
239 
240  vector<fs::path> inputs;
241  fs::path output;
242 
243  auto options = DAS::Options(
244  "Apply jet energy smearing correction. In practice, the correction factors "
245  "are stored in a dedicated vector in the reconstructed jets. To apply the "
246  "pure stochastic (scaling) smearing, use a null (infinite) core size; hybrid "
247  "smearing (scaling in core and stochastic in tails) is recommended. Note: JME "
248  "recommends 3 sigmas, but Run 2 studies suggest not more than 2 sigmas.",
250  options.inputs("inputs", &inputs, "input ROOT file(s) or directory")
251  .output("output", &output, "output ROOT file")
252  .arg<fs::path>("tables", "corrections.JER.tables",
253  "JSON file containing the corrections")
254  .arg<string>("campaign", "corrections.JER.campaign",
255  "campaign (e.g. `Summer19UL18_RunA`)")
256  .arg<float>("core_width", "corrections.JER.core_width",
257  "width of the Gaussian core in units of sigma "
258  "(for the matching algorithm)");
259 
260  const auto& config = options(argc, argv);
261  const auto& slice = options.slice();
262  const int steering = options.steering();
263 
264  DAS::JetEnergy::applyJERsmearing(inputs, output, config, steering, slice);
265  }
266  catch (boost::exception& e) {
267  DE::Diagnostic(e);
268  return EXIT_FAILURE;
269  }
270 
271  return EXIT_SUCCESS;
272 }
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
DAS::JetEnergy::applyJERsmearing
void applyJERsmearing(const vector< fs::path > &inputs, const fs::path &output, const pt::ptree &config, const int steering, const DT::Slice slice={1, 0})
Definition: applyJERsmearing.cc:47
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: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