DAS  3.0
Das Analysis System
applyPUprofCorrection.cc File Reference
#include <cstdlib>
#include <filesystem>
#include <iostream>
#include <vector>
#include "Core/Objects/interface/Event.h"
#include "Core/Objects/interface/Jet.h"
#include "Core/CommonTools/interface/binnings.h"
#include "Core/CommonTools/interface/DASOptions.h"
#include <TString.h>
#include <TFile.h>
#include <TH2.h>
#include "Core/CommonTools/interface/ControlPlots.h"
#include "PUcorrection.h"
#include <darwin.h>
+ Include dependency graph for applyPUprofCorrection.cc:

Namespaces

 DAS
 
 DAS::PUprofile
 

Functions

void applyPUprofCorrection (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[] 
)
173 {
174  try {
176 
177  vector<fs::path> inputs;
178  fs::path output;
179 
180  auto options = DAS::Options(
181  "Correct PU profile (independently to the trigger).",
183  options.inputs("inputs", &inputs, "input ROOT file(s) or directory")
184  .output("output", &output, "output ROOT file")
185  .arg<fs::path>("MC", "corrections.PUprofile.MC", "profile obtained with `getPUprofile`")
186  .arg<fs::path>("Data", "corrections.PUprofile.Data", "profile obtained with `getPUprofile`")
187  .arg<float>("maxWeight", "corrections.PUprofile.maxWeight", "highest allowed value for the weight");
188 
189  const auto& config = options(argc, argv);
190  const auto& slice = options.slice();
191  const int steering = options.steering();
192 
193  DAS::PUprofile::applyPUprofCorrection(inputs, output, config, steering, slice);
194  }
195  catch (boost::exception& e) {
196  DE::Diagnostic(e);
197  return EXIT_FAILURE;
198  }
199 
200  return EXIT_SUCCESS;
201 }
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
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
DAS::PUprofile::applyPUprofCorrection
void applyPUprofCorrection(const vector< fs::path > inputs, const fs::path output, const pt::ptree &config, const int steering, const DT::Slice slice={1, 0})
Apply the PU profile reweighting to the simulation.
Definition: applyPUprofCorrection.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