ThinSliceDriver.cxx
Go to the documentation of this file.
1 #include "ThinSliceDriver.h"
2 
3 #include "THStack.h"
4 #include "TCanvas.h"
5 
7  const fhicl::ParameterSet & extra_options)
8  : fExtraOptions(extra_options) {}
9 
11 
13  std::map<int, std::vector<std::vector<ThinSliceSample>>> & samples,
14  ThinSliceDataSet & data_set, TFile & output_file,
15  std::vector<std::pair<int, int>> plot_style,
16  int nPars,
17  TDirectory * plot_dir,
18  bool plot_rebinned,
19  bool post_fit) {
20 
21  for (auto it = samples.begin(); it != samples.end(); ++it) {
22  std::vector<ThinSliceSample> & vec = it->second[0];
23  for (size_t i = 0; i < vec.size(); ++i) {
24  vec[i].RefillRebinnedHists();
25 
26  }
27 
28  for (size_t i = 1; i < it->second.size(); ++i) {
29  std::vector<ThinSliceSample> & vec = it->second[i];
30  for (size_t j = 0; j < vec.size(); ++j) {
31  vec[j].RefillRebinnedHists();
32  }
33  }
34  }
35 
37  samples, data_set, output_file, plot_style, plot_rebinned,
38  post_fit, nPars, plot_dir);
39 }
40 
41 
43  size_t i,
44  const std::vector<std::pair<int, int>> & plot_style) {
45  return {plot_style.at(i % plot_style.size()).first,
46  (i < plot_style.size() ? 1001: 3244)};
47 }
std::pair< int, int > GetColorAndStyle(size_t i, const std::vector< std::pair< int, int >> &plot_style)
void CompareDataMC(std::map< int, std::vector< std::vector< ThinSliceSample >>> &samples, ThinSliceDataSet &data_set, TFile &output_file, std::vector< std::pair< int, int >> plot_style, int nPars, TDirectory *plot_dir, bool plot_rebinned=false, bool post_fit=false)
virtual void CompareSelections(std::map< int, std::vector< std::vector< ThinSliceSample >>> &samples, ThinSliceDataSet &data_set, TFile &output_file, std::vector< std::pair< int, int >> plot_style, bool plot_rebinned, bool post_fit, int nPars, TDirectory *plot_dir)=0
struct vector vector
ThinSliceDriver(const fhicl::ParameterSet &extra_options)