DAS  3.0
Das Analysis System
fitJetResponse.cc File Reference
#include <cmath>
#include <cassert>
#include <iostream>
#include <map>
#include <filesystem>
#include <TString.h>
#include <TFile.h>
#include <TH1.h>
#include <TH2.h>
#include <TH3.h>
#include <TF1.h>
#include <TKey.h>
#include "Core/CommonTools/interface/DASOptions.h"
#include "Core/JEC/interface/resolution.h"
#include "Core/JEC/interface/DoubleCrystalBall.h"
#include "common.h"
#include "fit.h"
#include <darwin.h>
+ Include dependency graph for fitJetResponse.cc:

Classes

struct  ResponseFit
 

Namespaces

 DAS
 
 DAS::JetEnergy
 

Functions

vector< double > GetMergedBinning (TH1 *h, const int threshold=30)
 
pair< float, float > findDLogExtrema (const unique_ptr< TH1 > &DLog, const double mu, const pair< float, float > Range)
 
double round_to (double value, double precision=1.0)
 
TH1 * CumulativeResponse (TH1 *res1D)
 
void FitResponseByBin (TDirectory *dir, unique_ptr< TH2 > res2D, const int steering)
 
void loopDirsFromGetResponse (TDirectory *dIn, TDirectory *dOut, const int steering, const DT::Slice slice)
 
void fitJetResponse (const fs::path &input, 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[] 
)
533 {
534  try {
536 
537  fs::path input, output;
538 
539  auto options = DAS::Options(
540  "Fit jet response in bins of pt and eta. Any 3D histograms "
541  "with axes following the same convention will be parsed in "
542  "the identical way.",
543  DT::split);
544  options.input ("input" , &input , "input ROOT file (from `getJetResponse`)")
545  .output("output", &output, "output ROOT file");
546 
547  const auto& config = options(argc, argv);
548  const auto& slice = options.slice();
549  const int steering = options.steering();
550 
551  DAS::JetEnergy::fitJetResponse(input, output, config, steering, slice);
552  }
553  catch (boost::exception& e) {
554  DE::Diagnostic(e);
555  return EXIT_FAILURE;
556  }
557  return EXIT_SUCCESS;
558 }
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
DAS::JetEnergy::fitJetResponse
void fitJetResponse(const fs::path &input, const fs::path &output, const pt::ptree &config, const int steering, const DT::Slice slice={1, 0})
Fit response distributions from getJetResponse
Definition: fitJetResponse.cc:513
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
Darwin::Tools::StandardInit
void StandardInit()
Definition: FileUtils.cc:29
Ntupliser_cfg.config
config
Definition: Ntupliser_cfg.py:264
DYToLL_M-50_13TeV_pythia8_cff_GEN_SIM_RECOBEFMIX_DIGI_L1_DIGI2RAW_L1Reco_RECO.input
input
Definition: DYToLL_M-50_13TeV_pythia8_cff_GEN_SIM_RECOBEFMIX_DIGI_L1_DIGI2RAW_L1Reco_RECO.py:35
DAS::Options
Darwin::Tools::Options Options(const char *, int=Darwin::Tools::none)
Constructs Darwin options with the correct commit information.
Definition: DASOptions.cc:14