DAS  3.0
Das Analysis System
MakeResponseHistos.h
Go to the documentation of this file.
1 #include <algorithm>
2 #include <cstdlib>
3 #include <functional>
4 
7 
10 
11 #include <TString.h>
12 #include <TH3.h>
13 
14 using namespace std;
15 
16 namespace DAS::Normalisation {
17 
20 unique_ptr<TH3> makeRespHist (TString name,
21  TString study)
22 {
23  using namespace DAS::JetEnergy;
24 
25  static int nResBins = 200;
26  static auto resBins = getBinning(nResBins, 0, 2);
27  unique_ptr<TH3D> h;
28  if (study == "HLT"){
29  // Filling in bins of ptHLT and eta
30  static const char * axistitles = ";p_{T}^{HLT};|#eta^{rec}|;#frac{p_{T}^{rec}}{p_{T}^{HLT bin low edge}}";
31  static const vector<double> HLT_binning = {40., 60., 80., 140., 200., 260., 320., 400., 450., 500.};
32  static int nHLTbins = HLT_binning.size()-1;
33  h = make_unique<TH3D>(name, axistitles,
34  nHLTbins, HLT_binning.data(),
35  nYbins, y_edges.data(),
36  nResBins, resBins.data());
37  }
38  else if (study == "JER"){
39  // Filling in bins of ptgen results in better conditioned response distributions
40  // Pure rec level weight is used
41  static const char * axistitles = ";p_{T}^{gen};|#eta^{rec}|;#frac{p_{T}^{rec}}{p_{T}^{gen}}";
42  h = make_unique<TH3D>(name, axistitles,
43  nPtJERCbins, pt_JERC_edges.data(),
44  nAbsEtaBins, abseta_edges.data(),
45  nResBins, resBins.data());
46  }
47 
48  h->SetDirectory(nullptr);
49  return h;
50 }
51 
52 } // end of DAS::Normalisation namespace
DYToLL_M-50_13TeV_pythia8_cff_GEN_SIM_RECOBEFMIX_DIGI_L1_DIGI2RAW_L1Reco_RECO.name
name
Definition: DYToLL_M-50_13TeV_pythia8_cff_GEN_SIM_RECOBEFMIX_DIGI_L1_DIGI2RAW_L1Reco_RECO.py:48
DAS::y_edges
static const std::vector< double > y_edges
Definition: binnings.h:36
DAS::JetEnergy::pt_JERC_edges
static const std::vector< double > pt_JERC_edges
Definition: common.h:17
Event.h
DAS::JetEnergy::getBinning
std::vector< double > getBinning(int nBins, float first, float last)
Definition: common.h:53
Jet.h
DAS::Normalisation::makeRespHist
unique_ptr< TH3 > makeRespHist(TString name, TString study)
Create TH3 histograms for the Jet response and HLT response.
Definition: MakeResponseHistos.h:20
binnings.h
DAS::JetEnergy::abseta_edges
static const std::vector< double > abseta_edges
JERC binning (taken from JERCProtoLab repo, /macros/common_info/common_binning.hpp)
Definition: common.h:22
toolbox.h
DAS::Normalisation
Definition: getHLTJetResponse.cc:34
DAS::JetEnergy::nPtJERCbins
static const int nPtJERCbins
Definition: common.h:18
DAS::JetEnergy
Definition: applyJERsmearing.cc:41
DAS::nYbins
static const int nYbins
Definition: binnings.h:38
DAS::JetEnergy::nAbsEtaBins
static const int nAbsEtaBins
Definition: common.h:23