DAS  3.0
Das Analysis System
applyMuonSelection.cc File Reference
#include <cassert>
#include <cstdlib>
#include <filesystem>
#include <iostream>
#include <vector>
#include "Core/Objects/interface/Event.h"
#include "Core/Objects/interface/Lepton.h"
#include "Core/CommonTools/interface/binnings.h"
#include "Core/CommonTools/interface/DASOptions.h"
#include "Core/CommonTools/interface/GenericSFApplier.h"
#include "Core/CommonTools/interface/toolbox.h"
#include <TFile.h>
#include <TH2.h>
#include <TRegexp.h>
#include <TString.h>
#include "Math/VectorUtil.h"
#include <darwin.h>
#include "Core/Muons/interface/toolbox.h"
+ Include dependency graph for applyMuonSelection.cc:

Classes

class  IDApplier
 

Namespaces

 DAS
 
 DAS::Muon
 

Enumerations

enum  Selector {
  None = 0u, CutBasedIdLoose = 1u<< 0, CutBasedIdMedium = 1u<< 1, CutBasedIdMediumPrompt = 1u<< 2,
  CutBasedIdTight = 1u<< 3, CutBasedIdGlobalHighPt = 1u<< 4, CutBasedIdTrkHighPt = 1u<< 5, PFIsoVeryLoose = 1u<< 6,
  PFIsoLoose = 1u<< 7, PFIsoMedium = 1u<< 8, PFIsoTight = 1u<< 9, PFIsoVeryTight = 1u<<10,
  TkIsoLoose = 1u<<11, TkIsoTight = 1u<<12, SoftCutBasedId = 1u<<13, SoftMvaId = 1u<<14,
  MvaLoose = 1u<<15, MvaMedium = 1u<<16, MvaTight = 1u<<17, MiniIsoLoose = 1u<<18,
  MiniIsoMedium = 1u<<19, MiniIsoTight = 1u<<20, MiniIsoVeryTight = 1u<<21
}
 

Functions

void applyMuonSelection (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[] 
)
284 {
285  try {
287 
288  vector<fs::path> inputs;
289  fs::path output;
290 
291  auto options = DAS::Options(
292  "Apply muon scale factors (and corresponding selection) "
293  "for reconstruction, identification, and isolation. The command "
294  "should be called for each correction (a priori 3 times). "
295  "You may also run the selection only if you provide the histname.",
297  options.inputs("inputs", &inputs, "input ROOT file(s) or directory")
298  .output("output", &output, "output ROOT file")
299  .arg<string>("efficiency", "corrections.muons.efficiency",
300  "`/path/to/file.root:histname` "
301  "(`/dev/null` for the filename to only apply selection)");
302  const auto& config = options(argc, argv);
303  const auto& slice = options.slice();
304  const int steering = options.steering();
305 
306  DAS::Muon::applyMuonSelection(inputs, output, config, steering, slice);
307  }
308  catch (boost::exception& e) {
309  DE::Diagnostic(e);
310  return EXIT_FAILURE;
311  }
312 
313  return EXIT_SUCCESS;
314 }
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
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::Muon::applyMuonSelection
void applyMuonSelection(const vector< fs::path > &inputs, const fs::path &output, const pt::ptree &config, const int steering, const DT::Slice slice={1, 0})
Definition: applyMuonSelection.cc:213
DAS::Options
Darwin::Tools::Options Options(const char *, int=Darwin::Tools::none)
Constructs Darwin options with the correct commit information.
Definition: DASOptions.cc:14