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 <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
 

Functions

void CheckConsistency (DT::MetaInfo &metainfo1, TTree *tIn1, DT::MetaInfo &metainfo2, TTree *tIn2)
 
template<class Jet >
bool overlappingJets (const vector< Jet > &jets1, const vector< Jet > &jets2)
 
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[] 
)
157 {
158  try {
160 
161  vector<fs::path> inputs1;
162  vector<fs::path> inputs2;
163  fs::path output;
164 
165  auto options = DAS::Options(
166  "Mix the jet collections of two events into one jet collection in one events."
167  "Event weights are multiplied according to the DPS pocket formula (modulo the "
168  "combinatorial prefactor and the sigma effective constant). Extra information "
169  "is untouched and should be handled by the user. "
170  "Overlapping jets are properly treated.",
172  options.inputs("inputs1", &inputs1, "input ROOT file(s) or directory")
173  .inputs("inputs2", &inputs2, "input ROOT file(s) or directory")
174  .output("output", &output, "output ROOT file");
175  const auto& config = options(argc, argv);
176  const auto& slice = options.slice();
177  const int steering = options.steering();
178 
179  DAS::TPS::applyEventMixing(inputs1, inputs2, output, config, steering, slice);
180  }
181  catch (boost::exception& e) {
182  DE::Diagnostic(e);
183  return EXIT_FAILURE;
184  }
185 
186  return EXIT_SUCCESS;
187 }
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:88
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