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

Namespaces

 DAS
 
 DAS::TPS
 

Enumerations

enum  RemovalStrategy { DeltaR, AntikT, None }
 

Functions

void CheckConsistency (DT::MetaInfo &metainfo1, TTree *tIn1, DT::MetaInfo &metainfo2, TTree *tIn2)
 
RemovalStrategy parseStrategy (const std::string &strategyStr, TTree *tree)
 
template<class Jet >
vector< fjcore::PseudoJet > cluster (const vector< Jet > &jets, const double R)
 
template<class Jet >
bool overlappingJets (const vector< Jet > &jets)
 
void applyEventMixing (const vector< fs::path > &inputs1, const vector< fs::path > &inputs2, 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[] 
)
242 {
243  try {
245 
246  vector<fs::path> inputs1;
247  vector<fs::path> inputs2;
248  fs::path output;
249 
250  auto options = DAS::Options(
251  "Mix the jet collections of two events into one jet collection in one events."
252  "Event weights are multiplied according to the DPS pocket formula (modulo the "
253  "combinatorial prefactor and the sigma effective constant). Extra information "
254  "is untouched and should be handled by the user.\n"
255  "Overlapping jets can be treated by three different ways:\n"
256  " - DeltaR: drop events when facing azimuthally overlapping jets\n"
257  " - antikt: drop events when the jet multiplicity changes before and after clustering the jets with the anti-kt algorithm.\n"
258  " - none: do nothing\n",
260  options.inputs("inputs1", &inputs1, "input ROOT file(s) or directory")
261  .inputs("inputs2", &inputs2, "input ROOT file(s) or directory")
262  .output("output", &output, "output ROOT file")
263  .arg<string>("RemovalStrategy", "corrections.event_mixing.overlap", "'deltaR' or 'antikt' or 'none'");
264  const auto& config = options(argc, argv);
265  const auto& slice = options.slice();
266  const int steering = options.steering();
267 
268  DAS::TPS::applyEventMixing(inputs1, inputs2, output, config, steering, slice);
269  }
270  catch (boost::exception& e) {
271  DE::Diagnostic(e);
272  return EXIT_FAILURE;
273  }
274 
275  return EXIT_SUCCESS;
276 }
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:131
Darwin::Tools::split
@ split
activate -k and -j to define slice
Definition: Options.h:26
DAS::TPS::applyEventMixing
void applyEventMixing(const vector< fs::path > &inputs1, const vector< fs::path > &inputs2, const fs::path &output, const pt::ptree &config, const int steering, const DT::Slice slice={1, 0})
Definition: applyEventMixing.cc:121
Darwin::Tools::StandardInit
void StandardInit()
Definition: FileUtils.cc:70
Ntupliser_cfg.config
config
Definition: Ntupliser_cfg.py:317
DAS::Options
Darwin::Tools::Options Options(const char *, int=Darwin::Tools::none)
Constructs Darwin options with the correct commit information.
Definition: DASOptions.cc:14