DAS  3.0
Das Analysis System
getSumWeights.cc File Reference
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <TChain.h>
#include <TFile.h>
#include <TH1.h>
#include "Core/CommonTools/interface/DASOptions.h"
#include "Core/Objects/interface/Event.h"
#include <darwin.h>
+ Include dependency graph for getSumWeights.cc:

Namespaces

 DAS
 
 DAS::Normalisation
 

Enumerations

enum  { WEIGHT = 0b001, SIGN = 0b010, CUTOFF = 0b100 }
 

Functions

void getSumWeights (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[] 
)
141 {
142  try {
144 
145  vector<fs::path> inputs;
146  fs::path output;
147 
148  auto options = DAS::Options("Get the sum of the weights.", DT::split | DT::config);
149  options.inputs("inputs", &inputs, "input ROOT file(s) or directory")
150  .output("output", &output, "output ROOT file")
151  .arg<string>("mode", "corrections.weights.mode",
152  "apply generator weight (`weight`), apply sign only (`signOnly`), "
153  "just count the number of events (`count`)")
154  .arg<float>("maxAbsValue", "corrections.weights.maxAbsValue",
155  "Maximum absolute weight to consider (0 to run without cut)");
156 
157  const auto& config = options(argc, argv);
158  const auto& slice = options.slice();
159  const int steering = options.steering();
160 
161  DAS::Normalisation::getSumWeights(inputs, output, config, steering, slice);
162  }
163  catch (boost::exception& e) {
164  DE::Diagnostic(e);
165  return EXIT_FAILURE;
166  }
167 
168  return EXIT_SUCCESS;
169 }
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
DAS::Normalisation::getSumWeights
void getSumWeights(const vector< fs::path > &inputs, const fs::path &output, const pt::ptree &config, const int steering, const DT::Slice slice={1, 0})
Definition: getSumWeights.cc:41
Darwin::Tools::split
@ split
activate -k and -j to define slice
Definition: Options.h:26
Darwin::Tools::StandardInit
void StandardInit()
Definition: FileUtils.cc:25
Ntupliser_cfg.config
config
Definition: Ntupliser_cfg.py:260
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