DAS  3.0
Das Analysis System
applyPhotonID.cc File Reference
#include <cstdlib>
#include <filesystem>
#include <iostream>
#include <vector>
#include "Core/Objects/interface/Event.h"
#include "Core/Objects/interface/Photon.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 <darwin.h>
+ Include dependency graph for applyPhotonID.cc:

Classes

class  IDApplier
 

Namespaces

 DAS
 
 DAS::Photon
 

Functions

void applyPhotonID (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[] 
)
142 {
143  try {
145 
146  vector<fs::path> inputs;
147  fs::path output;
148 
149  auto options = DAS::Options(
150  "Selects photons passing the ID criteria. Also "
151  "requires them not to fall in the EE-EB "
152  "transition region.",
154  options.inputs("inputs", &inputs, "input ROOT file(s) or directory")
155  .output("output", &output, "output ROOT file")
156  .arg<string>("WP", "corrections.photons.ID.WP",
157  "The photon ID to use (Loose/Medium/Tight/MVA80/MVA90)")
158  .arg<fs::path>("table", "corrections.photons.ID.table",
159  "The file from which ID scale factors are taken "
160  "(or /dev/null for no correction)");
161 
162  const auto& config = options(argc, argv);
163  const auto& slice = options.slice();
164  const int steering = options.steering();
165 
166  DAS::Photon::applyPhotonID(inputs, output, config, steering, slice);
167  }
168  catch (boost::exception& e) {
169  DE::Diagnostic(e);
170  return EXIT_FAILURE;
171  }
172 
173  return EXIT_SUCCESS;
174 }
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::Options
Darwin::Tools::Options Options(const char *, int=Darwin::Tools::none)
Constructs Darwin options with the correct commit information.
Definition: DASOptions.cc:14
DAS::Photon::applyPhotonID
void applyPhotonID(const vector< fs::path > &inputs, const fs::path &output, const pt::ptree &config, const int steering, const DT::Slice slice={1, 0})
Definition: applyPhotonID.cc:96