DAS  3.0
Das Analysis System
applyBTagSF.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 <TFile.h>
#include <TH3.h>
#include "Math/VectorUtil.h"
#include <darwin.h>
#include "Core/BTagging/interface/BTagCalibration.h"
+ Include dependency graph for applyBTagSF.cc:

Classes

struct  JetWeight
 

Namespaces

 DAS
 
 DAS::BTagging
 

Functions

void applyBTagSF (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[] 
)
169 {
170  try {
172 
173  vector<fs::path> inputs;
174  fs::path output;
175 
176  auto options = DAS::Options(
177  "Apply the multi-WP calibration with fixed-WP SFs "
178  "tables to B-tagged jets.",
180  options.inputs("inputs", &inputs, "input ROOT file(s) or directory")
181  .output("output", &output, "output ROOT file")
182  .arg<fs::path>("discriminant", "corrections.btagging.discriminant",
183  "location of binned discriminant obtained with "
184  "`getBTagBinnedDiscriminant`")
185  .arg<fs::path>("SFtables", "corrections.btagging.SFtables",
186  "location of fix-WP SF tables from BTV");
187  const auto& config = options(argc, argv);
188  const auto& slice = options.slice();
189  const int steering = options.steering();
190 
191  DAS::BTagging::applyBTagSF(inputs, output, config, steering, slice);
192  }
193  catch (boost::exception& e) {
194  DE::Diagnostic(e);
195  return EXIT_FAILURE;
196  }
197 
198  return EXIT_SUCCESS;
199 }
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
DAS::BTagging::applyBTagSF
void applyBTagSF(const vector< fs::path > &inputs, const fs::path &output, const pt::ptree &config, const int steering, const DT::Slice slice={1, 0})
Apply the multi-WP calibration with fix-WPs tables.
Definition: applyBTagSF.cc:116
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